* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: "Poppins", system-ui, sans-serif;
    background: #020617 !important;
    background-color: #020617 !important;
    color: #f8fafc !important;
    min-height: 100vh;
}

/* ── Mobile Header & Navigation Drawer ── */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #ffffff;
    padding: 0 16px;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.mobile-header .hamburger {
    background: #1e3a8a;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    flex-shrink: 0;
}

.mobile-header-logo img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.mobile-header-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-mobile {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: #020b2f;
    z-index: 998;
    transition: left 0.3s ease;
    padding-top: 75px;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.nav-mobile.active {
    left: 0;
}

.nav-mobile ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-mobile ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    outline: none;
    background: transparent;
    margin: 4px 10px;
    transition: all 0.2s ease;
}

.nav-mobile ul li a i,
.nav-mobile ul li a ion-icon {
    font-size: 20px;
    color: #ffffff;
}

.nav-mobile ul li a:hover,
.nav-mobile ul li a.active {
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    border: none;
}

.nav-mobile ul li a:hover i,
.nav-mobile ul li a.active i,
.nav-mobile ul li a:hover ion-icon,
.nav-mobile ul li a.active ion-icon {
    color: #ffffff;
}

main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.12), transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(29, 78, 216, 0.1), transparent 40%);
}

.back-link {
    position: absolute;
    top: 2rem;
    left: 2rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.back-link:hover {
    color: #38bdf8;
    transform: translateX(-4px);
}

.hero {
    width: 100%;
    max-width: 1100px;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.22), transparent 50%),
                radial-gradient(circle at bottom left, rgba(29, 78, 216, 0.15), transparent 50%),
                linear-gradient(145deg, #071232, #040a1e);
    border: 1px solid rgba(96, 165, 250, 0.18);
    border-radius: 32px;
    padding: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 40px rgba(37, 99, 235, 0.12);
}

.hero__intro h1 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #ffffff;
    font-weight: 700;
}

.hero__intro .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.35em;
    color: #38bdf8;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.hero__intro .subtitle {
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    line-height: 1.65;
}

.hero__stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero__stats div {
    border-left: 2px solid rgba(56, 189, 248, 0.4);
    padding-left: 1rem;
}

.hero__stats strong {
    font-size: 1.6rem;
    display: block;
    color: #38bdf8;
}

.hero__stats span {
    font-size: 0.85rem;
    color: #94a3b8;
}

.hero__card {
    background: rgba(6, 16, 44, 0.75);
    border: 1px solid rgba(96, 165, 250, 0.16);
    border-radius: 24px;
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
}

.register-hero {
    display: flex;
    align-items: center;
    justify-content: center;
}

.register-hero .hero__card {
    width: 100%;
    max-width: 940px;
}

.register-card {
    gap: 1rem;

}

.section-heading h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #6df2ff;
    margin-bottom: 0.15rem;
}

