/* Colette Cockpit – spoločný vzhľad (ladí s administráciou kvetomatu) */
:root {
  color-scheme: dark;
  --page: #1a0d0d;
  --surface: #231818;
  --surface-2: #2b1d1d;
  --ink: #f8e4e6;
  --ink-2: rgba(248, 228, 230, 0.70);
  --muted: rgba(248, 228, 230, 0.45);
  --gold: #d4af37;
  --gold-2: #e6c866;
  --gold-wash: rgba(212, 175, 55, 0.10);
  --line: rgba(212, 175, 55, 0.16);
  --line-strong: rgba(212, 175, 55, 0.35);
  --rose: #c9a0a0;
  --grid: rgba(248, 228, 230, 0.07);
  --axis: rgba(248, 228, 230, 0.18);
  /* grafy – overené na kontrast a farbosleposť voči --surface */
  --income: #b08a22;
  --expense: #c8667a;
  --net: #f8e4e6;
  --good-text: #81c784;
  --good: #0ca30c; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { background: var(--page); }
body {
  margin: 0; color: var(--ink); min-height: 100vh;
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(212, 175, 55, 0.07), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(201, 112, 125, 0.07), transparent 60%),
    var(--page);
  background-attachment: fixed;
}
/* jemná zrnitá štruktúra (papier) */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .8 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

/* horná lišta */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(35, 24, 24, 0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { max-width: 1180px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { color: var(--gold); font-size: 12px; letter-spacing: 4px; text-transform: uppercase; font-weight: 500; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.brand svg { width: 18px; height: 18px; }
.nav { display: flex; gap: 6px; margin-right: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px; border: 1px solid transparent; }
.nav a:hover { color: var(--ink); background: var(--gold-wash); }
.nav a.on { color: var(--gold); border-color: var(--line-strong); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 18px 16px 72px; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
h1 { font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 11px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); margin: 0 0 2px; }
.sub { color: var(--muted); font-size: 13px; }
.section-title { font-size: 10px; letter-spacing: 4px; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }

/* ovládacie prvky */
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
select, input, textarea, button { font: inherit; color: var(--ink); }
select, input, textarea {
  background: var(--page); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; min-width: 0;
}
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--line-strong); box-shadow: 0 0 0 3px var(--gold-wash); }
textarea { resize: vertical; min-height: 64px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--gold); }
::placeholder { color: var(--muted); }
button { cursor: pointer; background: transparent; border: 1px solid var(--line-strong); color: var(--gold);
  border-radius: 999px; padding: 8px 16px; font-size: 13px; letter-spacing: 0.5px; }
button:hover { background: var(--gold-wash); }
button.primary { background: linear-gradient(180deg, #dcbc4f, #c9a22c); color: #1a0d0d; border-color: transparent; font-weight: 600; }
button.primary:hover { filter: brightness(1.06); }
button.ghost { border-color: transparent; color: var(--ink-2); }
button.danger { border-color: rgba(208, 59, 59, 0.5); color: #e88; }
.link { background: none; border: 0; color: var(--gold); padding: 0; font-size: 12px; border-radius: 0; letter-spacing: 0; }
.link:hover { background: none; text-decoration: underline; }

/* karty */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0) 40%), var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 10px 30px -18px rgba(0, 0, 0, 0.6);
}
.grid { display: grid; gap: 12px; }

/* dlaždice s číslami */
.kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 12px; }
.kpi .label { color: var(--muted); font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; }
.kpi .value { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; color: var(--ink); }
.kpi .value.gold { color: var(--gold); }
.kpi .value.pos { color: var(--good-text); }
.kpi .hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.pos { color: var(--good-text); }

/* záložky */
.tabs { display: flex; gap: 4px; margin: 22px 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 9px 12px;
  color: var(--muted); white-space: nowrap; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.tabs button.on { color: var(--gold); border-bottom-color: var(--gold); }
.panel { display: none; } .panel.on { display: block; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }

/* tabuľky */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--grid); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.small { color: var(--muted); font-size: 12px; }

/* štítky */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.chip.gold { color: var(--gold); border-color: var(--line-strong); background: var(--gold-wash); }
.chip.ok { color: #81c784; border-color: rgba(129, 199, 132, 0.35); background: rgba(76, 175, 80, 0.10); }
.chip.warn { color: #f0c46a; border-color: rgba(250, 178, 25, 0.35); background: rgba(250, 178, 25, 0.08); }
.chip.bad { color: #ef9a9a; border-color: rgba(208, 59, 59, 0.4); background: rgba(208, 59, 59, 0.10); }
.chip.dim { color: var(--muted); }

/* upozornenia */
.alerts { display: grid; gap: 8px; margin-bottom: 12px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; }
.alert .dot { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #1a0d0d; }
.alert .t { font-weight: 600; }
.alert .d { color: var(--ink-2); font-size: 13px; }

/* prihlásenie */
#login { max-width: 380px; margin: 16vh auto; padding: 36px 30px; text-align: left; }
#login input { width: 100%; margin: 14px 0 12px; font-size: 16px; padding: 12px 14px; }
#login button { width: 100%; padding: 12px; letter-spacing: 3px; text-transform: uppercase; font-size: 12px; }

/* modálne okno / spodný panel */
.modal-bg { position: fixed; inset: 0; background: rgba(10, 4, 4, 0.72); z-index: 80; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 24px 12px; }
.modal { width: 100%; max-width: 720px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

.hidden { display: none !important; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line-strong); padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 99; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.empty { color: var(--muted); padding: 28px 0; text-align: center; }

@media (max-width: 600px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 12px; }
  .kpi .value { font-size: 20px; }
  .hide-sm { display: none; }
  .brand span { display: none; }
}
