/* ==============================================================================
   ASTRA VOICE STS — PROFESJONALNY, JASNY MOTYW AKADEMICKI
   (Speech-to-Speech Research Laboratory Theme)
   ============================================================================== */

:root {
    /* Paleta barw podstawowych (Light Academic) */
    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --card-border-subtle: #cbd5e1;
    --card-border-active: #2563eb;
    
    /* Typografia i kontrast tekstu */
    --text-primary: #0f172a;       /* Głęboki slate-900 */
    --text-secondary: #475569;     /* Slate-600 */
    --text-subtle: #64748b;        /* Slate-500 */
    --text-light: #94a3b8;
    
    /* Akcenty instytucjonalne / akademickie */
    --academic-navy: #1e3a8a;      /* Oxford Navy */
    --academic-blue: #2563eb;      /* Cobalt Blue */
    --academic-light-blue: #eff6ff;/* Soft Blue tint */
    --academic-green: #059669;     /* Emerald Success */
    --academic-green-light: #ecfdf5;
    --academic-crimson: #b91c1c;   /* Academic Crimson */
    --academic-crimson-light: #fef2f2;
    --academic-slate-bg: #f1f5f9;  /* Soft gray container */
    
    /* Fonty */
    --font-main: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Kształty i cienie */
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 6px;
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --shadow-elevated: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
}

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

body {
    background-color: var(--bg-page);
    background-image: 
        radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 24px 16px;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    width: 100%;
    max-width: 1220px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ==============================================================================
   NAGŁÓWEK (ACADEMIC INSTITUTE HEADER)
   ============================================================================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--academic-navy), var(--academic-blue));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 3px 10px rgba(30, 58, 138, 0.25);
}

.logo-area h1 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--academic-navy);
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-accent {
    font-size: 0.72rem;
    background: #dbeafe;
    color: var(--academic-navy);
    border: 1px solid #bfdbfe;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.subtitle {
    font-size: 0.8rem;
    color: var(--text-subtle);
    margin-top: 2px;
}

.subtitle strong {
    color: var(--academic-navy);
    font-weight: 600;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--academic-slate-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.status-dot.green { 
    background: var(--academic-green); 
    box-shadow: 0 0 6px rgba(5, 150, 105, 0.4); 
}
.status-dot.red { 
    background: var(--academic-crimson); 
    box-shadow: 0 0 6px rgba(185, 28, 28, 0.4); 
}

.model-chip {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--academic-navy);
    font-family: var(--font-mono);
    font-size: 0.76rem;
}

.btn-logout {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #64748b;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: var(--academic-crimson);
}

/* ==============================================================================
   DASHBOARD GRID & KARTY
   ============================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 18px;
}

@media (max-width: 880px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--academic-slate-bg);
}

.card-header h3 {
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--academic-navy);
}

.tooltip-badge {
    font-size: 0.72rem;
    background: var(--academic-slate-bg);
    color: var(--text-subtle);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--card-border);
    font-weight: 500;
}

/* ==============================================================================
   PRZEŁĄCZNIK TRYBÓW (OPEN SOURCE VS PREMIUM)
   ============================================================================== */
.mode-toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.mode-btn {
    background: #ffffff;
    border: 1.5px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.mode-btn:hover {
    background: #f8fafc;
    border-color: var(--card-border-subtle);
}

.mode-btn.active {
    background: #eff6ff;
    border-color: var(--academic-blue);
    color: var(--academic-navy);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.mode-icon {
    font-size: 1.4rem;
}

.mode-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
}

.mode-desc {
    display: block;
    font-size: 0.7rem;
    color: var(--text-subtle);
    margin-top: 2px;
}

.mode-btn.active .mode-desc {
    color: var(--academic-navy);
}

/* GŁÓWNY PRZYCISK ROZMOWY */
.conversation-main-action {
    margin: 10px 0;
}

.btn-conversation-toggle {
    width: 100%;
    padding: 11px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-conversation-toggle.active {
    background: #fef2f2;
    border: 1.5px solid #f87171;
    color: var(--academic-crimson);
}

.btn-conversation-toggle.active:hover {
    background: #fee2e2;
    border-color: var(--academic-crimson);
}

.btn-conversation-toggle.stopped {
    background: #ecfdf5;
    border: 1.5px solid #4ade80;
    color: var(--academic-green);
}

.btn-conversation-toggle.stopped:hover {
    background: #dcfce7;
    border-color: var(--academic-green);
}

/* STEROWANIE MOWĄ & WYBÓR GŁOSÓW */
.control-box {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--academic-slate-bg);
}

.control-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-subtle);
    display: block;
    margin-bottom: 6px;
}

