/* Vzhled po vzoru Fakturoidu: světle modrá horní lišta, bílý list na světlém pozadí, žlutá hlavní tlačítka.
   Všechna pravidla jsou pod .shell, takže se přihlašovací stránka nemění. */
body:has(.shell){background:#fafafa}
.shell{--ink:#212121;--muted:#6f6f6f;--green:#0b6fb3;--green-dark:#095a92;--bar:#9fd4f2;--bar-ink:#12344d;--yellow:#ffd83a;--border:#e6e6e6;--bg:#fafafa;--radius:12px;min-height:100vh;color:var(--ink);font-size:15px}
.shell a{color:inherit}
.shell :focus-visible{outline:2px solid var(--green);outline-offset:2px}

/* Horní lišta */
.appbar{background:var(--bar);color:var(--bar-ink);height:54px}
.appbar-in{width:max(80%,min(100%,980px));max-width:none;margin:auto;height:100%;padding:0 20px;display:flex;align-items:center;gap:18px}
.appbar .plus{width:30px;height:30px;border-radius:50%;background:var(--yellow);color:#212121;display:grid;place-items:center;font-size:22px;line-height:1;flex-shrink:0}
.appbar nav{display:flex;gap:2px;overflow-x:auto;flex:1}
.appbar nav a{color:var(--bar-ink);padding:6px 12px;border-radius:16px;white-space:nowrap;font-size:15px}
.appbar nav a:hover{background:rgba(255,255,255,.5)}
.appbar nav a.active{background:#fff;color:#0b4a78;font-weight:600}
.appbar-right{display:flex;align-items:center;gap:14px;font-size:14px;white-space:nowrap}
.appbar-right button{background:none;border:0;color:var(--bar-ink);opacity:.85;font-size:14px;padding:4px}
.appbar-right button:hover{opacity:1;text-decoration:underline}

/* Podnabídka a list */
.subnav{width:max(80%,min(100%,980px));max-width:none;box-sizing:border-box;margin:14px auto 0;padding:0 20px;display:flex;justify-content:space-between;align-items:center;gap:12px}
.subnav-tabs{display:flex;gap:4px;flex-wrap:wrap}
.subnav-tabs a{color:var(--green);padding:6px 14px;border-radius:16px;font-size:14px}
.subnav-tabs a:hover{background:#ececec}
.subnav-tabs a.active{background:#e8e8e8}
.shell .subnav .button{min-height:36px;border-radius:18px;background:#fff;border:1px solid #d9d9d9;color:var(--green);font-size:14px;padding:6px 16px}
.shell main{width:max(80%,min(100%,980px));max-width:none;box-sizing:border-box;margin:12px auto 0;padding:0 20px}
.sheet{background:#fff;border-radius:14px;box-shadow:0 1px 4px rgba(0,0,0,.08);padding:28px 32px;overflow:hidden}
.sheet.flush{padding:0}
.shell .app-footer{border:0;margin-top:22px;font-size:13px}

/* Nadpisy a text */
.shell h1{font-size:32px;font-weight:400;letter-spacing:0;line-height:1.25;margin:0 0 6px}
.shell h2{font-weight:600;letter-spacing:0}
.shell .eyebrow{display:none}
.shell .heading-dot{display:none}
.shell .page-heading{margin-bottom:24px}
.shell .page-heading p,.shell .muted{color:var(--muted)}
.shell .text-link{color:var(--green);font-weight:400;text-decoration:underline}

/* Tlačítka */
.shell .button{border-radius:8px;font-weight:400;font-size:14px;min-height:40px;box-shadow:none}
.shell .button:hover{transform:none}
.shell .button.primary{background:var(--yellow);border-color:#e6bf1f;color:#212121}
.shell .button.primary:hover{background:#ffcf1a}
.shell .button.secondary{background:#fff;border-color:#d4d4d4;color:var(--green)}
.shell .button.secondary:hover{background:#f1f8fd}

/* Pole */
.shell select,.shell input,.shell textarea{border:1px solid #ccc;border-radius:8px;color:var(--ink)}
.shell select:focus,.shell input:focus,.shell textarea:focus{border-color:var(--green)}
.shell .field label,.shell label{color:#555;font-weight:400;font-size:13px}

/* Seznam faktur: dlaždice se součty + řádky */
.tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-bottom:1px solid #eee}
.tile{display:flex;align-items:center;gap:14px;padding:20px 26px;border-top:1px solid #eee;border-left:1px solid #eee}
.tile:nth-child(-n+2){border-top:0}
.tile:nth-child(odd){border-left:0}
.tile.on{background:#e6f3fc}
.tile-icon{width:32px;height:32px;border:1.5px solid var(--green);border-radius:50%;display:grid;place-items:center;color:var(--green);font-size:15px;flex-shrink:0}
.tile.late .tile-icon{border-color:#c62828;color:#c62828}
.tile-main{flex:1;min-width:0}
.tile-main strong{display:block;font-weight:400;font-size:15px}
.tile-main span{font-size:12px;color:var(--muted)}
.tile-sum{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.tile-sum strong{display:block;font-weight:400;font-size:15px}
.tile-sum span{font-size:12px;color:var(--muted)}
.shell .filter-bar{background:#fafafa;border-bottom:1px solid #eee;padding:18px 26px}
.shell .filter-bar{flex-wrap:wrap;gap:10px}
.shell .filter-bar input{flex:1 1 75%}
.shell .filter-bar .button{order:1}
.shell .filter-bar select{flex:0 1 auto;order:2}
.inv-list{display:block}
.shell .year-head{display:flex;justify-content:space-between;align-items:baseline;margin:0;padding:16px 26px 8px;background:#f4f9fd;border-top:1px solid #e3eef7;font-size:20px;font-weight:600}
.year-head small{font-size:13px;font-weight:400;color:var(--muted)}
.inv-row{display:grid;grid-template-columns:150px minmax(0,1fr) 128px 130px;gap:14px;align-items:start;padding:14px 26px;border-top:1px solid #eee}
.inv-row:hover{background:#fbfbfb}
.shell .dashboard-bottom .inv-row{grid-template-columns:150px minmax(0,1fr) 145px;padding:14px 20px}
.shell .dashboard-bottom .inv-sub{display:none}
.inv-num a{color:var(--green);text-decoration:underline;white-space:nowrap}
.inv-who strong{display:block;font-weight:400}
.inv-meta{font-size:13px;color:var(--muted);margin-top:2px}
.inv-sub{text-align:right;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.inv-total{text-align:right;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.inv-total small{font-weight:400;font-size:11px;color:var(--muted);margin-left:3px}
.shell .status{background:none;padding:0;border-radius:0;color:var(--ink);font-weight:400;font-size:13px}
.shell .status.pending{color:var(--green)}
.shell .status.overdue{color:#c62828}
.shell .status.partial{color:#b26a00}
.shell .status.draft{color:var(--muted)}
.shell .project-tag{background:#f0f0f0;color:#555;border-radius:10px;padding:1px 8px;font-size:12px;margin-left:6px}
.shell .sheet.flush .panel{border:0;border-radius:0;box-shadow:none}

/* Přehled, panely a tabulky */
.shell .stat-card{border-color:#eee;border-radius:12px}
.shell .stat-card.accent{background:#e6f3fc;border-color:#cfe6f6}
.shell .stat-card.accent .stat-value{color:var(--green)}
.shell .panel{border-color:#eee;border-radius:12px}
.shell .panel-heading{border-color:#eee}
.shell th{text-transform:uppercase;font-size:11px;letter-spacing:.04em;color:#888}
.shell .cell-title{font-weight:400;color:var(--green);text-decoration:underline}
.shell .invoice-summary{border-radius:12px}
.shell .notice{border-radius:8px}

@media(max-width:700px){
  .appbar-in{gap:10px;padding:0 12px}
  .appbar .user{display:none}
  .sheet{padding:20px 16px}.sheet.flush{padding:0}
  .tiles{grid-template-columns:1fr}.tile:nth-child(2){border-top:1px solid #eee}.tile{border-left:0;padding:16px 18px}
  .inv-row{grid-template-columns:1fr auto;padding:14px 16px}
  .inv-num{grid-column:1/-1}
  .inv-sub{display:none}
  .subnav{flex-wrap:wrap}
}
.shell .key-row .status{margin-left:10px}

.shell .status.cancelled{color:#c62828;text-decoration:line-through}
.shell .status.credit{color:#b26a00}
.spaced-sm{margin-top:10px}.spaced-b{margin-bottom:22px}
.item-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.bar-chart{width:100%;height:auto;display:block}
.ares-button{margin-top:6px;align-self:flex-start;min-height:34px}
.paper-table input{width:110px}
.payment-row .text-link{display:block}
.link-danger{display:block;margin:12px auto 0;background:none;border:0;padding:6px;color:#c62828;font-size:13px;text-decoration:underline}

.tabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 18px;border-bottom:1px solid var(--border)}
.tab{padding:10px 14px;border-bottom:3px solid transparent;margin-bottom:-1px;color:var(--muted);font-weight:600;white-space:nowrap}
.tab:hover{color:var(--ink)}.tab.active{color:#0b6fb3;border-bottom-color:#0b6fb3}
.tab .count{margin-left:4px}
.chart-wrap{position:relative}
.chart-tip{position:absolute;background:#18352e;color:#fff;padding:5px 9px;border-radius:6px;font-size:12px;pointer-events:none;white-space:nowrap;z-index:3}
.bar{cursor:pointer;transition:opacity .15s}.bar:hover{opacity:.8}.bar.selected{fill:#f2b705}.bar:focus-visible{outline:3px solid #80b6a0}
.segmented{display:inline-flex;border:1px solid #dce4df;border-radius:8px;overflow:hidden}
.segmented label{padding:7px 12px;cursor:pointer;font-size:13px;display:flex;gap:6px;align-items:center}
.segmented label:has(input:checked){background:#e3f1fb;color:#0b6fb3;font-weight:700}
.segmented input{position:absolute;opacity:0;pointer-events:none}
.report-filter{display:flex;gap:10px;align-items:center;margin-bottom:16px}
.presets{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.chip{border:1px solid #dce4df;border-radius:999px;padding:5px 12px;font-size:13px;background:#fff}
.chip:hover{background:#f1f6f3}.chip.active{background:#0b6fb3;color:#fff;border-color:#0b6fb3}
.month-detail{margin-top:18px;border-top:1px solid var(--border);padding-top:14px}
.month-rows{display:flex;flex-direction:column}
.month-row{display:grid;grid-template-columns:minmax(150px,auto) 1fr 110px 120px;gap:12px;padding:10px 6px;border-bottom:1px solid #eef1ef;font-size:13px;align-items:center}
.month-row:hover{background:#f6fafd}.month-row .t{text-align:right;font-weight:700;font-variant-numeric:tabular-nums}.month-row .n{font-weight:700}
@media(max-width:700px){.month-row{grid-template-columns:1fr auto}.month-row .s{display:none}.shell main,.subnav,.appbar-in{width:100%}}
