/* LeadMarket — design system */
:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f1f4f9;
  --border: #e4e9f0;
  --border-strong: #d3dae5;
  --text: #0f1f2e;
  --text-muted: #5b6b80;
  --text-soft: #8090a3;

  --nav-bg: #0c2330;          /* hluboká petrolejová */
  --nav-bg-2: #0a1c27;
  --nav-fg: #cfe0e8;
  --nav-fg-muted: #7a93a0;
  --nav-active: #11d28a;

  --primary: #0e7c66;          /* hluboká zelená */
  --primary-600: #0a6a57;
  --primary-50: #e5f6f0;
  --accent: #11d28a;            /* svěží zelená akcent */
  --accent-soft: #d6f7e8;

  --warn: #d97706;
  --warn-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --info: #2563eb;
  --info-soft: #dbeafe;
  --gold: #b88a2c;
  --gold-soft: #fdf3d6;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;

  --shadow-xs: 0 1px 2px rgba(15, 31, 46, .04);
  --shadow-sm: 0 2px 6px rgba(15, 31, 46, .05), 0 1px 2px rgba(15, 31, 46, .04);
  --shadow-md: 0 8px 24px rgba(15, 31, 46, .08), 0 2px 6px rgba(15, 31, 46, .04);
  --shadow-lg: 0 24px 60px rgba(15, 31, 46, .18);

  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Sora', 'Inter', system-ui, sans-serif;

  --sidebar-w: 260px;
  --topbar-h: 68px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: linear-gradient(180deg, var(--nav-bg) 0%, var(--nav-bg-2) 100%);
  color: var(--nav-fg);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid rgba(255,255,255,.04);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 12px; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent) 0%, #0eaf73 100%);
  color: #052218; box-shadow: 0 6px 20px rgba(17,210,138,.35);
}
.brand-name { font-family: var(--font-display); font-weight: 700; color: #fff; letter-spacing: -.01em; }
.brand-sub { font-size: 11px; color: var(--nav-fg-muted); letter-spacing: .04em; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-section { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--nav-fg-muted); padding: 14px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--nav-fg);
  background: transparent;
  border: 0; text-align: left;
  cursor: pointer;
  font-size: 13.5px; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.04); color: #fff; }
.nav-item.active { background: rgba(17,210,138,.12); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav-item .ico { width: 18px; height: 18px; opacity: .85; flex: none; }
.nav-item .badge-mini {
  margin-left: auto;
  font-size: 10px; font-weight: 700;
  background: var(--accent); color: #052218;
  padding: 2px 6px; border-radius: 999px;
}

.side-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  padding: 14px;
}
.side-card-title { font-size: 11px; color: var(--nav-fg-muted); text-transform: uppercase; letter-spacing: .1em; }
.side-card-value { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: #fff; margin: 4px 0 10px; }

/* Main */
.main { display: flex; flex-direction: column; min-width: 0; }
.system-warning {
  padding: 10px 20px;
  border-bottom: 1px solid #f59e0b;
  background: var(--warn-soft);
  color: #854d0e;
  font-weight: 600;
  text-align: center;
}
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 30;
}
.search {
  flex: 1; max-width: 520px;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--text-muted);
}
.search input { flex: 1; border: 0; background: transparent; outline: 0; color: var(--text); font-size: 13.5px; }
.search kbd {
  font-family: inherit; font-size: 11px;
  background: var(--surface); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px;
}

.role-switch {
  display: inline-flex; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 3px;
}
.role-opt {
  border: 0; background: transparent; color: var(--text-muted);
  padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 13px;
}
.role-opt.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }

.top-credits {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: #0a6a57;
  padding: 8px 12px; border-radius: 10px; font-weight: 700; font-size: 13px;
}
.top-credits svg { color: #0a6a57; }

.icon-btn {
  position: relative;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--surface-2); color: var(--text-muted);
  border: 1px solid var(--border);
  display: grid; place-items: center;
}
.icon-btn:hover { color: var(--text); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }

