/* =============================================
   ALVI Dochádzka — Modal & Toast Overlays
   ============================================= */

/* ── Modal ─────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 200;
    animation: alFadeOverlay 0.2s ease;
}

.modal {
    background: var(--al-card-bg);
    border-radius: var(--al-radius-lg);
    padding: 32px; width: 460px; max-width: 90vw;
    box-shadow: var(--al-shadow-lg), 0 0 40px rgba(0, 0, 0, 0.1);
    animation: alScaleIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--al-border-light);
}

.modal-wide  { width: 640px; }
.modal-large { width: 820px; max-height: 85vh; overflow-y: auto; }

.modal h3 {
    font-size: 17px; font-weight: 800;
    margin-bottom: 24px; letter-spacing: -0.3px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--al-border-light);
}

.modal-actions {
    display: flex; gap: 10px; justify-content: flex-end;
    margin-top: 24px; padding-top: 16px;
    border-top: 1px solid var(--al-border-light);
}

/* ── Confirm Dialog ────────────────────────── */
.confirm-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 300;
    animation: alFadeOverlay 0.15s ease;
}

.confirm-dialog {
    background: var(--al-card-bg);
    border-radius: var(--al-radius-lg);
    padding: 28px; width: 400px; max-width: 90vw;
    box-shadow: var(--al-shadow-lg);
    animation: alConfirmScaleIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--al-border-light);
    text-align: center;
}

.confirm-dialog .confirm-icon {
    font-size: 36px; margin-bottom: 12px;
}

.confirm-dialog h4 {
    font-size: 16px; font-weight: 700;
    margin-bottom: 8px; color: var(--al-text);
}

.confirm-dialog p {
    font-size: 13px; color: var(--al-text-secondary);
    margin-bottom: 24px; line-height: 1.5;
}

.confirm-dialog .confirm-actions {
    display: flex; gap: 10px; justify-content: center;
}

/* ── Toast ─────────────────────────────────── */
.toast-container {
    position: fixed; top: 24px; right: 24px;
    z-index: 500;
    display: flex; flex-direction: column; gap: 8px;
}

.toast {
    background: var(--al-card-bg); color: var(--al-text);
    padding: 14px 20px 14px 18px;
    border-radius: var(--al-radius-sm);
    font-size: 13px; font-weight: 600;
    box-shadow: var(--al-shadow-lg);
    animation: alToastIn 0.4s cubic-bezier(0.4, 0, 0.2, 1), alToastOut 0.3s ease 2.7s forwards;
    display: flex; align-items: center; gap: 10px;
    min-width: 280px; overflow: hidden; position: relative;
    border: 1px solid var(--al-border-light);
}

.toast::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px;
}

.toast-success::before { background: var(--al-gradient-success); }
.toast-error::before   { background: var(--al-gradient-danger); }
.toast-info::before    { background: var(--al-gradient-primary); }

/* ── Login Screen ──────────────────────────── */
.login-screen {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0f0c29 0%, #1a1341 30%, #302b63 60%, #24243e 100%);
    position: relative; overflow: hidden;
}

.login-screen::before {
    content: '';
    position: absolute; width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 60%);
    top: 10%; left: 25%; pointer-events: none;
    animation: loginGlow 8s ease-in-out infinite;
}

.login-screen::after {
    content: '';
    position: absolute; width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(168,85,247,0.15) 0%, transparent 60%);
    bottom: 10%; right: 15%; pointer-events: none;
    animation: loginGlow 8s ease-in-out 4s infinite;
}

@keyframes loginGlow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
}

.login-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: var(--al-radius-xl);
    padding: 48px 44px; width: 440px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    text-align: center; position: relative; z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: alScaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-header {
    margin-bottom: 32px;
}

.login-logo {
    width: 56px; height: 56px;
    margin: 0 auto 18px;
    background: var(--al-gradient-primary);
    border-radius: var(--al-radius-lg);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 900; color: white;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.login-card h1 {
    font-size: 22px; font-weight: 800;
    margin-bottom: 6px; letter-spacing: -0.3px; color: var(--al-text);
}

.login-card p {
    color: var(--al-text-muted);
    font-size: 14px; margin-bottom: 0; font-weight: 400;
}

.login-form { text-align: left; }

.login-error {
    color: var(--al-danger); font-size: 13px; font-weight: 600;
    background: var(--al-danger-light);
    padding: 10px 16px; border-radius: var(--al-radius-sm);
    border: 1px solid rgba(239,68,68,0.15);
    margin-bottom: 16px;
    text-align: center;
}

/* ── Animations ────────────────────────────── */
@keyframes alFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes alFadeOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes alScaleIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes alConfirmScaleIn {
    from { opacity: 0; transform: scale(0.92) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes alToastIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes alToastOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-10px); }
}

.fade-in { animation: alFadeIn 0.35s ease; }
