:root {
    --color-primary: #006DCA;
    --color-primary-dark: #0052A3;
    --color-accent: #FF9A00;
    --color-bg: #F4F7FA;
    --color-card: #FFFFFF;
    --color-instruction-bg: #EAF3FF;
    --text-dark: #0B2540;
    --muted: #6B7280;
    --radius-lg: 16px;
    --radius-md: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--color-bg);
    color: var(--text-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', 'Inter', system-ui, sans-serif;
}

h1 {
    font-size: 32px;
    font-weight: 600;
}

h2 {
    font-size: 20px;
    font-weight: 700;
}

label {
    font-size: 14px;
    font-weight: 500;
}

input {
    font-size: 16px;
}

p,
li {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
}

/* Layout */
.auth-hero {
    min-height: 100vh;
    position: relative;
    background-size: cover;
    background-position: center;
}

.auth-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 80, 160, 0.55),
            rgba(0, 80, 160, 0.35));
    backdrop-filter: saturate(1.1);
    z-index: 1;
}


.auth-content {
    position: relative;
    z-index: 10;
}

/* Logo */
.logo-container {
    display: flex;
    justify-content: center;
    padding: 2rem 0 3rem;
}

.logo-box {
    padding: 14px 22px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.25);
    animation: logoFadeUp 0.6s ease-out both;
}

@keyframes logoFadeUp {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-box img {
    height: 64px;
    width: auto;
    filter:
        drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 10px rgba(255, 255, 255, 0.35));
}

/* Auth Card */
.auth-card-wrapper {
    padding: 0 1rem 2rem;
}

.auth-card {
    max-width: 900px;
    margin: 0 auto;
    background: var(--color-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(11, 37, 64, 0.08);
}

.auth-card.login-card {
    max-width: 480px;
}

/* Grid Layout for Signup */
.signup-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Instructions */
.instruction-toggle {
    display: block;
    width: 100%;
    background: linear-gradient(180deg, #007bd6, #005fbc);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.instruction-toggle h2 {
    margin: 0;
    color: white;
}

.instruction-toggle svg {
    width: 20px;
    height: 20px;
}

.instruction-box {
    background: linear-gradient(180deg, #007bd6, #005fbc);
    color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
}

.instruction-box h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: white;
    display: none;
}

.instruction-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instruction-box li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: white;
}

.instruction-box li.highlight {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 2px solid var(--color-accent);
    font-weight: 600;
}

.instruction-box li svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.instruction-box li:last-child {
    margin-bottom: 0;
}

.instruction-content.collapsed {
    display: none;
}

/* Form Elements */
.page-title {
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-group label .required {
    color: #EF4444;
}

.input-wrapper {
    position: relative;
}

.form-group input {
    width: 100%;
    height: 48px;
    padding: 0 1rem;
    border-radius: 0.5rem;
    border: 1px solid #E6EEF6;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group input.error {
    border-color: #EF4444;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    padding: 4px;
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    color: var(--text-dark);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.error-message {
    color: #EF4444;
    font-size: 13px;
    margin-top: 0.25rem;
}

.forgot-password {
    text-align: right;
    margin-bottom: 1rem;
}

.forgot-password button {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}

.forgot-password button:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    width: 100%;
    height: 48px;
    padding: 0 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 16px;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

.btn-secondary {
    background: var(--color-accent);
    color: white;
}

.btn-secondary:hover {
    background: #E68A00;
}

.btn-ghost {
    background: transparent;
    color: var(--color-primary);
}

.btn-ghost:hover {
    background: var(--color-bg);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Switch Section */
.switch-section {
    margin-top: 1.5rem;
    text-align: center;
}

.switch-section p {
    color: var(--muted);
    margin-bottom: 0.75rem;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Responsive */
@media (min-width: 768px) {
    .logo-container {
        padding: 3rem 0;
    }

    .auth-card-wrapper {
        padding: 0 2rem 3rem;
    }

    .auth-card {
        padding: 2rem;
    }

    .signup-grid {
        grid-template-columns: 50% 48%;
        gap: 1.75rem;
    }

    .instruction-toggle {
        display: none;
    }

    .instruction-box h2 {
        display: block;
    }

    .instruction-content {
        display: block !important;
    }

    .page-title.mobile-only {
        display: none;
    }

    .page-title.desktop-only {
        display: block;
        text-align: left;
    }
}

.flash-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    animation: fadeInDown .4s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
