/* ============================================================================
   INSIGHT Hungarian Cafeteria — app-specific additions ONLY.
   Layout/components come from the shared INSIGHT design system in style.css
   (hero, stat-grid, card, panel, filterbar, table.data, btn, field, modal).
   Only the bits the shared sheet has no equivalent for live here; every colour
   is a theme token so light and dark mode both stay readable.
   ============================================================================ */

/* hero CTA under the bullet list (template hero has no button slot) */
.hero-cta { margin-top:20px; }
.hero-cta .btn { padding:9px 16px; font-size:13px; }

/* small unit / percent suffix inside stat tiles */
.stat-sub { font-size:13px; font-weight:600; color:var(--text-muted); margin-left:6px; }
.caf-stats { margin-bottom:16px; }

/* identity strip on the declaration */
.caf-ident { display:flex; flex-wrap:wrap; gap:12px 34px; margin-bottom:16px; }
.caf-kv { display:flex; flex-direction:column; gap:3px; min-width:0; }
.caf-kv span { font-size:11px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.4px; }
.caf-kv b { font-size:14px; color:var(--text); }

/* monthly grid */
table.data.caf-grid tbody tr { cursor:default; }
table.data.caf-grid td.caf-month { font-weight:600; }
table.data.caf-grid tr.caf-off td { color:var(--text-dim); }
.caf-amt { width:130px; text-align:right; font-variant-numeric:tabular-nums; background:var(--bg-stripe); border:1px solid var(--border-strong); border-radius:6px; padding:6px 10px; font-size:13px; color:var(--text); font-family:inherit; outline:none; }
.caf-amt:focus { border-color:var(--accent); background:var(--bg-card); }
.caf-amt:disabled { opacity:.45; cursor:not-allowed; }
.caf-amt.over { border-color:var(--accent); background:rgba(192,57,43,.10); color:var(--accent); }
.caf-na { color:var(--text-dim); display:inline-block; width:130px; text-align:center; }
.caf-fastfill { margin-bottom:12px; }

/* live status line (desktop "bubble") */
.caf-status { display:flex; align-items:center; gap:10px; margin:14px 0 4px; padding:10px 14px; border-radius:8px; border:1px solid var(--border); background:var(--bg-stripe); font-size:13px; color:var(--text); line-height:1.45; }
.caf-status.ok  { border-color:var(--success); }
.caf-status.bad { border-color:var(--accent); }
.caf-dot { width:12px; height:12px; border-radius:50%; flex-shrink:0; background:var(--info); }
.caf-dot.ok  { background:var(--success); }
.caf-dot.bad { background:var(--accent); }

/* statement card */
.caf-legal .lorem { text-align:justify; font-size:12.5px; }

/* notices (already declared, not found, info) */
.caf-notice { display:flex; align-items:flex-start; gap:14px; font-size:13.5px; line-height:1.55; color:var(--text); border-left:4px solid var(--accent); margin-bottom:16px; }
.caf-notice > i { font-size:22px; color:var(--accent); margin-top:2px; }
.caf-notice-sm { font-size:12.5px; border-left-color:var(--info); }
.caf-notice-sm > i { font-size:16px; color:var(--info); }
.caf-notice-who { font-weight:700; margin-bottom:4px; }

