/* Micro IT Park CRM — premium theme (hand-written, no build step) */
:root {
  /* Brand (from the Micro IT Park logo) */
  --navy-950: #0a1726;
  --navy-900: #0f2135;
  --navy-800: #152b43;
  --navy: #182d42;
  --navy-600: #24405e;
  --brand-red: #da251c;
  --brand-red-soft: #ff5a4f;

  --primary: #1b3a5c;
  --primary-600: #132c47;
  --primary-50: #eef3f9;
  --link: #2257c9;

  --text: #0d1b2a;
  --text-2: #4a5a6e;
  --muted: #8a97a8;
  --border: #e6eaf0;
  --border-2: #d7dde6;
  --bg: #f4f6f9;
  --card: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(13, 27, 42, .04), 0 1px 3px rgba(13, 27, 42, .05);
  --shadow-md: 0 6px 20px -8px rgba(13, 27, 42, .18);
  --shadow-lg: 0 24px 60px -16px rgba(13, 27, 42, .35);
  --sidebar-w: 268px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* Chart series (validated: all-pairs CVD-safe) */
  --s1: #257de0; --s2: #f47230; --s3: #00b894;
  --good: #16a34a; --bad: #e5484d;

  --green: #15803d; --green-bg: #ecfdf3; --green-bd: #b7ebcb;
  --orange: #c2410c; --orange-bg: #fff4ec; --orange-bd: #fbd5b5;
  --red: #c81e1e; --red-bg: #fef2f2; --red-bd: #fbcaca;
  --blue: #1d5bd6; --blue-bg: #eef4ff; --blue-bd: #c8d9fb;
  --sky: #0369a1; --sky-bg: #f0f9ff; --sky-bd: #bae6fd;
  --violet: #6d28d9; --violet-bg: #f5f3ff; --violet-bd: #ddd6fe;
  --amber: #a16207; --amber-bg: #fffbeb; --amber-bd: #fde68a;
  --indigo: #4338ca; --indigo-bg: #eef2ff; --indigo-bd: #c7d2fe;
  --teal: #0f766e; --teal-bg: #f0fdfa; --teal-bd: #99f6e4;
  --slate: #475569; --slate-bg: #f1f5f9; --slate-bd: #e2e8f0;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 12px; background: var(--slate-bg); padding: 1px 6px; border-radius: 5px; }
svg.icon { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 15px !important; height: 15px !important; }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hidden { display: none !important; }

/* ================= Layout ================= */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 40;
  background: radial-gradient(120% 60% at 0% 0%, #1f3a59 0%, transparent 60%), linear-gradient(180deg, var(--navy-900), var(--navy-950));
  color: #fff; transition: transform .22s ease;
}
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.content { padding: 28px 32px 48px; max-width: 1440px; width: 100%; }

.brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 20px; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 12px; background: #fff; display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5);
}
.brand-logo img { width: 30px; height: 30px; }
.brand-name { font-weight: 800; font-size: 15.5px; letter-spacing: -.2px; }
.brand-sub { font-size: 10.5px; letter-spacing: 1.4px; color: rgba(255, 255, 255, .5); font-weight: 600; text-transform: uppercase; }

.nav { flex: 1; overflow-y: auto; padding: 8px 12px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.nav-link, .nav-group > summary {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px;
  color: rgba(255, 255, 255, .72); font-weight: 600; cursor: pointer; list-style: none; user-select: none; transition: background .15s, color .15s;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-link:hover, .nav-group > summary:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav-link.active { background: linear-gradient(90deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05)); color: #fff; }
.nav-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand-red-soft); }
.nav-group { margin-top: 6px; }
.nav-group > summary { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255, 255, 255, .42); padding: 12px 14px 6px; }
.nav-group > summary .icon { display: none; }
.nav-group > summary .chev { display: block; margin-left: auto; transition: transform .15s; width: 14px !important; height: 14px !important; }
.nav-group[open] > summary .chev { transform: rotate(90deg); }
.nav-sub { padding: 0 0 4px; }
.nav-sub .nav-link { padding: 9px 14px; font-size: 13.5px; }
.nav-count {
  margin-left: auto; min-width: 24px; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 700;
  background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .8); text-align: center;
}
.nav-count.hot { background: #16a34a; color: #fff; }
.nav-count.warn { background: var(--brand-red); color: #fff; }
.nav-section { margin: 20px 14px 6px; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255, 255, 255, .42); font-weight: 700; }

.user-card {
  margin: 12px; padding: 12px; border-radius: 14px; display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08);
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--navy-600), var(--navy)); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; letter-spacing: .3px;
}
.user-card .avatar { background: linear-gradient(135deg, var(--brand-red-soft), var(--brand-red)); }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.user-card .name { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .role-badge { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .85); }
.user-card form { margin-left: auto; }
.user-card .icon-btn { color: rgba(255, 255, 255, .7); }
.user-card .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.icon-btn {
  background: none; border: 0; padding: 7px; border-radius: 8px; color: var(--text-2); cursor: pointer; display: inline-grid; place-items: center;
}
.icon-btn:hover { background: var(--slate-bg); color: var(--text); }

