/* ==============================================
   NAŠA DRUŽINA — Design System
   Preprost, topel, mobile-first
   ============================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
    --brand:        #6366f1;
    --brand-light:  rgba(99, 102, 241, 0.18);
    --brand-dark:   #4f46e5;

    --anej:         #38bdf8;
    --anej-light:   rgba(56, 189, 248, 0.15);
    --noel:         #34d399;
    --noel-light:   rgba(52, 211, 153, 0.15);
    --lana:         #fb7185;
    --lana-light:   rgba(251, 113, 133, 0.15);

    /* Privzeti Dark Mode (Sleek Dark Theme) */
    --bg:           #0b1329;
    --card:         #1e293b;
    --card-bg:      #1e293b;
    --border:       #334155;
    --text:         #f8fafc;
    --text-2:       #94a3b8;
    --text-3:       #64748b;
    --shadow:       0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg:    0 10px 40px rgba(0, 0, 0, 0.55);
    --r:            16px;
    --r-sm:         10px;
    --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition:   all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --header-h:     64px;
}

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

html { 
    font-size: 15px; 
    max-width: 100vw;
    overflow-x: hidden;
}
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: calc(115px + env(safe-area-inset-bottom, 20px)) !important; /* prostor za bottom nav + safe area */
    max-width: 100vw;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ===== HEADER ===== */
/* ===== HEADER ===== */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding-top: max(env(safe-area-inset-top, 0px), 8px);
    padding-bottom: 8px;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    min-height: calc(64px + env(safe-area-inset-top, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    box-sizing: border-box;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.3rem;
    border-radius: 12px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s ease;
}
.header-logo:active {
    opacity: 0.75;
}

.header-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 14px rgba(99,102,241,0.35);
    flex-shrink: 0;
}

.header-logo-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-dev-btn {
    color: var(--text-3);
    font-size: 1rem;
    min-width: 40px;
    min-height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.header-dev-btn.active, .header-dev-btn:hover {
    color: var(--brand);
    background: rgba(99,102,241,0.15);
}
.header-dev-btn:active {
    transform: scale(0.95);
}

.header-logout-btn {
    color: var(--text-3);
    font-size: 1rem;
    min-width: 40px;
    min-height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.header-logout-btn:hover, .header-logout-btn:active {
    color: #ef4444;
    background: rgba(239,68,68,0.15);
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    font-family: var(--font-display);
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.avatar-sm {
    width: 26px;
    height: 26px;
    font-size: 0.65rem;
}

@media (max-width: 480px) {
    .app-header {
        padding-top: max(env(safe-area-inset-top, 0px), 12px);
        padding-bottom: 10px;
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.6rem, env(safe-area-inset-right));
        min-height: calc(64px + env(safe-area-inset-top, 0px));
        gap: 0.4rem;
    }
    .header-logo {
        gap: 0.4rem;
        padding: 0.3rem 0.1rem;
        min-width: 0;
        flex-shrink: 1;
    }
    .header-logo-text {
        font-size: 1.05rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .header-logo-icon {
        width: 34px;
        height: 34px;
        font-size: 1.05rem;
        border-radius: 10px;
    }
    .header-user {
        gap: 0.2rem;
        flex-shrink: 0;
    }
    .avatar {
        width: 32px;
        height: 32px;
        font-size: 0.78rem;
        margin-left: 0.15rem;
    }
    .header-dev-btn, .header-logout-btn {
        min-width: 32px;
        min-height: 32px;
        font-size: 0.9rem;
    }
}

/* Na zelo ozkih zaslonih ime aplikacije ostane vidno — namesto skrivanja
   besedila dodatno stisnemo presledke in ikone, da vse ostane v eni vrstici. */
@media (max-width: 360px) {
    .header-logo-text {
        font-size: 0.92rem;
        max-width: 34vw;
        white-space: nowrap;
    }
    .header-logo-icon {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
    }
    .header-user {
        gap: 0.1rem;
    }
    .header-dev-btn, .header-logout-btn {
        min-width: 28px;
        min-height: 30px;
        font-size: 0.85rem;
    }
    .avatar {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
}

/* ===== BOTTOM NAV (mobile-style & desktop dock) ===== */
.bottom-nav {
    position: fixed !important;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    z-index: 1000;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.35);
    padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

@media (min-width: 768px) {
    .bottom-nav {
        max-width: 640px;
        left: 50% !important;
        right: auto !important;
        transform: translate3d(-50%, 0, 0) !important;
        -webkit-transform: translate3d(-50%, 0, 0) !important;
        bottom: 18px !important;
        border-radius: 26px !important;
        border: 1.5px solid rgba(255,255,255,0.14) !important;
        box-shadow: 0 16px 40px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.05) !important;
        padding: 0.35rem 0.6rem !important;
        padding-bottom: 0.35rem !important;
    }
}

/* Levi/desni ovoj samo grupira gumbe, dejansko razporeditev (enaka širina
   za VSAK gumb) prevzame .bottom-nav preko flex:1 na vsakem .bottom-nav-item */
.bottom-nav-side {
    display: contents;
}

.bottom-nav-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.25rem;
    color: var(--text-3);
    font-size: 0.78rem;
    font-weight: 700;
    gap: 0.25rem;
    transition: var(--transition);
    position: relative;
    min-width: 0;
}

.bottom-nav-item.add-btn {
    flex: 0 0 72px;
}

.bottom-nav-item.active { color: var(--brand); }
.bottom-nav-item:hover { color: var(--brand); }

.bottom-nav-item i { font-size: 1.55rem; }

.bottom-nav-item.add-btn {
    color: #fff;
}

.bottom-nav-item.ai-nav-btn {
    color: #c084fc;
}
.bottom-nav-item.ai-nav-btn i, .bottom-nav-item.ai-nav-btn .ai-nav-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 8px rgba(168, 85, 247, 0.45));
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.bottom-nav-item.ai-nav-btn:active i, .bottom-nav-item.ai-nav-btn:active .ai-nav-icon {
    transform: scale(1.25);
}
.bottom-nav-item.ai-nav-btn span {
    color: #c084fc;
    font-weight: 800;
}

#doorNavBtn:active div {
    transform: scale(0.88);
}
#doorNavBtn div {
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bottom-nav-add-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--brand), #ec4899);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    box-shadow: 0 6px 22px rgba(99,102,241,0.55);
    margin-bottom: 6px;
    margin-top: -42px;
    transition: var(--transition);
    border: 3px solid var(--card);
    outline: 2px solid rgba(99,102,241,0.3);
    flex-shrink: 0;
}

