/* ══════════════════════════════════════════════════════════════
   DochádzkaPRO — téma „Moduly“, fáza 4: prihlásenie, ekonóm, majster, parťák
   ══════════════════════════════════════════════════════════════ */

/* ── Panely (ekonóm, majster, parťák) ── */
.user-badge { color: var(--text-3); font-size: 12.5px; }
.user-badge strong { color: var(--ink); font-size: 14px; font-weight: 700; }
.sidebar-footer .btn { width: 100%; justify-content: center; }
.page-title { font-size: 30px; font-weight: 800; letter-spacing: -.8px; }
.date-filter-grid input, .date-filter-grid select { margin-bottom: 0; }
.billing-card, .proj-card, .approval-card { border: none !important; border-radius: 20px !important; box-shadow: var(--shadow-xs); }
.page .card { border-radius: 22px; }
.stat-card { border: none !important; border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.stat-card::before { display: none; }
.stat-card .stat-val { font-weight: 800; letter-spacing: -1px; color: var(--ink); }
.stat-card .stat-label { text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
code { font-family: var(--font); background: #EEF1F5; padding: 1px 6px; border-radius: 8px; }

/* ── Prihlásenie ── */
body:has(.panel-login) { background: var(--bg); font-family: var(--font); }
.panel-brand { background: var(--ink); }
.panel-brand::before, .panel-brand::after { display: none !important; }
.brand-logo { font-family: var(--font); font-weight: 800; letter-spacing: -.4px; }
.brand-logo span { color: #C9CFD8; }
.panel-brand img[data-brand-img] { background: #fff; padding: 8px 12px; border-radius: 14px; box-sizing: content-box; }
.brand-headline { font-family: var(--font); font-weight: 800; letter-spacing: -1.6px; }
.brand-headline em { font-style: normal; color: #A5ADB9; }
.brand-sub { color: #A5ADB9; font-size: 16px; }
.brand-feature { color: #C9CFD8; font-size: 15px; font-weight: 500; }
.brand-feature-dot { width: 8px; height: 8px; border-radius: 3px; background: #A5ADB9; }
.brand-bottom { color: #A5ADB9; }

.panel-login { background: var(--bg); }
.box { background: #fff; border-radius: 28px; padding: 32px 30px; box-shadow: var(--shadow-sm); max-width: 400px; }
.box-logo { color: var(--ink); font-family: var(--font); font-weight: 800; }
.box-logo span { color: var(--st-onsite); }
.box-sub { text-transform: none !important; letter-spacing: 0 !important; color: var(--text-3); font-size: 15px; font-weight: 600; }
.box label { color: var(--text-2); font-size: 13px; font-weight: 700; }
.box input { border-radius: 12px; min-height: 50px; font-size: 16px; font-family: var(--font); border-color: var(--border-md); }
.box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,89,232,.14); }
.box input::placeholder { color: #626A77; }
.btn-login { border-radius: 12px; min-height: 52px; font-size: 16px; font-weight: 800; font-family: var(--font); background: var(--ink); }
.btn-login:hover { background: var(--ink-hover); box-shadow: var(--shadow-md); }
.box-err { border-radius: 12px; background: #FDECEA; color: #B42318; border: none; }
.box-footer, .box-footer a { color: var(--text-3); font-size: 13.5px; }
.box-footer a:hover { color: var(--ink); }

@media (max-width: 768px) {
  .box { box-shadow: none; background: transparent; padding: 8px 4px; }
  .panel-login { background: #fff; }
}

/* Prihlásenie na mobile: najprv formulár — tmavý panel skrytý, logo ostáva vo formulári */
@media (max-width: 768px) {
  .panel-brand { display: none !important; }
  .panel-login { min-height: 100vh; padding: 28px 18px; align-items: flex-start; }
  .box { margin-top: 8px; }
}

/* ── Prázdne stavy: ikona, nadpis, čo robiť ďalej ── */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 34px 24px !important; }
.empty-ico { width: 52px; height: 52px; border-radius: 14px; background: #EEF1F5; color: var(--ink); display: grid; place-items: center; margin-bottom: 4px; }
.empty-state b { font-size: 17px; font-weight: 800; color: var(--ink); }
.empty-state p { font-size: 15px; color: var(--text-2); max-width: 46ch; line-height: 1.5; }
.empty-state .btn { margin-top: 6px; }
.empty-inline { font-size: 14px; color: var(--text-3); padding: 6px 0; }

/* ── Ekonóm: karta obdobia (ako karta mesiaca na Dnes) ── */
.ek-month { display: grid; grid-template-columns: 1.2fr 1.4fr auto; align-items: center; gap: 20px 28px; margin-bottom: 16px; padding: 22px 24px; }
.ek-month:empty { display: none; }
.ek-month .month-hours { font-size: 44px; }
.ek-month-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ek-month-stats > div { background: rgba(255,255,255,.07); border-radius: 14px; padding: 12px 14px; }
.ek-month-stats b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.6px; }
.ek-month-stats span { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: #C9CFD8; font-weight: 600; margin-top: 2px; }
.ek-month-stats i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ek-month .month-cta { margin-top: 0; width: auto; padding: 13px 22px; white-space: nowrap; }
.ek-month .month-cta:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 1100px) { .ek-month { grid-template-columns: 1fr; } .ek-month .month-cta { width: 100%; } }
@media (max-width: 480px) { .ek-month-stats { grid-template-columns: 1fr; } .ek-month .month-hours { font-size: 34px; } }

/* ── Ekonóm: hlavička s prepínačom mesiaca (namiesto karty „Filter obdobia“) ── */
.ek-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ek-head .page-sub { margin-bottom: 0; }
.ek-period { display: inline-flex; align-items: center; gap: 4px; padding: 4px; background: #fff; border-radius: 14px; box-shadow: 0 1px 2px rgba(20,22,26,.05); }
.ek-period-btn { all: unset; box-sizing: border-box; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--ink); cursor: pointer; }
.ek-period-btn:hover { background: #F4F6F9; }
.ek-period-btn:focus-visible { outline: 2px solid #2559E8; outline-offset: 2px; }
.ek-period input[type="month"] { width: auto; min-width: 170px; height: 38px; min-height: 0; margin: 0; padding: 0 10px; border: 0; box-shadow: none; background: transparent; font-size: 15px; font-weight: 700; color: var(--ink); text-align: center; text-transform: capitalize; cursor: pointer; }
.ek-period input[type="month"]:focus { box-shadow: none; }
.ek-period input[type="month"]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }

/* Karta obdobia: popisy dlaždíc sa nelámu */
.ek-month { grid-template-columns: minmax(220px, 1fr) minmax(0, 1.6fr) auto; }
.ek-month-stats span { white-space: nowrap; }

/* Tabuľka a karty podkladov */
.ek-meta { font-size: 13px; color: var(--text-3); font-weight: 500; margin-top: 1px; }
.ek-amount { font-weight: 800; color: var(--ink); white-space: nowrap; }
.ek-total-label { font-weight: 700; text-align: right; color: var(--text-2); }
.ek-paid { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: #12845F; }
.ek-dash { color: var(--text-3); }
.ek-card-foot { padding-top: 12px; margin-top: 2px; border-top: 1px solid #EEF0F3; }
.ek-count { font-size: 12.5px; font-weight: 700; color: #3A4250; background: #EEF1F5; border-radius: 8px; padding: 3px 10px; }
.ek-error { background: #FDECEA; color: #B42318; border-radius: 14px; padding: 14px 16px; font-size: 14px; font-weight: 600; }
.billing-card-amount { font-family: inherit; font-size: 26px; font-weight: 800; letter-spacing: -.6px; color: var(--ink); line-height: 1.1; }
.billing-card-sub { font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-3); margin-top: 4px; }
.billing-card-total strong { font-size: 22px; font-weight: 800; letter-spacing: -.5px; color: var(--ink); }
.payment-date-wrap input[type="date"] { font-size: 14px; min-height: 38px; }

/* Náklady podľa projektov — farby stavieb, čísla Manrope */
.proj-row { border-bottom-color: #EEF0F3; padding: 12px 0; }
.proj-color { width: 9px; height: 9px; border-radius: 3px; }
.proj-name { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.proj-meta { font-family: inherit; font-size: 13px; font-weight: 500; color: var(--text-3); }
.proj-bar { height: 6px; background: #EEF1F5; }
.proj-pct { font-size: 12px; font-weight: 600; color: var(--text-3); }
.proj-amount { font-family: inherit; font-size: 15px; font-weight: 800; color: var(--ink); min-width: 96px; }

/* Ročný výkaz */
.ek-annual-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.ek-annual-stats .stat-card { padding: 16px 18px 14px; }
.ek-annual-stats .stat-val { font-size: 26px; font-weight: 800; letter-spacing: -.6px; color: var(--ink) !important; }
.ek-annual-stats .stat-label { font-size: 13px; font-weight: 600; color: var(--text-2); margin-top: 4px; }
.ek-annual .annual-row { border-bottom-color: #EEF0F3; gap: 12px; padding: 4px 0; }
.annual-month { font-size: 13.5px; font-weight: 700; color: var(--text-2); width: 46px; padding: 8px 0; }
.annual-bar-wrap { display: flex; align-items: center; gap: 10px; padding: 8px 0; min-width: 0; }
.annual-bar { height: 8px; min-width: 0; padding: 0; border: 0; border-radius: 4px; background: #3A4250; flex-shrink: 0; max-width: 70%; }
.annual-hours { font-size: 13px; font-weight: 600; color: var(--text-3); white-space: nowrap; }
.annual-amount { font-family: inherit; font-size: 15px; font-weight: 800; color: var(--ink); min-width: 100px; padding: 8px 0; }
.annual-badge { min-width: 96px; padding: 8px 0; }

@media (max-width: 768px) {
  .ek-head { align-items: stretch; flex-direction: column; }
  .ek-period { justify-content: space-between; }
  .ek-period input[type="month"] { flex: 1; }
  .ek-month { grid-template-columns: 1fr; }
  .ek-annual-stats { grid-template-columns: 1fr; gap: 8px; }
  .annual-badge { min-width: 0; }
  .annual-amount { min-width: 0; }
}
@media print {
  .sidebar, .mobile-topbar, .ek-period, #annualWorkerSelect + .btn { display: none !important; }
}
@media (max-width: 480px) {
  .ek-month-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .ek-month-stats > div { padding: 10px; }
  .ek-month-stats b { font-size: 22px; }
  .ek-month-stats span { white-space: normal; align-items: flex-start; font-size: 12.5px; line-height: 1.3; }
  .ek-month-stats i { margin-top: 4px; }
}
.ek-month > * { min-width: 0; }
@media (max-width: 1100px) { .ek-month { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .ek-month-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ek-month-stats span { overflow-wrap: anywhere; } }
@media (max-width: 480px) {
  .ek-month-stats span { display: block; overflow-wrap: normal; hyphens: none; }
  .ek-month-stats i { display: block; margin: 2px 0 6px; }
}

/* ── Parťák / majster ── */
.pk-depts { padding: 6px 22px !important; }
.pk-dept { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #EEF0F3; }
.pk-dept:last-child { border-bottom: none; }
.pk-dept-ico { width: 36px; height: 36px; border-radius: 12px; background: #EEF1F5; color: var(--ink); display: grid; place-items: center; flex-shrink: 0; }
.pk-dept-name { flex: 1; font-size: 15px; font-weight: 700; color: var(--ink); }
.pk-dept-count { font-size: 13.5px; font-weight: 600; color: var(--text-3); white-space: nowrap; }
.pk-dept-count b { font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -.4px; margin-right: 2px; }
.pk-report-filter .date-filter-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.pk-report-filter .date-filter-grid .btn { margin: 0 !important; min-height: 42px; }
@media (max-width: 640px) { .pk-report-filter .date-filter-grid { grid-template-columns: 1fr 1fr; } .pk-report-filter .date-filter-grid .btn { grid-column: 1 / -1; } }