.topbar {
  height: 68px; background: rgba(255, 255, 255, .85); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 16px; padding: 0 32px; position: sticky; top: 0; z-index: 30;
}
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; min-width: 0; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb b { color: var(--text); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-search { position: relative; margin-left: 12px; flex: 0 1 340px; }
.topbar-search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.topbar-search input {
  width: 100%; padding: 9px 12px 9px 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); font: inherit; color: var(--text);
}
.topbar-search input:focus { outline: none; background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(27, 58, 92, .12); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar-user { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-left: 1px solid var(--border); font-weight: 600; }
.topbar-user .meta { line-height: 1.2; }
.topbar-user .meta small { display: block; color: var(--muted); font-weight: 600; font-size: 11px; }
.menu-toggle { display: none; }
.backdrop { display: none; }

/* ================= Page header ================= */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -.6px; }
.page-sub { color: var(--text-2); margin-top: 4px; font-size: 14.5px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ================= Buttons ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px;
  font: inherit; font-weight: 600; font-size: 14px; border: 1px solid var(--border-2); background: #fff; color: var(--text);
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
  box-shadow: 0 1px 2px rgba(13, 27, 42, .05);
}
.btn:hover { background: #f8fafc; text-decoration: none; border-color: #c9d1dc; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .input:focus, .select:focus, .textarea:focus { outline: none; box-shadow: 0 0 0 3px rgba(27, 58, 92, .15); border-color: var(--primary); }
.btn-primary { background: linear-gradient(180deg, #24476e, var(--primary)); border-color: var(--primary-600); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 6px 14px -6px rgba(27, 58, 92, .6); }
.btn-primary:hover { background: linear-gradient(180deg, #1f3f63, var(--primary-600)); border-color: var(--primary-600); }
.btn-accent { background: linear-gradient(180deg, #ef3b31, var(--brand-red)); border-color: #b81d15; color: #fff; box-shadow: 0 6px 14px -6px rgba(218, 37, 28, .6); }
.btn-accent:hover { background: linear-gradient(180deg, #e2342a, #c11f17); border-color: #a01a13; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #a91818; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); box-shadow: none; }
.btn-ghost:hover { background: var(--slate-bg); color: var(--text); border-color: transparent; }
.btn-white { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22); color: #fff; box-shadow: none; }
.btn-white:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .35); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ================= Cards ================= */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-title { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 10px; letter-spacing: -.1px; }
.card-sub { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.card-body { padding: 20px 22px; }
.card + .card, .stack > * + * { margin-top: 20px; }
.chip { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 7px; background: var(--slate-bg); color: var(--text-2); border: 1px solid var(--border); }
.count-pill { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: var(--navy); color: #fff; }
.link-arrow { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 13.5px; }
.ic-chip { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.ic-chip .icon { width: 17px; height: 17px; }

/* ================= Hero ================= */
.hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 28px 30px; margin-bottom: 24px; color: #fff;
  background: radial-gradient(60% 120% at 100% 0%, rgba(218, 37, 28, .55) 0%, transparent 55%),
              radial-gradient(50% 90% at 0% 100%, rgba(37, 125, 224, .35) 0%, transparent 60%),
              linear-gradient(135deg, var(--navy-800), var(--navy-950));
  box-shadow: var(--shadow-md);
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: center;
}
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(90deg, transparent, #000 70%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 1.4px; color: rgba(255, 255, 255, .6); font-weight: 700; }
.hero h1 { font-size: 28px; font-weight: 800; letter-spacing: -.6px; margin-top: 6px; }
.hero p { color: rgba(255, 255, 255, .75); margin-top: 8px; font-size: 14.5px; max-width: 520px; }
.hero .page-actions { margin-top: 18px; }
.hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hero-stat { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 14px 16px; backdrop-filter: blur(6px); }
.hero-stat .l { font-size: 12px; color: rgba(255, 255, 255, .65); font-weight: 600; }
.hero-stat .v { font-size: 24px; font-weight: 800; letter-spacing: -.5px; margin-top: 2px; }
.hero-stat .d { font-size: 11.5px; font-weight: 700; margin-top: 2px; color: rgba(255, 255, 255, .6); }
.delta-up { color: #4ade80 !important; } .delta-down { color: #fca5a5 !important; }

/* ================= KPI ================= */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi {
  position: relative; display: block; padding: 18px 18px 16px; border-radius: var(--radius); background: #fff; border: 1px solid var(--border);
  color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; box-shadow: var(--shadow); overflow: hidden;
}
a.kpi:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-2); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.kpi-value { font-size: 30px; font-weight: 800; margin: 12px 0 4px; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.kpi-note { font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .dot { width: 10px; height: 10px; border-radius: 50%; }
.kpi::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: transparent; }
.kpi.good::before { background: #22c55e; } .kpi.good .kpi-note { color: var(--green); } .kpi.good .dot { background: #22c55e; box-shadow: 0 0 0 4px #dcfce7; }
.kpi.average::before { background: #f97316; } .kpi.average .kpi-note { color: var(--orange); } .kpi.average .dot { background: #f97316; box-shadow: 0 0 0 4px #ffedd5; }
.kpi.bad::before { background: #ef4444; } .kpi.bad .kpi-note { color: var(--red); } .kpi.bad .dot { background: #ef4444; box-shadow: 0 0 0 4px #fee2e2; }
.kpi .kpi-note.blue { color: var(--blue); } .kpi .kpi-note.orange { color: var(--orange); } .kpi .kpi-note.green { color: var(--green); }
.chip-blue { background: var(--blue-bg); color: var(--blue); } .chip-sky { background: var(--sky-bg); color: var(--sky); }
.chip-orange { background: var(--orange-bg); color: var(--orange); } .chip-green { background: var(--green-bg); color: var(--green); }
.chip-violet { background: var(--violet-bg); color: var(--violet); } .chip-red { background: var(--red-bg); color: var(--red); }
.chip-teal { background: var(--teal-bg); color: var(--teal); } .chip-navy { background: var(--primary-50); color: var(--primary); }
.chip-amber { background: var(--amber-bg); color: var(--amber); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.delta.up { background: var(--green-bg); color: var(--green); } .delta.down { background: var(--red-bg); color: var(--red); } .delta.flat { background: var(--slate-bg); color: var(--slate); }

/* ================= Badges ================= */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700;
  border: 1px solid transparent; white-space: nowrap; line-height: 1.5;
}
.badge .bdot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-lg { font-size: 13px; padding: 5px 12px; }
.tone-green { color: var(--green); background: var(--green-bg); border-color: var(--green-bd); }
.tone-orange { color: var(--orange); background: var(--orange-bg); border-color: var(--orange-bd); }
.tone-red { color: var(--red); background: var(--red-bg); border-color: var(--red-bd); }
.tone-blue { color: var(--blue); background: var(--blue-bg); border-color: var(--blue-bd); }
.tone-sky { color: var(--sky); background: var(--sky-bg); border-color: var(--sky-bd); }
.tone-violet { color: var(--violet); background: var(--violet-bg); border-color: var(--violet-bd); }
.tone-amber { color: var(--amber); background: var(--amber-bg); border-color: var(--amber-bd); }
.tone-indigo { color: var(--indigo); background: var(--indigo-bg); border-color: var(--indigo-bd); }
.tone-teal { color: var(--teal); background: var(--teal-bg); border-color: var(--teal-bd); }
.tone-slate { color: var(--slate); background: var(--slate-bg); border-color: var(--slate-bd); }
.role-badge { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; padding: 1px 8px; border-radius: 5px; background: var(--violet-bg); color: var(--violet); }

tr.q-good td:first-child { box-shadow: inset 3px 0 0 #22c55e; }
tr.q-average td:first-child { box-shadow: inset 3px 0 0 #f97316; }
tr.q-bad td:first-child { box-shadow: inset 3px 0 0 #ef4444; }

/* ================= Tables ================= */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); font-weight: 700;
  padding: 11px 16px; background: #f9fafc; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: #f8fafd; }
.table .lead-name { font-weight: 700; color: var(--text); }
.table .clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table td.r, .table th.r { text-align: right; }
.table tfoot td { font-weight: 800; background: #f9fafc; border-top: 1px solid var(--border); }
.table tr.is-current td { background: var(--primary-50); }
.actions { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }

/* ================= Forms ================= */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field label, .label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--text); }
.req { color: var(--brand-red); }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-2); border-radius: var(--radius-sm); background: #fff;
  font: inherit; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: #a6b1bf; }
.textarea { resize: vertical; min-height: 90px; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2364748b' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input-sm, .select-sm { padding: 7px 10px; font-size: 13px; }
.select-sm { padding-right: 28px; }
.help { font-size: 12px; color: var(--muted); margin-top: 5px; }
.error { font-size: 12.5px; color: var(--red); margin-top: 5px; font-weight: 500; }
.has-error .input, .has-error .select, .has-error .textarea { border-color: var(--red); }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 6px; }
.fieldset-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); grid-column: 1 / -1; margin-top: 8px; padding-top: 14px; border-top: 1px dashed var(--border); }

.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 12px; padding: 18px 20px; }
.filters-more { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding: 0 20px 18px; }
.filters-bar { display: flex; gap: 10px; padding: 0 20px 18px; flex-wrap: wrap; align-items: center; }
.search-box { position: relative; }
.search-box .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box .input { padding-left: 38px; }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filter-row .field { min-width: 140px; }
.filter-row .field label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }

/* ================= Alerts / Toasts ================= */
.alert { padding: 12px 16px; border-radius: 12px; border: 1px solid; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.alert-warn { background: var(--amber-bg); border-color: var(--amber-bd); color: #713f12; }
.alert-error { background: var(--red-bg); border-color: var(--red-bd); color: #7f1d1d; }
.alert-info { background: var(--blue-bg); border-color: var(--blue-bd); color: #1e3a8a; }
.toasts { position: fixed; top: 18px; right: 18px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.toast {
  display: flex; align-items: center; gap: 10px; background: var(--navy-900); color: #fff; padding: 12px 16px; border-radius: 12px;
  box-shadow: var(--shadow-lg); font-weight: 500; animation: toast-in .25s ease; border: 1px solid rgba(255,255,255,.08);
}
.toast.success .icon { color: #4ade80; } .toast.error .icon { color: #f87171; }
.toast button { margin-left: auto; background: none; border: 0; color: #94a3b8; cursor: pointer; font-size: 18px; line-height: 1; }
.toast.hide { opacity: 0; transform: translateY(-8px); transition: all .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* ================= Modal ================= */
dialog.modal { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); color: var(--text); }
dialog.modal[open] { animation: pop .18s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
dialog.modal::backdrop { background: rgba(10, 23, 38, .55); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16.5px; font-weight: 700; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: #f9fafc; border-radius: 0 0 18px 18px; }

/* ================= Lead details ================= */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.lead-header { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.lead-avatar { width: 60px; height: 60px; border-radius: 18px; background: linear-gradient(135deg, var(--navy-600), var(--navy)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; box-shadow: var(--shadow-md); }
.lead-header h1 { font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
.meta-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; color: var(--text-2); }
.meta-row span { display: inline-flex; align-items: center; gap: 6px; }
.info-list { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; }
.info-list dt { color: var(--muted); font-weight: 600; font-size: 13px; }
.info-list dd { margin: 0; font-weight: 500; word-break: break-word; }
.quick-form { display: grid; gap: 16px; }
.quick-form .label { margin-bottom: 6px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 16px; overflow-x: auto; }
.tab {
  padding: 14px 14px 12px; color: var(--text-2); border-bottom: 2px solid transparent; display: inline-flex; gap: 8px;
  align-items: center; white-space: nowrap; background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; font: inherit; font-weight: 600;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--primary); border-bottom-color: var(--brand-red); }
.tab .nav-count { margin-left: 0; background: var(--slate-bg); color: var(--slate); }
.tab .nav-count.warn { background: var(--brand-red); color: #fff; }
.card .nav-count { background: var(--slate-bg); color: var(--slate); }

.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.comment-meta b { color: var(--text); font-size: 13.5px; }
.comment-text { margin-top: 4px; white-space: pre-line; word-break: break-word; background: #f8fafc; border: 1px solid var(--border); padding: 10px 12px; border-radius: 4px 12px 12px 12px; }

.timeline { position: relative; padding-left: 6px; }
.tl-item { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.tl-item::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 0; width: 2px; background: var(--border); }
.tl-item:last-child::before { display: none; }
.tl-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; border: 1px solid; }
.tl-icon .icon { width: 15px; height: 15px; }
.tl-title { font-weight: 700; }
.tl-desc { color: var(--text-2); margin-top: 2px; word-break: break-word; }
.tl-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }

.meeting-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: #fcfdfe; }
.meeting-card + .meeting-card { margin-top: 12px; }
.meeting-when { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ================= Misc ================= */
.empty { text-align: center; padding: 46px 20px; color: var(--text-2); }
.empty .icon { width: 44px; height: 44px; color: #b4bfcc; stroke-width: 1.5; margin-bottom: 10px; }
.empty h4 { font-size: 16px; color: var(--text); margin-bottom: 4px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px; }
.grid-2 > .card + .card, .grid-3 > .card + .card { margin-top: 0; }
.steps { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: #fff; border: 1px solid var(--border); font-weight: 600; color: var(--muted); font-size: 13px; }
.step .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--slate-bg); font-size: 12px; }
.step.done { color: var(--green); } .step.done .n { background: var(--green); color: #fff; }
.step.current { color: var(--primary); border-color: var(--primary); background: var(--primary-50); } .step.current .n { background: var(--primary); color: #fff; }
.stat-boxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-box { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; background: #fff; }
.stat-box .v { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dropzone { border: 2px dashed #c6cfdb; border-radius: 16px; padding: 34px 20px; text-align: center; background: #fafbfd; cursor: pointer; display: block; transition: all .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-50); }
.dropzone .icon { width: 36px; height: 36px; color: var(--primary); margin-bottom: 8px; }

.pagination { display: flex; align-items: center; gap: 6px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pagination .info { color: var(--text-2); font-size: 13px; margin-right: auto; }
.page-link { min-width: 34px; height: 34px; padding: 0 10px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: 9px; color: var(--text-2); font-weight: 600; background: #fff; }
.page-link:hover { background: var(--slate-bg); text-decoration: none; }
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-link.disabled { opacity: .45; pointer-events: none; }

/* Quality picker */
.quality-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.quality-picker label { cursor: pointer; }
.quality-picker input { position: absolute; opacity: 0; pointer-events: none; }
.quality-picker .badge { opacity: .5; transition: opacity .12s, box-shadow .12s; }
.quality-picker label:hover .badge { opacity: .85; }
.quality-picker input:checked + .badge { opacity: 1; box-shadow: 0 0 0 2px currentColor; }
.quality-picker input:focus-visible + .badge { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ================= Charts ================= */
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bars { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 8px; }
.bars-y { position: relative; font-size: 11px; color: var(--muted); }
.bars-y span { position: absolute; right: 0; transform: translateY(50%); }
.bars-plot { position: relative; display: flex; align-items: flex-end; gap: 4px; border-bottom: 1px solid var(--border-2); }
.bars-plot .grid-line { position: absolute; left: 0; right: 0; border-top: 1px dashed #e9edf2; pointer-events: none; }
.bar-group { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding: 0 2px; border-radius: 6px; z-index: 1; }
.bar-group:hover { background: rgba(27, 58, 92, .05); }
.bar-group.is-current { background: rgba(218, 37, 28, .06); }
.bar { flex: 1; max-width: 22px; min-height: 0; border-radius: 4px 4px 0 0; transition: filter .12s; }
.bar.zero { min-height: 0; }
.bar-group:hover .bar { filter: brightness(1.06); }
.bar.hatch { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.55) 0 3px, transparent 3px 7px); }
.bars-x { display: flex; gap: 4px; margin-left: 42px; margin-top: 6px; }
.bars-x span { flex: 1; text-align: center; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.bars-x span.is-current { color: var(--text); font-weight: 700; }
.chart-tip {
  position: fixed; z-index: 200; pointer-events: none; background: var(--navy-950); color: #fff; padding: 9px 11px; border-radius: 10px;
  font-size: 12px; line-height: 1.55; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .1s; max-width: 240px; white-space: pre-line;
}
.chart-tip.show { opacity: 1; }
.chart-tip b { font-size: 12.5px; }

.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { width: 150px; height: 150px; border-radius: 50%; position: relative; flex-shrink: 0; }
.donut::after { content: ""; position: absolute; inset: 22px; background: #fff; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--border); }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; text-align: center; line-height: 1.1; }
.donut-center b { font-size: 24px; font-weight: 800; display: block; }
.donut-center small { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.legend-list { flex: 1; min-width: 160px; display: grid; gap: 9px; }
.legend-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.legend-row i { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-row .n { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.legend-row .p { width: 46px; text-align: right; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.hbar { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; align-items: center; font-size: 13px; color: var(--text); padding: 3px 0; }
a.hbar:hover { text-decoration: none; }
a.hbar:hover .fill { filter: brightness(1.25); }
.hbar + .hbar { margin-top: 8px; }
.hbar .track { grid-column: 1 / -1; display: block; height: 8px; background: #eef1f5; border-radius: 99px; overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 99px; background: var(--primary); }
.hbar .n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.funnel-step { display: grid; grid-template-columns: 150px 1fr 110px; gap: 14px; align-items: center; }
.funnel-step + .funnel-step { margin-top: 12px; }
.funnel-step .lbl { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.funnel-step .track { height: 30px; background: #f1f4f8; border-radius: 8px; overflow: hidden; }
.funnel-step .fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--navy-600), var(--primary)); display: flex; align-items: center; padding-left: 10px; color: #fff; font-weight: 700; font-size: 12.5px; min-width: 2px; }
.funnel-step .pct { text-align: right; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.funnel-step .pct b { color: var(--text); font-size: 14px; }

.ratio-ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; background: conic-gradient(var(--good) calc(var(--p) * 1%), #eef1f5 0); display: grid; place-items: center; position: relative; }
.ratio-ring::after { content: ""; position: absolute; inset: 12px; background: #fff; border-radius: 50%; }
.ratio-ring span { position: relative; z-index: 1; font-size: 22px; font-weight: 800; }

.leader { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.leader + .leader { border-top: 1px solid #eef1f5; }
.leader .rank { width: 24px; height: 24px; border-radius: 8px; background: var(--slate-bg); color: var(--slate); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.leader:first-child .rank { background: #fef3c7; color: #a16207; }
.leader .info { flex: 1; min-width: 0; }
.leader .info b { display: block; font-size: 13.5px; }
.leader .info small { color: var(--muted); font-size: 12px; }
.leader .score { font-weight: 800; font-variant-numeric: tabular-nums; }

/* ================= Auth ================= */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; }
.auth-side {
  position: relative; overflow: hidden; color: #fff; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(70% 60% at 100% 0%, rgba(218, 37, 28, .55), transparent 60%),
              radial-gradient(60% 60% at 0% 100%, rgba(37, 125, 224, .35), transparent 60%),
              linear-gradient(150deg, var(--navy-800), var(--navy-950));
}
.auth-side::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px); background-size: 22px 22px; mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); }
.auth-side > * { position: relative; z-index: 1; }
.auth-orb { position: absolute; border-radius: 50%; filter: blur(2px); z-index: 0; }
.auth-orb.o1 { width: 220px; height: 220px; right: -60px; top: 18%; background: radial-gradient(circle at 30% 30%, #ff6b61, var(--brand-red)); opacity: .9; animation: float 9s ease-in-out infinite; }
.auth-orb.o2 { width: 90px; height: 90px; right: 150px; top: 42%; background: radial-gradient(circle at 30% 30%, #ff8a82, #e0342b); opacity: .85; animation: float 7s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translateY(-14px); } }
.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-brand .brand-logo { width: 48px; height: 48px; border-radius: 14px; }
.auth-brand .brand-logo img { width: 34px; height: 34px; }
.auth-side h2 { font-size: 40px; font-weight: 800; line-height: 1.12; letter-spacing: -1.2px; max-width: 520px; }
.auth-side h2 em { font-style: normal; background: linear-gradient(90deg, #ff8a82, #ffd1cd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-side .lead { opacity: .78; margin-top: 14px; font-size: 16px; max-width: 460px; }
.auth-feats { display: grid; gap: 12px; margin-top: 28px; max-width: 440px; }
.auth-feat { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); padding: 12px 14px; border-radius: 14px; backdrop-filter: blur(6px); }
.auth-feat .ic-chip { background: rgba(255,255,255,.1); color: #fff; }
.auth-feat b { display: block; font-size: 14px; }
.auth-feat small { color: rgba(255,255,255,.65); font-size: 12.5px; }
.auth-main { display: grid; place-items: center; padding: 32px; background: radial-gradient(60% 50% at 50% 0%, #f1f5fa, #fff 70%); }
.auth-card { width: 100%; max-width: 410px; }
.auth-card .logo-full { height: 64px; margin-bottom: 26px; }
.auth-card h1 { font-size: 28px; font-weight: 800; letter-spacing: -.6px; margin-bottom: 6px; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon .input { padding-left: 40px; height: 46px; border-radius: 12px; }
.input-icon .toggle-pass { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.auth-card .btn-primary { height: 48px; border-radius: 12px; font-size: 15px; }
.auth-foot { margin-top: 26px; text-align: center; color: var(--muted); font-size: 12.5px; }

/* ================= Responsive ================= */
@media (max-width: 1280px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-3 > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr 1fr; }
  .filters .search-box { grid-column: 1 / -1; }
  .filters-more { grid-template-columns: repeat(3, 1fr); }
  .hero { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 23, 38, .5); z-index: 35; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-grid; }
  .topbar { padding: 0 16px; }
  .topbar-search { display: none; }
  .content { padding: 20px 16px 32px; }
  .topbar-user .meta { display: none; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .grid-2, .grid-3, .stat-boxes { grid-template-columns: 1fr 1fr; }
  .grid-3 > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 24px; }
  .page-title { font-size: 22px; }
  .hero { padding: 22px 18px; } .hero h1 { font-size: 22px; }
  .form-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .filters, .filters-more { grid-template-columns: 1fr 1fr; }
  .info-list { grid-template-columns: 1fr; gap: 2px; }
  .info-list dd { margin-bottom: 10px; }
  .topbar .btn-add span { display: none; }
  .card-head, .card-body { padding: 16px; }
  .funnel-step { grid-template-columns: 100px 1fr 70px; gap: 8px; }
  table.responsive thead { display: none; }
  table.responsive, table.responsive tbody, table.responsive tr, table.responsive td { display: block; width: 100%; }
  table.responsive tr { border-bottom: 1px solid var(--border); padding: 10px 6px; }
  table.responsive td { border: 0; padding: 5px 12px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.responsive td::before { content: attr(data-label); font-weight: 600; color: var(--muted); font-size: 12px; text-align: left; }
  table.responsive td.actions { justify-content: flex-end; }
  table.responsive td.actions::before { content: none; }
  table.responsive .clip { max-width: 60%; }
  table.responsive tfoot { display: block; }
}

/* ================= Print ================= */
@media print {
  .sidebar, .topbar, .page-actions, .toasts, form.card:has(.filter-row) { display: none !important; }
  .main { margin: 0; } .content { padding: 0; max-width: none; }
  body { background: #fff; }
  .card, .kpi { box-shadow: none; break-inside: avoid; }
}

/* ================= Follow-up calls ================= */
.call-list { padding: 4px 0; }
.call-row { display: flex; align-items: center; gap: 14px; padding: 12px 22px; border-bottom: 1px solid #eef1f5; position: relative; }
.call-row:last-child { border-bottom: 0; }
.call-row:hover { background: #f8fafd; }
.call-row.q-good { box-shadow: inset 3px 0 0 #22c55e; } .call-row.q-average { box-shadow: inset 3px 0 0 #f97316; } .call-row.q-bad { box-shadow: inset 3px 0 0 #ef4444; }
.call-row.is-overdue { background: #fff7f7; }
.call-time { width: 78px; flex-shrink: 0; line-height: 1.25; }
.call-time b { display: block; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.call-time small { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.call-row.is-overdue .call-time small { color: var(--red); }
.call-info { flex: 1; min-width: 0; }
.call-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.call-name a { color: var(--text); }
.call-meta { font-size: 12.5px; color: var(--text-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.card-calls { border-color: #fcd9b6; box-shadow: 0 0 0 3px #fff4ec, var(--shadow); }
.card-calls .card-head { background: linear-gradient(90deg, #fff7f0, #fff); border-radius: var(--radius) var(--radius) 0 0; }
.calls-summary { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .call-row { flex-wrap: wrap; padding: 12px 16px; }
  .call-actions { width: 100%; justify-content: flex-end; }
  .call-meta { white-space: normal; }
}

/* ================= v1.3: journey, tabs, bulk, calls ================= */
.journey { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.j-step { text-align: center; min-width: 0; }
.j-bar { height: 7px; border-radius: 4px; background: #e6eaf0; }
.j-label { font-size: 12.5px; font-weight: 700; margin-top: 9px; display: flex; align-items: center; justify-content: center; gap: 4px; color: var(--muted); line-height: 1.2; min-height: 30px; text-align: center; }
.j-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.j-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(29, 91, 214, .18); }
.j-step.is-done .j-bar { background: #22c55e; } .j-step.is-done .j-label { color: var(--green); }
.j-step.is-current .j-bar { background: var(--blue); } .j-step.is-current .j-label { color: var(--blue); }
.j-step.is-skipped .j-bar { background: repeating-linear-gradient(135deg, #e6eaf0 0 4px, #f6f8fa 4px 8px); } .j-step.is-skipped .j-meta { font-style: italic; }
.j-step.is-won .j-bar { background: #16a34a; } .j-step.is-won .j-label { color: var(--green); }
.j-step.is-lost .j-bar { background: #ef4444; } .j-step.is-lost .j-label { color: var(--red); }

.mini-journey { display: flex; gap: 2px; margin-top: 6px; width: 96px; }
.mini-journey span { flex: 1; height: 4px; border-radius: 2px; background: #e6eaf0; }
.mini-journey span.on { background: var(--blue); }
.mini-journey.is-won span.on { background: #22c55e; }
.mini-journey.is-lost span { background: #fecaca; }

.view-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.view-tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 10px; background: #fff; border: 1px solid var(--border); color: var(--text-2); font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow); }
.view-tab:hover { text-decoration: none; border-color: var(--border-2); color: var(--text); }
.view-tab .n { background: var(--slate-bg); color: var(--slate); font-size: 11.5px; padding: 0 7px; border-radius: 99px; font-weight: 700; }
.view-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.view-tab.active .n { background: rgba(255,255,255,.2); color: #fff; }
.view-tab.is-warn:not(.active) { border-color: var(--red-bd); color: var(--red); }
.view-tab.is-warn .n { background: var(--brand-red); color: #fff; }

.bulk-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 20px; background: var(--primary-50); border-top: 1px solid var(--border); position: sticky; top: 68px; z-index: 5; }
.bulk-count { font-weight: 700; }
.bulk-users { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-check { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--border-2); border-radius: 99px; background: #fff; font-size: 13px; cursor: pointer; }
.chip-check input { accent-color: var(--primary); }
.row-check { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

.call-outcomes { display: flex; gap: 8px; flex-wrap: wrap; }
.outcome-talked { color: var(--green); border-color: var(--green-bd); background: var(--green-bg); }
.outcome-no_answer { color: var(--amber); border-color: var(--amber-bd); background: var(--amber-bg); }
.outcome-busy { color: var(--orange); border-color: var(--orange-bd); background: var(--orange-bg); }
.outcome-wrong_number { color: var(--red); border-color: var(--red-bd); background: var(--red-bg); }
.call-hist + .call-hist { margin-top: 8px; }
.call-actions form { display: inline; }
@media (max-width: 640px) {
  .journey { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .bulk-bar { top: 0; }
}