.radio-pill-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.radio-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    color: var(--text-secondary);
}

.radio-pill input {
    margin: 0;
    cursor: pointer;
}

.radio-pill:has(input:checked) {
    background: #eff6ff;
    border-color: var(--academic-blue);
    color: var(--academic-navy);
    font-weight: 700;
}

.custom-select {
    width: 100%;
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid var(--card-border-subtle);
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.custom-select:focus {
    border-color: var(--academic-blue);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.browser-voice-subrow {
    margin-top: 6px;
    background: var(--academic-slate-bg);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
}

.sub-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 3px;
    font-weight: 600;
}

.custom-select-sm {
    width: 100%;
    background: #ffffff;
    color: var(--academic-navy);
    border: 1px solid var(--card-border-subtle);
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}

.reasoning-effort-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid var(--academic-slate-bg);
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.reasoning-effort-select select {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid var(--card-border-subtle);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
}

.vad-config-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--academic-slate-bg);
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.vad-toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

/* ==============================================================================
   METRYKI I LICZNIKI (METRICS CARD)
   ============================================================================== */
.metrics-card {
    justify-content: space-between;
}

.session-badge {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 12px;
    background: #dcfce7;
    color: var(--academic-green);
    border: 1px solid #86efac;
    font-weight: 600;
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.metric-box {
    background: var(--academic-slate-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.metric-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-subtle);
    font-weight: 600;
}

.metric-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.metric-val.highlight {
    color: var(--academic-blue);
}

/* ==============================================================================
   UKŁAD GŁÓWNY ROZMOWY
   ============================================================================== */
.conversation-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
}

@media (max-width: 880px) {
    .conversation-layout {
        grid-template-columns: 1fr;
    }
}

/* CHAT THREAD (DZIENNIK ROZMOWY) */
.chat-card {
    height: 540px;
}

.chat-thread {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 6px;
    margin-top: 4px;
}

/* Scrollbar styling */
.chat-thread::-webkit-scrollbar {
    width: 6px;
}
.chat-thread::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}
.chat-thread::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.message {
    display: flex;
    max-width: 90%;
}

.user-msg {
    align-self: flex-end;
}

.user-msg .msg-content {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px 10px 2px 10px;
    padding: 10px 14px;
    font-size: 0.88rem;
    color: #1e3a8a;
    box-shadow: 0 1px 2px rgba(30, 58, 138, 0.04);
}

.user-msg .msg-header {
    color: #2563eb;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.assistant-msg {
    align-self: flex-start;
}

.assistant-msg .msg-content {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 10px 10px 10px 2px;
    padding: 12px 16px;
    font-size: 0.88rem;
    color: var(--text-primary);
    box-shadow: var(--shadow-subtle);
    line-height: 1.5;
}

.assistant-msg .msg-header {
    color: var(--academic-navy);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.system-msg {
    align-self: center;
    max-width: 98%;
    width: 100%;
}

.system-msg .msg-content {
    background: var(--academic-slate-bg);
    border: 1px dashed var(--card-border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-align: center;
}

.msg-meta {
    font-size: 0.68rem;
    color: var(--text-subtle);
    margin-top: 6px;
    font-family: var(--font-mono);
    display: flex;
    gap: 8px;
}

/* ==============================================================================
   KONTROLA MOWY (CONTROLLER CARD)
   ============================================================================== */
.controller-card {
    height: 540px;
    align-items: center;
    justify-content: space-between;
}

.vad-badge {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 12px;
    background: var(--academic-slate-bg);
    border: 1px solid var(--card-border-subtle);
    color: var(--academic-navy);
    font-weight: 600;
    font-family: var(--font-mono);
}

.visualizer-container {
    width: 100%;
    height: 110px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#waveform-canvas {
    width: 100%;
    height: 100%;
}

.visualizer-label {
    position: absolute;
    font-size: 0.76rem;
    color: var(--text-secondary);
    font-weight: 600;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.85);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(203, 213, 225, 0.5);
}

/* OBSZAR KONTROLI I MIKROFON */
.controls-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.btn-mic {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--academic-navy), var(--academic-blue));
    border: none;
    color: white;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.35);
}