.bottom-nav-add-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(99,102,241,0.65);
}

/* ===== KARTICE ===== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--shadow);
}

/* ===== VSEBINA ===== */
.page-content { 
    padding: 1rem; 
    max-width: 860px; 
    margin: 0 auto; 
    margin-bottom: 2rem;
    padding-bottom: calc(45px + env(safe-area-inset-bottom, 15px));
    transition: max-width 0.2s ease;
}

@media (min-width: 1024px) {
    .page-content {
        max-width: 1480px;
        padding: 1.5rem 2rem;
        margin-bottom: 3rem;
        padding-bottom: calc(55px + env(safe-area-inset-bottom, 15px));
    }
    .app-header {
        padding: 0 2rem;
    }
}

/* ===== EVENT CARD ===== */
.event-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 1.15rem 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.event-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }

.event-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 5px;
    border-radius: var(--r) 0 0 var(--r);
}

.event-card.child-1::before { background: var(--anej); }
.event-card.child-2::before { background: var(--noel); }
.event-card.child-3::before { background: var(--lana); }

.event-icon {
    font-size: 2.4rem;
    line-height: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-info { flex: 1; min-width: 0; }

.event-title {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 0.35rem;
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin-top: 0.45rem;
}

.event-child-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.event-child-badge.child-1 { background: var(--anej); }
.event-child-badge.child-2 { background: var(--noel); }
.event-child-badge.child-3 { background: var(--lana); }

.event-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--bg);
    color: var(--text-2);
    border: 1.5px solid var(--border);
}

.event-today-badge {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
    font-weight: 800;
}

.event-tomorrow-badge {
    background: rgba(59, 130, 246, 0.18);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.4);
    font-weight: 800;
}