/* HR tabs, table extras, badges */
.caf-tabs { margin-bottom:14px; }
.caf-lbl { font-size:12px; color:var(--text-muted); }
table.data tbody tr.caf-left td { background:rgba(192,57,43,.06); }
table.data tbody tr.caf-left td:first-child { box-shadow:inset 3px 0 0 var(--accent); }
.badge.caf-b-ok     { background:rgba(39,174,96,.14);  color:var(--success); }
.badge.caf-b-left   { background:rgba(192,57,43,.14);  color:var(--accent); }
.badge.caf-b-global { background:rgba(142,68,173,.15); color:#8e44ad; margin-left:6px; }
html.dark .badge.caf-b-global { color:#c39bd3; }
.badge.caf-b-year   { background:var(--bg-hover); color:var(--text-muted); }
.caf-dim { color:var(--text-dim); }

/* modal size + title (shared modal is sized for wide detail views) */
.modal.caf-modal { max-width:560px; }
.modal-head .mh-title { font-size:16px; font-weight:700; color:var(--text); }

/* site-restriction screen */
.caf-site-msg { display:flex; gap:12px; align-items:flex-start; text-align:left; margin:18px 0; padding:14px 16px; border-radius:8px; background:rgba(192,57,43,.08); border:1px solid rgba(192,57,43,.30); color:var(--text); font-size:13.5px; line-height:1.55; }
.caf-site-msg i { color:var(--accent); font-size:18px; margin-top:2px; }
.caf-site-actions { display:flex; gap:10px; flex-wrap:wrap; justify-content:center; }
.caf-site-actions .btn { text-decoration:none; }

/* HR grid: page fills the main area, only the table body scrolls (single scrollbar) */
.main-content.caf-fill { display:flex; flex-direction:column; overflow:hidden; }
.main-content.caf-fill > .page-header, .main-content.caf-fill > #hrTabs { flex:0 0 auto; }
.caf-fill-body { flex:1 1 auto; min-height:0; display:flex; flex-direction:column; }
.caf-grid-panel { flex:1 1 auto; min-height:0; display:flex; flex-direction:column; }
.caf-grid-panel > .panel-title, .caf-grid-panel > .filterbar { flex:0 0 auto; }
.tbl-wrap.caf-fill-wrap { flex:1 1 auto; min-height:0; max-height:none; }
.caf-search { position:relative; display:flex; align-items:center; min-width:200px; }
.caf-search i { position:absolute; left:10px; font-size:12px; color:var(--text-dim); pointer-events:none; }
.filterbar .caf-search input { width:100%; padding-left:30px; }
table.data.caf-sortable th.caf-sort { cursor:pointer; user-select:none; }
table.data.caf-sortable th.caf-sort i { font-size:10px; margin-left:3px; opacity:.45; }
table.data.caf-sortable th.caf-sort.on { color:var(--accent); }
table.data.caf-sortable th.caf-sort.on i { opacity:1; }

/* HR on-behalf declaration: entry bar, active banner, picker modal */
.caf-ob-bar { margin-bottom:12px; }
.caf-ob { align-items:center; flex-wrap:wrap; }
.caf-ob .caf-ob-txt { flex:1 1 260px; }
.caf-ob-actions { display:flex; gap:8px; flex-wrap:wrap; }
.caf-ob-search { margin-bottom:10px; }
.caf-ob-search .caf-search { flex:1 1 auto; }
.tbl-wrap.caf-ob-list { max-height:52vh; }
table.data tbody tr.caf-pick { cursor:pointer; }
table.data tbody tr.caf-pick:hover td { background:var(--bg-hover); }
table.data tbody tr.caf-pick.sel td { background:rgba(41,128,185,.14); }
table.data tbody tr.caf-pick.sel td:first-child { box-shadow:inset 3px 0 0 var(--info); }
.caf-ob-more { padding:8px 4px 0; }

/* row selection + delete (Submitted declarations) */
table.data th.caf-chk, table.data td.caf-chk { width:34px; text-align:center; padding-left:8px; padding-right:4px; }
table.data .caf-chk input { width:15px; height:15px; cursor:pointer; accent-color:var(--accent); vertical-align:middle; }
table.data tbody tr.caf-sel td { background:rgba(192,57,43,.08); }
.btn.caf-btn-danger { background:var(--accent); border-color:var(--accent); color:#fff; }
.btn.caf-btn-danger:hover:not(:disabled) { filter:brightness(1.08); }
.btn.caf-btn-danger:disabled { opacity:.45; cursor:not-allowed; }
.caf-del-emps { margin-top:10px; }
.caf-del-emps b { font-weight:600; font-size:13px; line-height:1.5; }

/* event log */
.badge.caf-ev { white-space:nowrap; }
.badge.caf-ev-ok   { background:rgba(39,174,96,.14);  color:var(--success); }
.badge.caf-ev-bad  { background:rgba(192,57,43,.14);  color:var(--accent); }
.badge.caf-ev-warn { background:rgba(230,126,34,.16); color:var(--warning); }
.badge.caf-ev-info { background:rgba(41,128,185,.14); color:var(--info); }
.caf-ev-det { font-size:12px; color:var(--text-muted); white-space:normal; word-break:break-word; }

table.data.caf-sortable th.caf-sort:hover { color:var(--text); }
table.data tbody tr.caf-empty td { text-align:center; color:var(--text-muted); padding:28px; cursor:default; }
@media (max-width:768px){ .main-content.caf-fill { display:block; overflow-y:auto; } .tbl-wrap.caf-fill-wrap { max-height:70vh; } }

@media (max-width:640px){ .caf-amt, .caf-na { width:96px; } .caf-ident { gap:10px 20px; } }