.btn-mic:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-mic.recording {
    background: linear-gradient(135deg, var(--academic-crimson), #dc2626);
    box-shadow: 0 4px 18px rgba(185, 28, 28, 0.45);
    animation: academic-mic-pulse 1.5s infinite;
}

@keyframes academic-mic-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
    70% { transform: scale(1.04); box-shadow: 0 0 0 14px rgba(220, 38, 38, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.mic-hint {
    font-size: 0.78rem;
    color: var(--text-subtle);
    text-align: center;
}

/* PRZYCISKI MOWY RĘCZNEJ */
.manual-buttons-row {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 360px;
}

.btn-manual-action {
    flex: 1;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
}

.btn-start-speech {
    background: var(--academic-green);
    color: white;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.btn-start-speech:hover:not(:disabled) {
    background: #047857;
    transform: translateY(-1px);
}

.btn-start-speech:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-stop-speech {
    background: var(--academic-crimson);
    color: white;
    box-shadow: 0 2px 6px rgba(185, 28, 28, 0.25);
}

.btn-stop-speech:hover:not(:disabled) {
    background: #991b1b;
    transform: translateY(-1px);
}

.btn-stop-speech:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.sub-controls {
    display: flex;
    gap: 8px;
    width: 100%;
}

.btn-secondary {
    flex: 1;
    background: #ffffff;
    border: 1px solid var(--card-border-subtle);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.15s ease;
}

.btn-secondary:hover {
    background: var(--academic-slate-bg);
    color: var(--text-primary);
    border-color: #94a3b8;
}

/* TRANSKRYPCJA NA ŻYWO */
.live-transcription-box {
    width: 100%;
    background: var(--academic-slate-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    min-height: 56px;
}

.box-label {
    font-size: 0.68rem;
    color: var(--text-subtle);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
}

.live-text {
    font-size: 0.82rem;
    color: var(--text-primary);
    font-style: italic;
}

/* ==============================================================================
   STOPKA (FOOTER)
   ============================================================================== */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    font-size: 0.78rem;
    color: var(--text-subtle);
    box-shadow: var(--shadow-subtle);
}

@media (max-width: 750px) {
    .footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

.btn-link {
    background: none;
    border: none;
    color: var(--academic-blue);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    margin-left: 12px;
    font-family: inherit;
}

.btn-link:hover {
    text-decoration: underline;
    color: var(--academic-navy);
}

.btn-sm {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: #ffffff;
    border: 1px solid var(--card-border-subtle);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.btn-sm:hover {
    background: var(--academic-slate-bg);
    color: var(--text-primary);
}

/* ==============================================================================
   MODAL TABELI KOSZTÓW I METRYK
   ============================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 16px;
}

.modal-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 760px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: var(--shadow-elevated);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--card-border);
}

.modal-header h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--academic-navy);
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-subtle);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.5;
}

.cost-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 0.84rem;
}

.cost-table th, .cost-table td {
    padding: 10px 12px;
    border: 1px solid var(--card-border);
    text-align: left;
}

.cost-table th {
    background: var(--academic-slate-bg);
    color: var(--academic-navy);
    font-weight: 700;
}

.cost-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.assumptions-box {
    margin-top: 14px;
    padding: 12px;
    background: var(--academic-slate-bg);
    border-radius: var(--radius-md);
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
    border: 1px solid var(--card-border);
}

/* ==============================================================================
   BRAMKA LOGOWANIA (LOGIN GATE OVERLAY) — STYL AKADEMICKI
   ============================================================================== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-elevated);
}

.login-badge-icon {
    font-size: 2.6rem;
    margin-bottom: 12px;
}

.login-card h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--academic-navy);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.login-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 22px;
    line-height: 1.5;
}

.login-input-group {
    margin-bottom: 12px;
}

.login-input-group input {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1.5px solid var(--card-border-subtle);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
    text-align: center;
    letter-spacing: 1px;
}

.login-input-group input:focus {
    border-color: var(--academic-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--academic-crimson);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.btn-login {
    width: 100%;
    padding: 11px 18px;
    background: linear-gradient(135deg, var(--academic-navy), var(--academic-blue));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(30, 58, 138, 0.25);
    font-family: inherit;
}

.btn-login:hover {
    background: linear-gradient(135deg, #172554, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(30, 58, 138, 0.35);
}

.login-hint {
    font-size: 0.72rem;
    color: var(--text-subtle);
    margin-top: 18px;
    line-height: 1.4;
}

.login-hint code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--academic-navy);
    font-family: var(--font-mono);
    border: 1px solid #e2e8f0;
}