.event-location {
    font-size: 0.88rem;
    color: var(--text-3);
    margin-top: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

.event-note {
    font-size: 0.85rem;
    color: var(--text-2);
    margin-top: 0.35rem;
    font-style: italic;
}

.event-actions {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex-shrink: 0;
}

.btn-icon-sm {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: var(--transition);
    border: 1.5px solid var(--border);
    color: var(--text-2);
    background: var(--bg);
}
.btn-icon-sm:hover { background: var(--border); color: var(--text); }
.btn-icon-sm.danger:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }

/* ===== DATUM SKUPINA ===== */
.date-group { margin-bottom: 1.5rem; }
.date-group-label {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0.5rem 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.date-group-label.today  { color: #f59e0b; }
.date-group-label.tomorrow { color: #38bdf8; }

/* ===== GUMBI ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.2rem;
    border-radius: var(--r-sm);
    font-size: 0.88rem;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand), #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.4); }

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-2);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }

.btn-danger { background: #fee2e2; color: #dc2626; }
.btn-danger:hover { background: #dc2626; color: #fff; }

.btn-full { width: 100%; justify-content: center; }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; border-radius: var(--r); }

/* ===== FORMA ===== */
.form-group { margin-bottom: 1rem; }

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-2);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text);
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
    appearance: none;
}

.form-control:focus {
    border-color: var(--brand);
    background: var(--card);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

textarea.form-control { resize: vertical; min-height: 80px; }

/* Otrok izbirnik */
.child-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}

.child-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 0.5rem;
    border-radius: var(--r);
    border: 2px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
    text-align: center;
}

.child-option input[type=radio],
.child-option input[type=checkbox] { display: none; }

.child-option:has(input:checked),
.child-option.selected {
    border-color: currentColor;
    background: var(--card);
}

.child-option.child-anej:has(input:checked),
.child-option.child-anej.selected { border-color: var(--anej); background: var(--anej-light); }
.child-option.child-noel:has(input:checked),
.child-option.child-noel.selected { border-color: var(--noel); background: var(--noel-light); }
.child-option.child-lana:has(input:checked),
.child-option.child-lana.selected { border-color: var(--lana); background: var(--lana-light); }

.child-option-emoji { font-size: 2.3rem; line-height: 1; }
.child-option-name { font-size: 0.95rem; font-weight: 800; color: var(--text); }

/* Kategorija izbirnik */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.cat-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 0.35rem;
    border-radius: var(--r-sm);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
    text-align: center;
}

.cat-option input[type=radio] { display: none; }
.cat-option:has(input:checked) { border-color: var(--brand); background: var(--brand-light); }

.cat-option-icon { font-size: 1.8rem; line-height: 1; }
.cat-option-name { font-size: 0.78rem; font-weight: 700; color: var(--text-2); }

/* ===== PUSH BANNER ===== */
.push-banner {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    padding: 1rem;
    border-radius: var(--r);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.push-banner-icon { font-size: 1.5rem; flex-shrink: 0; }
.push-banner-text { flex: 1; font-size: 0.85rem; line-height: 1.4; }
.push-banner-text strong { display: block; margin-bottom: 0.2rem; }

.push-banner-btn {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.4);
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}
.push-banner-btn:hover { background: rgba(255,255,255,0.35); }

/* ===== LOGIN ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    padding: 1.5rem;
}

.login-card {
    background: rgba(30,41,59,0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 2rem;
    width: 100%;
    max-width: 380px;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}

.login-hero {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-emoji { font-size: 3rem; display: block; margin-bottom: 0.5rem; }

.login-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
}

.login-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 0.35rem;
}

.login-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: #f1f5f9;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
    margin-bottom: 0.75rem;
}

.login-input::placeholder { color: #475569; }
.login-input:focus {
    border-color: var(--brand);
    background: rgba(99,102,241,0.1);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}

.login-btn {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--brand), #ec4899);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-display);
    box-shadow: 0 4px 20px rgba(99,102,241,0.4);
    margin-bottom: 1.25rem;
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(99,102,241,0.5); }

.demo-label {
    text-align: center;
    font-size: 0.72rem;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.75rem;
}

.demo-btns {
    display: flex;
    gap: 0.5rem;
}

.demo-btn {
    flex: 1;
    padding: 0.65rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.demo-btn:hover { background: rgba(99,102,241,0.15); color: #a5b4fc; border-color: rgba(99,102,241,0.3); }
.demo-btn span { font-size: 1.3rem; }

/* ===== ALERT ===== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--r-sm);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.alert-danger  { background: #fee2e2; color: #dc2626; }
.alert-success { background: #d1fae5; color: #059669; }

/* ===== PRAZNA STRAN ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-3);
}

.empty-state-emoji { font-size: 3rem; display: block; margin-bottom: 0.75rem; }
.empty-state h3 { font-size: 1rem; font-weight: 700; color: var(--text-2); margin-bottom: 0.5rem; }

/* ===== HEADING ===== */
.page-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.page-subtitle { font-size: 0.82rem; color: var(--text-3); margin-bottom: 1rem; }

