:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #dbe3ef;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #dc2626;
    --warning: #d97706;
    --success: #15803d;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 16px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { color: inherit; }

.topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 24px;
    background: #0f172a;
    color: white;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 4px 18px rgba(0,0,0,0.16);
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.brand-icon { width: 42px; height: 42px; display: grid; place-items: center; background: rgba(255,255,255,0.12); border-radius: 12px; font-size: 22px; }
.brand-title { font-weight: 700; font-size: 18px; }
.brand-subtitle { color: #cbd5e1; font-size: 12px; margin-top: 2px; }

.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { text-decoration: none; color: #e5e7eb; padding: 9px 12px; border-radius: 999px; font-size: 14px; }
.nav a:hover, .nav a.active { background: rgba(255,255,255,0.13); color: white; }

.container { max-width: 1600px; margin: 0 auto; padding: 24px; }
.footer { color: var(--muted); text-align: center; padding: 18px; font-size: 13px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-head h1 { margin: 0 0 6px; font-size: 28px; }
.page-head p { margin: 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.panel, .card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.panel { padding: 18px; margin-bottom: 18px; }
.panel.soft { box-shadow: none; background: #f8fafc; }
.panel.narrow { max-width: 560px; }
.panel-title { font-weight: 700; font-size: 17px; margin-bottom: 14px; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.card { padding: 18px; }
.card-label { color: var(--muted); font-size: 13px; }
.card-value { margin-top: 8px; font-size: 32px; font-weight: 800; }
.card-value.small { font-size: 21px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    border-radius: 10px;
    padding: 10px 14px;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    min-height: 38px;
}
.btn:hover { background: #f8fafc; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.small { padding: 6px 10px; min-height: 30px; font-size: 12px; }
.btn.danger { color: white; background: var(--danger); border-color: var(--danger); }

.notice { border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; font-weight: 700; }
.notice.success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.notice.error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.form-grid { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.form-grid.one-column { grid-template-columns: 1fr; }
.form-grid label { font-size: 13px; color: var(--muted); font-weight: 700; display: flex; flex-direction: column; gap: 6px; }
.form-grid label.wide { grid-column: span 2; }
.form-actions { display: flex; align-items: end; }
.check-label { justify-content: center; gap: 8px !important; flex-direction: row !important; align-items: center; color: var(--text) !important; }

input, select, textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    min-height: 38px;
    padding: 8px 10px;
    font: inherit;
    background: white;
}
input:focus, select:focus { outline: 2px solid rgba(37, 99, 235, .18); border-color: var(--primary); }
.number-input { max-width: 90px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.inline-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.inline-form label { font-size: 13px; color: var(--muted); font-weight: 700; display: flex; flex-direction: column; gap: 5px; }

.table-wrap { overflow: auto; border-radius: 12px; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; }
.data-table th, .data-table td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: middle; }
.data-table th { background: #f8fafc; font-size: 13px; color: #334155; position: sticky; top: 0; z-index: 2; }
.data-table.compact th, .data-table.compact td { padding: 8px 10px; }
.data-table tr:last-child td { border-bottom: 0; }
.empty { color: var(--muted); text-align: center; padding: 26px !important; }
.muted-row { opacity: .55; }
.warn-text { color: var(--warning); }
.danger-text { color: var(--danger); }
.hint { color: var(--muted); font-size: 13px; }
.field-hint { color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.2; }
.date-hr-input { min-width: 130px; font-variant-numeric: tabular-nums; }

.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 10px; font-size: 13px; font-weight: 800; border: 1px solid rgba(0,0,0,.08); }
.badge-I, .shift-I { background: #dbeafe !important; color: #1e40af !important; }
.badge-II, .shift-II { background: #ede9fe !important; color: #5b21b6 !important; }
.badge-D, .shift-D { background: #ffedd5 !important; color: #9a3412 !important; }
.badge-GO, .shift-GO { background: #dcfce7 !important; color: #166534 !important; }
.badge-BO, .shift-BO { background: #e5e7eb !important; color: #374151 !important; }
.badge-S, .shift-S { background: #fef9c3 !important; color: #854d0e !important; }
.holiday-sample { background: #fee2e2; color: #991b1b; }

.schedule-wrap { max-height: calc(100vh - 280px); }
.schedule-table { min-width: 1250px; font-size: 13px; }
.schedule-table th, .schedule-table td { border: 1px solid var(--line); text-align: center; padding: 4px; }
.schedule-table thead th { position: sticky; top: 0; background: #f8fafc; z-index: 3; }
.sticky-col { position: sticky; left: 0; z-index: 4; background: #fff; box-shadow: 2px 0 0 var(--line); }
.schedule-table thead .sticky-col { z-index: 5; background: #f8fafc; }
.employee-col { min-width: 180px; max-width: 220px; text-align: left !important; padding: 8px !important; }
.employee-note { color: var(--muted); font-size: 11px; margin-top: 3px; font-weight: 400; }
.day-col { min-width: 72px; max-width: 82px; vertical-align: top; }
.day-col strong { display: block; font-size: 13px; margin-top: 2px; }
.day-col small { display: block; font-size: 10px; color: #991b1b; line-height: 1.15; margin-top: 2px; }
.day-col.weekend, .schedule-cell.weekend { background: #fff7ed; }
.day-col.holiday, .schedule-cell.holiday { background: #fee2e2; }
.day-col.outside-month, .schedule-cell.outside-month { opacity: .58; }
.schedule-cell { min-width: 72px; }
.shift-select {
    min-height: 34px;
    border: 0;
    border-radius: 8px;
    font-weight: 800;
    text-align: center;
    text-align-last: center;
    padding: 4px;
    cursor: pointer;
}
.shift-select:not(.shift-I):not(.shift-II):not(.shift-D):not(.shift-GO):not(.shift-BO):not(.shift-S) { background: #fff; color: #64748b; border: 1px solid #e2e8f0; }
.summary-col { min-width: 90px; background: #f8fafc; font-size: 14px; }
.save-status { margin-top: 12px; color: var(--muted); font-size: 13px; font-weight: 700; }
.save-status.saved { color: var(--success); }
.save-status.saving { color: var(--primary); }
.save-status.warning { color: var(--warning); }
.save-status.error { color: var(--danger); }

.login-page { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #0f172a, #1d4ed8); padding: 20px; }
.login-card { width: min(420px, 100%); background: white; border-radius: 24px; padding: 28px; box-shadow: 0 24px 70px rgba(0,0,0,.25); }
.login-logo { width: 58px; height: 58px; display: grid; place-items: center; background: #dbeafe; border-radius: 18px; font-size: 28px; margin-bottom: 14px; }
.login-card h1 { margin: 0 0 6px; }
.login-card p { margin-top: 0; color: var(--muted); }
.login-card form { display: grid; gap: 10px; }
.login-card label { font-size: 13px; color: var(--muted); font-weight: 700; }
.login-hint { margin-top: 16px; color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    .nav { justify-content: flex-start; }
    .page-head { flex-direction: column; }
    .cards { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid label.wide { grid-column: span 1; }
    .container { padding: 14px; }
}

@media print {
    .topbar, .footer, .toolbar, .actions, .btn { display: none !important; }
    body { background: white; }
    .container { max-width: none; padding: 0; }
    .panel { box-shadow: none; border: 0; padding: 0; }
    .table-wrap { overflow: visible; border: 0; }
}

.notice.info { background: #eaf4ff; border-color: #b9dcff; color: #164a75; }
.compact-notice { margin: 0; padding: 10px 12px; }
.mini-badge { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 999px; background: #eef2ff; color: #334155; font-size: 12px; font-weight: 700; }
.btn.danger { background: #fee2e2; border-color: #fecaca; color: #991b1b; }
.btn.danger:hover { background: #fecaca; }
.sub-row td { background: #fafafa; padding-top: 0; }
.clean-list { margin: 0; padding-left: 20px; line-height: 1.8; }
.shift-select:disabled { opacity: 0.75; cursor: not-allowed; }

.btn.ghost { background: #fff; color: var(--primary); border-color: #bfdbfe; }
.btn.ghost:hover { background: #eff6ff; }

.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 12px; font-weight: 900; }
.badge-REQ { background: #fce7f3; color: #9d174d; }
.own-row .sticky-col { background: #eff6ff; }
.has-request { outline: 2px solid #f472b6; outline-offset: -2px; }
.cell-request-form { margin-top: 3px; }
.request-go-btn, .request-chip { border: 0; border-radius: 999px; padding: 3px 6px; font-size: 10px; font-weight: 900; background: #fce7f3; color: #9d174d; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.request-go-btn:hover, .request-chip:hover { background: #fbcfe8; }
.summary-col small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 600; }
.status-pill { display: inline-flex; border-radius: 999px; padding: 5px 9px; font-weight: 800; font-size: 12px; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-approved { background: #dcfce7; color: #166534; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.actions-cell { white-space: nowrap; }
.inline-mini-form { display: inline-flex; margin: 0 4px 4px 0; }

/* v1.4: jasniji prikaz današnjeg datuma i diskretniji unos prijedloga GO */
.day-col.today-column,
.schedule-cell.today-column {
    background: #e0f2fe !important;
    box-shadow: inset 0 0 0 2px #0ea5e9;
}
.day-col.today-column strong::after {
    content: " danas";
    display: block;
    margin-top: 2px;
    color: #0369a1;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}
.badge-REQ { background: #f8fafc; color: #475569; border-style: dashed; }
.badge-REQ-PENDING { background: #fce7f3; color: #9d174d; }
.has-request { outline: 2px solid #f472b6; outline-offset: -2px; }
.cell-request-form { margin-top: 3px; display: flex; justify-content: center; }
.request-go-btn {
    width: 22px;
    height: 22px;
    min-width: 22px;
    padding: 0;
    border-radius: 7px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 15px;
    line-height: 1;
    font-weight: 900;
    cursor: pointer;
    opacity: .26;
    transition: opacity .15s ease, background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.own-row .schedule-cell:hover .request-go-btn,
.request-go-btn:focus {
    opacity: 1;
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
    transform: scale(1.04);
}
.pending-vacation-chip {
    background: #fce7f3 !important;
    color: #9d174d !important;
    border: 1px solid #f9a8d4 !important;
    padding: 3px 7px !important;
    opacity: 1 !important;
    white-space: nowrap;
}
.pending-vacation-chip:hover { background: #fbcfe8 !important; }
.request-chip {
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (hover: none) {
    .request-go-btn { opacity: .65; }
}

/* v1.5: tjedni / mjesečni / godišnji pogled + bolji mobile prikaz */
.schedule-toolbar {
    align-items: stretch;
}
.view-switch {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.view-switch .btn {
    min-width: 106px;
}
.schedule-table-week {
    min-width: 980px;
}
.schedule-table-month {
    min-width: 1250px;
}
.schedule-wrap-week {
    max-height: calc(100vh - 290px);
}
.year-overview {
    display: grid;
    gap: 16px;
}
.year-card {
    padding: 16px;
}
.year-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}
.year-card-head h2 {
    margin: 0 0 4px;
    font-size: 18px;
}
.year-card-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}
.year-go-balance {
    min-width: 120px;
    text-align: right;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 12px;
}
.year-go-balance strong {
    display: block;
    font-size: 26px;
    line-height: 1;
}
.year-go-balance span,
.year-go-balance small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}
.year-month-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 8px;
}
.year-month-card {
    min-height: 92px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 14px;
    text-decoration: none;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 7px;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.year-month-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    border-color: #bfdbfe;
}
.year-month-card.current-month {
    background: #e0f2fe;
    border-color: #0ea5e9;
    box-shadow: inset 0 0 0 1px #0ea5e9;
}
.year-month-card.empty-month {
    background: #fafafa;
}
.year-month-name {
    font-weight: 900;
    color: #334155;
    font-size: 13px;
}
.year-mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: flex-start;
}
.mini-shift {
    display: inline-flex;
    border-radius: 999px;
    padding: 3px 6px;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.1;
}
.pending-mini {
    background: #fce7f3;
    color: #9d174d;
}
.muted-mini {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 1200px) {
    .year-month-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .topbar {
        padding: 10px 12px;
        gap: 10px;
    }
    .brand {
        min-width: 0;
        width: 100%;
    }
    .brand-icon {
        width: 36px;
        height: 36px;
        font-size: 19px;
    }
    .brand-title {
        font-size: 16px;
    }
    .brand-subtitle {
        font-size: 11px;
    }
    .nav {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 4px;
    }
    .nav a {
        white-space: nowrap;
        font-size: 13px;
        padding: 8px 10px;
    }
    .container {
        padding: 10px;
    }
    .page-head h1 {
        font-size: 22px;
    }
    .page-head p {
        font-size: 13px;
    }
    .actions,
    .inline-form,
    .view-switch {
        width: 100%;
        justify-content: flex-start;
    }
    .view-switch {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .view-switch .btn {
        min-width: 0;
        padding-left: 8px;
        padding-right: 8px;
    }
    .inline-form label {
        flex: 1 1 140px;
    }
    .legend {
        gap: 6px;
        margin-bottom: 10px;
    }
    .badge {
        font-size: 11px;
        padding: 6px 8px;
    }
    .panel {
        padding: 10px;
        border-radius: 14px;
    }
    .schedule-wrap {
        max-height: calc(100vh - 335px);
        border-radius: 10px;
    }
    .schedule-table {
        font-size: 12px;
    }
    .schedule-table-week {
        min-width: 860px;
    }
    .schedule-table-month {
        min-width: 1120px;
    }
    .employee-col {
        min-width: 124px;
        max-width: 124px;
        padding: 6px !important;
        font-size: 11px;
    }
    .employee-note {
        font-size: 9px;
        line-height: 1.2;
    }
    .day-col,
    .schedule-cell {
        min-width: 58px;
        max-width: 64px;
    }
    .day-col strong {
        font-size: 11px;
    }
    .day-col small {
        font-size: 8px;
    }
    .shift-select {
        min-height: 31px;
        font-size: 12px;
        padding: 2px;
    }
    .summary-col {
        min-width: 74px;
        font-size: 12px;
    }
    .summary-col small {
        font-size: 9px;
    }
    .request-go-btn {
        width: 20px;
        height: 20px;
        min-width: 20px;
        font-size: 14px;
        opacity: .55;
    }
    .pending-vacation-chip {
        padding: 2px 5px !important;
        font-size: 9px !important;
    }
    .year-card-head {
        flex-direction: column;
    }
    .year-go-balance {
        width: 100%;
        text-align: left;
    }
    .year-month-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .year-month-card {
        min-height: 86px;
    }
}

@media (max-width: 420px) {
    .view-switch {
        grid-template-columns: 1fr;
    }
    .btn {
        min-height: 36px;
        padding: 8px 10px;
    }
    .year-month-grid {
        grid-template-columns: 1fr;
    }
}


/* v1.7: odjeli, rimske oznake smjena i komentar u ćeliji */
.department-filter-form label {
    min-width: 220px;
}
.department-row th {
    position: sticky;
    left: 0;
    z-index: 4;
    background: #e2e8f0 !important;
    color: #0f172a;
    text-align: left !important;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 7px 10px !important;
    box-shadow: 0 1px 0 var(--line), 2px 0 0 var(--line);
}
.department-mini {
    color: #475569 !important;
    font-weight: 800;
    margin-bottom: 5px !important;
}
.shift-note {
    display: block;
    margin-top: 4px;
    min-height: 24px;
    height: 24px;
    padding: 2px 5px;
    border-radius: 7px;
    border: 1px solid #dbe3ef;
    font-size: 10px;
    line-height: 1.1;
    color: #334155;
    background: rgba(255,255,255,.9);
}
.shift-note::placeholder {
    color: #cbd5e1;
}
.cell-note {
    margin-top: 4px;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 7px;
    padding: 3px 5px;
    background: rgba(255,255,255,.72);
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 10px;
    font-weight: 800;
}
.shift-select.shift-II {
    font-size: 12px;
}

@media (max-width: 760px) {
    .department-filter-form label {
        min-width: 0;
        width: 100%;
    }
    .shift-note {
        min-height: 22px;
        height: 22px;
        font-size: 9px;
        padding: 1px 3px;
    }
    .cell-note {
        max-width: 58px;
        font-size: 9px;
        padding: 2px 4px;
    }
    .department-row th {
        font-size: 10px;
        padding: 6px !important;
    }
}

/* v1.8: ispis svih pogleda rasporeda i izvještaja */
.print-only,
.print-cell-content {
    display: none !important;
}
.print-button {
    white-space: nowrap;
}

@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }

    html,
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 10px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .topbar,
    .footer,
    .toolbar,
    .actions,
    .btn,
    .save-status,
    .notice,
    .cell-request-form,
    .request-go-btn,
    .request-chip,
    .shift-select,
    .shift-note,
    .cell-note {
        display: none !important;
    }

    .print-only,
    .print-cell-content {
        display: block !important;
    }

    .page-head {
        display: none !important;
    }

    .print-header {
        margin: 0 0 6mm;
        padding-bottom: 3mm;
        border-bottom: 1px solid #000;
    }

    .print-header h1 {
        margin: 0 0 2mm;
        font-size: 16px;
    }

    .print-header p {
        margin: 0;
        font-size: 10px;
        color: #333;
    }

    .container {
        max-width: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .panel,
    .card,
    .year-card {
        box-shadow: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 0 5mm !important;
        background: #fff !important;
    }

    .legend {
        margin: 0 0 4mm !important;
        gap: 2mm !important;
        page-break-inside: avoid;
    }

    .badge {
        padding: 1mm 2mm !important;
        font-size: 8px !important;
        border: 1px solid #999 !important;
    }

    .table-wrap,
    .schedule-wrap {
        overflow: visible !important;
        max-height: none !important;
        border: 0 !important;
        border-radius: 0 !important;
    }

    table {
        width: 100% !important;
        border-collapse: collapse !important;
        page-break-inside: auto;
    }

    thead {
        display: table-header-group;
    }

    tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    th,
    td {
        box-shadow: none !important;
    }

    .sticky-col,
    .schedule-table thead th,
    .data-table th,
    .department-row th {
        position: static !important;
        left: auto !important;
        top: auto !important;
        z-index: auto !important;
    }

    .schedule-table {
        min-width: 0 !important;
        width: 100% !important;
        table-layout: fixed !important;
        font-size: 6.4px !important;
        line-height: 1.05 !important;
    }

    .schedule-table-week {
        font-size: 8.3px !important;
    }

    .schedule-table th,
    .schedule-table td {
        border: 1px solid #777 !important;
        padding: 1.1mm .7mm !important;
        vertical-align: top !important;
        text-align: center !important;
    }

    .employee-col {
        width: 32mm !important;
        min-width: 32mm !important;
        max-width: 32mm !important;
        text-align: left !important;
        font-size: 7.2px !important;
        word-break: normal !important;
        overflow-wrap: anywhere !important;
    }

    .schedule-table-week .employee-col {
        width: 38mm !important;
        min-width: 38mm !important;
        max-width: 38mm !important;
        font-size: 8.5px !important;
    }

    .employee-note,
    .summary-col small {
        font-size: 5.8px !important;
        color: #333 !important;
    }

    .day-col,
    .schedule-cell {
        min-width: 0 !important;
        max-width: none !important;
        width: auto !important;
    }

    .day-col strong {
        font-size: 6.6px !important;
        margin-top: .4mm !important;
    }

    .schedule-table-week .day-col strong {
        font-size: 8px !important;
    }

    .day-col small {
        font-size: 5.3px !important;
        color: #111 !important;
        line-height: 1 !important;
    }

    .summary-col {
        width: 18mm !important;
        min-width: 18mm !important;
        max-width: 18mm !important;
        font-size: 7px !important;
    }

    .print-cell-content {
        min-height: 5mm;
        line-height: 1.1;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .print-cell-content strong,
    .print-cell-content span,
    .print-cell-content small {
        display: block;
    }

    .print-cell-content strong {
        font-size: 8px;
        font-weight: 900;
    }

    .schedule-table-week .print-cell-content strong {
        font-size: 10px;
    }

    .print-cell-content small {
        margin-top: .7mm;
        font-size: 5.5px;
        font-weight: 700;
    }

    .department-row th {
        text-align: left !important;
        padding: 1.5mm !important;
        font-size: 8px !important;
        background: #ddd !important;
    }

    .day-col.today-column,
    .schedule-cell.today-column {
        box-shadow: inset 0 0 0 1px #000 !important;
    }

    .day-col.today-column strong::after {
        content: " danas";
        font-size: 5px !important;
    }

    .year-overview {
        display: block !important;
    }

    .year-card {
        page-break-inside: avoid;
        break-inside: avoid;
        border-bottom: 1px solid #999 !important;
        padding-bottom: 4mm !important;
    }

    .year-card-head {
        display: flex !important;
        margin-bottom: 2mm !important;
    }

    .year-card-head h2 {
        font-size: 11px !important;
        margin: 0 !important;
    }

    .year-card-head p,
    .department-mini {
        font-size: 7px !important;
        margin: .5mm 0 0 !important;
        color: #333 !important;
    }

    .year-go-balance {
        min-width: 25mm !important;
        padding: 1.5mm !important;
        border-radius: 0 !important;
        border: 1px solid #999 !important;
    }

    .year-go-balance strong {
        font-size: 14px !important;
    }

    .year-go-balance span,
    .year-go-balance small {
        font-size: 6px !important;
    }

    .year-month-grid {
        display: grid !important;
        grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
        gap: 1.5mm !important;
    }

    .year-month-card {
        min-height: 17mm !important;
        padding: 1.3mm !important;
        border-radius: 0 !important;
        border: 1px solid #999 !important;
        text-decoration: none !important;
        color: #000 !important;
    }

    .year-month-name {
        font-size: 7px !important;
    }

    .mini-shift,
    .muted-mini {
        font-size: 5.5px !important;
        padding: .7mm 1mm !important;
    }

    .data-table {
        font-size: 7.2px !important;
        table-layout: auto !important;
    }

    .data-table th,
    .data-table td {
        border: 1px solid #777 !important;
        padding: 1.2mm !important;
    }

    .hint {
        font-size: 8px !important;
    }
}

/* v1.10: čisti pregled za korisnike, lokalna navigacija i bolji mobilni prikaz */
.schedule-local-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: -4px 0 10px;
}
.schedule-nav-actions {
    width: auto;
}
.shift-readonly {
    min-height: 34px;
    border-radius: 8px;
    font-weight: 900;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    user-select: none;
}
.shift-readonly.shift-empty {
    background: transparent !important;
    border: 0 !important;
    color: transparent !important;
}
.own-row .shift-readonly.shift-empty {
    min-height: 24px;
}
.schedule-cell .shift-readonly + .print-cell-content + .cell-note,
.schedule-cell .shift-readonly + .print-cell-content + .cell-request-form {
    margin-top: 2px;
}

@media (max-width: 760px) {
    .schedule-local-nav {
        justify-content: stretch;
        margin: 0 0 8px;
    }
    .schedule-nav-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }
    .schedule-nav-actions .btn {
        min-width: 0;
        padding: 8px 6px;
        font-size: 12px;
        white-space: nowrap;
    }
    .compact-notice {
        font-size: 12px;
        line-height: 1.35;
    }
    .legend {
        max-height: 74px;
        overflow-y: auto;
    }
    .schedule-panel {
        padding: 6px;
        margin-left: -4px;
        margin-right: -4px;
    }
    .schedule-wrap {
        max-height: calc(100vh - 300px);
    }
    .shift-readonly {
        min-height: 30px;
        font-size: 12px;
        padding: 2px;
    }
}

@media (max-width: 520px) {
    .topbar {
        position: static;
    }
    .container {
        padding: 6px;
    }
    .page-head {
        margin-bottom: 10px;
    }
    .page-head h1 {
        font-size: 19px;
    }
    .page-head p {
        font-size: 12px;
    }
    .toolbar {
        gap: 8px;
    }
    .schedule-toolbar {
        padding: 8px;
    }
    .inline-form label {
        flex: 1 1 110px;
    }
    input, select, textarea {
        min-height: 34px;
        padding: 6px 8px;
        font-size: 13px;
    }
    .legend {
        gap: 4px;
        margin: 6px 0 8px;
    }
    .badge {
        font-size: 10px;
        padding: 5px 6px;
    }
    .schedule-table-week {
        min-width: 760px;
    }
    .schedule-table-month {
        min-width: 980px;
    }
    .employee-col {
        min-width: 108px;
        max-width: 108px;
        font-size: 10px;
        line-height: 1.15;
    }
    .employee-note {
        font-size: 8.5px;
    }
    .day-col,
    .schedule-cell {
        min-width: 50px;
        max-width: 54px;
    }
    .day-col strong {
        font-size: 10px;
    }
    .day-col small {
        display: none;
    }
    .summary-col {
        min-width: 60px;
        font-size: 11px;
    }
    .summary-col small {
        font-size: 8px;
    }
    .request-go-btn {
        width: 18px;
        height: 18px;
        min-width: 18px;
        font-size: 12px;
        border-radius: 6px;
    }
    .cell-note {
        max-width: 48px;
        font-size: 8px;
    }
    .shift-readonly {
        min-height: 27px;
        font-size: 11px;
    }
}

@media print {
    .no-print,
    .schedule-local-nav,
    .shift-readonly {
        display: none !important;
    }
}

/* v1.12: vlastiti veliki prikaz komentara, bez browser title tooltipa */
.comment-tooltip {
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    transform: translateX(-50%) translateY(6px);
    width: max-content;
    max-width: min(640px, calc(100vw - 24px));
    min-width: 260px;
    padding: 14px 16px 15px;
    border-radius: 14px;
    background: #ffffff;
    color: #0f172a;
    border: 2px solid #2563eb;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .28);
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .10s ease, transform .10s ease, visibility .10s ease;
}
.comment-tooltip::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -8px;
    width: 14px;
    height: 14px;
    transform: translateX(-50%) rotate(45deg);
    background: #ffffff;
    border-left: 2px solid #2563eb;
    border-top: 2px solid #2563eb;
}
.comment-tooltip.tooltip-above::before {
    top: auto;
    bottom: -8px;
    border-left: 0;
    border-top: 0;
    border-right: 2px solid #2563eb;
    border-bottom: 2px solid #2563eb;
}
.comment-tooltip-label {
    margin-bottom: 5px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.comment-tooltip-body {
    font-size: 20px;
    font-weight: 900;
    color: #111827;
}
.comment-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.comment-tooltip.tooltip-above.is-visible {
    transform: translateX(-50%) translateY(0);
}
.schedule-cell.has-note,
.cell-note,
.shift-note:not(:placeholder-shown) {
    cursor: help;
}
.cell-note:hover {
    background: #fff;
    border-color: #93c5fd;
    color: #0f172a;
}

@media (max-width: 760px) {
    .comment-tooltip {
        max-width: calc(100vw - 16px);
        min-width: 220px;
        padding: 12px 13px;
        border-radius: 13px;
    }
    .comment-tooltip-body {
        font-size: 17px;
    }
}

@media print {
    .comment-tooltip {
        display: none !important;
    }
}

/* v1.13: izblijedene strelice/kvačice na administratorskim padajućim izbornicima u rasporedu */
.shift-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%2394a3b8' stroke-opacity='.34' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 6px center !important;
    background-size: 13px 13px !important;
    padding-right: 18px !important;
}
.shift-select:hover,
.shift-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%2364748b' stroke-opacity='.52' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
.shift-select::-ms-expand {
    display: none;
}

@media (max-width: 760px) {
    .shift-select {
        background-position: right 4px center !important;
        background-size: 11px 11px !important;
        padding-right: 14px !important;
    }
}

/* v1.16 - dopuštenja po odjelima */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 14px;
    margin-top: 6px;
}
.checkbox-grid.compact-checks {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 4px 10px;
    min-width: 260px;
}
.check-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
    font-size: 13px;
    color: #243044;
}
.check-label input {
    width: auto;
    min-width: 16px;
}
.dept-permissions {
    border: 1px solid #d8e0ea;
    border-radius: 14px;
    padding: 12px 14px;
    background: #f8fafc;
}
.dept-permissions legend {
    padding: 0 8px;
    font-weight: 800;
    color: #223047;
}
.user-permission-form select[name="role"] {
    min-width: 150px;
}

/* v1.21: preglednije kartice za djelatnike */
.employee-list-panel {
    padding: 20px;
}
.employee-list-hint {
    margin: -4px 0 16px;
}
.employee-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.employee-card {
    display: block;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}
.employee-card-inactive {
    opacity: .58;
    background: #f8fafc;
}
.employee-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e5edf7;
}
.employee-active-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    color: #334155;
    white-space: nowrap;
}
.employee-active-toggle input[type="checkbox"] {
    width: 20px;
    min-height: 20px;
    height: 20px;
    accent-color: var(--primary);
}
.employee-login-summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 14px;
}
.employee-card-grid {
    display: grid;
    grid-template-columns: minmax(260px, .95fr) minmax(420px, 1.45fr) minmax(260px, .8fr);
    gap: 14px;
    align-items: stretch;
}
.employee-card-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
}
.employee-card-block label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.employee-card-block label:last-child {
    margin-bottom: 0;
}
.block-title {
    font-size: 13px;
    font-weight: 900;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 10px;
}
.employee-vacation-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(90px, 1fr));
    gap: 10px;
    align-items: stretch;
}
.employee-vacation-grid label {
    margin: 0;
}
.employee-vacation-grid .number-input,
.employee-meta-block .number-input {
    max-width: none;
}
.vacation-stat {
    min-height: 58px;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    padding: 9px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.vacation-stat span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}
.vacation-stat strong {
    font-size: 20px;
    line-height: 1;
}
.vacation-total {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.employee-meta-block {
    display: flex;
    flex-direction: column;
}
.employee-save-btn {
    width: 100%;
    margin-top: auto;
}
.employee-empty {
    background: #f8fafc;
    border: 1px dashed var(--line);
    border-radius: 14px;
}

@media (max-width: 1180px) {
    .employee-card-grid {
        grid-template-columns: 1fr 1fr;
    }
    .employee-meta-block {
        grid-column: span 2;
    }
}

@media (max-width: 760px) {
    .employee-list-panel {
        padding: 12px;
    }
    .employee-card {
        padding: 12px;
        border-radius: 14px;
    }
    .employee-card-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .employee-login-summary {
        justify-content: flex-start;
    }
    .employee-card-grid {
        grid-template-columns: 1fr;
    }
    .employee-meta-block {
        grid-column: auto;
    }
    .employee-vacation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .vacation-stat strong {
        font-size: 18px;
    }
}


/* v1.25: zaseban i kompaktniji mobilni prikaz rasporeda */
@media (max-width: 820px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .schedule-page .topbar {
        position: static;
        min-height: 0;
        padding: 8px 10px;
        gap: 7px;
        align-items: stretch;
    }

    .schedule-page .brand {
        gap: 8px;
    }

    .schedule-page .brand-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        border-radius: 10px;
        font-size: 17px;
    }

    .schedule-page .brand-title {
        font-size: 15px;
        line-height: 1.15;
        white-space: normal;
    }

    .schedule-page .brand-subtitle {
        font-size: 10px;
        line-height: 1.2;
    }

    .schedule-page .nav {
        gap: 5px;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .schedule-page .nav::-webkit-scrollbar {
        display: none;
    }

    .schedule-page .nav a {
        font-size: 12px;
        padding: 6px 9px;
    }

    .schedule-page .container {
        padding: 8px 6px;
    }

    .schedule-page .page-head {
        margin-bottom: 8px;
    }

    .schedule-page .page-head h1 {
        font-size: 20px;
        line-height: 1.15;
    }

    .schedule-page .page-head p {
        font-size: 12px;
        line-height: 1.25;
    }

    .schedule-page .schedule-toolbar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 8px;
        margin-bottom: 10px;
        border-radius: 14px;
        box-shadow: none;
    }

    .schedule-page .view-switch {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
    }

    .schedule-page .view-switch .btn,
    .schedule-page .schedule-toolbar .btn {
        min-width: 0;
        min-height: 34px;
        padding: 7px 8px;
        font-size: 12px;
        border-radius: 10px;
    }

    .schedule-page .schedule-toolbar .inline-form {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 8px;
    }

    .schedule-page .schedule-toolbar .department-filter-form {
        grid-template-columns: 1fr;
    }

    .schedule-page .schedule-toolbar .inline-form label,
    .schedule-page .department-filter-form label {
        width: 100%;
        min-width: 0;
        flex: none;
        font-size: 11px;
        gap: 4px;
    }

    .schedule-page .field-hint {
        display: none;
    }

    .schedule-page input,
    .schedule-page select,
    .schedule-page textarea {
        min-height: 34px;
        padding: 6px 8px;
        font-size: 13px;
        border-radius: 9px;
    }

    .schedule-page .compact-notice {
        margin: 6px 0 8px;
        padding: 9px 10px;
        font-size: 12px;
        line-height: 1.35;
        border-radius: 12px;
    }

    .schedule-page .legend {
        flex-wrap: nowrap;
        overflow-x: auto;
        max-height: none;
        gap: 6px;
        margin: 6px 0 9px;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .schedule-page .legend::-webkit-scrollbar {
        display: none;
    }

    .schedule-page .legend .badge {
        flex: 0 0 auto;
        font-size: 10px;
        padding: 5px 8px;
        white-space: nowrap;
    }

    .schedule-page .schedule-local-nav {
        margin: 0 0 8px;
    }

    .schedule-page .schedule-nav-actions {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
    }

    .schedule-page .schedule-nav-actions .btn {
        min-width: 0;
        min-height: 34px;
        padding: 7px 5px;
        font-size: 12px;
        border-radius: 10px;
        white-space: nowrap;
    }

    .schedule-page .schedule-panel {
        padding: 4px;
        margin-left: -4px;
        margin-right: -4px;
        border-radius: 12px;
    }

    .schedule-page .schedule-wrap {
        max-height: calc(100dvh - 235px);
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 10px;
    }

    .schedule-page .schedule-table {
        table-layout: fixed;
        font-size: 11px;
        line-height: 1.15;
    }

    .schedule-page .schedule-table-week {
        min-width: 820px;
    }

    .schedule-page .schedule-table-month {
        min-width: 1220px;
    }

    .schedule-page .schedule-table th,
    .schedule-page .schedule-table td {
        padding: 2px !important;
    }

    .schedule-page .employee-col {
        width: 118px;
        min-width: 118px;
        max-width: 118px;
        padding: 6px !important;
        font-size: 10.5px;
        line-height: 1.18;
        overflow-wrap: anywhere;
    }

    .schedule-page .employee-note {
        margin-top: 3px;
        font-size: 8.5px;
        line-height: 1.2;
    }

    .schedule-page .day-col,
    .schedule-page .schedule-cell {
        width: 48px;
        min-width: 48px;
        max-width: 48px;
    }

    .schedule-page .day-col div {
        font-size: 10px;
        line-height: 1.05;
    }

    .schedule-page .day-col strong {
        font-size: 11px;
        line-height: 1.05;
        margin-top: 1px;
    }

    .schedule-page .day-col small {
        display: block;
        max-width: 44px;
        margin: 2px auto 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 7.5px;
        line-height: 1.05;
    }

    .schedule-page .day-col.today-column strong::after {
        font-size: 8px;
        line-height: 1;
        margin-top: 1px;
    }

    .schedule-page .department-row th {
        font-size: 10px;
        line-height: 1.15;
        padding: 6px !important;
        letter-spacing: .025em;
    }

    .schedule-page .shift-select,
    .schedule-page .shift-readonly {
        min-height: 28px;
        height: 28px;
        border-radius: 8px;
        font-size: 12px;
        padding: 2px 13px 2px 2px !important;
        line-height: 1;
    }

    .schedule-page .shift-readonly {
        padding-right: 2px !important;
    }

    .schedule-page .shift-select {
        background-position: right 3px center !important;
        background-size: 10px 10px !important;
    }

    .schedule-page .shift-note {
        display: none;
        margin-top: 2px;
        height: 20px;
        min-height: 20px;
        padding: 1px 3px;
        border-radius: 7px;
        font-size: 8.5px;
        line-height: 1;
    }

    .schedule-page .shift-note:not(:placeholder-shown),
    .schedule-page .schedule-cell.has-note .shift-note,
    .schedule-page .schedule-cell:focus-within .shift-note {
        display: block;
    }

    .schedule-page .cell-note {
        max-width: 44px;
        margin: 2px auto 0;
        padding: 2px 3px;
        border-radius: 7px;
        font-size: 8.5px;
        line-height: 1.1;
    }

    .schedule-page .cell-request-form {
        margin-top: 2px;
    }

    .schedule-page .request-go-btn {
        width: 17px;
        height: 17px;
        min-width: 17px;
        border-radius: 6px;
        font-size: 11px;
        opacity: .22;
    }

    .schedule-page .request-go-btn:focus,
    .schedule-page .request-go-btn:active {
        opacity: 1;
    }

    .schedule-page .pending-vacation-chip {
        padding: 2px 4px !important;
        font-size: 8.5px !important;
        line-height: 1.05;
    }

    .schedule-page .summary-col {
        width: 58px;
        min-width: 58px;
        max-width: 58px;
        font-size: 11px;
        line-height: 1.1;
    }

    .schedule-page .summary-col small {
        display: block;
        margin-top: 2px;
        font-size: 8px;
        line-height: 1.1;
    }

    .schedule-page .save-status {
        margin: 6px 4px 0;
        font-size: 12px;
    }

    .schedule-page .comment-tooltip {
        max-width: calc(100vw - 18px);
        min-width: 220px;
    }

    .schedule-page .comment-tooltip-body {
        font-size: 17px;
    }
}

@media (max-width: 420px) {
    .schedule-page .page-head h1 {
        font-size: 18px;
    }

    .schedule-page .schedule-toolbar {
        padding: 7px;
    }

    .schedule-page .view-switch,
    .schedule-page .schedule-nav-actions {
        gap: 5px;
    }

    .schedule-page .schedule-nav-actions .btn {
        font-size: 11px;
        padding-left: 3px;
        padding-right: 3px;
    }

    .schedule-page .employee-col {
        width: 108px;
        min-width: 108px;
        max-width: 108px;
        font-size: 10px;
    }

    .schedule-page .day-col,
    .schedule-page .schedule-cell {
        width: 45px;
        min-width: 45px;
        max-width: 45px;
    }

    .schedule-page .schedule-table-week {
        min-width: 796px;
    }

    .schedule-page .schedule-table-month {
        min-width: 1170px;
    }

    .schedule-page .shift-select,
    .schedule-page .shift-readonly {
        min-height: 27px;
        height: 27px;
        font-size: 11.5px;
    }
}

@media (orientation: landscape) and (max-height: 520px) {
    .schedule-page .topbar,
    .schedule-page .page-head,
    .schedule-page .compact-notice,
    .schedule-page .legend {
        display: none !important;
    }

    .schedule-page .container {
        padding-top: 4px;
    }

    .schedule-page .schedule-toolbar {
        margin-bottom: 6px;
    }

    .schedule-page .schedule-wrap {
        max-height: calc(100dvh - 118px);
    }
}

/* v1.27: raspored bez unutarnjeg vertikalnog scrolla
   Tablica rasporeda ostaje horizontalno pomična, ali visina se širi prema sadržaju.
   Tako na desktopu i mobitelu ostaje samo jedan desni scrollbar stranice. */
.schedule-wrap,
.schedule-wrap-week,
.schedule-page .schedule-wrap {
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
}

.schedule-panel {
    overflow: visible !important;
}

/* Ne skrivaj dno tablice ako ima više djelatnika. */
.schedule-page .schedule-panel,
.schedule-page .panel {
    max-height: none !important;
}

@media (max-width: 760px) {
    .schedule-page .schedule-wrap,
    .schedule-wrap,
    .schedule-wrap-week {
        max-height: none !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
    }

    .schedule-page .schedule-panel {
        overflow: visible !important;
    }
}

/* v1.28 - knjiga najava / knjiga snimanja */
.recording-form-panel .recording-form textarea {
    min-height: 120px;
    resize: vertical;
}
.recording-program-grid {
    max-height: 220px;
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--border, #d8e0ea);
    border-radius: 12px;
    background: #fff;
}
.recording-cards {
    display: grid;
    gap: 14px;
}
.recording-card {
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    background: #fff;
    padding: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.recording-card.status-pending {
    border-left: 6px solid #f59e0b;
}
.recording-card.status-approved {
    border-left: 6px solid #16a34a;
}
.recording-card.status-deleted,
.recording-card.status-rejected {
    opacity: .65;
    border-left: 6px solid #64748b;
}
.recording-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.recording-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: #172033;
}
.recording-meta,
.recording-note,
.attachment-list {
    color: #56637a;
    margin-top: 8px;
}
.recording-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.recording-tags span,
.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: .82rem;
    font-weight: 700;
    background: #eef2ff;
    color: #334155;
}
.status-pill.status-pending { background: #fef3c7; color: #92400e; }
.status-pill.status-approved { background: #dcfce7; color: #166534; }
.status-pill.status-deleted,
.status-pill.status-rejected { background: #e2e8f0; color: #334155; }
.recording-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.attachment-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.attachment-list a {
    background: #f8fafc;
    border: 1px solid #dbe4f0;
    border-radius: 999px;
    padding: 5px 10px;
    text-decoration: none;
    color: #1d4ed8;
    font-weight: 700;
}
.participant-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.participant-column {
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    padding: 12px;
    background: #f8fafc;
    max-height: 340px;
    overflow: auto;
}
.participant-column strong {
    display: block;
    margin-bottom: 8px;
}
.recording-book-table td {
    vertical-align: top;
}
.recording-book-table small {
    color: #64748b;
}
.compact-form {
    grid-template-columns: minmax(240px, 1fr) 160px auto;
}
@media (max-width: 760px) {
    .recording-card-head {
        display: block;
    }
    .recording-card-head .status-pill {
        margin-top: 10px;
    }
    .participant-columns {
        grid-template-columns: 1fr;
    }
    .compact-form {
        grid-template-columns: 1fr;
    }
    .recording-book-wrap {
        overflow-x: auto;
    }
    .recording-book-table {
        min-width: 980px;
    }
}
@media print {
    .recording-card-actions,
    .page-head .actions,
    .toolbar,
    .nav,
    .topbar {
        display: none !important;
    }
}

/* v1.29 - knjiga snimanja: preglednije forme, lokacije i ekipa */
.recording-form-panel .form-grid > .wide,
.recording-form-panel .form-grid fieldset.wide,
.recording-form-panel .form-grid div.wide,
.recording-form-panel .form-grid label.wide {
    grid-column: 1 / -1;
}
.recording-form-panel .recording-form {
    grid-template-columns: repeat(4, minmax(210px, 1fr));
    align-items: start;
}
.recording-form-panel fieldset {
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    padding: 14px;
    background: #fbfdff;
}
.recording-form-panel fieldset legend {
    padding: 0 8px;
    font-weight: 900;
    color: #243044;
}
.recording-program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 8px 12px;
    max-height: 190px;
}
.participant-fieldset {
    background: #f8fafc !important;
}
.participant-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 16px;
}
.participant-column {
    background: #fff;
    max-height: 360px;
    overflow: auto;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    padding: 12px;
}
.participant-column strong {
    position: sticky;
    top: -12px;
    z-index: 1;
    display: block;
    margin: -12px -12px 10px;
    padding: 10px 12px;
    background: #eff6ff;
    border-bottom: 1px solid #dbe4f0;
    color: #17335d;
}
.employee-check {
    display: grid !important;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 8px;
    padding: 7px 6px;
    border-bottom: 1px solid #edf2f7;
    font-weight: 600 !important;
    color: #172033 !important;
}
.employee-check:last-child { border-bottom: 0; }
.employee-check span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.employee-check b { font-size: 13px; line-height: 1.15; }
.employee-check small { font-size: 10px; color: #64748b; line-height: 1.15; text-transform: uppercase; letter-spacing: .02em; }
.recording-place-select option[data-county-id] { padding: 3px 0; }

@media (max-width: 900px) {
    .recording-form-panel .recording-form { grid-template-columns: 1fr; }
    .participant-columns { grid-template-columns: 1fr; }
    .recording-program-grid { grid-template-columns: 1fr; }
}

/* v1.30 - titule djelatnika za knjigu snimanja */
.employee-role-fieldset {
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    padding: 12px;
    background: #ffffff;
}
.employee-role-fieldset legend {
    padding: 0 8px;
    font-weight: 900;
    color: #243044;
}
.employee-role-fieldset .hint {
    margin-top: 8px;
    font-size: 12px;
}
.employee-role-checks {
    margin-top: 2px;
}
.employee-role-checks-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
}
.employee-role-fieldset-card {
    margin-top: 2px;
}
.employee-role-fieldset-card .check-label {
    font-size: 12px;
    font-weight: 800;
}
.participant-hint {
    margin: 0 0 12px;
    padding: 9px 11px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    color: #1e3a5f;
}
.compact-empty {
    padding: 10px;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    border: 1px dashed #cbd5e1;
}
@media (max-width: 760px) {
    .employee-role-checks-card {
        grid-template-columns: 1fr;
    }
}

/* v1.31 - hrvatski kalendar, 24h vrijeme i moderniji izgled knjige snimanja */
.date-picker-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.date-picker-wrap .date-hr-input {
    width: 100%;
    padding-right: 44px;
    min-width: 0;
}
.native-date-picker {
    position: absolute;
    right: 8px;
    top: 50%;
    width: 28px;
    height: 28px;
    transform: translateY(-50%);
    opacity: 0;
    pointer-events: none;
}
.date-picker-button {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 15px;
}
.date-picker-button:hover {
    background: #dbeafe;
}
.date-picker-button:disabled {
    opacity: .45;
    cursor: default;
}
.time-24-input {
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}

.recording-form-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.recording-form-panel .recording-form {
    gap: 16px;
}
.recording-form-panel input,
.recording-form-panel select,
.recording-form-panel textarea,
.recording-book-wrap input,
.recording-book-wrap select {
    border-color: #c9d7ea;
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
}
.recording-form-panel input:focus,
.recording-form-panel select:focus,
.recording-form-panel textarea:focus {
    border-color: #2563eb;
    outline: 3px solid rgba(37, 99, 235, .14);
}
.recording-form-panel .form-grid label {
    color: #475569;
}
.recording-form-panel fieldset {
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    border-color: #d7e3f4;
}
.recording-form-panel fieldset legend {
    color: #17335d;
    letter-spacing: .01em;
}
.recording-program-grid {
    background: #ffffff;
    border-color: #d7e3f4;
}
.recording-program-grid .check-label,
.employee-check {
    border-radius: 10px;
    transition: background .15s ease, border-color .15s ease;
}
.recording-program-grid .check-label:hover,
.employee-check:hover {
    background: #eff6ff;
}
.participant-fieldset {
    background: linear-gradient(180deg, #eef6ff 0%, #f8fafc 100%) !important;
}
.participant-column {
    border-color: #d7e3f4;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.participant-column strong {
    background: linear-gradient(90deg, #dbeafe 0%, #eef2ff 100%);
}
.recording-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.recording-book-table th {
    background: #eef4ff;
    color: #17335d;
}
.recording-book-table tbody tr:hover td {
    background: #f8fbff;
}
.recording-book-table td:first-child strong {
    color: #1d4ed8;
}
.recording-title {
    color: #0f2d56;
}

@media (max-width: 760px) {
    .date-picker-button {
        width: 36px;
        height: 36px;
    }
    .date-picker-wrap .date-hr-input {
        padding-right: 48px;
    }
}

/* v1.32 - moderni 24h odabir vremena i otkazivanje snimanja */
.time-picker-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.time-picker-wrap .time-24-input {
    width: 100%;
    padding-right: 46px;
    min-width: 0;
}
.time-picker-button {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: #f0f9ff;
    color: #0369a1;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 15px;
}
.time-picker-button:hover {
    background: #dbeafe;
}
.time-picker-button:disabled {
    opacity: .45;
    cursor: default;
}
.time-picker-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 60;
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    display: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    border: 1px solid #c9d7ea;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 22px 55px rgba(15, 23, 42, .20);
}
.time-picker-wrap.is-open .time-picker-menu {
    display: grid;
}
.time-picker-option {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
    border-radius: 10px;
    padding: 8px 6px;
    cursor: pointer;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.time-picker-option:hover,
.time-picker-option.is-selected {
    border-color: #2563eb;
    background: #dbeafe;
    color: #1d4ed8;
}
.btn.warn {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fed7aa;
}
.btn.warn:hover {
    background: #ffedd5;
}
.notice.warn {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}
.status-pill.status-canceled,
.status-canceled .status-pill {
    background: #fee2e2;
    color: #991b1b;
}
.recording-row-canceled td {
    background: #f8fafc !important;
    color: #94a3b8;
    opacity: .72;
}
.recording-row-canceled td:nth-child(2) strong {
    text-decoration: line-through;
}
.recording-row-canceled .status-pill {
    opacity: 1;
    text-decoration: none;
}
.recording-card.status-canceled {
    border-color: #fecaca;
    background: linear-gradient(180deg, #fff7f7 0%, #ffffff 100%);
    opacity: .86;
}
.recording-card.status-deleted {
    opacity: .55;
}
.recording-actions-cell {
    min-width: 160px;
}
.recording-actions-cell form,
.recording-card-actions form {
    display: inline-block;
    margin: 4px 4px 0 0;
}
@media (max-width: 760px) {
    .time-picker-button {
        width: 36px;
        height: 36px;
    }
    .time-picker-wrap .time-24-input {
        padding-right: 50px;
    }
    .time-picker-menu {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-height: 230px;
    }
}


/* v1.33 - Ekipa u knjizi snimanja bez unutarnjeg rolanja + Realizator */
.participant-columns {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    align-items: start;
}
.participant-column {
    max-height: none !important;
    overflow: visible !important;
}
.participant-column strong {
    position: static !important;
    top: auto !important;
}
@media (min-width: 1280px) {
    .participant-columns {
        grid-template-columns: repeat(4, minmax(230px, 1fr));
    }
}

/* v1.34 - Proširivi detalji u knjizi snimanja */
.recording-main-row.recording-expandable {
    cursor: pointer;
    transition: box-shadow .15s ease, transform .15s ease;
}
.recording-main-row.recording-expandable:hover td {
    background: #f7fbff !important;
}
.recording-main-row.recording-expandable:focus {
    outline: 3px solid rgba(37, 99, 235, .20);
    outline-offset: -3px;
}
.recording-main-row.recording-expandable.is-open td {
    border-bottom-color: transparent;
    background: #f8fbff !important;
}
.recording-expand-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    color: #64748b;
    font-weight: 700;
}
.recording-expand-hint::before {
    content: '▾';
    display: inline-block;
    transform: rotate(-90deg);
    transition: transform .15s ease;
}
.recording-main-row.is-open .recording-expand-hint::before {
    transform: rotate(0deg);
}
.recording-detail-row[hidden] {
    display: none !important;
}
.recording-detail-row td {
    background: #f8fbff !important;
    padding: 0 18px 18px 18px !important;
}
.recording-detail-box {
    border: 1px solid #d7e3f4;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 10px 28px rgba(15, 23, 42, .06);
    padding: 16px;
}
.recording-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}
.recording-detail-header strong {
    display: block;
    color: #0f2d56;
    font-size: 18px;
}
.recording-detail-header small {
    display: block;
    color: #64748b;
    margin-top: 2px;
}
.recording-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.detail-item {
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    padding: 12px;
}
.detail-item.wide {
    grid-column: span 2;
}
.detail-item span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 5px;
}
.detail-item strong {
    display: block;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.35;
}
.detail-item small {
    display: block;
    color: #64748b;
    margin-top: 4px;
}
.detail-item p {
    margin: 0;
    color: #1f2937;
    line-height: 1.45;
    white-space: normal;
}
.attachment-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.attachment-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 7px 11px;
    font-weight: 800;
    text-decoration: none;
}
.attachment-chip:hover {
    background: #dbeafe;
}
.recording-row-canceled + .recording-detail-row .recording-detail-box,
.recording-detail-row.recording-row-canceled .recording-detail-box {
    border-color: #fecaca;
    background: linear-gradient(180deg, #fff7f7 0%, #ffffff 100%);
}
@media (max-width: 1180px) {
    .recording-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 760px) {
    .recording-expand-hint {
        font-size: 12px;
    }
    .recording-detail-row td {
        padding: 0 10px 14px 10px !important;
    }
    .recording-detail-box {
        padding: 12px;
        border-radius: 14px;
    }
    .recording-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .recording-detail-grid {
        grid-template-columns: 1fr;
    }
    .detail-item.wide {
        grid-column: span 1;
    }
}

/* v1.35 - Knjiga najava: kronološki sortirano + proširivi detalji */
.recording-requests-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.recording-request-cards {
    gap: 16px;
}
.recording-request-card.recording-expandable {
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.recording-request-card.recording-expandable:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .09);
}
.recording-request-card.recording-expandable:focus {
    outline: 3px solid rgba(37, 99, 235, .22);
    outline-offset: 2px;
}
.recording-request-card.is-open {
    border-color: #bfdbfe;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .10);
}
.recording-card.status-pending,
.recording-request-card.status-pending {
    border-left-color: #2563eb;
    background: linear-gradient(90deg, #eff6ff 0%, #ffffff 32%, #ffffff 100%);
}
.recording-request-card.status-approved {
    border-left-color: #16a34a;
    background: linear-gradient(90deg, #f0fdf4 0%, #ffffff 32%, #ffffff 100%);
}
.recording-request-card.status-canceled {
    border-left-color: #f97316;
    background: linear-gradient(90deg, #fff7ed 0%, #ffffff 32%, #ffffff 100%);
}
.recording-request-card.status-rejected,
.recording-request-card.status-deleted {
    border-left-color: #64748b;
    background: linear-gradient(90deg, #f8fafc 0%, #ffffff 32%, #ffffff 100%);
    opacity: .78;
}
.recording-request-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-top: 12px;
    color: #64748b;
    font-size: .92rem;
}
.recording-request-summary strong {
    color: #334155;
}
.recording-card-detail[hidden] {
    display: none !important;
}
.recording-card-detail {
    margin-top: 14px;
}
.recording-card-detail .recording-detail-box {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}
.recording-request-card .recording-expand-hint {
    margin-top: 0;
    margin-left: auto;
    color: #1d4ed8;
}
.recording-request-card .recording-expand-hint::before {
    content: '▾';
    display: inline-block;
    transform: rotate(-90deg);
    transition: transform .15s ease;
}
.recording-request-card.is-open .recording-expand-hint::before {
    transform: rotate(0deg);
}
@media (max-width: 760px) {
    .recording-card-head {
        flex-direction: column;
    }
    .recording-request-summary {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .recording-request-card .recording-expand-hint {
        margin-left: 0;
    }
}

/* v1.36 - Knjiga najava i knjiga snimanja: isti card prikaz + datum filter */
.recording-date-toolbar .inline-form {
    align-items: end;
    gap: 12px;
}
.recording-date-toolbar label {
    min-width: 220px;
}
.recording-list-panel {
    border: 1px solid #dbe7f6;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}
.recording-book-list-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f7fdf9 100%);
}
.recording-book-cards {
    gap: 14px;
}
.recording-book-card {
    border-left: 6px solid #16a34a;
    background: linear-gradient(90deg, #f0fdf4 0%, #ffffff 30%, #ffffff 100%);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.recording-book-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .09);
}
.recording-book-card:focus {
    outline: 3px solid rgba(22, 163, 74, .22);
    outline-offset: 2px;
}
.recording-book-card.is-open {
    border-color: #86efac;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .10);
}
.recording-book-card.status-canceled,
.recording-book-card.is-canceled {
    border-left-color: #f97316;
    background: linear-gradient(90deg, #fff7ed 0%, #ffffff 30%, #ffffff 100%);
    opacity: .86;
}
.recording-book-card.status-canceled .recording-title,
.recording-book-card.is-canceled .recording-title {
    text-decoration: line-through;
}
.recording-book-card-head {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
}
.recording-card-main {
    min-width: 0;
}
.recording-time-block {
    display: grid;
    justify-items: start;
    gap: 2px;
}
.recording-time {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    border-radius: 14px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 8px 10px;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: .02em;
}
.recording-time-block small {
    color: #64748b;
    font-weight: 700;
}
.recording-subnote {
    margin-top: 6px;
    color: #475569;
    font-size: .95rem;
}
.recording-book-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.recording-book-summary > div {
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: rgba(255, 255, 255, .78);
    padding: 9px 10px;
}
.recording-book-summary span {
    display: block;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 900;
    margin-bottom: 3px;
}
.recording-book-summary strong {
    display: block;
    color: #0f172a;
    font-size: .94rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.recording-book-card-footer {
    margin-top: 12px;
}
.recording-book-card .recording-expand-hint,
.recording-request-card .recording-expand-hint {
    user-select: none;
}
.recording-book-card .recording-expand-hint::before {
    content: '▾';
    display: inline-block;
    transform: rotate(-90deg);
    transition: transform .15s ease;
}
.recording-book-card.is-open .recording-expand-hint::before {
    transform: rotate(0deg);
}
.recording-requests-head h1::after,
.recording-book-head h1::after {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .02em;
    vertical-align: middle;
}
.recording-requests-head h1::after {
    content: 'najave';
    background: #dbeafe;
    color: #1d4ed8;
}
.recording-book-head h1::after {
    content: 'odobreno';
    background: #dcfce7;
    color: #166534;
}
@media (max-width: 1180px) {
    .recording-book-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 760px) {
    .recording-date-toolbar .inline-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }
    .recording-date-toolbar label {
        min-width: 0;
        grid-column: 1 / -1;
    }
    .recording-book-card-head {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .recording-time {
        min-width: auto;
        font-size: 1rem;
    }
    .recording-book-summary {
        grid-template-columns: 1fr;
    }
    .recording-card-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .recording-card-actions .btn,
    .recording-card-actions button {
        width: 100%;
        justify-content: center;
    }
}

/* v1.37 - kompaktne kartice za knjigu snimanja i najava */
.recording-list-panel .panel-title {
    margin-bottom: 10px;
}
.recording-cards,
.recording-book-cards,
.recording-request-cards {
    gap: 10px !important;
}
.recording-card {
    padding: 10px 12px !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .045) !important;
}
.recording-card:hover {
    box-shadow: 0 10px 24px rgba(15, 23, 42, .065) !important;
}
.recording-card-head,
.recording-book-card-head {
    gap: 9px !important;
    align-items: center !important;
}
.recording-book-card-head {
    grid-template-columns: 68px minmax(0, 1fr) auto !important;
}
.recording-title {
    font-size: 1rem !important;
    line-height: 1.16 !important;
    letter-spacing: .01em;
}
.recording-meta {
    margin-top: 3px !important;
    font-size: .88rem !important;
    line-height: 1.25 !important;
}
.recording-time-block {
    gap: 0 !important;
}
.recording-time {
    min-width: 56px !important;
    padding: 6px 8px !important;
    border-radius: 12px !important;
    font-size: .95rem !important;
}
.recording-time-block small {
    margin-top: 2px;
    font-size: .72rem !important;
}
.status-pill {
    padding: 3px 8px !important;
    font-size: .76rem !important;
    line-height: 1.15 !important;
}

/* U zatvorenoj kartici ostaju samo osnovni podaci. */
.recording-card:not(.is-open) > .recording-note,
.recording-card:not(.is-open) .recording-subnote,
.recording-card:not(.is-open) > .recording-tags {
    display: none !important;
}

/* Sažetak ekipe: samo novinar i snimatelj u zatvorenom stanju. */
.recording-book-summary {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px 14px !important;
    margin-top: 7px !important;
}
.recording-book-summary > div {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 5px !important;
    min-width: 0 !important;
}
.recording-book-summary span {
    display: inline !important;
    margin: 0 !important;
    font-size: .72rem !important;
    letter-spacing: .03em !important;
    color: #64748b !important;
    white-space: nowrap;
}
.recording-book-summary strong {
    display: inline !important;
    font-size: .86rem !important;
    line-height: 1.18 !important;
    color: #0f172a !important;
    overflow-wrap: anywhere;
}
.recording-card:not(.is-open) .recording-book-summary > div:nth-child(n+3) {
    display: none !important;
}
.recording-card.is-open .recording-book-summary > div:nth-child(n+3) {
    display: inline-flex !important;
}
.recording-request-summary,
.recording-book-card-footer {
    margin-top: 6px !important;
    font-size: .82rem !important;
    gap: 6px 12px !important;
}
.recording-card:not(.is-open) .recording-request-summary > span:not(.recording-expand-hint) {
    display: none !important;
}
.recording-expand-hint {
    margin-top: 0 !important;
    font-size: .82rem !important;
}
.recording-card-actions {
    margin-top: 7px !important;
    gap: 6px !important;
}
.recording-card-actions .btn.small,
.recording-card-actions button.small,
.btn.small {
    padding: 5px 9px !important;
    font-size: .78rem !important;
    border-radius: 10px !important;
    min-height: 0 !important;
}

/* Otvoreni detalji su gušći, ali i dalje čitljivi. */
.recording-card-detail {
    margin-top: 9px !important;
}
.recording-card-detail .recording-detail-box,
.recording-detail-box {
    padding: 10px !important;
    border-radius: 14px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 8px 20px rgba(15, 23, 42, .045) !important;
}
.recording-detail-header {
    padding-bottom: 8px !important;
    margin-bottom: 9px !important;
    gap: 8px !important;
}
.recording-detail-header strong {
    font-size: 15px !important;
}
.recording-detail-header small {
    font-size: .78rem !important;
}
.recording-detail-grid {
    gap: 8px !important;
}
.detail-item {
    padding: 8px !important;
    border-radius: 11px !important;
}
.detail-item span {
    font-size: 10px !important;
    margin-bottom: 3px !important;
}
.detail-item strong {
    font-size: 13px !important;
    line-height: 1.25 !important;
}
.detail-item small {
    margin-top: 2px !important;
    font-size: .76rem !important;
}
.detail-item p {
    line-height: 1.3 !important;
}
.attachment-chip {
    padding: 5px 9px !important;
    font-size: .82rem !important;
}

@media (max-width: 760px) {
    .recording-list-panel {
        padding: 10px !important;
    }
    .recording-card {
        position: relative;
        padding: 9px 10px !important;
        border-radius: 13px !important;
    }
    .recording-card-head,
    .recording-book-card-head {
        display: grid !important;
        grid-template-columns: 56px minmax(0, 1fr) !important;
        gap: 7px !important;
        align-items: start !important;
    }
    .recording-card-head .status-pill,
    .recording-book-card-head .status-pill {
        position: absolute;
        top: 8px;
        right: 9px;
        margin: 0 !important;
        max-width: 112px;
    }
    .recording-title {
        font-size: .95rem !important;
        padding-right: 82px;
    }
    .recording-meta {
        font-size: .8rem !important;
        padding-right: 68px;
    }
    .recording-time {
        min-width: 46px !important;
        padding: 5px 6px !important;
        font-size: .88rem !important;
        border-radius: 10px !important;
    }
    .recording-book-summary {
        gap: 3px 10px !important;
        margin-top: 5px !important;
    }
    .recording-book-summary span {
        font-size: .62rem !important;
    }
    .recording-book-summary strong {
        font-size: .78rem !important;
    }
    .recording-card-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 5px !important;
    }
    .recording-card-actions form {
        display: inline-flex !important;
    }
    .recording-card-actions .btn,
    .recording-card-actions button,
    .recording-card-actions .btn.small,
    .recording-card-actions button.small {
        width: auto !important;
        justify-content: center;
        padding: 5px 8px !important;
        font-size: .74rem !important;
    }
    .recording-detail-header {
        flex-direction: row !important;
        align-items: center !important;
    }
    .recording-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }
    .detail-item.wide {
        grid-column: 1 / -1 !important;
    }
    .detail-item {
        padding: 7px !important;
    }
    .detail-item span {
        font-size: 9px !important;
    }
    .detail-item strong {
        font-size: 12px !important;
    }
}

@media (max-width: 420px) {
    .recording-detail-grid {
        grid-template-columns: 1fr !important;
    }
}

/* v1.39 - dodatno zbijene najave na mobitelu + isti kompaktni princip kao knjiga snimanja */
.recording-request-card-head {
    display: grid !important;
    grid-template-columns: 68px minmax(0, 1fr) auto !important;
    gap: 9px !important;
    align-items: center !important;
}
.recording-request-card .recording-note,
.recording-request-card .recording-tags {
    margin-top: 6px !important;
}
.recording-request-card:not(.is-open) .recording-note,
.recording-request-card:not(.is-open) .recording-tags,
.recording-request-card:not(.is-open) .recording-request-summary > span:not(.recording-expand-hint) {
    display: none !important;
}
.recording-request-mini-summary {
    margin-top: 6px !important;
}
.recording-request-card:not(.is-open) .recording-request-mini-summary > div:nth-child(n+3) {
    display: none !important;
}
.recording-request-card.is-open .recording-request-mini-summary > div:nth-child(n+3) {
    display: inline-flex !important;
}
.recording-request-card .recording-card-actions {
    margin-top: 7px !important;
}

@media (max-width: 760px) {
    .recording-request-card-head {
        display: grid !important;
        grid-template-columns: 54px minmax(0, 1fr) !important;
        gap: 7px !important;
        align-items: start !important;
    }
    .recording-request-card .recording-card-main {
        min-width: 0 !important;
    }
    .recording-request-card .recording-title {
        font-size: .95rem !important;
        line-height: 1.12 !important;
        padding-right: 80px !important;
        overflow-wrap: break-word !important;
        word-break: normal !important;
    }
    .recording-request-card .recording-meta {
        font-size: .8rem !important;
        line-height: 1.18 !important;
        padding-right: 72px !important;
        margin-top: 2px !important;
    }
    .recording-request-card .recording-time-block small {
        font-size: .58rem !important;
        line-height: 1.05 !important;
    }
    .recording-request-card .status-pill {
        position: absolute !important;
        top: 8px !important;
        right: 9px !important;
        margin: 0 !important;
        max-width: 116px !important;
    }
    .recording-request-mini-summary {
        margin-top: 5px !important;
        gap: 3px 10px !important;
    }
    .recording-request-mini-summary span {
        font-size: .62rem !important;
    }
    .recording-request-mini-summary strong {
        font-size: .78rem !important;
    }
    .recording-request-card .recording-request-summary {
        margin-top: 4px !important;
        font-size: .78rem !important;
    }
    .recording-request-card .recording-card-actions {
        margin-top: 6px !important;
        gap: 5px !important;
    }
    .recording-request-card:not(.is-open) .recording-card-actions {
        margin-top: 6px !important;
    }
}

/* v1.42 - početna stranica i moderniji meni s podmenijima */
.app-topbar {
    align-items: flex-start;
}
.nav-modern {
    gap: 7px;
    align-items: flex-start;
}
.nav-modern .nav-item,
.nav-modern .nav-dropdown > summary {
    text-decoration: none;
    color: #e5e7eb;
    padding: 9px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    user-select: none;
}
.nav-modern .nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-modern .nav-dropdown > summary::after {
    content: '▾';
    font-size: 10px;
    opacity: .75;
    transform: translateY(1px);
}
.nav-modern .nav-item:hover,
.nav-modern .nav-item.active,
.nav-modern .nav-dropdown:hover > summary,
.nav-modern .nav-dropdown[open] > summary,
.nav-modern .nav-dropdown.active > summary {
    background: rgba(255,255,255,0.13);
    color: #fff;
}
.nav-dropdown {
    position: relative;
}
.nav-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 210px;
    padding: 8px;
    border-radius: 16px;
    background: #fff;
    color: var(--text);
    border: 1px solid #dbe3ef;
    box-shadow: 0 18px 45px rgba(15,23,42,.18);
    z-index: 50;
    display: grid;
    gap: 4px;
}
.nav-dropdown-menu-wide { min-width: 250px; grid-template-columns: 1fr 1fr; }
.nav-dropdown-menu-right { right: 0; }
.nav-dropdown-menu a {
    color: #0f172a !important;
    text-decoration: none;
    padding: 10px 11px !important;
    border-radius: 12px !important;
    font-weight: 800;
    font-size: 13px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.nav-dropdown-menu a:hover {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
}
.small-badge {
    min-width: 18px !important;
    height: 18px !important;
    font-size: 11px !important;
}

.dashboard-head h1 { font-size: 30px; }
.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(260px, .9fr) minmax(0, 1.6fr);
    gap: 18px;
    align-items: stretch;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 60%, #eef6ff 100%);
}
.dashboard-person {
    display: flex;
    align-items: center;
    gap: 15px;
}
.dashboard-avatar {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 28px;
    box-shadow: 0 14px 34px rgba(37,99,235,.25);
    flex: 0 0 auto;
}
.dashboard-kicker {
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 900;
    margin-bottom: 4px;
}
.dashboard-person h2 {
    margin: 0;
    font-size: 24px;
}
.dashboard-person p {
    color: #64748b;
    margin: 5px 0 0;
}
.dashboard-hero-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.dashboard-metric {
    background: rgba(255,255,255,.84);
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 14px;
    min-width: 0;
}
.dashboard-metric span,
.dashboard-vacation-box span {
    display: block;
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 900;
    margin-bottom: 7px;
}
.dashboard-metric strong {
    display: block;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.25;
}
.dashboard-metric small {
    display: block;
    color: #64748b;
    font-weight: 700;
    margin-top: 5px;
    line-height: 1.3;
}
.dashboard-vacation-metric {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .8fr) minmax(280px, .8fr);
    gap: 14px;
    margin-bottom: 18px;
}
.dashboard-panel {
    min-width: 0;
}
.dashboard-list {
    display: grid;
    gap: 8px;
}
.dashboard-list-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    text-decoration: none;
    padding: 9px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}
.dashboard-list-item:hover {
    background: #f8fafc;
    border-color: #bfdbfe;
}
.dashboard-list-item.is-canceled {
    opacity: .7;
    background: #fff7ed;
}
.dash-time {
    color: #1d4ed8;
    background: #eff6ff;
    border-radius: 12px;
    padding: 7px 8px;
    font-weight: 900;
    text-align: center;
}
.dash-main { min-width: 0; }
.dash-main strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0f172a;
}
.dash-main small {
    display: block;
    color: #64748b;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-vacation-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.dashboard-vacation-box > div {
    border-radius: 16px;
    border: 1px solid #dbeafe;
    background: #f8fbff;
    padding: 12px;
}
.dashboard-vacation-box strong {
    display: block;
    font-size: 26px;
    color: #0f172a;
}
.dashboard-mini-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748b;
    font-weight: 900;
    margin: 12px 0 8px;
}
.dashboard-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.dashboard-chip-row span {
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
}
.dashboard-alert-list {
    display: grid;
    gap: 9px;
}
.dashboard-alert-item {
    text-decoration: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'label number' 'hint number';
    gap: 3px 10px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #fff;
}
.dashboard-alert-item.needs-action {
    background: #fff7ed;
    border-color: #fed7aa;
}
.dashboard-alert-item span { grid-area: label; font-weight: 900; color: #0f172a; }
.dashboard-alert-item strong { grid-area: number; font-size: 28px; color: #ea580c; align-self: center; }
.dashboard-alert-item small { grid-area: hint; color: #64748b; font-weight: 700; }
.dashboard-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.compact-empty {
    padding: 16px !important;
}
.muted { color: #64748b; }
.small-margin { margin: 8px 0 12px; }

@media (max-width: 1180px) {
    .dashboard-hero { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .dashboard-admin-panel { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
    .topbar.app-topbar {
        position: sticky;
        align-items: stretch;
        gap: 10px;
    }
    .nav-modern {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 4px;
    }
    .nav-modern .nav-item,
    .nav-modern .nav-dropdown > summary {
        white-space: nowrap;
        font-size: 13px;
        padding: 8px 10px;
    }
    .nav-dropdown {
        position: static;
    }
    .nav-dropdown-menu {
        position: fixed;
        left: 10px;
        right: 10px;
        top: 112px;
        min-width: 0;
        max-height: 62vh;
        overflow: auto;
    }
    .nav-dropdown-menu-wide { grid-template-columns: 1fr; }
    .dashboard-head {
        display: grid;
        gap: 12px;
    }
    .dashboard-head .actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .dashboard-hero-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-person h2 { font-size: 20px; }
    .dashboard-avatar { width: 54px; height: 54px; border-radius: 17px; }
    .dashboard-vacation-box { grid-template-columns: 1fr 1fr; }
    .dashboard-shortcuts { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 460px) {
    .dashboard-list-item { grid-template-columns: 52px minmax(0, 1fr); }
    .dash-time { padding: 6px 7px; }
    .dashboard-vacation-box { grid-template-columns: 1fr; }
    .dashboard-shortcuts { grid-template-columns: 1fr; }
}

/* v1.43 - snimanja: pretraga, povijest, mail log, predlošci i mobilne dorade */
.search-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 12px;
    align-items: end;
}
.search-grid .wide { grid-column: 1 / -1; }
.compact-search-results .recording-card { text-decoration: none; color: inherit; }
.log-table small,
.data-table small {
    display: block;
    color: #64748b;
    font-weight: 700;
    margin-top: 2px;
}
.status-sent {
    background: #dcfce7 !important;
    color: #166534 !important;
}
.status-failed {
    background: #fee2e2 !important;
    color: #991b1b !important;
}
.mini-log-list {
    margin: 6px 0 0;
    padding-left: 18px;
    display: grid;
    gap: 4px;
    color: #334155;
}
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.analytics-block {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #f8fafc;
    padding: 14px;
}
.analytics-block h3 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #0f172a;
}
.analytics-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 7px;
}
.analytics-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 7px;
}
.analytics-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.analytics-list small { color: #64748b; font-weight: 800; }
.template-list { display: grid; gap: 10px; }
.template-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
}
.template-row.inactive { opacity: .65; background: #f8fafc; }
.template-row small { display: block; color: #64748b; font-weight: 700; margin-top: 3px; }
.template-select-label select { margin-top: 6px; }
.conflict-warning ul {
    margin: 8px 0 4px;
    padding-left: 20px;
}
.schedule-recordings {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
    margin-top: 3px;
}
.schedule-recording-chip,
.schedule-recording-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 19px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .10);
    color: #1d4ed8;
    border: 1px solid rgba(37, 99, 235, .22);
    padding: 2px 5px;
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}
.schedule-cell.has-recording { box-shadow: inset 0 -2px 0 rgba(37, 99, 235, .30); }
.recording-card { scroll-margin-top: 110px; }
.recording-book-summary,
.recording-request-mini-summary {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
}
.recording-card-detail .recording-detail-grid {
    gap: 9px;
}

@media (max-width: 900px) {
    .search-grid,
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    .template-row {
        grid-template-columns: 1fr;
    }
    .template-row .actions {
        justify-content: flex-start;
    }
    .recording-book-summary,
    .recording-request-mini-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
    .recording-book-summary > div,
    .recording-request-mini-summary > div {
        padding: 7px 8px;
        min-height: 0;
    }
    .recording-card-head {
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr) auto;
        gap: 8px;
        align-items: start;
    }
    .recording-card-main { min-width: 0; }
    .recording-title {
        font-size: 18px;
        line-height: 1.15;
    }
    .recording-card .recording-note,
    .recording-request-summary {
        display: none;
    }
    .recording-card.is-open .recording-note,
    .recording-card.is-open .recording-request-summary {
        display: flex;
    }
    .recording-card-actions {
        margin-top: 8px;
    }
    .recording-card-actions .btn {
        padding: 8px 10px;
        font-size: 13px;
    }
}

@media (max-width: 560px) {
    .recording-card {
        padding: 12px 12px 12px 14px;
        border-radius: 17px;
    }
    .recording-card-head {
        grid-template-columns: 66px minmax(0, 1fr);
    }
    .recording-card-head .status-pill {
        grid-column: 2;
        justify-self: start;
        margin-top: 2px;
    }
    .recording-time-block {
        width: 58px;
        padding: 7px 6px;
    }
    .recording-time {
        font-size: 18px;
    }
    .recording-title {
        font-size: 17px;
        max-width: 100%;
        overflow-wrap: anywhere;
    }
    .recording-meta { font-size: 13px; }
    .recording-book-summary,
    .recording-request-mini-summary {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .recording-book-summary > div:nth-child(n+3),
    .recording-request-mini-summary > div:nth-child(n+3) {
        display: none;
    }
    .recording-card.is-open .recording-book-summary > div,
    .recording-card.is-open .recording-request-mini-summary > div {
        display: block;
    }
    .schedule-recordings { gap: 2px; }
    .schedule-recording-chip { font-size: 9px; padding: 2px 4px; }
}

/* v1.44 - privici / automatsko čišćenje */
.attachment-stats-grid {
    margin-bottom: 18px;
}
.attachment-cleanup-panel h2,
.panel h2 {
    margin-top: 0;
}
.attachment-chip-deleted {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    cursor: default;
}
.attachment-chip-deleted small {
    margin-left: 6px;
    font-weight: 700;
    color: #94a3b8;
}
.attachment-preview-table {
    max-width: 100%;
    overflow-x: auto;
}
.attachment-preview-table table td,
.attachment-preview-table table th {
    white-space: nowrap;
}
@media (max-width: 700px) {
    .attachment-cleanup-panel .form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .attachment-cleanup-panel .form-actions .btn {
        width: 100%;
    }
}

/* v1.45 - Uređivanje ekipe već u najavi */
.split-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}
@media (max-width: 700px) {
    .split-actions {
        justify-content: stretch;
    }
    .split-actions .btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}

/* v1.46 - preglednije spremanje i odobravanje najava */
.recording-approval-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #d7e3f4;
    border-radius: 18px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}
.recording-approval-actions-top {
    margin-bottom: 2px;
}
.recording-approval-actions-bottom {
    margin-top: 2px;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    border-color: #cdebd7;
}
.recording-approval-copy strong {
    display: block;
    color: #0f2d56;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: .01em;
    margin-bottom: 3px;
}
.recording-approval-copy span {
    display: block;
    color: #64748b;
    font-size: .9rem;
    line-height: 1.35;
}
.recording-approval-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    align-items: stretch;
}
.approval-btn {
    appearance: none;
    border: 1px solid #dbe4f0;
    border-radius: 15px;
    background: #ffffff;
    color: #0f172a;
    cursor: pointer;
    display: grid;
    gap: 2px;
    min-width: 230px;
    padding: 11px 14px;
    text-align: left;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .05);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.approval-btn:hover,
.approval-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, .10);
    outline: none;
}
.approval-btn span {
    font-size: .98rem;
    font-weight: 900;
    line-height: 1.18;
}
.approval-btn small {
    color: #64748b;
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.25;
}
.approval-btn-primary {
    border-color: #2563eb;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
}
.approval-btn-primary small {
    color: rgba(255, 255, 255, .86);
}
.approval-btn-primary:hover,
.approval-btn-primary:focus-visible {
    border-color: #1d4ed8;
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}
.approval-btn-secondary {
    border-color: #bfdbfe;
    background: #ffffff;
    color: #1e3a5f;
}
.approval-btn-secondary:hover,
.approval-btn-secondary:focus-visible {
    border-color: #93c5fd;
    background: #eff6ff;
}

@media (max-width: 900px) {
    .recording-approval-actions {
        grid-template-columns: 1fr;
        padding: 12px;
    }
    .recording-approval-buttons {
        justify-content: stretch;
        display: grid;
        grid-template-columns: 1fr;
    }
    .approval-btn {
        width: 100%;
        min-width: 0;
        text-align: left;
        padding: 12px;
    }
}

/* v1.47 - jasnije boje gumba kod odobravanja najava
   Spremi samo najavu = plavo, Odobri snimanje = zeleno */
.approval-btn-secondary {
    border-color: #2563eb !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
}
.approval-btn-secondary small {
    color: rgba(255, 255, 255, .88) !important;
}
.approval-btn-secondary:hover,
.approval-btn-secondary:focus-visible {
    border-color: #1d4ed8 !important;
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
}
.approval-btn-primary {
    border-color: #16a34a !important;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: #ffffff !important;
}
.approval-btn-primary small {
    color: rgba(255, 255, 255, .90) !important;
}
.approval-btn-primary:hover,
.approval-btn-primary:focus-visible {
    border-color: #15803d !important;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
}
.recording-approval-actions-bottom {
    background: linear-gradient(135deg, #f8fbff 0%, #f0fdf4 100%) !important;
}

/* v1.48 - predlošci snimanja: automatski dani + pregledniji popis */
.template-editor-panel .template-auto-box {
    background: linear-gradient(135deg, #f8fbff, #eef6ff) !important;
}
.weekday-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 14px;
}
.weekday-chip {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}
.weekday-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.weekday-chip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 104px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    font-weight: 800;
    transition: .16s ease;
}
.weekday-chip input:checked + span {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, .18);
}
.template-days-ahead {
    max-width: 260px;
}
.improved-template-list {
    display: grid;
    gap: 12px;
}
.improved-template-list .template-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #dbe4f0;
    border-left: 6px solid #2563eb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15,23,42,.045);
}
.improved-template-list .template-row.inactive {
    opacity: .68;
    border-left-color: #94a3b8;
    background: #f8fafc;
}
.template-main strong {
    display: block;
    color: #0f2545;
    font-size: 1.05rem;
}
.template-main small {
    display: block;
    color: #64748b;
    margin-top: 2px;
}
.template-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.template-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    background: #eef2ff;
    color: #334155;
    font-size: .82rem;
    font-weight: 800;
}
.template-row-actions {
    justify-content: flex-end;
}
.template-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.btn.danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}
.btn.danger:hover {
    background: #fecaca;
}
@media (max-width: 760px) {
    .weekday-picker { gap: 8px; }
    .weekday-chip span { min-width: 0; flex: 1; padding: 10px 12px; }
    .improved-template-list .template-row { grid-template-columns: 1fr; }
    .template-row-actions { justify-content: flex-start; }
}

/* v1.49 - jasniji predlošci snimanja */
.template-list-panel { margin-bottom: 18px; }
.panel-title-row { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }
.template-count-pill { white-space:nowrap; align-self:flex-start; padding:8px 12px; border-radius:999px; background:#eff6ff; color:#1d4ed8; font-weight:800; border:1px solid #bfdbfe; }
.compact-template-list { display:grid; gap:12px; }
.compact-template-list .template-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 16px; border:1px solid #dbe5f3; border-radius:18px; background:linear-gradient(135deg,#ffffff 0%,#f8fbff 100%); box-shadow:0 10px 24px rgba(15,23,42,.05); }
.compact-template-list .template-row.inactive { opacity:.68; background:#f8fafc; }
.compact-template-list .template-main strong { display:block; font-size:18px; color:#0f2748; }
.compact-template-list .template-main small { display:block; margin-top:3px; color:#5b6b82; font-weight:700; }
.compact-template-list .template-meta { display:flex; flex-wrap:wrap; gap:8px; margin-top:9px; }
.compact-template-list .template-meta span { background:#eef4ff; border:1px solid #dbeafe; color:#334155; padding:4px 8px; border-radius:999px; font-size:12px; font-weight:700; }
.template-row-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.btn.success, .btn.small.success { background:#16a34a; color:#fff; border-color:#16a34a; }
.btn.success:hover, .btn.small.success:hover { background:#15803d; border-color:#15803d; }
.small-empty { padding:12px 14px; border-radius:14px; background:#f8fafc; border:1px dashed #cbd5e1; }
.template-select-label .hint { display:block; margin-top:7px; color:#64748b; }
@media (max-width: 760px) {
  .panel-title-row { display:block; }
  .template-count-pill { display:inline-flex; margin-top:10px; }
  .compact-template-list .template-row { align-items:stretch; flex-direction:column; padding:12px; border-radius:16px; }
  .template-row-actions { justify-content:flex-start; }
  .template-row-actions .btn, .template-row-actions form { flex:1 1 140px; }
  .template-row-actions form .btn { width:100%; }
}

/* v1.52 - statusi snimanja, potvrde i mail izmjene */
.status-pill.status-in_progress {
    background: #dbeafe;
    color: #1d4ed8;
}
.status-pill.status-changed {
    background: #ede9fe;
    color: #6d28d9;
}
.recording-card.status-in_progress,
.recording-request-card.status-in_progress {
    border-left-color: #2563eb;
    background: linear-gradient(90deg, #eff6ff 0%, #ffffff 32%, #ffffff 100%);
}
.recording-book-card.status-changed,
.recording-request-card.status-changed {
    border-left-color: #7c3aed;
    background: linear-gradient(90deg, #f5f3ff 0%, #ffffff 30%, #ffffff 100%);
}
.current-status-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #f8fbff;
}
.current-status-box span {
    color: #64748b;
    font-weight: 800;
    font-size: .86rem;
}
.current-status-box strong {
    color: #0f172a;
    font-weight: 900;
}
.app-confirm-modal[hidden] {
    display: none !important;
}
.app-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 20px;
}
.app-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .52);
    backdrop-filter: blur(4px);
}
.app-confirm-card {
    position: relative;
    width: min(520px, 100%);
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,.65);
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}
.app-confirm-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    background: #fff7ed;
    color: #c2410c;
    font-weight: 950;
    font-size: 1.25rem;
}
.app-confirm-content h3 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 1.1rem;
}
.app-confirm-content p {
    margin: 0;
    color: #475569;
    line-height: 1.45;
}
.app-confirm-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}
body.has-confirm-modal {
    overflow: hidden;
}
@media (max-width: 640px) {
    .app-confirm-card {
        grid-template-columns: 1fr;
        padding: 18px;
    }
    .app-confirm-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .app-confirm-actions .btn {
        justify-content: center;
        width: 100%;
    }
}

/* v1.55 - zaključavanje prošlih snimanja */
.status-pill.status-frozen {
  background: #e9eef6;
  color: #42526e;
  border: 1px solid #cfd8e8;
}
.recording-card.is-frozen {
  border-color: #d8e0ec;
  background: linear-gradient(90deg, rgba(232,238,247,.72), rgba(255,255,255,.92));
}
.recording-card.is-frozen:not(.is-canceled) {
  border-left-color: #64748b;
}
.recording-frozen-note {
  color: #64748b;
  font-weight: 700;
}
.frozen-detail-notice {
  background: #f4f7fb;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 12px 14px;
}
.frozen-detail-notice p {
  margin: 4px 0 0;
  color: #475569;
}
@media (max-width: 760px) {
  .status-pill.status-frozen {
    font-size: 12px;
    padding: 5px 9px;
  }
  .recording-frozen-note {
    display: block;
    width: 100%;
    font-size: 12px;
  }
}
