/* ============================================================
   GO LIGHT UP CRM — design system
   World: paper-light ground, white 14px cards, one orange accent,
   Inter. Matches the pinned reference dashboard.
   ============================================================ */
:root {
  --orange: #F26B1C;
  --orange-600: #E25D10;
  --orange-700: #C94F0B;
  --orange-100: #FFF1E8;
  --orange-200: #FFE0CC;
  --orange-300: #FFC7A3;
  --orange-050: #FFF8F3;
  --brand-grad: linear-gradient(160deg, #F98A2A 0%, #F26B1C 55%, #E85A0E 100%);

  --bg: #F5F6F8;
  --card: #FFFFFF;
  --line: #E8EAEF;
  --line-2: #F0F1F4;
  --ink: #1F2430;
  --ink-2: #4B5563;
  --muted: #6B7280;
  --muted-2: #9CA3AF;

  --blue: #2F6FED; --blue-100: #EAF1FE; --blue-050: #F3F7FF;
  --green: #12924F; --green-100: #E4F6EC; --green-050: #F0FBF4;
  --red: #D9333F; --red-100: #FDECEC;
  --purple: #7C3AED; --purple-100: #F0E9FE;
  --teal: #0E9F9F; --teal-100: #E2F6F6;
  --pink: #DB2777; --pink-100: #FCE7F1;
  --amber: #B7791F; --amber-100: #FDF3DE;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 28px -16px rgba(16, 24, 40, .12);
  --shadow-lg: 0 8px 20px -6px rgba(16, 24, 40, .16), 0 24px 48px -24px rgba(16, 24, 40, .22);
  --sidebar-w: 212px;
  --topbar-h: 66px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01", "tnum";
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: 26px; line-height: 1.2; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hide { display: none !important; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 22px; height: 22px; }
.ic-fill { fill: currentColor; stroke: none; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 6px; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none; background: var(--card); border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 30;
}
.brand {
  height: 116px; background: var(--brand-grad); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  position: relative; overflow: hidden;
}
.brand::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.brand-mark { width: 56px; height: 52px; color: #fff; }
.brand-word { font-weight: 700; font-size: 22px; letter-spacing: -.02em; line-height: 1; margin-top: 2px; }
.nav { padding: 12px 12px 6px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 500; font-size: 14.5px;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav-item .ic { color: var(--muted); transition: color .18s var(--ease); }
.nav-item:hover { background: var(--bg); color: var(--ink); }
.nav-item:hover .ic { color: var(--ink); }
.nav-item.is-active { background: var(--orange-100); color: var(--orange); font-weight: 600; }
.nav-item.is-active .ic { color: var(--orange); }
.nav-count { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; background: var(--orange); color: #fff; border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center; }
.sidebar-foot { margin-top: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.quick-quote {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--orange-050); border: 1px solid var(--orange-200);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.quick-quote:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.quick-quote-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--orange); color: #fff; display: grid; place-items: center; flex: none; }
.quick-quote strong { display: block; font-size: 13.5px; color: var(--ink); }
.quick-quote small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 4px 2px; }
.me-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.me-text strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { font-size: 12px; color: var(--muted); }
.me-logout { margin: 0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 28px;
  position: sticky; top: 0; z-index: 20;
}
.search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px; background: #F1F2F5; border-radius: 12px; padding: 0 12px; height: 42px; color: var(--muted); border: 1px solid transparent; transition: border-color .2s, background .2s; }
.search:focus-within { background: #fff; border-color: var(--orange-300); box-shadow: 0 0 0 4px var(--orange-100); }
.search input { flex: 1; border: 0; background: transparent; outline: 0; font-size: 14px; color: var(--ink); min-width: 0; }
.search input::placeholder { color: var(--muted); }
.search kbd { font-family: inherit; font-size: 11.5px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.who { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 12px; margin-left: 6px; }
.who:hover { background: var(--bg); }
.who-text { display: flex; flex-direction: column; line-height: 1.15; }
.who-text strong { font-size: 13.5px; }
.who-text small { font-size: 12px; color: var(--muted); }

.content { padding: 26px 32px 48px; flex: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; box-shadow: 0 1px 1px rgba(16, 24, 40, .03);
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .12s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover { background: var(--bg); border-color: #DCDFE5; }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 17px; height: 17px; }
.btn-primary { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 6px 14px -6px rgba(242, 107, 28, .6); }
.btn-primary:hover { background: var(--orange-600); border-color: var(--orange-600); }
.btn-plus { width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; margin-left: -6px; }
.btn-plus .ic { width: 15px; height: 15px; stroke-width: 2.2; }
/* Reference treatment for the topbar quick-add: white pill, orange circular plus, muted chevron */
.topbar .btn-add { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .06); padding-left: 8px; }
.topbar .btn-add:hover { background: var(--bg); border-color: #DCDFE5; }
.topbar .btn-add .btn-plus { background: var(--orange); color: #fff; margin-left: 0; }
.topbar .btn-add .ic-sm { color: var(--muted); }
.btn-soft { background: var(--orange-100); border-color: var(--orange-100); color: var(--orange-700); }
.btn-soft:hover { background: var(--orange-200); border-color: var(--orange-200); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-100); border-color: var(--red-100); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-dashed { border-style: dashed; background: transparent; color: var(--ink-2); box-shadow: none; }
.btn-dashed:hover { background: #fff; color: var(--ink); }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--ink-2); display: inline-grid; place-items: center; cursor: pointer; position: relative; transition: background .18s, color .18s; }
.icon-btn:hover { background: var(--bg); color: var(--ink); }
.icon-btn .ic { width: 20px; height: 20px; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn.sm .ic { width: 17px; height: 17px; }
.has-dot .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); border: 2px solid #fff; }

/* ---------- Dropdown ---------- */
.dropdown { position: relative; }
.menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none; transition: opacity .16s var(--ease), transform .16s var(--ease); z-index: 40;
}
.dropdown.open .menu { opacity: 1; transform: none; pointer-events: auto; }
.dropdown.left .menu { right: auto; left: 0; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; border: 0; background: none; text-align: left; font-size: 13.5px; font-weight: 500; color: var(--ink); cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--orange-050); color: var(--orange-700); }
.menu .ic { width: 17px; height: 17px; color: var(--muted); }
.menu a:hover .ic, .menu button:hover .ic { color: var(--orange); }
.menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 6px 0; }
.menu .danger { color: var(--red); }
.menu .danger:hover { background: var(--red-100); color: var(--red); }

/* ---------- Cards & layout ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px 24px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 18px 24px 14px; }
.card-head h2 { display: flex; align-items: center; gap: 10px; font-size: 16.5px; }
.card-head h2 .ic { color: var(--orange); width: 20px; height: 20px; }
.card-head .spacer { flex: 1; }
.card-head .link { color: var(--orange); font-weight: 600; font-size: 13px; }
.card-head .link:hover { text-decoration: underline; }
.card-body { padding: 0 24px 22px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin-bottom: 4px; }
.page-head .muted { font-size: 14.5px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.einv { min-width: 0; }
.einv-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; min-width: 0; }
.einv-alias { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--ink-2); background: #F3F4F6; border-radius: 6px; padding: 2px 7px; max-width: 100%; overflow-wrap: anywhere; word-break: break-all; }
.divider { border: 0; border-top: 1px solid var(--line-2); margin: 14px 0; }

/* ---------- Chips / badges / avatars ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge .ic { width: 13px; height: 13px; stroke-width: 2.4; }
.badge-green { background: var(--green-100); color: var(--green); }
.badge-red { background: var(--red-100); color: var(--red); }
.badge-blue { background: var(--blue-100); color: var(--blue); }
.badge-orange { background: var(--orange-100); color: var(--orange-700); }
.badge-purple { background: var(--purple-100); color: var(--purple); }
.badge-gray { background: #EEF0F3; color: var(--ink-2); }
.badge-amber { background: var(--amber-100); color: var(--amber); }
.badge-teal { background: var(--teal-100); color: var(--teal); }
.roles-tbl td.center, .roles-tbl th.center { text-align: center; }
.roles-tbl .check input { width: 18px; height: 18px; }
.th-sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; }
.th-sort.on { color: var(--orange); }
.th-sort .ic { width: 13px; height: 13px; }
.quote-filters .field > span { font-size: 12px; white-space: nowrap; }
.quote-filters .row { flex-wrap: wrap; }
.quote-filters .field { min-width: 150px; }
@media (max-width: 900px) { .quote-filters .row > * { flex: 1 1 100% !important; } }
.phone-wrap { display: flex; align-items: stretch; }
.phone-wrap .dial { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; background: #F7F8FA; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.phone-wrap input { border-radius: 0 10px 10px 0 !important; }
.badge-btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 12px; padding-right: 6px; transition: filter .15s; }
.badge-btn:hover { filter: brightness(.95); }
.badge-btn .ic { width: 12px; height: 12px; }
.status-pick .menu { min-width: 160px; }
.status-pick .menu button { padding: 6px 8px; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: #fff; color: var(--ink-2); font-size: 12px; font-weight: 600; border: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; letter-spacing: .02em; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.av-orange { background: var(--orange-100); color: var(--orange-700); }
.av-blue { background: var(--blue-100); color: var(--blue); }
.av-purple { background: var(--purple-100); color: var(--purple); }
.av-green { background: var(--green-100); color: var(--green); }
.av-teal { background: var(--teal-100); color: var(--teal); }
.av-pink { background: var(--pink-100); color: var(--pink); }
.av-brand { background: var(--orange); color: #fff; }
.av-photo { background: linear-gradient(135deg, #2b2f3a, #4b5163); color: #fff; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 500; font-size: 13.5px; color: var(--ink-2); }
.tab:hover { color: var(--ink); background: var(--bg); }
.tab.is-active { background: var(--orange-100); border-color: var(--orange-200); color: var(--orange-700); font-weight: 600; }
.tab .count { font-size: 11.5px; font-weight: 700; background: #F1F2F5; border-radius: 999px; padding: 1px 7px; color: var(--ink-2); }
.tab.is-active .count { background: #fff; color: var(--orange-700); }
.tabs-line { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabs-line a { padding: 10px 14px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs-line a.is-active { color: var(--orange); border-color: var(--orange); font-weight: 600; }
.tabs-line a:hover { color: var(--ink); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #FAFBFC; white-space: nowrap; }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #FCFCFD; }
.tbl .t-right, .tbl th.t-right { text-align: right; }
.tbl .t-num { font-variant-numeric: tabular-nums; }
.tbl a.t-link { font-weight: 600; }
.tbl a.t-link:hover { color: var(--orange); }
.tbl .t-actions { text-align: right; white-space: nowrap; }
.tbl .t-actions .icon-btn { opacity: .55; }
.tbl tr:hover .t-actions .icon-btn { opacity: 1; }
.thumb { width: 44px; height: 44px; border-radius: 10px; background: #F1F2F5; object-fit: contain; border: 1px solid var(--line); }
.thumb-lg { width: 64px; height: 64px; }
.thumb-empty { display: grid; place-items: center; color: var(--muted-2); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.mono-tag { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 600; background: #F1F2F5; padding: 3px 7px; border-radius: 6px; color: var(--ink-2); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty .ic { width: 36px; height: 36px; color: var(--muted-2); margin: 0 auto 10px; stroke-width: 1.4; }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.pager a, .pager span.cur { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; font-weight: 600; }
.pager a:hover { background: var(--bg); }
.pager span.cur { background: var(--orange); color: #fff; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea, .input {
  height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 14px; color: var(--ink); width: 100%; outline: 0;
  transition: border-color .18s, box-shadow .18s;
}
.field textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-100); }
.field input[type="color"] { padding: 4px; width: 60px; }
.field input[type="file"] { height: auto; padding: 6px; border-style: dashed; background: #FAFBFC; cursor: pointer; font-size: 13px; color: var(--muted); }
.field input[type="file"]::file-selector-button { font: inherit; font-weight: 600; font-size: 13px; color: var(--orange-700); background: var(--orange-100); border: 1px solid var(--orange-200); border-radius: 8px; padding: 7px 12px; margin-right: 10px; cursor: pointer; transition: background .18s; }
.field input[type="file"]::file-selector-button:hover { background: var(--orange-200); }
.field input[type="file"]:hover { border-color: var(--orange-300); }
.field input:disabled { background: #F7F8FA; color: var(--muted); }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 34px; }
.field.readonly .value { height: 42px; display: flex; align-items: center; padding: 0 12px; border-radius: 10px; background: var(--orange-050); border: 1px dashed var(--orange-300); color: var(--orange-700); font-weight: 700; font-family: ui-monospace, Menlo, monospace; letter-spacing: .04em; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: 1 / -1; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 18px; margin-top: 6px; border-top: 1px solid var(--line-2); }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--orange); margin: 0; }
.seg { display: inline-flex; background: #F1F2F5; border-radius: 10px; padding: 3px; gap: 2px; }
.seg label { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg input { display: none; }
.seg input:checked + label, .seg label.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }
.inline-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.inline-form .field { flex: 1; min-width: 160px; }

.spec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #FAFBFC; }
.spec-grid .field > span:first-child { font-size: 12px; }
.spec-grid .span-2 { grid-column: span 2; }
.spec-grid .span-3 { grid-column: 1 / -1; }
.unit-wrap { position: relative; display: flex; align-items: center; }
.unit-wrap input { padding-right: 44px; }
.unit-wrap i { position: absolute; right: 12px; font-style: normal; font-weight: 600; font-size: 12.5px; color: var(--muted); pointer-events: none; }
.unit-wrap i.pre { right: auto; left: 12px; }
.unit-wrap i.pre + input { padding-left: 44px; padding-right: 12px; }
.spec-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 4px; border-top: 1px solid var(--line); margin-top: 2px; }
.spec-preview { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spec-preview code { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: var(--orange-050); border: 1px dashed var(--orange-300); color: var(--orange-700); padding: 4px 8px; border-radius: 6px; }
@media (max-width: 900px) { .spec-grid { grid-template-columns: 1fr 1fr; } .spec-grid .span-2 { grid-column: span 2; } }

/* ---------- Flash ---------- */
.flashes { position: fixed; top: 80px; right: 24px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-weight: 500; animation: flash-in .35s var(--ease); }
.flash.static { animation: none; box-shadow: none; margin-bottom: 14px; }
.flash .ic { width: 20px; height: 20px; flex: none; }
.flash-success { border-color: #BFE8CF; color: #0F5F35; background: var(--green-050); }
.flash-success .ic { color: var(--green); }
.flash-error { border-color: #F5C2C7; color: #8A1C25; background: #FFF5F5; }
.flash-error .ic { color: var(--red); }
.flash-x { margin-left: auto; border: 0; background: none; cursor: pointer; color: inherit; opacity: .6; display: grid; place-items: center; }
.flash-x .ic { width: 16px; height: 16px; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Dashboard ---------- */
.greet { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.greet h1 { font-size: 27px; }
.greet p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.date-chip { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border: 1px solid var(--line); background: #fff; border-radius: 12px; font-weight: 500; font-size: 13.5px; }
.date-chip .ic { color: var(--muted); width: 17px; height: 17px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.kpi { position: relative; padding: 20px 22px 18px; min-height: 128px; display: flex; flex-direction: column; overflow: hidden; }
.kpi-label { color: var(--muted); font-size: 14px; font-weight: 500; }
.kpi-value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; line-height: 1.15; }
.kpi-sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.stage-more { font-size: 12.5px; color: var(--muted); text-align: center; padding: 2px 0; }
.stage-more:hover { color: var(--orange); }
.kpi-icon { position: absolute; top: 18px; right: 20px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--orange-100); color: var(--orange); }
.kpi-icon.green { background: var(--green-100); color: var(--green); }
.kpi-icon .ic { width: 20px; height: 20px; }
.kpi-foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: auto; padding-top: 10px; gap: 12px; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 34px; }
.spark i { width: 9px; border-radius: 3px 3px 1px 1px; background: var(--orange-200); display: block; height: 100%; transform: scaleY(.12); transform-origin: bottom; transition: transform .6s var(--ease); }
.spark i.hi { background: var(--orange); }
.spark.green i { background: #BFE8CF; }
.spark.green i.hi { background: var(--green); }
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 20px; align-items: start; }
.dash-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.dash-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.select-sm { height: 36px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0 32px 0 12px; font-size: 13px; font-weight: 500; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 15px; }

/* Pipeline */
.pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 0 24px 22px; }
.pipeline.five { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stage { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stage-head { border-radius: 12px; padding: 12px 36px 12px 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: relative; min-width: 0; }
.stage-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-head strong { font-size: 14px; }
.stage-head .count { font-size: 12px; font-weight: 700; background: #fff; border-radius: 999px; padding: 1px 8px; }
.stage-head .sum { width: 100%; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.stage-head > .ic { position: absolute; right: 12px; top: 12px; width: 18px; height: 18px; }
.stage-blue { background: var(--blue-100); color: var(--ink); }
.stage-blue > .ic { color: var(--blue); }
.stage-orange { background: var(--orange-100); }
.stage-orange > .ic { color: var(--orange); }
.stage-green { background: var(--green-100); }
.stage-green > .ic { color: var(--green); }
.stage-gray { background: #EEF0F3; }
.stage-gray > .ic { color: var(--muted); }
.stage-body { display: flex; flex-direction: column; gap: 10px; min-height: 40px; border-radius: 12px; transition: background .2s; }
.stage-body.drag-over { background: var(--orange-050); outline: 2px dashed var(--orange-300); outline-offset: -2px; }
.deal { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 12px 12px 14px; display: flex; gap: 10px; align-items: flex-start; box-shadow: 0 1px 2px rgba(16, 24, 40, .03); cursor: grab; transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s; }
.deal:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #DADDE3; }
.deal.dragging { opacity: .5; cursor: grabbing; }
.deal-body { flex: 1 1 0; min-width: 0; display: block; }
.deal-title { display: block; font-weight: 700; font-size: 13.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-sub { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.deal-val { display: block; font-weight: 800; font-size: 14.5px; margin-top: 8px; letter-spacing: -.01em; }
.deal .avatar { flex: none; }
.deal-meta { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.deal .avatar { margin-top: 2px; }
.stage-add { justify-content: center; }

/* Agenda / tasks / activity */
.agenda { list-style: none; margin: 0; padding: 0 24px 20px; }
.agenda li { display: grid; grid-template-columns: 46px 18px minmax(0, 1fr) 24px; gap: 10px; align-items: start; position: relative; padding-bottom: 20px; }
.agenda li:last-child { padding-bottom: 4px; }
.agenda time { font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding-top: 1px; font-variant-numeric: tabular-nums; }
.agenda .node { position: relative; height: 100%; display: flex; justify-content: center; }
.agenda .node::before { content: ""; position: absolute; top: 14px; bottom: -8px; width: 2px; background: var(--orange-200); left: 50%; transform: translateX(-50%); }
.agenda li:last-child .node::before { display: none; }
.agenda .node i { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); margin-top: 5px; box-shadow: 0 0 0 3px var(--orange-100); position: relative; z-index: 1; }
.agenda .txt strong { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.agenda .txt small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.agenda .txt small .ic { width: 13px; height: 13px; }
.agenda .kind { color: var(--muted-2); }
.agenda .kind .ic { width: 18px; height: 18px; }
.agenda .kind.blue { color: var(--blue); }
.tasklist { list-style: none; margin: 0; padding: 0 24px 16px; display: flex; flex-direction: column; gap: 6px; }
.task { display: flex; align-items: flex-start; gap: 12px; padding: 8px 6px; border-radius: 10px; }
.task:hover { background: #FAFBFC; }
.task .tick { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid #CFD3DA; display: grid; place-items: center; flex: none; margin-top: 1px; cursor: pointer; background: #fff; color: #fff; transition: background .18s, border-color .18s; }
.task .tick .ic { width: 14px; height: 14px; stroke-width: 3; opacity: 0; transition: opacity .18s; }
.task.done .tick { background: var(--green); border-color: var(--green); }
.task.done .tick .ic { opacity: 1; }
.task .txt { flex: 1; min-width: 0; }
.task .txt strong { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.task.done .txt strong { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.task .txt small { display: flex; align-items: center; gap: 4px; color: var(--orange); font-size: 12.5px; font-weight: 500; margin-top: 2px; }
.task .txt small .ic { width: 12px; height: 12px; }
.task .txt small.late { color: var(--red); }
.task .txt small.ok { color: var(--green); }
.task .txt small.plain { color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.chip b { font-size: 11.5px; font-weight: 700; background: #EEF0F3; border-radius: 999px; padding: 1px 7px; }
.chip i { font-style: normal; color: var(--muted); font-weight: 500; }
.chip:hover { border-color: var(--orange-300); color: var(--orange); }
.chip.is-active { background: var(--orange-100); border-color: var(--orange-300); color: var(--orange); }
.chip.is-active b { background: #fff; }
.prodnotes { list-style: none; margin: 0; padding: 4px 24px 12px; }
.prodnotes li { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.prodnotes li:last-child { border-bottom: 0; }
.prodnotes .pn-head { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.prodnotes .pn-head time { color: var(--muted); font-size: 12px; }
.prodnotes .pn-body { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--ink-2); white-space: pre-line; }
.actlist { list-style: none; margin: 0; padding: 0 24px 16px; }
.actlist li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.actlist li:last-child { border-bottom: 0; }
.actlist .act-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--orange-100); color: var(--orange); }
.actlist .act-ic .ic { width: 16px; height: 16px; }
.actlist .act-ic.green { background: var(--green-100); color: var(--green); }
.actlist .act-ic.blue { background: var(--blue-100); color: var(--blue); }
.actlist .act-ic.gray { background: #EEF0F3; color: var(--ink-2); }
.actlist .txt { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; line-height: 1.35; }
.actlist .txt b { font-weight: 700; }
.actlist time { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* Charts */
.charts { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; }
.chart-bars { padding: 6px 24px 20px; }
.chart-bars svg { width: 100%; height: 220px; display: block; overflow: visible; }
.chart-bars .bar { fill: var(--orange); rx: 4; transition: opacity .2s; transform-origin: bottom; }
.chart-bars .bar.won { fill: #FFC7A3; }
.chart-bars .bar:hover { opacity: .8; }
.chart-bars .axis { fill: var(--muted); font-size: 11.5px; font-weight: 500; }
.chart-bars .gridline { stroke: var(--line-2); stroke-width: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.donut-wrap { display: flex; align-items: center; gap: 22px; padding: 6px 24px 22px; }
.donut { width: 150px; height: 150px; flex: none; position: relative; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 18; stroke-linecap: butt; transition: stroke-dasharray .6s var(--ease); }
.donut .track { stroke: #F1F2F5; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.donut-center strong { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.donut-center small { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.donut-legend { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; gap: 9px; }
.donut-legend li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.donut-legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.donut-legend b { margin-left: auto; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.hbar { display: grid; grid-template-columns: 130px 1fr 80px; gap: 12px; align-items: center; padding: 8px 0; font-size: 13.5px; }
.hbar .track { height: 10px; background: #F1F2F5; border-radius: 999px; overflow: hidden; }
.hbar .fill { height: 100%; width: 100%; background: var(--orange); border-radius: 999px; transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; }
.stat { padding: 18px 20px; }
.stat .l { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.stat .s { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ---------- Detail pages ---------- */
.detail-head { display: flex; align-items: center; gap: 16px; }
.detail-head h1 { font-size: 24px; }
.meta-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 13.5px; }
.meta-list dt { color: var(--muted); font-weight: 500; }
.meta-list dd { margin: 0; font-weight: 500; word-break: break-word; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.timeline li:last-child { border-bottom: 0; }
.timeline .ch { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--orange-100); color: var(--orange); }
.timeline .ch .ic { width: 17px; height: 17px; }
.timeline .ch.blue { background: var(--blue-100); color: var(--blue); }
.timeline .ch.green { background: var(--green-100); color: var(--green); }
.timeline .ch.purple { background: var(--purple-100); color: var(--purple); }
.timeline .ch.gray { background: #EEF0F3; color: var(--ink-2); }
.timeline .body { flex: 1; min-width: 0; }
.timeline .body strong { font-size: 13.5px; }
.timeline .body p { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; white-space: pre-line; }
.timeline .body small { color: var(--muted); font-size: 12px; display: block; margin-top: 4px; }

/* ---------- Calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-dow { padding: 10px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #FAFBFC; }
.cal-day { min-height: 112px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.cal-day.pad { background: #FAFBFC; }
.cal-day .d { font-size: 13px; font-weight: 600; color: var(--ink-2); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.today .d { background: var(--orange); color: #fff; }
.cal-ev { font-size: 12px; font-weight: 600; padding: 3px 7px; border-radius: 6px; background: var(--orange-100); color: var(--orange-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.blue { background: var(--blue-100); color: var(--blue); }
.cal-ev.green { background: var(--green-100); color: var(--green); }
.cal-ev.task { background: #EEF0F3; color: var(--ink-2); }
.cal-ev.task::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); margin-right: 5px; vertical-align: 1px; }

/* ---------- Quote editor ---------- */
.qe-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 18px; }
.qe-number { display: flex; flex-direction: column; gap: 4px; }
.qe-number .no { font-size: 22px; font-weight: 800; letter-spacing: -.01em; color: var(--orange); font-variant-numeric: tabular-nums; }
.qe-items { width: 100%; border-collapse: collapse; }
.qe-items th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 10px; border-bottom: 1px solid var(--line); background: #FAFBFC; white-space: nowrap; }
.qe-items td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.qe-items tr.acc td { background: #FAFBFC; }
.qe-items tr.acc td:first-child { padding-left: 28px; }
.qe-items input, .qe-items select { height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; width: 100%; background: #fff; font-size: 13.5px; }
.qe-items input:focus, .qe-items select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-100); outline: 0; }
.qe-items input.n { text-align: right; font-variant-numeric: tabular-nums; appearance: textfield; -moz-appearance: textfield; }
.qe-items input.n::-webkit-inner-spin-button, .qe-items input.n::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qe-items input[data-f="qty"] { min-width: 72px; }
.qe-items input.disc { min-width: 64px; }
.qe-items select[data-f="unit"] { min-width: 92px; }
.qe-items td.img-cell { width: 52px; }
.qe-items .pos, .tbl td.code { white-space: nowrap; }
.qe-items .pos-in { width: 84px; font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 12.5px; color: var(--ink-2); }
.qe-items .pos-in::placeholder { color: var(--muted-2); font-weight: 600; }
.qe-items .pos { font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.qe-items .name-cell { min-width: 190px; }
.qe-items .name-cell input { font-weight: 600; }
.qe-items .name-cell input.brand-in { margin-top: 5px; height: 28px; font-size: 12px; font-weight: 500; color: var(--ink-2); background: #FAFBFC; }
.qe-items .name-cell input.brand-in::placeholder { font-weight: 400; }
.qe-items .specs-cell { min-width: 240px; }
.qe-items .note-cell { min-width: 150px; }
.qe-items .total { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qe-items .row-tools { display: flex; gap: 2px; justify-content: flex-end; white-space: nowrap; }
.qe-items .drag .ic { width: 16px; height: 16px; }
.qe-items [data-act="catalog"] { color: var(--orange); }
.qe-items .thumb { width: 40px; height: 40px; }
.qe-items .drag { cursor: grab; color: var(--muted-2); }
.qe-items .color-cell { display: flex; align-items: center; gap: 6px; }
.qe-items .color-cell input[type="color"] { width: 30px; height: 30px; padding: 2px; border-radius: 50%; }
.qe-items .color-cell input[type="text"] { width: 96px; }
.qe-empty { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; margin: 10px 0; }
.qe-totals { margin-left: auto; width: 360px; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 14px; }
.qe-totals .l { color: var(--muted); }
.qe-totals .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.qe-totals .grand { font-size: 20px; font-weight: 800; color: var(--orange); padding-top: 8px; border-top: 1px solid var(--line); }
.qe-totals .grand-l { padding-top: 8px; border-top: 1px solid var(--line); font-weight: 700; color: var(--ink); align-self: center; }
.qe-toolbar { position: sticky; bottom: 0; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); margin: 0 -32px -48px; padding: 14px 32px; display: flex; align-items: center; gap: 10px; z-index: 10; }
.qe-toolbar .status { margin-right: auto; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.qe-toolbar .status.dirty { color: var(--amber); font-weight: 600; }
.qe-toolbar .status.saved { color: var(--green); font-weight: 600; }
.picker { position: relative; }
.picker-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 360px; overflow: auto; z-index: 50; display: none; }
.picker-list.open { display: block; }
.picker-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.picker-item:last-child { border-bottom: 0; }
.picker-item:hover, .picker-item.active { background: var(--orange-050); }
.picker-item .thumb { width: 38px; height: 38px; }
.picker-item .pi-body { flex: 1; min-width: 0; }
.picker-item .pi-name { font-weight: 600; font-size: 13.5px; }
.picker-item .pi-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-item .pi-price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.picker-item .pi-code { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--orange-700); font-weight: 700; }
.picker-empty { padding: 16px; color: var(--muted); text-align: center; font-size: 13px; }
.cat-checks { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-check { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; height: 38px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 500; font-size: 13px; background: #fff; }
.cat-check input { accent-color: var(--orange); width: 16px; height: 16px; margin: 0; }
.cat-check:has(input:checked) { border-color: var(--orange-300); background: var(--orange-050); color: var(--orange-700); font-weight: 600; }
.share-box { display: flex; align-items: center; gap: 10px; background: #F7F8FA; border: 1px solid var(--line); border-radius: 12px; padding: 8px 8px 8px 14px; }
.share-box code { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.status-strip { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 12px; background: var(--orange-050); border: 1px solid var(--orange-200); }
.status-strip.green { background: var(--green-050); border-color: #BFE8CF; }
.status-strip.blue { background: var(--blue-050); border-color: #C9DBFB; }
.status-strip .ic { color: var(--orange); width: 22px; height: 22px; }
.status-strip.green .ic { color: var(--green); }
.status-strip.blue .ic { color: var(--blue); }
.preview-frame { width: 100%; aspect-ratio: 297 / 210; border: 1px solid var(--line); border-radius: 12px; background: #1b1c1e; overflow: hidden; }
.preview-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Login ---------- */
.login-body { margin: 0; min-height: 100vh; background: #121314; }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-visual { position: relative; overflow: hidden; }
.login-visual img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.login-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18, 19, 20, .92) 0%, rgba(18, 19, 20, .55) 45%, rgba(18, 19, 20, .15) 100%); }
.login-visual-text { position: absolute; left: 56px; top: 56px; bottom: 56px; z-index: 2; color: #fff; display: flex; flex-direction: column; }
.login-mark { width: 84px; height: 78px; color: #fff; }
.login-tag { margin-top: 18px; font-size: 13px; letter-spacing: .32em; line-height: 1.7; color: #d9d9d9; font-weight: 500; }
.login-script { margin-top: auto; font-family: "Great Vibes", "Snell Roundhand", "Brush Script MT", cursive; font-size: 44px; color: #E0B36B; line-height: 1.1; }
.login-panel { background: #fff; padding: 64px 72px; display: flex; flex-direction: column; justify-content: center; max-width: 560px; width: 100%; margin: 0 auto; }
.login-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; margin-bottom: 40px; }
.login-brand .brand-mark { width: 40px; height: 37px; color: var(--orange); }
.login-brand small { font-weight: 500; color: var(--muted); font-size: 13px; margin-left: 4px; }
.login-panel h1 { font-size: 30px; margin-bottom: 6px; }
.login-panel .muted { margin-bottom: 26px; font-size: 15px; }
.login-panel .field input { height: 48px; font-size: 15px; }
.login-foot { margin-top: 36px; color: var(--muted); font-size: 12.5px; }

/* ---------- Mobile ---------- */
.only-mobile { display: none !important; }
.scrim { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 25; }
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash { grid-template-columns: 1fr; }
  .charts { grid-template-columns: 1fr; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > * { min-width: 0; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline.five { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .qe-head { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid .span-2 { grid-column: span 2; }
}
@media (max-width: 900px) {
  .only-mobile { display: inline-grid !important; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .topbar { padding: 0 16px; gap: 10px; }
  .search { max-width: none; }
  .search kbd, .who, .topbar .icon-btn[title="Yardım"], .topbar .btn-primary .txt { display: none; }
  .topbar .btn-primary { padding: 0 12px; }
  .search { flex: 1 1 100px; min-width: 0; }
  .topbar-right { flex: 0 1 auto; min-width: 0; gap: 4px; }
  .shell, body { overflow-x: clip; }
  .status-strip > div { min-width: 0; flex: 1; overflow-wrap: anywhere; }
  .topbar .btn-primary .btn-plus { margin: 0; }
  .status-strip { flex-wrap: wrap; }
  .status-strip > .row, .status-strip > form { margin-left: 0 !important; width: 100%; }
  .page-head h1 { font-size: 22px; }
  .content { padding: 18px 16px 40px; }
  .kpis { grid-template-columns: 1fr; }
  .pipeline, .pipeline.five { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-grid .span-3 { grid-column: auto; }
  .qe-head { grid-template-columns: 1fr; }
  .qe-totals { width: 100%; }
  .qe-toolbar { margin: 0 -16px -40px; padding: 12px 16px; flex-wrap: wrap; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { padding: 40px 24px; }
  .cal-day { min-height: 70px; padding: 4px; }
  .cal-ev { display: none; }
  .cal-day .dots { display: flex; gap: 3px; }
  .greet { flex-direction: column; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .flashes { left: 16px; right: 16px; max-width: none; }
}
@media (min-width: 901px) { .cal-day .dots { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Bildirimler (zil menüsü + Görevler sayfası) */
.notif-count { position: absolute; top: 4px; right: 4px; margin: 0; min-width: 18px; padding: 0 5px; font-size: 10.5px; line-height: 18px; border: 2px solid #fff; }
.notif-menu { width: 360px; max-width: calc(100vw - 32px); padding: 6px; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 6px; font-size: 13px; }
.notif-head .link-btn { border: 0; background: none; color: var(--orange-700); font-weight: 600; font-size: 12.5px; cursor: pointer; padding: 0; }
.notif-menu .notif-txt { display: grid; gap: 2px; min-width: 0; font-weight: 500; line-height: 1.35; white-space: normal; }
.notif-menu .notif-txt small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.notif-menu a[role="menuitem"] { align-items: flex-start; }
.notif-menu a[role="menuitem"] .ic { flex: none; margin-top: 2px; color: var(--orange); }
.notif-empty { padding: 14px 10px 12px; color: var(--muted); font-size: 13px; text-align: center; }
.notif-foot { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px !important; color: var(--ink-2) !important; font-size: 13px !important; }
.notiflist { list-style: none; margin: 0; padding: 4px 12px 10px; }
.notiflist li + li { border-top: 1px solid var(--line); }
.notiflist a { display: flex; align-items: center; gap: 12px; padding: 11px 8px; border-radius: 10px; color: var(--ink); }
.notiflist a:hover { background: var(--orange-050); }
.notiflist a > .ic { width: 20px; height: 20px; color: var(--orange); flex: none; }
.notiflist a span { display: grid; gap: 2px; flex: 1; min-width: 0; }
.notiflist a strong { font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.notiflist a small { color: var(--muted); font-size: 12px; }
.notiflist a .ic-sm { width: 16px; height: 16px; color: var(--muted); }
/* Üretim notu görselleri */
.pn-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pn-files a { display: block; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.pn-files img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s var(--ease); }
.pn-files a:hover img { transform: scale(1.05); }
.field input[type="file"] { padding: 8px 10px; font-size: 13px; }
.tasklist .txt small .ic-sm { width: 13px; height: 13px; vertical-align: -2px; margin-right: 2px; }