/* ===== FILTER CHIPPI ===== */
.filter-row {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.05rem;
    border-radius: 24px;
    font-size: 0.92rem;
    font-weight: 800;
    white-space: nowrap;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--text-2);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.filter-chip.active, .filter-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.filter-chip.child-1.active { border-color: var(--anej); color: var(--anej); background: var(--anej-light); }
.filter-chip.child-2.active { border-color: var(--noel); color: var(--noel); background: var(--noel-light); }
.filter-chip.child-3.active { border-color: var(--lana); color: var(--lana); background: var(--lana-light); }

/* ===== DIVIDER ===== */
.divider { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-sheet {
    background: var(--card);
    border-radius: 24px 24px 0 0;
    padding: 1.5rem;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    margin: -0.5rem auto 1rem;
}

/* ===== UTILITY ===== */
.text-muted { color: var(--text-3); }
.text-sm { font-size: 0.78rem; }
.fw-700 { font-weight: 700; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-sm { gap: 0.5rem; }

/* ===== PREKLOPNIK POGLEDA ===== */
.view-switcher {
    display: flex;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 0.25rem;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.view-switcher-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-2);
    text-decoration: none;
    transition: var(--transition);
}

.view-switcher-btn.active {
    background: var(--card);
    color: var(--brand);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* ===== MESEČNI KOLEDAR ===== */
.month-calendar-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 1.15rem 1rem;
    margin-bottom: 1.25rem;
}

.month-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.month-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    text-transform: capitalize;
}

.month-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1.5px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}
.month-nav-btn:hover { border-color: var(--brand); color: var(--brand); }

.month-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.92rem;
    font-weight: 900;
    color: var(--text-2);
    padding-bottom: 0.65rem;
    margin-bottom: 0.35rem;
    border-bottom: 1.5px solid var(--border);
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.45rem;
}

.month-day {
    min-height: 95px;
    border-radius: 14px;
    background: var(--bg);
    border: 1.5px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0.45rem 0.35rem;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    position: relative;
    transition: var(--transition);
    overflow: hidden;
}

.month-day:hover {
    border-color: var(--brand);
    background: var(--card);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.month-day.other-month {
    opacity: 0.18;
    pointer-events: none;
}

.month-day.is-today {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    box-shadow: 0 0 0 1px #f59e0b;
}

.month-day.selected {
    border-color: var(--brand);
    background: rgba(99, 102, 241, 0.22);
    box-shadow: 0 0 0 2px var(--brand);
}

.month-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.15rem 0.35rem;
}

.month-day-num {
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text);
}

.month-day.is-today .month-day-num {
    color: #f59e0b;
}

.month-day-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.month-event-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 5px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 3.5px solid transparent;
}

.month-event-pill.child-1 {
    background: rgba(59, 130, 246, 0.28);
    color: #bfdbfe;
    border-left-color: var(--anej);
}

.month-event-pill.child-2 {
    background: rgba(16, 185, 129, 0.28);
    color: #a7f3d0;
    border-left-color: var(--noel);
}

.month-event-pill.child-3 {
    background: rgba(236, 72, 153, 0.28);
    color: #fbcfe8;
    border-left-color: var(--lana);
}

.month-event-pill-time {
    font-size: 0.7rem;
    opacity: 0.9;
    font-weight: 700;
    margin-left: auto;
}

.month-event-more {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--brand);
    text-align: center;
    padding: 2px 0;
    line-height: 1;
}