.profile { display: flex; align-items: center; gap: 10px; padding-left: 6px; border-left: 1px solid var(--border); margin-left: 4px; }
.avatar {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, #0e7c66, #11d28a);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-family: var(--font-display);
  font-size: 13px;
}
.profile-name { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.profile-role { font-size: 11.5px; color: var(--text-soft); }
.verified { color: var(--accent); display: inline-flex; }

.content { padding: 28px; min-height: calc(100vh - var(--topbar-h)); }

.only-mobile { display: none; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.card-pad { padding: 20px; }
.card-head {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-title { font-weight: 700; font-size: 15px; font-family: var(--font-display); letter-spacing: -.005em; }
.card-sub { font-size: 12px; color: var(--text-soft); }

/* Page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title { font-family: var(--font-display); font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; letter-spacing: -.02em; margin: 0; }
.page-desc { color: var(--text-muted); margin: 4px 0 0; max-width: 720px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600; font-size: 13px;
  background: var(--surface-2); color: var(--text);
  transition: all .15s;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(14,124,102,.25); }
.btn-primary:hover { background: var(--primary-600); }
.btn-accent { background: var(--accent); color: #062a1d; box-shadow: 0 6px 18px rgba(17,210,138,.3); }
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-ghost-light { background: rgba(17,210,138,.16); color: #fff; border: 1px solid rgba(17,210,138,.3); width: 100%; }
.btn-ghost-light:hover { background: rgba(17,210,138,.26); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 7px 10px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }

/* Grids */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 1200px) { .grid-4 { grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 760px) { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } }

/* KPI */
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative; overflow: hidden;
}
.kpi::after {
  content: ""; position: absolute; inset: auto -30% -60% auto; width: 180px; height: 180px;
  background: radial-gradient(closest-side, rgba(17,210,138,.12), transparent 70%);
  pointer-events: none;
}
.kpi-label { color: var(--text-soft); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kpi-value { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-muted); }
.delta { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 12px; padding: 2px 7px; border-radius: 999px; }
.delta.up { background: var(--accent-soft); color: #0a6a57; }
.delta.down { background: var(--danger-soft); color: var(--danger); }
.spark { width: 90px; height: 30px; }

/* Company header */
.company-hero {
  background:
    radial-gradient(900px 240px at -10% -60%, rgba(17,210,138,.16), transparent 70%),
    linear-gradient(180deg, #fff, #fafdfb);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center;
}
.company-hero .logo {
  width: 72px; height: 72px; border-radius: 18px;
  background: linear-gradient(135deg, #0e7c66, #11d28a);
  display: grid; place-items: center; color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 24px;
  box-shadow: var(--shadow-md);
}
.company-logo {
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff !important;
  border: 1px solid var(--border);
  color: inherit !important;
}
.company-logo img { display: block; width: 100%; height: auto; max-height: 100%; object-fit: contain; }
.company-hero .company-logo { width: 152px; min-width: 152px; height: 72px; padding: 10px 12px; border-radius: 14px; }
.company-logo-large { width: 220px; height: 84px; padding: 12px 14px; border-radius: 16px; }
.company-meta h1 { margin: 0; font-family: var(--font-display); font-size: 22px; letter-spacing: -.01em; }
.company-meta .row { display: flex; gap: 16px; flex-wrap: wrap; color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.company-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.company-stat { text-align: right; }
.company-stat .v { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.company-stat .l { font-size: 11px; color: var(--text-soft); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 900px) { .company-hero { grid-template-columns: 1fr; text-align: left; } .company-stats { justify-content: flex-start; } .company-stat { text-align: left; } }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border);
}
.badge.green { background: var(--accent-soft); color: #0a6a57; border-color: transparent; }
.badge.blue { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.gold { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.badge.purple { background: #ede9fe; color: #6d28d9; border-color: transparent; }
.badge.gray { background: var(--surface-2); color: var(--text-muted); }
.badge.red { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.dark { background: #0c2330; color: #fff; border-color: transparent; }

/* Lead card */
.leads-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.lead-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.lead-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); transform: translateY(-2px); }
.lead-card.exclusive { border-color: rgba(17,210,138,.5); box-shadow: 0 0 0 1px rgba(17,210,138,.25) inset; }
.lead-card.purchased { opacity: .8; }
.lead-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.lead-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.lead-price { text-align: right; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--primary); white-space: nowrap; }
.lead-price small { font-size: 11px; color: var(--text-soft); font-weight: 600; display: block; text-transform: uppercase; letter-spacing: .06em; }
.lead-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.lead-loc { color: var(--text-muted); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.lead-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 12.5px; color: var(--text-muted); }
.lead-rows .l { color: var(--text-soft); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.lead-rows .v { color: var(--text); font-weight: 600; }
.lead-desc { color: var(--text-muted); font-size: 13px; line-height: 1.55; }
.lead-meta { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--border); justify-content: space-between; }
.source { display: flex; align-items: center; gap: 8px; }
.source .s-logo { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.source .s-name { font-weight: 600; font-size: 12.5px; }
.source .s-rating { font-size: 11.5px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.star { color: #f5b800; }
.quality-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.quality-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #0eaf73); }
.lead-actions { display: flex; gap: 8px; }
.lead-actions .btn { flex: 1; }

/* Filters bar */
.filters {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--text-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.filters select, .filters input {
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px;
  padding: 8px 10px; font: inherit; font-size: 13px; color: var(--text); width: 100%;
}
.filters .toggle-row { display: flex; gap: 10px; align-items: center; }
.filters-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: 4px; grid-column: 1/-1; }
.filters-actions .left { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.checkbox { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text); padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 500; }
.checkbox input { accent-color: var(--primary); }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, #eef2f7 0%, #f5f8fc 50%, #eef2f7 100%); background-size: 200% 100%; animation: shine 1.2s infinite linear; border-radius: 10px; }
@keyframes shine { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skel-card { height: 240px; }

/* Empty */
.empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty svg { color: var(--text-soft); margin-bottom: 12px; }

/* Charts */
.chart-wrap { padding: 18px; }
.chart-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.chart-legend .dot-l { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: middle; }

/* Activity */
.activity-list { display: flex; flex-direction: column; }
.activity-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: 0; }
.activity-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.activity-ico.green { background: var(--accent-soft); color: #0a6a57; }
.activity-ico.blue { background: var(--info-soft); color: var(--info); }
.activity-ico.gold { background: var(--gold-soft); color: var(--gold); }
.activity-ico.gray { background: var(--surface-2); color: var(--text-muted); }
.activity-text { font-size: 13px; }
.activity-time { font-size: 11.5px; color: var(--text-soft); }

/* Team */
.team-row { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.team-row:last-child { border-bottom: 0; }
.team-row .avatar { width: 34px; height: 34px; font-size: 12px; border-radius: 10px; }
.team-stat { text-align: right; font-weight: 600; }
.team-stat small { display: block; font-size: 10.5px; color: var(--text-soft); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }

/* Modal & Drawer */
.drawer-root { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.modal-root { position: fixed; inset: 0; pointer-events: none; z-index: 70; }
.modal-root.open, .drawer-root.open { pointer-events: auto; }
.scrim { position: absolute; inset: 0; background: rgba(8, 22, 31, .45); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s; }
.modal-root.open .scrim, .drawer-root.open .scrim { opacity: 1; }
.modal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.98);
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg);
  width: min(560px, calc(100vw - 32px)); max-height: 86vh; overflow: auto;
  opacity: 0; transition: all .2s;
}
.modal-root.open .modal { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.modal-head { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { margin: 0; font-family: var(--font-display); font-size: 17px; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

.drawer {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: min(720px, 100vw); background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateX(24px); opacity: 0; transition: all .25s;
  display: flex; flex-direction: column;
}
.drawer-root.open .drawer { transform: none; opacity: 1; }
.drawer-head { padding: 20px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.drawer-body { padding: 22px; overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 18px; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: space-between; align-items: center; background: var(--surface-2); }

.close-x { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); display: grid; place-items: center; }

.locked {
  position: relative; padding: 14px;
  border: 1px dashed var(--border-strong); border-radius: 12px;
  background: repeating-linear-gradient(135deg, #f8fafc 0 12px, #f1f5f9 12px 24px);
  color: var(--text-muted); user-select: none;
}
.locked .lock-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; }
.locked .lock-row .v { filter: blur(5px); letter-spacing: 1px; color: var(--text); font-weight: 600; }
.unlock-banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--accent-soft); color: #0a6a57; border-radius: 10px; font-weight: 600; font-size: 13px; }

/* Toasts */
.toasts {
  position: fixed;
  bottom: 16px;
  left: calc(var(--sidebar-w) + 16px);
  right: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: calc(100vw - var(--sidebar-w) - 32px);
  z-index: 80;
}
.toast {
  background: #0c2330; color: #fff;
  padding: 9px 11px; border-radius: 10px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 8px;
  width: fit-content; max-width: 260px;
  font-size: 12px; line-height: 1.35;
  border: 1px solid rgba(255,255,255,.06);
  animation: slideIn .25s ease;
}
.toast svg { width: 20px; height: 20px; flex: 0 0 20px; }
.toast span { min-width: 0; }
.toast.success { background: linear-gradient(135deg, #0e7c66, #0a6a57); }
.toast.error { background: linear-gradient(135deg, #b91c1c, #dc2626); }
@keyframes slideIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 980px) {
  .toasts { left: 12px; bottom: 12px; max-width: calc(100vw - 24px); }
  .toast { max-width: min(260px, calc(100vw - 24px)); }
}

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft); font-weight: 700; background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow: auto; }

/* Pipeline */
.pipeline { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.pipe-step { font-size: 11px; padding: 4px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); cursor: pointer; border: 1px solid var(--border); }
.pipe-step.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pipe-step.win { background: var(--accent); color: #062a1d; border-color: var(--accent); }
.pipe-step.lose { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-soft); }

/* Seller cards */
.sellers-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.seller-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.seller-head { display: flex; align-items: center; gap: 12px; }
.seller-logo { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #0c2330, #144357); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; }
.seller-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 14px; font-size: 12.5px; }
.seller-stats .l { color: var(--text-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; display: block; }
.seller-stats .v { font-weight: 700; color: var(--text); }

/* Watchdog cards */
.watchdog-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.watchdog-card .name { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.watchdog-card .crits { display: flex; gap: 6px; flex-wrap: wrap; }

/* Donut */
.donut-wrap { display: flex; gap: 18px; align-items: center; }
.donut-legend { display: flex; flex-direction: column; gap: 6px; flex: 1; font-size: 12.5px; }
.donut-legend .row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.donut-legend .row .l { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.donut-legend .row .v { font-weight: 700; }

/* Pkg cards */
.pkg-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
@media (max-width: 760px){ .pkg-grid{grid-template-columns:1fr;} }
.pkg { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.pkg.popular { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(17,210,138,.15); position: relative; }
.pkg.popular::after { content: "Doporučeno"; position: absolute; top: -10px; right: 14px; background: var(--accent); color: #062a1d; padding: 2px 10px; border-radius: 999px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.pkg-price { font-family: var(--font-display); font-size: 30px; font-weight: 800; }

/* Forms */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.demo-payment-warning,
.demo-payment-inline-warning {
  padding: 12px 14px;
  border: 1px solid #f3b454;
  border-radius: 11px;
  background: #fff7e8;
  color: #7c3d08;
  font-size: 12.5px;
}
.demo-payment-warning { display: flex; flex-direction: column; gap: 5px; }
.demo-payment-warning strong { font-size: 13px; letter-spacing: .02em; }
.demo-payment-inline-warning { margin-bottom: 14px; }
.demo-payment-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.demo-payment-summary > div { padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.demo-payment-summary span { display: block; color: var(--text-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.demo-payment-summary strong { display: block; margin-top: 3px; font-size: 14px; }
.demo-payment-methods { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.demo-payment-methods legend { margin-bottom: 7px; color: var(--text-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.demo-payment-methods label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.demo-payment-methods label:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.demo-payment-methods input { accent-color: var(--primary); }
.demo-payment-methods span { display: flex; flex-direction: column; gap: 1px; }
.demo-payment-methods small { color: var(--text-muted); font-size: 11.5px; }
.demo-payment-details { padding: 12px 14px; border: 1px dashed var(--primary); border-radius: 11px; background: #f1fbf7; }
.demo-payment-details-title { margin-bottom: 7px; color: var(--primary-600); font-weight: 700; }
.demo-payment-details > div:not(.demo-payment-details-title) { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; font-size: 12px; }
.demo-payment-details > div span { color: var(--text-muted); }
.demo-payment-details > div strong { text-align: right; overflow-wrap: anywhere; }
.demo-payment-details p { margin: 9px 0 0; color: #7c3d08; font-size: 11.5px; font-weight: 600; }
@media (max-width: 520px) {
  .demo-payment-summary { grid-template-columns: 1fr; }
  .demo-payment-details > div:not(.demo-payment-details-title) { flex-direction: column; gap: 1px; }
  .demo-payment-details > div strong { text-align: left; }
}
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.field input, .field select, .field textarea {
  border: 1px solid var(--border); background: var(--surface); border-radius: 8px;
  padding: 10px 12px; font: inherit; font-size: 13.5px; color: var(--text); width: 100%;
  text-transform: none; letter-spacing: 0; font-weight: 500;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid rgba(14,124,102,.25); border-color: var(--primary); }
.field .err { color: var(--danger); font-size: 11.5px; text-transform: none; letter-spacing: 0; }

/* Misc */
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.row-gap { display:flex; gap:10px; flex-wrap:wrap;}
.muted { color: var(--text-muted); }
.center { text-align: center; }
.flex-between { display:flex; align-items:center; justify-content:space-between; gap:12px;}

/* Account administration */
.acc-tabs { display:flex; gap:6px; flex-wrap:wrap; background:var(--surface-2); padding:6px; border-radius:14px; border:1px solid var(--border); }
.acc-tab { background:transparent; border:0; padding:9px 14px; border-radius:10px; font-weight:600; font-size:13px; color:var(--text-soft); cursor:pointer; transition:all .15s; }
.acc-tab:hover { color:var(--text); }
.acc-tab.active { background:var(--surface); color:var(--text); box-shadow:var(--shadow-sm); }
.acc-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 0; border-bottom:1px solid var(--border); }
.acc-row:last-child { border-bottom:0; }
.acc-card-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 16px; border:1px solid var(--border); border-radius:12px; background:var(--surface-2); }
.toggle { position:relative; display:inline-block; width:42px; height:24px; cursor:pointer; flex-shrink:0; }
.toggle input { opacity:0; width:0; height:0; }
.toggle span { position:absolute; inset:0; background:#cdd5e0; border-radius:24px; transition:.2s; }
.toggle span::before { content:""; position:absolute; left:3px; top:3px; width:18px; height:18px; background:#fff; border-radius:50%; transition:.2s; box-shadow:0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked + span { background:var(--primary); }
.toggle input:checked + span::before { transform:translateX(18px); }
.perm.yes { display:inline-grid; place-items:center; width:22px; height:22px; border-radius:6px; background:rgba(17,210,138,.15); color:var(--primary); }
.perm.no { color:var(--text-muted); }
.card.danger { border-color:rgba(229,72,77,.35); }
.btn-danger { background:var(--danger); color:#fff; border:0; padding:10px 16px; border-radius:10px; font-weight:600; cursor:pointer; }
.btn-danger:hover { filter:brightness(.95); }


:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* Mobile */
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .25s; z-index: 50; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .only-mobile { display: grid; }
  .topbar { padding: 0 14px; gap: 8px; }
  .role-switch, .top-credits, .profile-meta { display: none; }
  .content { padding: 18px; }
}

/* ====== Role & permissions (account admin) ====== */
.role-switch{
  display:inline-flex;align-items:center;gap:8px;
  padding:6px 10px;border:1px solid var(--border);border-radius:999px;
  background:var(--surface);box-shadow:var(--shadow-xs);
}
.role-switch select{
  border:0;background:transparent;font:inherit;color:var(--text);
  padding:4px 6px;border-radius:6px;cursor:pointer;max-width:240px;
}
.role-switch select:focus{outline:2px solid var(--primary);outline-offset:2px}
.ro-banner{
  display:flex;align-items:center;gap:10px;
  padding:10px 14px;margin-bottom:16px;border-radius:12px;
  background:#fff8e1;color:#7a5b00;border:1px solid #f4d97a;
  font-size:13px;
}
.ro-banner svg{width:16px;height:16px;flex:0 0 16px}
.perm-matrix th.me, .perm-matrix td.me{
  background:rgba(17,210,138,.08);
  font-weight:600;
}
.perm-matrix th.me{color:var(--primary-700,#0e7c66)}
input:disabled, textarea:disabled, select:disabled{
  background:var(--surface-2,#f4f6f8) !important;
  color:#6b7280 !important;cursor:not-allowed;opacity:.85;
}

/* ============ Prototype watermark, footer & disclaimer ============ */
.proto-watermark{
  position:fixed; right:14px; bottom:14px; z-index:9999;
  display:flex; align-items:center; gap:8px;
  padding:8px 12px; border-radius:999px;
  background:rgba(12,35,48,.72); backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 8px 24px rgba(0,0,0,.25);
  pointer-events:none; opacity:.92;
}
.proto-watermark img{ height:24px; width:auto; opacity:.98; filter:invert(1) drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.proto-watermark span{
  font: 700 10px/1 "Inter", sans-serif; letter-spacing:.08em;
  color:#e6f2ee; text-transform:uppercase;
}
@media (max-width: 640px){ .proto-watermark span{ display:none; } }
/* Hide watermark while a modal or drawer is open so it doesn't cover action buttons */
body:has(#modalRoot.open) .proto-watermark,
body:has(#drawerRoot.open) .proto-watermark{ opacity:0; visibility:hidden; transition:opacity .15s ease; }

.proto-footer{
  margin-top:32px; padding:18px 24px;
  border-top:1px solid var(--border);
  background:linear-gradient(180deg, transparent, rgba(12,35,48,.03));
}
.proto-footer-inner{
  display:flex; align-items:center; gap:16px; flex-wrap:wrap;
  max-width:1400px; margin:0 auto;
}
.proto-footer-logo{ height:28px; width:auto; filter:invert(1) brightness(.15); opacity:.85; }
.proto-footer-text{
  flex:1; min-width:260px;
  font:500 12.5px/1.55 "Inter", sans-serif; color:var(--text-muted);
}
.proto-footer-text strong{ color:var(--text); font-weight:700; }
.proto-footer-text em{ color:var(--primary); font-style:normal; font-weight:600; }
.proto-version{
  display:inline-block; margin-left:8px; padding:2px 8px;
  border-radius:999px; background:var(--accent-soft); color:var(--primary-600);
  font:700 10.5px/1.4 "Inter", sans-serif; letter-spacing:.06em; text-transform:uppercase;
}
.proto-footer-info{
  padding:8px 14px; border-radius:10px; cursor:pointer;
  background:var(--surface); border:1px solid var(--border-strong);
  color:var(--text); font:600 12.5px/1 "Inter", sans-serif;
  transition:all .15s ease;
}
.proto-footer-info:hover{ border-color:var(--primary); color:var(--primary); }

.proto-modal{ position:fixed; inset:0; z-index:10000; display:flex; align-items:center; justify-content:center; padding:20px; }
.proto-modal[hidden]{ display:none; }
.proto-modal-backdrop{ position:absolute; inset:0; background:rgba(6,18,26,.65); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); }
.proto-modal-card{
  position:relative; z-index:1; max-width:520px; width:100%;
  background:var(--surface); border-radius:20px;
  padding:32px 32px 28px;
  box-shadow:0 30px 80px rgba(6,18,26,.4), 0 4px 12px rgba(6,18,26,.15);
  border:1px solid var(--border);
  animation:protoIn .28s cubic-bezier(.2,.9,.3,1);
}
@keyframes protoIn{ from{ opacity:0; transform:translateY(12px) scale(.98); } to{ opacity:1; transform:none; } }
.proto-modal-brand{ display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:18px; flex-wrap:wrap; }
.proto-modal-logo{ height:38px; width:auto; max-width:210px; }
.proto-modal-badge{
  display:inline-block; padding:4px 10px; border-radius:999px;
  background:var(--accent-soft); color:var(--primary-600);
  font:700 10.5px/1.4 "Inter", sans-serif; letter-spacing:.08em; text-transform:uppercase;
  margin-bottom:0;
}
.proto-modal-card h2{ margin:0 0 12px; font: 800 22px/1.25 "Sora","Inter",sans-serif; color:var(--text); }
.proto-modal-card p{ margin:0 0 10px; font:400 14px/1.6 "Inter",sans-serif; color:var(--text-muted); }
.proto-modal-card p strong{ color:var(--text); font-weight:700; }
.proto-modal-note{ font-size:12.5px !important; padding:12px 14px; background:var(--surface-2); border-radius:10px; border:1px solid var(--border); }
.proto-modal-actions{ display:flex; justify-content:flex-end; margin-top:20px; }
body.proto-notice-open{ overflow:hidden; }
@media (max-width:640px){
  .proto-modal-card{ padding:24px 22px 22px; }
  .proto-modal-brand{ align-items:flex-start; }
  .proto-modal-logo{ height:34px; max-width:190px; }
}

/* ============ Login gate ============ */
body.proto-locked .app,
body.proto-locked .proto-modal,
body.proto-locked .modal-root,
body.proto-locked .drawer-root,
body.proto-locked .toasts { display:none !important; }
body.proto-locked { overflow:hidden; }
body.proto-locked .proto-watermark{
  z-index:100001;
  background:rgba(255,255,255,.94);
  border-color:rgba(255,255,255,.7);
  box-shadow:0 10px 28px rgba(0,0,0,.3);
}
body.proto-locked .proto-watermark img{ filter:none; }
body.proto-locked .proto-watermark span{ color:#344754; }

.login-gate{
  position:fixed; inset:0; z-index:100000;
  display:flex; align-items:center; justify-content:center;
  padding:20px;
  background:radial-gradient(1200px 700px at 20% 10%, #12384a 0%, #0a1c27 55%, #050f16 100%);
  animation:loginFade .35s ease;
}
.login-gate.is-leaving{ opacity:0; transition:opacity .28s ease; }
@keyframes loginFade{ from{opacity:0} to{opacity:1} }
.login-gate-bg{ position:absolute; inset:0; overflow:hidden; pointer-events:none; }
.login-blob{
  position:absolute; border-radius:50%; filter:blur(80px); opacity:.45;
  animation:loginFloat 14s ease-in-out infinite;
}
.login-blob.b1{ width:520px; height:520px; background:#11d28a; top:-140px; left:-120px; }
.login-blob.b2{ width:460px; height:460px; background:#0e7c66; bottom:-160px; right:-80px; animation-delay:-6s; }
.login-blob.b3{ width:360px; height:360px; background:#2563eb; top:40%; right:20%; opacity:.25; animation-delay:-3s; }
@keyframes loginFloat{ 0%,100%{ transform:translate(0,0) } 50%{ transform:translate(30px,-20px) } }

.login-card{
  position:relative; z-index:1; width:100%; max-width:420px;
  background:rgba(255,255,255,.98); border-radius:22px;
  padding:34px 32px 28px;
  box-shadow:0 40px 100px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.2);
  border:1px solid rgba(255,255,255,.1);
  display:flex; flex-direction:column; gap:14px;
  animation:loginIn .45s cubic-bezier(.2,.9,.3,1);
}
@keyframes loginIn{ from{opacity:0; transform:translateY(20px) scale(.96)} to{opacity:1; transform:none} }
.login-card.shake{ animation:loginShake .4s ease; }
@keyframes loginShake{ 10%,90%{transform:translateX(-2px)} 20%,80%{transform:translateX(4px)} 30%,50%,70%{transform:translateX(-8px)} 40%,60%{transform:translateX(8px)} }

.login-logo{ height:34px; width:auto; align-self:flex-start; filter:invert(1) brightness(.12); margin-bottom:2px; }
.login-badge{
  display:inline-block; align-self:flex-start;
  padding:4px 10px; border-radius:999px;
  background:var(--accent-soft); color:var(--primary-600);
  font:700 10.5px/1.4 "Inter",sans-serif; letter-spacing:.08em; text-transform:uppercase;
}
.login-card h1{ margin:2px 0 0; font:800 22px/1.25 "Sora","Inter",sans-serif; color:var(--text); }
.login-sub{ margin:0 0 6px; font:400 13px/1.55 "Inter",sans-serif; color:var(--text-muted); }
.login-sub strong{ color:var(--text); font-weight:700; }

.login-field{ display:flex; flex-direction:column; gap:6px; }
.login-field > span{ font:600 12px/1 "Inter",sans-serif; color:var(--text); letter-spacing:.02em; }
.login-field input{
  width:100%; padding:11px 13px; border-radius:10px;
  border:1px solid var(--border-strong); background:var(--surface);
  font:500 14px/1.3 "Inter",sans-serif; color:var(--text);
  transition:border-color .15s, box-shadow .15s;
}
.login-field input:focus{ outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(14,124,102,.15); }
.login-pw{ position:relative; display:block; }
.login-pw input{ padding-right:44px; }
.login-pw-toggle{
  position:absolute; right:6px; top:50%; transform:translateY(-50%);
  border:none; background:transparent; cursor:pointer;
  width:32px; height:32px; border-radius:8px; font-size:15px; color:var(--text-muted);
}
.login-pw-toggle:hover{ background:var(--surface-2); color:var(--text); }

.login-error{
  padding:9px 12px; border-radius:10px;
  background:var(--danger-soft); color:var(--danger);
  font:600 12.5px/1.4 "Inter",sans-serif;
}

.login-submit{
  margin-top:4px; padding:12px 16px; border-radius:11px; border:none; cursor:pointer;
  background:linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color:#fff; font:700 14px/1 "Inter",sans-serif;
  box-shadow:0 8px 20px rgba(14,124,102,.35);
  transition:transform .12s ease, box-shadow .15s ease;
}
.login-submit:hover{ transform:translateY(-1px); box-shadow:0 12px 26px rgba(14,124,102,.45); }
.login-submit:active{ transform:translateY(0); }

.login-foot{
  margin-top:6px; padding-top:14px; border-top:1px solid var(--border);
  font:500 11.5px/1.5 "Inter",sans-serif; color:var(--text-soft); text-align:center;
}

/* ============= Icon sizing safety net (v0.1.0-prototype) ============= */
/* Bez explicitního width/height se inline <svg> chová jako viewBox → 100 % rodiče.
   Tyto pravidla zajistí konzistentní velikosti ikon napříč aplikací. */
.app svg:not([width]):not(.spark) { width: 16px; height: 16px; flex: none; }
.empty > svg:not([width]) { width: 56px; height: 56px; margin-bottom: 14px; }
.lead-loc svg { width: 14px; height: 14px; }
.lead-price svg,
.badge svg { width: 12px; height: 12px; }
.verified svg { width: 14px; height: 14px; vertical-align: -2px; }
.brand-mark svg,
.icon-btn svg,
.top-credits svg,
.side-card svg,
.card-head svg,
.card-title svg,
.filters svg,
.role-opt svg { width: 18px; height: 18px; }
.activity-ico svg { width: 18px; height: 18px; }
.s-logo svg { width: 14px; height: 14px; }
.btn svg { width: 16px; height: 16px; }
.btn.btn-sm svg { width: 14px; height: 14px; }
.company-hero .badge svg { width: 14px; height: 14px; }

/* Ensure long price strings don't wrap awkwardly */
.pkg-price { white-space: nowrap; }

/* Tri-state permission toggle in per-user permissions editor */
.perm-tri { display: inline-flex; gap: 4px; background: var(--bg-soft, #f4f6f8); padding: 3px; border-radius: 999px; border: 1px solid var(--border, #e5e7eb); }
.perm-tri-opt { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted, #64748b); transition: all .15s ease; }
.perm-tri-opt:hover { color: var(--text, #0f172a); }
.perm-tri-opt.active { background: #fff; color: var(--text, #0f172a); box-shadow: 0 1px 2px rgba(15,23,42,.08); }
.perm-tri-opt.allow.active { background: #10b981; color: #fff; }
.perm-tri-opt.deny.active { background: #ef4444; color: #fff; }

/* Workspace switcher button */
#wsAdd { display: inline-grid; place-items: center; }
#wsAdd svg { width: 14px; height: 14px; }

/* ============= QUICK ROLE / DEMO FAB ============= */
.quick-fab{
  position:fixed; right:20px; bottom:78px; z-index:60;
  display:flex; flex-direction:column; gap:10px; align-items:flex-end;
  pointer-events:none;
}
.quick-fab > *{ pointer-events:auto; }
.quick-role-pill{
  display:inline-flex; align-items:center; gap:4px;
  background:#0c2330; color:#e6f2ee; border:1px solid rgba(255,255,255,.12);
  padding:4px; border-radius:999px;
  box-shadow:0 10px 30px -8px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.25);
  font:600 12px "Inter",sans-serif;
}
.quick-role-pill button{
  appearance:none; border:0; background:transparent; color:#cbd8d3;
  padding:7px 14px; border-radius:999px; cursor:pointer;
  font:inherit; letter-spacing:.01em; transition:.18s ease;
  display:inline-flex; align-items:center; gap:6px;
}
.quick-role-pill button:hover{ color:#fff; }
.quick-role-pill button.active{
  background:linear-gradient(135deg,#11d28a,#0e7c66); color:#04241b;
  box-shadow:0 4px 12px -3px rgba(17,210,138,.55);
}
.quick-reset{
  appearance:none; border:1px solid rgba(255,255,255,.14);
  background:rgba(12,35,48,.75); color:#e6f2ee;
  backdrop-filter:blur(6px);
  padding:6px 12px; border-radius:999px; cursor:pointer;
  font:600 11px "Inter",sans-serif; letter-spacing:.04em; text-transform:uppercase;
}
.quick-reset:hover{ background:#0c2330; }
@media (max-width: 640px){
  .quick-fab{ right:10px; bottom:64px; }
  .quick-role-pill button{ padding:6px 10px; font-size:11px; }
}
body:has(#modalRoot.open) .quick-fab,
body:has(#drawerRoot.open) .quick-fab{ opacity:0; visibility:hidden; transition:opacity .15s ease; }

/* ===== Stats: funnel, compact table, kpi-inline ===== */
.funnel{ display:flex; flex-direction:column; gap:10px; }
.funnel-row{ position:relative; background:#f4f6f5; border-radius:8px; overflow:hidden; height:44px; }
.funnel-bar{ position:absolute; inset:0 auto 0 0; background:linear-gradient(90deg,#0e7c66,#11d28a); opacity:.85; border-radius:8px; }
.funnel-lbl{ position:relative; z-index:1; display:flex; justify-content:space-between; align-items:center; height:100%; padding:0 14px; color:#0b1f1a; font-size:13px; }
.funnel-lbl strong{ font-weight:600; }
.funnel-lbl span{ color:#0b1f1a; opacity:.85; font-variant-numeric:tabular-nums; }
.table-compact td{ padding:8px 10px; font-size:13px; }
.kpi-inline{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.kpi-inline > div{ background:#f7f8f8; border-radius:8px; padding:10px 12px; }
.kpi-inline strong{ display:block; font-size:18px; margin-top:2px; }
.dot{ display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; vertical-align:middle; }

/* ===== Obchod (živá data) — dashboard ===== */
.tv-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tv-tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px 14px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px;
}
.tv-tile-label { font-size: 12px; font-weight: 600; color: var(--text-muted); letter-spacing: .02em; }
.tv-tile-value { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1.15; }
.tv-tile-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; min-height: 30px; }
.tv-tile-foot > span { display: flex; flex-direction: column; gap: 2px; }
.tv-tile-sub { font-size: 12px; color: var(--text-soft); }
.tv-spark { flex: 0 0 auto; }

.tv-chart { display: flex; flex-direction: column; gap: 10px; }
.tv-plot { position: relative; }
.tv-plot svg { display: block; width: 100% !important; height: auto !important; aspect-ratio: 640 / 250; }
.app svg.tv-spark { width: auto; height: auto; }
.tv-tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 130px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px;
  box-shadow: var(--shadow-md); padding: 8px 10px; font-size: 12px;
}
.tv-tip-head { font-weight: 700; color: var(--text); margin-bottom: 5px; }
.tv-tip-row { display: flex; align-items: center; gap: 7px; padding: 2px 0; color: var(--text-muted); }
.tv-tip-row b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.tv-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-muted); }
.tv-key { display: inline-flex; align-items: center; gap: 6px; }
.tv-key b { color: var(--text); }
.tv-key-line { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.tv-key-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }

.tv-bars { display: flex; flex-direction: column; gap: 10px; }
.tv-bar-row { display: grid; grid-template-columns: 140px 1fr 76px; align-items: center; gap: 10px; border-radius: 8px; }
.tv-bar-row:hover { background: var(--surface-2); }
.tv-bar-label { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-bar-track { height: 18px; border-radius: 0 4px 4px 0; }
.tv-bar-fill { height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.tv-bar-val { font-size: 12.5px; font-weight: 600; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }

.tv-stack { display: flex; gap: 2px; height: 28px; border-radius: 6px; overflow: hidden; margin-bottom: 12px; }
.tv-stack-seg { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; min-width: 3px; }

.tv-feed { display: flex; flex-direction: column; gap: 0; }
.tv-feed-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.tv-feed-row:last-child { border-bottom: 0; }
.tv-feed-ico {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.tv-feed-ico.in { background: var(--accent-soft); color: #00875f; }
.tv-feed-ico.out { background: var(--danger-soft); color: var(--danger); }
.tv-feed-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; font-size: 13px; }
.tv-feed-main .muted { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-feed-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 12px; }
.tv-feed-meta b { font-variant-numeric: tabular-nums; }

.tv-badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); color: var(--text-muted);
}
.tv-badge.active, .tv-badge.completed { background: var(--accent-soft); color: #0a6a57; }
.tv-badge.paused { background: var(--warn-soft); color: #92400e; }
.tv-badge.sold { background: var(--info-soft); color: #1d4ed8; }
.tv-badge.refunded { background: #fce7f3; color: #be185d; }
.tv-badge.cancelled, .tv-badge.archived { background: var(--surface-2); color: var(--text-soft); }
.tv-badge.draft { background: var(--surface-2); color: var(--text-muted); }
.tv-badge.gold { background: var(--gold-soft); color: #926c14; }

.tv-wallet-hero { display: flex; flex-direction: column; gap: 8px; }
.tv-wallet-balance { font-size: 40px; font-weight: 700; color: var(--text); line-height: 1.05; }
.tv-wallet-balance span { font-size: 15px; font-weight: 600; color: var(--text-soft); }

@media (max-width: 1100px) { .tv-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .tv-tiles { grid-template-columns: 1fr; }
  .tv-bar-row { grid-template-columns: 100px 1fr 70px; }
}
