*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:   #0f1e3c;
    --blue:   #1a4a8a;
    --accent: #e8a020;
    --light:  #f4f7fb;
    --white:  #ffffff;
    --text:   #1e293b;
    --muted:  #64748b;
    --error:  #dc2626;
    --border: #cbd5e1;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-image:
            radial-gradient(circle at 20% 20%, rgba(26,74,138,0.08) 0%, transparent 50%),
            radial-gradient(circle at 80% 80%, rgba(232,160,32,0.06) 0%, transparent 50%);
}

.card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04), 0 20px 60px rgba(15,30,60,0.10);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.card-header {
    background: var(--navy);
    padding: 36px 40px 32px;
    position: relative;
    overflow: hidden;
}
.card-header::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(232,160,32,0.15);
}
.card-header::after {
    content: '';
    position: absolute;
    bottom: -20px; left: 30px;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}

.logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.logo-icon {
    width: 44px; height: 44px;
    background: var(--accent);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.logo-text {
    font-family: 'Bitter', serif;
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    opacity: 0.95;
}
.logo-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    font-weight: 300;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.card-header h1 {
    font-family: 'Bitter', serif;
    color: var(--white);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}
.card-header p {
    color: rgba(255,255,255,0.55);
    font-size: 13.5px;
    margin-top: 6px;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.card-body {
    padding: 36px 40px 40px;
}

.form-group {
    margin-bottom: 20px;
}
label {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
}
input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--light);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
}
input:focus {
    border-color: var(--blue);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(26,74,138,0.10);
}
input::placeholder { color: #94a3b8; }

.hint {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 6px;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13.5px;
    color: var(--error);
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 8px;
}
.alert-error.show { display: flex; }

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    position: relative;
    overflow: hidden;
}
.btn-login:hover { background: var(--blue); }
.btn-login:active { transform: scale(0.99); }
.btn-login:disabled { background: #94a3b8; cursor: not-allowed; }

.spinner {
    display: none;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto;
}
.btn-login.loading .btn-text { display: none; }
.btn-login.loading .spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

.divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--muted);
}
.info-row span { font-size: 15px; }