.child-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.child-dot.child-1 { background: var(--anej); box-shadow: 0 0 5px var(--anej); }
.child-dot.child-2 { background: var(--noel); box-shadow: 0 0 5px var(--noel); }
.child-dot.child-3 { background: var(--lana); box-shadow: 0 0 5px var(--lana); }

@media (min-width: 1024px) {
    .month-calendar-card {
        padding: 1.5rem 1.75rem;
        border-radius: 20px;
    }
    .month-title {
        font-size: 1.5rem;
        letter-spacing: -0.02em;
    }
    .month-nav-btn {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        border-radius: 12px;
    }
    .month-weekdays {
        font-size: 1.05rem;
        padding-bottom: 0.85rem;
        margin-bottom: 0.65rem;
    }
    .month-grid {
        gap: 0.75rem;
    }
    .month-day {
        min-height: 135px;
        padding: 0.65rem 0.55rem;
        border-radius: 16px;
    }
    .month-day-num {
        font-size: 1.25rem;
        font-weight: 900;
    }
    .child-dot {
        width: 10px;
        height: 10px;
    }
    .month-event-pill {
        font-size: 0.86rem;
        padding: 5px 8px;
        border-radius: 8px;
        font-weight: 700;
        gap: 6px;
    }
    .month-event-pill-time {
        font-size: 0.78rem;
        font-weight: 800;
    }
    .month-event-more {
        font-size: 0.82rem;
        padding: 4px 0;
        font-weight: 800;
    }
}

@media (max-width: 640px) {
    .month-grid {
        gap: 0.25rem;
    }
    .month-day {
        min-height: 80px;
        padding: 0.3rem 0.2rem;
        border-radius: 10px;
    }
    .month-day-num {
        font-size: 0.92rem;
    }
    .month-event-pill {
        font-size: 0.72rem;
        padding: 2.5px 3px;
        gap: 3px;
    }
    .month-event-pill-time {
        display: none;
    }
}
.mt-1 { margin-top: 0.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ===== URNIK / SHIFTS KOLEDAR MOBILNA ODZIVNOST ===== */
.shifts-calendar-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
    margin-bottom: 2rem;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.shifts-weekdays-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 900;
    color: var(--text-3);
    margin-bottom: 0.85rem;
    text-transform: uppercase;
}

.shifts-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.shift-grid-cell {
    min-height: clamp(85px, 11vh, 120px);
    border-radius: 14px;
    padding: 0.55rem 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.shift-day-num {
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
}

.shift-wfh-icon {
    font-size: 1.05rem;
    line-height: 1;
}

.shift-child-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.shift-event-line {
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.15rem 0.35rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
}

.shift-grid-badge {
    font-weight: 800;
    font-size: 0.82rem;
    padding: 0.28rem 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1.25;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shift-cat-icon {
    font-size: 1rem;
    line-height: 1;
}

.shift-event-more {
    font-size: 0.75rem;
    font-weight: 800;
    color: #c084fc;
    text-align: center;
    margin-top: 3px;
}

@media (max-width: 640px) {
    .page-content {
        padding: 0.6rem 0.35rem;
    }
    .shifts-calendar-card {
        padding: 0.5rem 0.25rem;
        border-radius: 14px;
    }
    .shifts-weekdays-grid {
        gap: 2px;
        font-size: 0.68rem;
        margin-bottom: 0.35rem;
    }
    .shifts-month-grid {
        gap: 3px;
    }
    .shift-grid-cell {
        min-height: 58px;
        padding: 0.25rem 0.12rem;
        border-radius: 8px;
    }
    .shift-day-num {
        font-size: 0.78rem;
    }
    .shift-wfh-icon {
        font-size: 0.65rem;
    }
    .shift-child-dot {
        width: 6px;
        height: 6px;
    }
    .shift-grid-badge {
        font-size: 0.6rem;
        padding: 0.1rem 0.25rem;
        border-radius: 5px;
        gap: 2px;
    }
    .shift-cat-icon {
        font-size: 0.65rem;
    }
    .shift-event-line {
        font-size: 0.52rem;
        gap: 2px;
        padding: 0;
        background: none;
    }
    .shift-event-more {
        font-size: 0.58rem;
    }
}
