/* Reset & Base Styles - Filament Style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Filament Colors */
    --primary-50: #FFF4ED;
    --primary-100: #FFE5D1;
    --primary-200: #FFC8A3;
    --primary-300: #FFA26A;
    --primary-400: #FF732F;
    --primary-500: #FF5500;
    --primary-600: #E63E00;
    --primary-700: #C02E00;
    --primary-800: #992500;
    --primary-900: #7D1F00;

    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --gray-950: #030712;

    --success: #10B981;
    --success-light: #D1FAE5;
    --error: #EF4444;
    --error-light: #FEE2E2;
    --info: #FF5500;
    --info-light: #faddce;

    /* Typography */
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 0.75rem;
    --transition: all 0.2s ease;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    color: var(--gray-900);
    line-height: 1.5;
    background: var(--gray-50);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none !important;
}

/* Container */
.container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* Main Content */
.main-content {
    width: 100%;
    max-width: 28rem;
}

/* Form Container - Filament Card Style */
.form-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    border: 1px solid var(--gray-200);
}

/* Logo Header */
.logo-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-img {
    height: 3rem;
    width: auto;
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.form-header p {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 400;
}

/* Info Box */
.info-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--info-light);
    border: 1px solid var(--info);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.info-box svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--info);
    flex-shrink: 0;
}

/* Messages */
.message {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease;
}

.success-badge {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: min(90vw, 28rem);
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--success);
    background: var(--success-light);
    color: #065F46;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

.success-badge svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: var(--success);
}

.success-badge span {
    font-size: 0.8125rem;
    font-weight: 600;
}

.opacity-reduced {
    opacity: 0.4;
    pointer-events: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.message h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.message p {
    font-size: 0.875rem;
    margin: 0;
}

.success-message {
    background: var(--success-light);
    border: 1px solid var(--success);
    color: #065F46;
}

.success-message svg {
    color: var(--success);
}

.error-message {
    background: var(--error-light);
    border: 1px solid var(--error);
    color: #991B1B;
}

.error-message svg {
    color: var(--error);
}

.link-btn {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
}

.link-btn:hover {
    color: var(--primary-700);
}

/* Form */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-group input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--gray-300);
    border-radius: 0.6rem;
    font-size: 0.875rem;
    font-family: var(--font-family);
    color: var(--gray-900);
    transition: var(--transition);
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-500);
    border: 2px solid  var(--primary-500);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.form-group input.error {
    border-color: var(--error);
}

.form-group input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.help-text {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: -0.25rem;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 2.75rem;
}

.toggle-password {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: var(--transition);
    border-radius: 0.375rem;
}

.toggle-password:hover {
    color: var(--gray-600);
    background: var(--gray-100);
}

.toggle-password svg {
    width: 1.125rem;
    height: 1.125rem;
}

/* Button - Filament Style */
.btn {
    width: 100%;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-500);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-600);
    box-shadow: var(--shadow-md);
}

.btn-primary:active:not(:disabled) {
    background: var(--primary-700);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-loader {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Spinners */
.spinner,
.spinner-small {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner {
    width: 2rem;
    height: 2rem;
}

.spinner-small {
    width: 1rem;
    height: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Form Footer */
.form-footer {
    margin-top: 1rem;
    text-align: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-600);
}

.back-link svg {
    width: 1rem;
    height: 1rem;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    .form-container {
        padding: 1.5rem;
    }

    .logo-img {
        height: 2.5rem;
    }

    .form-header h1 {
        font-size: 1.25rem;
    }
}

@media (max-width: 380px) {
    .form-container {
        padding: 1.25rem;
    }

    .form-header h1 {
        font-size: 1.125rem;
    }
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Smooth transitions */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

button,
input,
textarea,
select {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, box-shadow;
}
