/* =========================================================
   Styles for Teacher Account Creation Page
   EdukalEDAD Senior Digital Literacy Program
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --blue: #2563eb;
    --blue-d: #0f172a;
    --blue-l: #3b82f6;
    --nc-blue: #0284c7;
    --nc-gold: #d97706;
    --bg: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --danger: #dc2626;
    --success: #16a34a;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: #1e293b;
}

/* ─── BACKGROUND AND CARD LAYOUT ────────────────────── */
#screen-login {
    height: 100vh;
    max-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('/assets/img/Background.png') center center / cover no-repeat;
    padding: 10px 16px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

#screen-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.78) 0%, rgba(30, 58, 138, 0.58) 100%);
    z-index: 1;
}

#screen-login::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 220px;
    background: radial-gradient(ellipse, rgba(221, 169, 65, 0.15) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.login-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 18px 24px 14px;
    width: 100%;
    max-width: 560px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.38),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 10;
    margin: auto;
    animation: cardSlideUp 0.35s ease-out;
    box-sizing: border-box;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3.5px;
    background: linear-gradient(90deg, #d97706, #f59e0b);
    border-radius: 0 0 3px 3px;
}

@keyframes cardSlideUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── LOGO AND HEADER ───────────────────────────────── */
.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.login-logo img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.login-logo-text {
    text-align: center;
}

.login-logo-text .title {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.4px;
    line-height: 1.1;
}

.login-logo-text .sub {
    font-size: 8.5px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    margin-top: 1px;
}

.register-header {
    text-align: center;
    margin-bottom: 8px;
}

.register-header h2 {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.3px;
    margin-bottom: 2px;
}

.register-header p {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.3;
    margin: 0;
}

/* ─── GOOGLE BUTTON ─────────────────────────────────── */
.btn-google {
    width: 100%;
    height: 34px;
    padding: 0 12px;
    background: #ffffff;
    color: #0f172a;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    font-size: 12.5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.btn-google:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.divider-text {
    text-align: center;
    margin: 7px 0;
    font-size: 9.5px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* ─── FORM GRID LAYOUT ──────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 6px 10px;
}

.col-6 {
    grid-column: span 6;
}

.col-12 {
    grid-column: span 12;
}

/* ─── INPUT FIELDS ─────────────────────────────────── */
.field {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.field label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 3px;
}

.field-hint {
    font-size: 9.5px;
    color: #64748b;
    font-weight: 500;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 10px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: color 0.15s;
    z-index: 2;
}

.input-group input {
    width: 100%;
    height: 34px;
    padding: 6px 10px 6px 32px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12.5px;
    font-family: inherit;
    transition: all 0.15s;
    background: #f8fafc;
    color: #0f172a;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 2.5px rgba(37, 99, 235, 0.12);
}

.input-group:focus-within .input-icon {
    color: #2563eb;
}

/* Password toggle */
.input-group.has-action input {
    padding-right: 32px;
}

.password-toggle-btn {
    position: absolute;
    right: 5px;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    z-index: 2;
}

.password-toggle-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

/* Caps lock badge */
.caps-lock-badge {
    display: none;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 600;
    color: #b45309;
    align-items: center;
    gap: 3px;
}

/* ─── PASSWORD STRENGTH METER (COMPACT) ─────────────── */
.pw-strength-card {
    display: none;
    margin-top: 2px;
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 7px;
    border: 1px solid #e2e8f0;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-2px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pw-strength-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.pw-strength-label {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    white-space: nowrap;
}

.pw-strength-text {
    font-size: 10.5px;
    font-weight: 800;
}

.pw-strength-bar {
    flex: 1;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin: 0;
}

.pw-strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.25s ease;
    border-radius: 2px;
}

.pw-req-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px 6px;
    margin-top: 3px;
}

.pw-req-item {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 9.5px;
    color: #64748b;
    white-space: nowrap;
}

.pw-match-badge {
    display: none;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 600;
    align-items: center;
    gap: 4px;
    padding: 1px 6px;
    border-radius: 4px;
    width: fit-content;
}

.pw-match-badge.matched {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.pw-match-badge.mismatched {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* ─── BUTTONS AND LINKS ─────────────────────────────── */
.login-btn-submit {
    width: 100%;
    height: 36px;
    padding: 0 14px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
}

.login-btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(37, 99, 235, 0.35);
}

.login-btn-submit:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.register-link {
    text-align: center;
    margin-top: 6px;
    font-size: 11.5px;
    color: #64748b;
    font-weight: 500;
}

.register-link a {
    color: #2563eb;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s;
}

.register-link a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ─── ERROR TOAST NOTIFICATION ─────────────────────── */
.login-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 11.5px;
    font-weight: 600;
    margin-top: 6px;
    display: none;
    align-items: center;
    gap: 6px;
    animation: slideInDown 0.25s ease-out;
}

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── SUCCESS MODAL ────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

.modal-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 34px 30px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: modalScale 0.3s ease-out;
}

@keyframes modalScale {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

.modal-icon-success {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border: 2px solid #bbf7d0;
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.modal-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.55;
    margin-bottom: 22px;
}

.modal-btn-confirm {
    width: 100%;
    padding: 13px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.modal-btn-confirm:hover {
    background: #1d4ed8;
}

/* ─── TOAST ────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    display: none;
    animation: slideInRight 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes slideInRight {
    from { transform: translateX(60px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* Hide native browser reveal button in Edge/IE */
input::-ms-reveal,
input::-ms-clear {
    display: none;
}

/* ─── RESPONSIVE FALLBACK FOR SMALL SCREENS ─────────── */
@media (max-height: 520px), (max-width: 540px) {
    html, body, #screen-login {
        height: auto !important;
        overflow-y: auto !important;
    }
    #screen-login {
        align-items: flex-start;
        padding: 12px 10px;
    }
    .login-card {
        padding: 16px 18px 12px;
    }
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
    }
    .col-6 {
        grid-column: span 1 !important;
    }
    .pw-req-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}