.section-heading p {
    font-size: 0.8rem;
    color: #8da1c9;
    margin-bottom: 0.5rem;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.register-form input[type="file"] {
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
}

.optional-note {
    font-size: 0.75rem;
    color: #6c7a98;
    text-align: center;
    margin: 0;
}

.hero__card h2 {
    font-size: 1.8rem;
}

.card-subtitle {
    color: #a0adc6;
    font-size: 0.9rem;
}

.logo-container {
    height: 60px;
    width: 60px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-container img {
    width: 36px;
    height: 36px;
    object-fit: cover;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.login-form label span {
    display: block;
    font-size: 0.85rem;
    color: #9ba7c5;
    margin-bottom: 0.35rem;
}

.login-form input,
.login-form select {
    width: 100%;
    background: rgba(4, 11, 32, 0.75);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    color: #f8fafc;
    font-size: 1rem;
    appearance: none;
    transition: all 0.2s ease;
}

.login-form input::placeholder {
    color: #64748b;
}

.login-form input[type="checkbox"] {
    appearance: auto;
    width: auto;
    padding: 0;
    border: none;
    border-radius: 3px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}

.login-form select option {
    background-color: #06112e;
    color: #f8fafc;
}

.login-form input:focus,
.login-form select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    background: rgba(7, 18, 50, 0.85);
}

.pw-input-wrap {
    position: relative;
    width: 100%;
}

.pw-input-wrap input {
    padding-right: 46px !important;
}

.pw-input-wrap .pw-toggle-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
    transition: color 0.2s ease, transform 0.15s ease;
    z-index: 10;
    pointer-events: auto;
}

.pw-input-wrap .pw-toggle-btn svg,
.pw-input-wrap .pw-toggle-btn ion-icon {
    pointer-events: none;
    display: inline-block;
    vertical-align: middle;
}

.pw-input-wrap .pw-toggle-btn:hover {
    color: #38bdf8;
}

.pw-input-wrap .pw-toggle-btn:active {
    transform: translateY(-50%) scale(0.92);
}


.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #94a3b8;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.login-form .remember span {
    display: inline;
    margin-bottom: 0;
    cursor: pointer;
    color: #cbd5e1;
}

.remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
}

.forgot {
    text-decoration: none;
    color: #60a5fa;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.primary {
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    font-weight: 700;
    padding: 0.95rem;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.secondary {
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
    font-weight: 600;
    padding: 0.95rem;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.secondary:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: #3b82f6;
    transform: translateY(-1px);
}

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

.form-footer {
    font-size: 0.85rem;
    text-align: center;
    color: #94a3b8;
}

.form-footer a {
    color: #38bdf8;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.form-footer a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* Modal CSS */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 8, 15, 0.8);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: #0d1118;
    color: #cdd6f5;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.modal-content p:last-child {
    margin-bottom: 0;
}

.close-modal {
    color: #6c7a98;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover,
.close-modal:focus {
    color: #ffffff;
    text-decoration: none;
}

.consent-container {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.consent-label {
    align-items: flex-start;
}

.consent-label input {
    margin-top: 4px;
}

.consent-label span {
    line-height: 1.4;
    font-size: 0.85rem;
    color: #9ba7c5;
}

@media (max-width: 720px) {
    .hero {
        padding: 2.5rem 1.5rem;
    }

    .hero__intro h1 {
        font-size: 2rem;
    }

    .card-subtitle {
        text-align: center;
    }

    .hero__stats {
        justify-content: flex-start;
    }
}

/* ── Toast Notification ───────────────────────────────── */
#toast {
    position: fixed;
    top: 24px;
    bottom: auto;
    right: 24px;
    left: auto;
    min-width: 260px;
    max-width: 400px;
    width: auto;
    height: auto;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    font-family: "Poppins", system-ui, sans-serif;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 999999;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

#toast.toast-success {
    background: linear-gradient(135deg, #059669, #10b981);
    border: 1px solid #34d399;
    color: #ffffff;
}

#toast.toast-error {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    border: 1px solid #f87171;
    color: #ffffff;
}

#toast.toast-info {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: 1px solid #60a5fa;
    color: #ffffff;
}

#toast .toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* ── Input error state ────────────────────────────────── */
.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
}

.field-error {
    font-size: 0.78rem;
    color: #f87171;
    margin-top: 0.3rem;
    display: block;
}

/* ── Forgot Password Modal ────────────────────────────── */
#forgotModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 15, 0.82);
    backdrop-filter: blur(6px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

#forgotModal.open {
    display: flex;
}

#forgotModal .fp-card {
    background: linear-gradient(145deg, #071232, #040b20);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 24px;
    padding: 2.25rem;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(37, 99, 235, 0.15);
    animation: slideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fp-close {
    position: absolute;
    top: 1.1rem;
    right: 1.4rem;
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.fp-close:hover {
    color: #fff;
}

.fp-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
    color: #ffffff;
    font-weight: 700;
}

.fp-card .fp-sub {
    font-size: 0.88rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    line-height: 1.55;
}

/* Step indicator */
.fp-steps {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.fp-step {
    flex: 1;
    height: 4px;
    border-radius: 99px;
    background: rgba(96, 165, 250, 0.15);
    transition: background 0.4s;
}

.fp-step.done {
    background: linear-gradient(90deg, #2563eb, #38bdf8);
}

.fp-panel {
    display: none;
}

.fp-panel.active {
    display: block;
}

.fp-field {
    margin-bottom: 1rem;
}

.fp-field label {
    display: block;
    font-size: 0.83rem;
    color: #94a3b8;
    margin-bottom: 0.35rem;
}

.fp-field input {
    width: 100%;
    background: rgba(4, 11, 32, 0.75);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    color: #f8fafc;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.fp-field input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* OTP boxes */
.otp-row {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.otp-box {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    background: rgba(4, 11, 32, 0.75);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 12px;
    color: #f8fafc;
    caret-color: #38bdf8;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.otp-box:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.resend-row {
    text-align: center;
    font-size: 0.83rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.resend-row button {
    background: none;
    border: none;
    color: #38bdf8;
    cursor: pointer;
    font-size: 0.83rem;
    padding: 0;
    text-decoration: underline;
}

.resend-row button:disabled {
    color: #64748b;
    text-decoration: none;
    cursor: default;
}

.fp-btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-weight: 700;
    padding: 0.9rem 1rem;
    margin-top: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.fp-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.fp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Success tick */
.fp-success-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 0.75rem;
}

.fp-success-title {
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 0.4rem;
}

.fp-success-text {
    font-size: 0.88rem;
    color: #8da1c9;
    text-align: center;
    line-height: 1.5;
}

/* password strength */
.strength-bar {
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    margin-top: 0.45rem;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 99px;
    width: 0;
    transition: width 0.35s ease, background 0.35s ease;
}

.strength-label {
    font-size: 0.75rem;
    color: #6c7a98;
    margin-top: 0.25rem;
}

/* spinner on btn */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(5, 8, 15, 0.4);
    border-top-color: #05080f;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

/* ════ RESPONSIVE & TEXT OVERFLOW FIXES ════ */
.hero {
    width: 100%;
    max-width: 1100px;
    box-sizing: border-box;
    overflow: hidden;
}

.hero__intro,
.hero__card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
}

.hero__intro .subtitle {
    overflow-wrap: break-word;
    word-break: break-word;
}

@media (max-width: 900px) {
    main {
        padding: 2.5rem 1rem 2rem !important;
    }

    .hero {
        grid-template-columns: 1fr !important;
        padding: 2rem 1.25rem !important;
        border-radius: 24px !important;
        gap: 1.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .hero__intro,
    .hero__card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .hero__intro h1 {
        font-size: 1.75rem !important;
        line-height: 1.35 !important;
    }

    .hero__intro .subtitle {
        font-size: 0.92rem !important;
        line-height: 1.55 !important;
        margin-bottom: 1.25rem !important;
    }

    .hero__card {
        padding: 1.5rem 1.25rem !important;
        border-radius: 20px !important;
    }

    .back-link {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        margin: 1.5rem 1.5rem 0.5rem !important;
        display: inline-flex !important;
    }
}

@media (max-width: 480px) {
    main {
        padding: 1.5rem 0.75rem 1.5rem !important;
    }

    .hero {
        padding: 1.25rem 1rem !important;
        border-radius: 20px !important;
    }

    .hero__intro h1 {
        font-size: 1.45rem !important;
    }

    .hero__intro .subtitle {
        font-size: 0.88rem !important;
    }

    .hero__card {
        padding: 1.25rem 0.9rem !important;
    }

    .login-form input,
    .login-form select {
        padding: 0.75rem 0.85rem !important;
        font-size: 0.95rem !important;
    }

    .form-actions {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
}