:root {
  --font: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  --sidebar-w: 276px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

html[data-theme="dark"] {
  --bg: #08111c;
  --bg-alt: #0b1420;
  --sidebar: #0a111b;
  --panel: rgba(14, 23, 35, .86);
  --panel-solid: #101a28;
  --panel-soft: #121f2f;
  --panel-lift: #162538;
  --text: #f6f9fd;
  --text-soft: #d9e2ed;
  --muted: #8393a8;
  --muted-2: #5f7085;
  --line: rgba(151, 181, 214, .12);
  --line-strong: rgba(93, 176, 236, .28);
  --blue: #2ea8ed;
  --blue-2: #1678c2;
  --blue-bright: #5bc5ff;
  --blue-soft: rgba(46, 168, 237, .12);
  --green: #2ecb82;
  --green-soft: rgba(46, 203, 130, .12);
  --orange: #e7a23a;
  --orange-soft: rgba(231, 162, 58, .13);
  --red: #ee6e62;
  --red-soft: rgba(238, 110, 98, .13);
  --purple: #7d71ed;
  --purple-soft: rgba(125, 113, 237, .14);
  --shadow: 0 24px 70px rgba(0,0,0,.22);
  --shadow-soft: 0 12px 34px rgba(0,0,0,.16);
  --white-glass: rgba(255,255,255,.05);
  --sidebar-item: rgba(255,255,255,.035);
  --table-hover: rgba(46,168,237,.055);
}

html[data-theme="light"] {
  --bg: #eef3f8;
  --bg-alt: #f5f8fb;
  --sidebar: #102a46;
  --panel: rgba(255,255,255,.86);
  --panel-solid: #ffffff;
  --panel-soft: #f7fafe;
  --panel-lift: #edf5fb;
  --text: #142234;
  --text-soft: #2f4056;
  --muted: #718096;
  --muted-2: #98a5b6;
  --line: rgba(34, 83, 124, .11);
  --line-strong: rgba(31, 132, 198, .24);
  --blue: #248fd1;
  --blue-2: #1b66a7;
  --blue-bright: #50b9f4;
  --blue-soft: rgba(36, 143, 209, .10);
  --green: #16a76a;
  --green-soft: rgba(22, 167, 106, .10);
  --orange: #d38a1f;
  --orange-soft: rgba(211, 138, 31, .11);
  --red: #d75d52;
  --red-soft: rgba(215, 93, 82, .10);
  --purple: #6558d6;
  --purple-soft: rgba(101, 88, 214, .10);
  --shadow: 0 26px 70px rgba(46,70,96,.10);
  --shadow-soft: 0 10px 28px rgba(46,70,96,.08);
  --white-glass: rgba(255,255,255,.62);
  --sidebar-item: rgba(255,255,255,.05);
  --table-hover: rgba(36,143,209,.045);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: var(--font);
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .35s var(--ease), color .35s var(--ease);
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  transition: opacity .35s ease;
}
.ambient-one { width: 560px; height: 560px; top: -180px; right: 5vw; background: rgba(31,151,221,.16); }
.ambient-two { width: 460px; height: 460px; left: 20vw; bottom: -260px; background: rgba(10,93,158,.13); }
html[data-theme="light"] .ambient { opacity: .46; }

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), transparent 18%),
    var(--sidebar);
  border-right: 1px solid rgba(113,175,222,.12);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.brand-block { padding: 4px 6px 8px; }
.brand-logo-shell {
  height: 52px;
  display: flex;
  align-items: center;
  border-radius: 18px;
  overflow: visible;
  background: transparent;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: none;
}
.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px 2px;
  filter: drop-shadow(0 0 16px rgba(82,182,255,.22));

  transform: scale(.64);
  transform-origin: left center;
}
.brand-kicker {
  margin-top: 11px;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .19em;
  color: rgba(216,234,248,.48);
}
.nav-group { margin-top: 20px; }
.nav-label {
  padding: 0 10px 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(207,225,242,.42);
}
.nav-item {
  width: 100%;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  cursor: pointer;
  color: rgba(234,243,251,.74);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  transition: .2s var(--ease);
}
.nav-item:hover { background: rgba(65,157,221,.07); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(43,156,224,.20), rgba(43,156,224,.06));
  border-color: rgba(76,183,242,.20);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--blue-bright);
}
.nav-glyph {
  width: 20px;
  text-align: center;
  color: #79cfff;
  font-size: 13px;
}
.nav-count {
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,.06);
  color: rgba(227,239,249,.60);
  font-size: 10px;
  font-weight: 500;
}
.nav-count.accent { background: rgba(46,168,237,.18); color: #9dddff; }
.sidebar-bottom { margin-top: auto; padding-top: 18px; }
.system-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.055);
  margin-bottom: 9px;
}
.system-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px rgba(46,203,130,.65); }
.system-card strong, .system-card span { display: block; }
.system-card strong { font-size: 11px; font-weight: 500; color: #dce9f5; }
.system-card span { font-size: 9px; color: rgba(218,232,245,.46); margin-top: 1px; }
.user-row {
  display: grid;
  grid-template-columns: 38px 1fr 28px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 15px;
  background: rgba(255,255,255,.025);
}
.user-avatar {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  color: white; font-weight: 500; font-size: 11px;
  background: linear-gradient(145deg, #2eaaee, #185e9e);
  box-shadow: 0 8px 18px rgba(24,94,158,.26);
}
.user-copy strong, .user-copy span { display: block; }
.user-copy strong { font-size: 11px; font-weight: 500; color: #edf6ff; }
.user-copy span { margin-top: 1px; font-size: 9px; color: rgba(222,236,248,.44); }
.mini-icon { width: 28px; height: 28px; border: 0; border-radius: 9px; background: transparent; color: rgba(232,244,252,.50); cursor: pointer; }

/* MAIN */
.main-area { min-width: 0; padding: 16px 20px 30px; }
.topbar {
  min-height: 76px;
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 11px 13px 11px 20px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-solid) 88%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}
.breadcrumbs { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.breadcrumbs span { color: var(--blue); font-weight: 600; }
.breadcrumbs i { opacity: .35; font-style: normal; }
.breadcrumbs strong { font-weight: 400; }
.title-row { display: flex; align-items: center; gap: 11px; margin-top: 4px; }
.title-row h1 { margin: 0; font-size: 23px; font-weight: 500; letter-spacing: -.035em; }
.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 2px; border-radius: 999px;
  background: var(--green-soft); color: var(--green);
  font-size: 8px; font-weight: 600; letter-spacing: .12em;
}
.live-badge span { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px currentColor; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.global-search {
  min-width: 270px;
  height: 44px;
  display: flex; align-items: center; gap: 9px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-soft);
}
.search-icon { color: var(--blue); }
.global-search input { width: 100%; border: 0; outline: none; background: transparent; color: var(--text); font-size: 11px; font-weight: 300; }
.global-search input::placeholder { color: var(--muted-2); }
kbd { border: 1px solid var(--line); background: var(--panel-lift); color: var(--muted); border-radius: 6px; padding: 3px 5px; font-family: var(--font); font-size: 8px; }
.icon-button {
  position: relative; width: 44px; height: 44px; border-radius: 13px;
  border: 1px solid var(--line); background: var(--panel-soft); color: var(--muted); cursor: pointer;
}
.notif-dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-bright); top: 10px; right: 10px; box-shadow: 0 0 9px rgba(91,197,255,.7); }
.theme-toggle {
  width: 70px; height: 34px; position: relative;
  display: flex; align-items: center; justify-content: space-around;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel-soft); cursor: pointer; overflow: hidden;
  color: var(--muted); font-size: 12px;
}
.theme-toggle .sun, .theme-toggle .moon { z-index: 2; width: 24px; text-align: center; }
.toggle-thumb {
  position: absolute; width: 27px; height: 27px; border-radius: 50%;
  left: 3px; top: 2px;
  background: linear-gradient(145deg, var(--blue-bright), var(--blue-2));
  box-shadow: 0 6px 14px rgba(31,133,203,.28);
  transition: transform .26s var(--ease);
}
html[data-theme="light"] .toggle-thumb { transform: translateX(35px); }
.primary-action, .secondary-action, .quiet-action {
  height: 44px; border-radius: 13px; padding: 0 15px; cursor: pointer;
  font-size: 11px; font-weight: 500; letter-spacing: .01em;
  transition: .2s var(--ease);
}
.primary-action { border: 1px solid rgba(91,197,255,.16); background: linear-gradient(135deg, #2daae9, #176fb4); color: white; box-shadow: 0 10px 24px rgba(30,137,203,.25); }
.primary-action:hover { transform: translateY(-1px); filter: brightness(1.05); }
.secondary-action { border: 1px solid var(--line); background: var(--panel-soft); color: var(--text-soft); }
.quiet-action { border: 0; background: transparent; color: var(--muted); }

.view { display: none; padding-top: 18px; animation: viewIn .28s var(--ease); }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.page-heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding: 9px 3px 18px;
}
.page-heading .overline { font-size: 9px; letter-spacing: .16em; color: var(--blue); text-transform: uppercase; font-weight: 500; }
.page-heading h2 { margin: 7px 0 0; font-size: clamp(26px, 3vw, 42px); font-weight: 400; letter-spacing: -.055em; }
.page-heading p { margin: 6px 0 0; color: var(--muted); font-size: 11px; max-width: 620px; }
.heading-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* PANELS & CARDS */
.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 96%, transparent), color-mix(in srgb, var(--panel-solid) 93%, transparent));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91,197,255,.38), transparent);
  opacity: .7;
}
.panel-pad { padding: 20px; }
.section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.section-kicker { font-size: 8px; color: var(--blue); letter-spacing: .17em; text-transform: uppercase; font-weight: 500; }
.section-title h3 { margin: 5px 0 0; font-size: 16px; font-weight: 400; letter-spacing: -.025em; }
.section-title p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.link-arrow { color: var(--blue); font-size: 10px; text-decoration: none; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi-card {
  min-height: 132px;
  position: relative;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  overflow: hidden;
  transition: .22s var(--ease);
}
.kpi-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.kpi-card .accent-line { position: absolute; width: 48px; height: 2px; top: 0; left: 16px; background: var(--blue-bright); box-shadow: 0 0 16px rgba(91,197,255,.5); }
.kpi-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.kpi-label { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .09em; font-weight: 500; }
.kpi-icon { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 9px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); font-size: 11px; }
.kpi-value { margin-top: 15px; font-size: clamp(24px, 2.5vw, 36px); line-height: 1; font-weight: 500; letter-spacing: -.045em; }
.kpi-sub { margin-top: 8px; color: var(--muted); font-size: 9px; }
.delta { display: inline-flex; gap: 4px; align-items: center; margin-top: 8px; font-size: 8px; color: var(--green); background: var(--green-soft); padding: 4px 7px; border-radius: 999px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(320px,.55fr); gap: 12px; margin-top: 12px; }
.plan-panel { min-height: 430px; }
.plan-content { display: grid; grid-template-columns: 230px 1fr; gap: 20px; align-items: center; }
.donut-zone { display: grid; place-items: center; }
.donut {
  --pct: 73;
  width: 176px; aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--blue-bright) 0 calc(var(--pct)*1%), rgba(105,132,160,.13) 0);
  display: grid; place-items: center;
  position: relative;
  box-shadow: 0 0 45px rgba(46,168,237,.08);
}
.donut::after { content: ""; width: 132px; height: 132px; border-radius: 50%; background: var(--panel-solid); border: 1px solid var(--line); position: absolute; }
.donut-copy { z-index: 1; text-align: center; }
.donut-copy strong { display: block; font-size: 32px; font-weight: 500; letter-spacing: -.045em; }
.donut-copy span { color: var(--muted); font-size: 9px; }
.donut-metrics { margin-top: 16px; display: grid; gap: 8px; width: 100%; }
.donut-metric { display: flex; justify-content: space-between; gap: 14px; font-size: 9px; color: var(--muted); }
.donut-metric strong { color: var(--text-soft); font-weight: 500; }
.bar-area { min-width: 0; }
.bar-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.small-select { height: 32px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-soft); color: var(--text-soft); padding: 0 10px; font-size: 9px; outline: none; }
.bar-chart { height: 230px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; align-items: end; }
.bar-column { height: 100%; display: flex; flex-direction: column; justify-content: end; gap: 7px; }
.bar-track { height: 190px; border: 1px dashed rgba(127,161,194,.22); border-radius: 12px; display: flex; align-items: end; justify-content: center; padding: 0 4px; background: rgba(255,255,255,.012); }
.bar-fill { width: 100%; border-radius: 8px 8px 5px 5px; background: linear-gradient(180deg, #3fc87d, #148b50); box-shadow: 0 10px 20px rgba(31,190,111,.14); }
.bar-fill.blue { background: linear-gradient(180deg, #4dbcf7, #1f6db7); box-shadow: 0 10px 20px rgba(46,168,237,.17); }
.bar-month { text-align: center; color: var(--muted); font-size: 8px; font-weight: 500; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 13px; }
.legend-item { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 8px; }
.legend-swatch { width: 8px; height: 8px; border-radius: 3px; background: var(--blue); }
.legend-swatch.green { background: var(--green); }
.legend-swatch.plan { background: transparent; border: 1px dashed var(--muted-2); }

.activity-panel { min-height: 430px; }
.activity-list { display: grid; gap: 3px; }
.activity-item { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); border: 1px solid var(--line); font-size: 10px; }
.activity-copy strong, .activity-copy span { display: block; }
.activity-copy strong { font-size: 10px; font-weight: 500; }
.activity-copy span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.activity-time { color: var(--muted-2); font-size: 8px; }
.quarter-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 16px; }
.quarter-card { padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-soft); }
.quarter-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.quarter-card .q { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .1em; }
.quarter-card strong { display: block; margin-top: 8px; font-size: 19px; font-weight: 500; letter-spacing: -.04em; }
.quarter-card small { color: var(--muted-2); font-size: 7px; }

.bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.offer-mini-list { display: grid; gap: 7px; }
.offer-mini { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.offer-mini:last-child { border-bottom: 0; }
.offer-mini strong, .offer-mini span { display: block; }
.offer-mini strong { font-size: 10px; font-weight: 500; }
.offer-mini span { margin-top: 2px; font-size: 8px; color: var(--muted); }
.offer-mini-value { font-size: 10px; font-weight: 500; }
.badge { display: inline-flex; align-items: center; justify-content: center; padding: 5px 8px; border-radius: 999px; font-size: 7px; font-weight: 500; white-space: nowrap; }
.badge.blue { color: var(--blue-bright); background: var(--blue-soft); }
.badge.green { color: var(--green); background: var(--green-soft); }
.badge.orange { color: var(--orange); background: var(--orange-soft); }
.badge.red { color: var(--red); background: var(--red-soft); }
.badge.purple { color: var(--purple); background: var(--purple-soft); }
.badge.gray { color: var(--muted); background: rgba(128,145,165,.10); }
.tech-card {
  min-height: 188px;
  padding: 20px;
  background:
    linear-gradient(125deg, rgba(22,119,184,.20), rgba(16,29,44,.1) 62%),
    var(--panel);
}
html[data-theme="light"] .tech-card { background: linear-gradient(125deg, rgba(36,143,209,.10), rgba(255,255,255,.88) 62%), var(--panel); }
.tech-lines { position: absolute; inset: 0; opacity: .45; pointer-events: none; background-image: linear-gradient(rgba(70,179,236,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(70,179,236,.07) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(110deg, black, transparent 70%); }
.tech-content { position: relative; z-index: 1; max-width: 470px; }
.tech-content .offer-tag { display: inline-flex; padding: 5px 8px; border-radius: 999px; border: 1px solid rgba(91,197,255,.25); color: var(--blue-bright); font-size: 7px; letter-spacing: .11em; text-transform: uppercase; }
.tech-content h3 { margin: 12px 0 7px; font-size: 22px; font-weight: 400; letter-spacing: -.04em; }
.tech-content p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
.tech-actions { display: flex; gap: 7px; margin-top: 14px; }

/* TOOLBARS + TABLE */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar-left, .toolbar-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search-field, .filter-select {
  height: 38px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--panel-soft); color: var(--text-soft); outline: none;
  font-size: 9px; font-weight: 300;
}
.search-field { width: 245px; padding: 0 12px; }
.filter-select { padding: 0 10px; min-width: 118px; }
.table-panel { padding: 4px 14px 8px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 920px; }
.data-table th { padding: 12px 9px; text-align: left; color: var(--muted-2); font-size: 7px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.data-table td { padding: 13px 9px; border-bottom: 1px solid var(--line); color: var(--text-soft); font-size: 9px; transition: background .15s ease; }
.data-table tr:hover td { background: var(--table-hover); }
.data-table tr:last-child td { border-bottom: 0; }
.row-primary { font-size: 10px; color: var(--text); font-weight: 500; }
.row-secondary { margin-top: 3px; font-size: 7px; color: var(--muted); }
.row-actions { display: flex; gap: 5px; }
.action-circle { width: 28px; height: 28px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-soft); color: var(--muted); cursor: pointer; transition: .15s ease; }
.action-circle:hover { color: var(--blue); border-color: var(--line-strong); }
.progress-mini { width: 74px; height: 5px; background: rgba(118,142,166,.12); border-radius: 999px; overflow: hidden; }
.progress-mini > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--blue-bright)); }

/* CLIENTS */
.client-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.client-card { min-height: 220px; padding: 17px; }
.client-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.client-logo-mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg, var(--blue-soft), transparent); border: 1px solid var(--line); color: var(--blue); font-size: 12px; font-weight: 500; }
.client-card h3 { margin: 15px 0 4px; font-size: 16px; font-weight: 500; letter-spacing: -.03em; }
.client-card .site { color: var(--blue); font-size: 8px; }
.client-meta { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.client-meta-box { padding: 9px 10px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel-soft); }
.client-meta-box span, .client-meta-box strong { display: block; }
.client-meta-box span { color: var(--muted); font-size: 7px; }
.client-meta-box strong { margin-top: 2px; font-size: 8px; font-weight: 500; }
.client-card-actions { display: flex; gap: 6px; margin-top: 15px; }

/* LEADS */
.lead-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 12px; }
.alert-line { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid rgba(238,110,98,.14); background: var(--red-soft); border-radius: 12px; color: var(--red); font-size: 8px; margin-bottom: 12px; }
.lead-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.lead-card { position: relative; padding: 17px; min-height: 210px; border-left: 2px solid var(--blue); }
.lead-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lead-country { color: var(--blue); font-size: 8px; font-weight: 500; }
.lead-date { color: var(--muted); font-size: 8px; }
.lead-card h3 { margin: 16px 0 3px; font-size: 15px; font-weight: 500; }
.lead-company { color: var(--muted); font-size: 8px; }
.lead-contact { margin-top: 13px; display: grid; gap: 5px; color: var(--text-soft); font-size: 8px; }
.lead-source { margin-top: 16px; color: var(--blue); font-size: 8px; }

/* PRICE LIST / SETTINGS / USERS */
.card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.module-card { padding: 18px; min-height: 190px; }
.module-card h3 { margin: 13px 0 6px; font-size: 16px; font-weight: 500; letter-spacing: -.03em; }
.module-card p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.7; }
.module-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.module-meta-box { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-soft); font-size: 8px; color: var(--muted); }
.module-meta-box strong { color: var(--text); font-weight: 500; }
.user-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; }
.user-card .avatar { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: white; background: linear-gradient(145deg,var(--blue),var(--blue-2)); font-size: 10px; font-weight: 500; }
.user-card h3 { margin: 0; font-size: 11px; font-weight: 500; }
.user-card p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }
.user-card-actions { display: flex; gap: 5px; }

/* CALENDAR */
.calendar-layout { display: grid; grid-template-columns: 250px 1fr; gap: 12px; }
.mini-calendar { padding: 16px; }
.month-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.month-row strong { font-size: 11px; font-weight: 500; }
.month-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.day-name, .day { text-align: center; font-size: 7px; color: var(--muted); height: 28px; display: grid; place-items: center; border-radius: 8px; }
.day.active { background: var(--blue); color: white; box-shadow: 0 7px 15px rgba(36,143,209,.25); }
.day.event { border: 1px solid var(--line-strong); color: var(--text); }
.timeline { padding: 16px; }
.timeline-item { display: grid; grid-template-columns: 54px 11px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-time { color: var(--muted); font-size: 8px; }
.timeline-node { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 12px rgba(46,168,237,.35); }
.timeline-copy strong, .timeline-copy span { display: block; }
.timeline-copy strong { font-size: 9px; font-weight: 500; }
.timeline-copy span { color: var(--muted); font-size: 8px; margin-top: 2px; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 30; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-solid); box-shadow: var(--shadow-soft); color: var(--text); font-size: 9px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1320px) {
  .kpi-grid, .lead-summary { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid, .bottom-grid { grid-template-columns: 1fr; }
  .client-grid, .lead-grid, .card-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 1040px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; display: block; }
  .sidebar-bottom { margin-top: 20px; }
  .nav-group { margin-top: 14px; }
  .topbar { top: 8px; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
  .global-search { min-width: 220px; }
  .plan-content { grid-template-columns: 1fr; }
  .calendar-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .main-area { padding: 10px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar-actions { width: 100%; justify-content: stretch; }
  .global-search { width: 100%; }
  .page-heading { flex-direction: column; align-items: flex-start; }
  .kpi-grid, .lead-summary, .client-grid, .lead-grid, .card-grid, .quarter-grid { grid-template-columns: 1fr; }
  .bar-chart { gap: 4px; }
}

/* FUNCTIONAL APP LAYER — keeps the approved V3 visual baseline intact */
.loading-panel { min-height: 180px; display:flex; align-items:center; justify-content:center; gap:12px; color:var(--muted); }
.spinner { width:24px; height:24px; border-radius:50%; border:2px solid var(--line); border-top-color:var(--blue); animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.error-panel code { color:var(--blue-bright); }
.empty-state-ui { padding:18px; color:var(--muted); border:1px dashed var(--line); border-radius:14px; }
.modal-backdrop { position:fixed; inset:0; z-index:200; background:rgba(3,11,22,.72); backdrop-filter:blur(10px); display:grid; place-items:center; padding:24px; }
.app-modal { width:min(640px,96vw); max-height:92vh; overflow:hidden; display:flex; flex-direction:column; border:1px solid var(--line-strong); background:var(--panel-solid); border-radius:24px; box-shadow:0 36px 120px rgba(0,0,0,.42); }
.app-modal.lg { width:min(860px,96vw); }
.app-modal.xl { width:min(1080px,97vw); }
.modal-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding:22px 24px 16px; border-bottom:1px solid var(--line); }
.modal-head h3 { margin:4px 0 0; font-size:24px; font-weight:400; letter-spacing:-.035em; }
.modal-close { width:36px; height:36px; border-radius:12px; border:1px solid var(--line); background:var(--panel-soft); color:var(--muted); cursor:pointer; font-size:22px; }
.modal-body { padding:22px 24px; overflow:auto; }
.modal-footer { display:flex; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:10px; padding:16px 24px 20px; border-top:1px solid var(--line); background:var(--panel-soft); }
.form-grid-ui { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.form-field { display:grid; gap:7px; }
.form-field.full, .form-separator.full, .offer-items.full, .full { grid-column:1/-1; }
.form-field > span { font-size:10px; letter-spacing:.06em; text-transform:uppercase; font-weight:500; color:var(--muted); }
.form-field input, .form-field select, .form-field textarea, .inline-field input, .inline-field select, .offer-item-row input, .offer-item-row select { width:100%; min-height:45px; border-radius:13px; border:1px solid var(--line); background:var(--panel-soft); color:var(--text); padding:10px 12px; outline:none; }
.form-field textarea { min-height:100px; resize:vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus, .inline-field input:focus { border-color:var(--line-strong); box-shadow:0 0 0 3px var(--blue-soft); }
.form-separator { display:flex; justify-content:space-between; align-items:center; gap:12px; padding-top:6px; font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); }
.compact { min-height:36px !important; height:36px !important; padding:0 12px !important; border-radius:11px !important; font-size:10px !important; }
.inline-field { display:flex; align-items:center; gap:8px; }
.offer-items { display:grid; gap:9px; }
.offer-item-row { display:grid; grid-template-columns:minmax(220px,1fr) 90px 120px 40px; gap:8px; align-items:center; padding:9px; border:1px solid var(--line); border-radius:14px; background:var(--panel-soft); }
.detail-hero { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:18px; }
.detail-hero h4 { margin:0 0 4px; font-size:25px; font-weight:400; letter-spacing:-.04em; }
.detail-hero p { margin:0; color:var(--muted); }
.client-logo-mark.large { width:58px; height:58px; border-radius:18px; font-size:14px; }
.detail-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:14px 0 18px; }
.detail-card { padding:14px; border-radius:14px; background:var(--panel-soft); border:1px solid var(--line); }
.detail-card span { display:block; color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.07em; }
.detail-card strong { display:block; margin-top:5px; font-size:13px; font-weight:500; word-break:break-word; }
.detail-tabs, .detail-section { display:grid; gap:18px; }
.detail-tabs section, .detail-section { padding-top:14px; border-top:1px solid var(--line); }
.detail-tabs h4, .detail-section h4 { margin:0 0 10px; font-size:13px; font-weight:500; }
.detail-list-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:11px 0; border-bottom:1px solid var(--line); }
.detail-list-row > div { min-width:0; }
.detail-list-row strong, .detail-list-row span { display:block; }
.detail-list-row strong { font-size:12px; font-weight:500; }
.detail-list-row span, .detail-list-row small { color:var(--muted); font-size:10px; margin-top:2px; }
.info-box { margin-top:16px; padding:14px 16px; border-radius:14px; border:1px solid var(--line); background:var(--blue-soft); color:var(--text-soft); }
.info-box strong { display:block; font-size:12px; margin-bottom:4px; }
.info-box p { margin:5px 0; color:var(--muted); font-size:11px; }
.info-box.error { background:var(--red-soft); }
.virtual-create { text-align:center; padding:24px 10px; }
.virtual-create h4 { margin:12px 0 8px; font-size:24px; font-weight:400; }
.virtual-create p { max-width:520px; margin:0 auto; color:var(--muted); }
.tech-visual-mini { width:64px; height:64px; margin:auto; border-radius:20px; display:grid; place-items:center; background:linear-gradient(135deg,var(--blue-soft),rgba(91,197,255,.03)); border:1px solid var(--line-strong); color:var(--blue-bright); font-size:28px; }
.virtual-link-box { padding:16px; border:1px solid var(--line-strong); border-radius:16px; background:linear-gradient(135deg,var(--blue-soft),transparent); }
.virtual-link-box span, .virtual-link-box strong { display:block; }
.virtual-link-box span { color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.07em; }
.virtual-link-box strong { margin-top:5px; font-size:12px; word-break:break-all; }
.action-row-ui { display:flex; gap:8px; margin-top:12px; }
.link-button { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
button:disabled { opacity:.55; cursor:wait; }
.toast[data-type="error"] { border-color:rgba(238,110,98,.35); color:var(--red); }
@media(max-width:760px){ .form-grid-ui,.detail-grid{grid-template-columns:1fr}.offer-item-row{grid-template-columns:1fr 80px 100px 38px}.modal-backdrop{padding:8px}.app-modal{max-height:96vh}.modal-body{padding:16px}.detail-grid{grid-template-columns:repeat(2,1fr)} }


/* ==========================================================================
   RESPONSIVE SYSTEM — desktop / tablet / mobile
   Keeps the approved V3 visual language while adapting layout and interaction.
   ========================================================================== */

.topbar-leading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-toggle,
.sidebar-backdrop {
  display: none;
}

.mobile-menu-toggle {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  place-items: center;
  padding: 0 11px;
}

.mobile-menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 3px 0;
  border-radius: 99px;
  background: currentColor;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}

body.sidebar-open .mobile-menu-toggle span:nth-child(1) {
  transform: translateY(4.5px) rotate(45deg);
}
body.sidebar-open .mobile-menu-toggle span:nth-child(2) { opacity: 0; }
body.sidebar-open .mobile-menu-toggle span:nth-child(3) {
  transform: translateY(-4.5px) rotate(-45deg);
}

.table-wrap {
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
}

.primary-action,
.secondary-action,
.quiet-action,
.icon-button,
.action-circle,
.mobile-menu-toggle,
.theme-toggle,
.nav-item {
  -webkit-tap-highlight-color: transparent;
}

img, svg, video, canvas {
  max-width: 100%;
}

/* Large desktop */
@media (min-width: 1440px) {
  .main-area {
    padding-left: 24px;
    padding-right: 24px;
  }
  .topbar {
    max-width: 1800px;
    margin-inline: auto;
  }
  .view {
    max-width: 1800px;
    margin-inline: auto;
  }
}

/* Small desktop / landscape tablet */
@media (max-width: 1180px) {
  :root { --sidebar-w: 292px; }

  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, var(--sidebar-w));
    height: 100dvh;
    z-index: 120;
    display: flex;
    transform: translateX(-104%);
    transition: transform .28s var(--ease);
    box-shadow: 28px 0 70px rgba(0,0,0,.26);
    border-right-color: var(--line-strong);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-bottom {
    margin-top: auto;
  }

  .mobile-menu-toggle {
    display: grid;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 110;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    background: rgba(3,10,18,.56);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .24s ease;
  }

  .sidebar-backdrop.is-visible {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .main-area {
    width: 100%;
    padding: 14px 16px 28px;
  }

  .topbar {
    top: 8px;
    padding-left: 14px;
    gap: 14px;
  }

  .topbar-leading {
    flex: 1 1 260px;
  }

  .topbar-actions {
    flex: 1 1 510px;
    justify-content: flex-end;
  }

  .global-search {
    min-width: 210px;
    flex: 1 1 220px;
  }

  .dashboard-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .plan-content {
    grid-template-columns: 210px minmax(0,1fr);
  }

  .calendar-layout {
    grid-template-columns: minmax(220px, 280px) minmax(0,1fr);
  }

  .client-grid,
  .lead-grid,
  .card-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .kpi-grid,
  .lead-summary {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

/* Tablet portrait */
@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    align-items: center;
  }

  .topbar-leading {
    flex: 1 1 100%;
  }

  .topbar-actions {
    width: 100%;
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: minmax(0,1fr) 44px 70px auto;
    align-items: center;
    gap: 8px;
  }

  .global-search {
    width: 100%;
    min-width: 0;
  }

  .page-heading {
    align-items: flex-start;
  }

  .heading-actions {
    justify-content: flex-end;
  }

  .plan-content {
    grid-template-columns: 1fr;
  }

  .donut-zone {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 22px;
    justify-content: start;
    align-items: center;
  }

  .donut-metrics {
    margin-top: 0;
    min-width: 220px;
  }

  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .mini-calendar {
    max-width: 460px;
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .form-grid-ui {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .bar-chart {
    min-width: 620px;
  }

  .bar-area {
    overflow-x: auto;
    padding-bottom: 4px;
  }
}

/* Mobile / compact tablet */
@media (max-width: 700px) {
  :root {
    --radius-xl: 22px;
    --radius-lg: 18px;
    --radius-md: 14px;
  }

  .ambient-one {
    width: 360px;
    height: 360px;
    right: -120px;
    top: -80px;
  }

  .ambient-two {
    width: 320px;
    height: 320px;
    left: -160px;
  }

  .main-area {
    padding: 8px 8px 22px;
  }

  .topbar {
    min-height: 0;
    top: 6px;
    padding: 9px;
    border-radius: 18px;
    gap: 8px;
  }

  .topbar-leading {
    gap: 9px;
  }

  .mobile-menu-toggle {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 12px;
  }

  .breadcrumbs {
    display: none;
  }

  .title-row {
    margin-top: 0;
    gap: 8px;
  }

  .title-row h1 {
    font-size: 18px;
    letter-spacing: -.03em;
  }

  .live-badge {
    display: none;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "search search search"
      "new theme notif";
    gap: 7px;
  }

  .global-search {
    grid-area: search;
    height: 41px;
    border-radius: 12px;
  }

  .global-search kbd {
    display: none;
  }

  .topbar-actions > .icon-button {
    grid-area: notif;
    width: 41px;
    height: 41px;
    border-radius: 12px;
  }

  .theme-toggle {
    grid-area: theme;
    width: 66px;
    height: 33px;
  }

  .topbar-actions > .primary-action {
    grid-area: new;
    min-width: 0;
    width: 100%;
    height: 41px;
    padding-inline: 12px;
  }

  .view {
    padding-top: 12px;
  }

  .page-heading {
    padding: 8px 2px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 13px;
  }

  .page-heading h2 {
    font-size: clamp(25px, 8vw, 34px);
    margin-top: 5px;
  }

  .page-heading p {
    font-size: 10px;
    line-height: 1.55;
  }

  .heading-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    justify-content: stretch;
  }

  .heading-actions .primary-action,
  .heading-actions .secondary-action,
  .heading-actions .quiet-action {
    width: 100%;
  }

  .panel-pad {
    padding: 15px;
  }

  .section-title {
    gap: 10px;
    margin-bottom: 12px;
  }

  .section-title h3 {
    font-size: 15px;
  }

  .kpi-grid,
  .lead-summary,
  .client-grid,
  .lead-grid,
  .card-grid,
  .quarter-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .kpi-card {
    min-height: 116px;
    padding: 14px;
  }

  .kpi-value {
    margin-top: 12px;
    font-size: 28px;
  }

  .dashboard-grid,
  .bottom-grid {
    gap: 9px;
    margin-top: 9px;
  }

  .plan-panel,
  .activity-panel {
    min-height: 0;
  }

  .plan-content {
    gap: 16px;
  }

  .donut-zone {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 14px;
  }

  .donut {
    width: 156px;
  }

  .donut::after {
    width: 116px;
    height: 116px;
  }

  .donut-copy strong {
    font-size: 28px;
  }

  .donut-metrics {
    min-width: 0;
    margin-top: 0;
  }

  .bar-area {
    margin-inline: -2px;
  }

  .bar-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .bar-chart {
    min-width: 560px;
    height: 210px;
  }

  .bar-track {
    height: 170px;
  }

  .activity-item {
    grid-template-columns: 34px minmax(0,1fr);
  }

  .activity-time {
    grid-column: 2;
  }

  .offer-mini {
    grid-template-columns: minmax(0,1fr) auto;
  }

  .offer-mini .badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .toolbar,
  .toolbar-left,
  .toolbar-right {
    width: 100%;
    align-items: stretch;
  }

  .toolbar-left,
  .toolbar-right {
    display: grid;
    grid-template-columns: 1fr;
  }

  .search-field,
  .filter-select {
    width: 100%;
    min-width: 0;
  }

  .table-panel {
    padding: 0;
    background: transparent;
  }

  .table-wrap {
    overflow: visible;
  }

  .data-table {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody {
    display: grid;
    gap: 9px;
  }

  .data-table tr {
    display: grid;
    gap: 0;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-soft);
    box-shadow: 0 6px 18px rgba(0,0,0,.035);
  }

  .data-table td {
    display: grid;
    grid-template-columns: minmax(88px, .85fr) minmax(0, 1.35fr);
    gap: 10px;
    align-items: start;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
    font-size: 9px;
    min-width: 0;
    word-break: break-word;
  }

  .data-table td:last-child {
    border-bottom: 0;
  }

  .data-table td::before {
    content: attr(data-label);
    color: var(--muted-2);
    font-size: 7px;
    font-weight: 500;
    letter-spacing: .07em;
    text-transform: uppercase;
  }

  .data-table td[data-label=""] {
    grid-template-columns: 1fr;
  }

  .data-table td[data-label=""]::before {
    display: none;
  }

  .row-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .client-card,
  .lead-card,
  .module-card {
    min-height: 0;
  }

  .client-meta {
    grid-template-columns: 1fr 1fr;
  }

  .client-card-actions,
  .tech-actions,
  .action-row-ui {
    flex-wrap: wrap;
  }

  .client-card-actions > *,
  .tech-actions > *,
  .action-row-ui > * {
    flex: 1 1 120px;
  }

  .calendar-layout {
    gap: 9px;
  }

  .mini-calendar,
  .timeline {
    padding: 14px;
  }

  .timeline-item {
    grid-template-columns: 44px 9px minmax(0,1fr);
    gap: 8px;
  }

  .timeline-item > :last-child:not(.timeline-copy) {
    grid-column: 3;
    justify-self: start;
  }

  .detail-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-hero h4 {
    font-size: 22px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-list-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-list-row > strong,
  .detail-list-row > .badge,
  .detail-list-row > button {
    align-self: flex-start;
  }

  .form-grid-ui {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-field.full,
  .form-separator.full,
  .offer-items.full,
  .full {
    grid-column: auto;
  }

  .form-separator {
    align-items: flex-start;
    flex-direction: column;
  }

  .inline-field {
    align-items: stretch;
    flex-direction: column;
  }

  .offer-item-row {
    grid-template-columns: minmax(0,1fr) minmax(84px,.45fr) 40px;
    gap: 7px;
  }

  .offer-item-row .offer-article-select {
    grid-column: 1 / -1;
  }

  .offer-item-row [name="item_price"] {
    grid-column: 1 / 2;
  }

  .offer-item-row [name="item_qty"] {
    grid-column: 2 / 3;
  }

  .offer-item-row .remove-offer-item {
    grid-column: 3 / 4;
    grid-row: 2;
    align-self: center;
  }

  .app-modal,
  .app-modal.lg,
  .app-modal.xl {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 12px);
    border-radius: 20px;
  }

  .modal-backdrop {
    padding: 6px;
    align-items: end;
  }

  .modal-head {
    padding: 16px 16px 12px;
  }

  .modal-head h3 {
    font-size: 21px;
  }

  .modal-body {
    padding: 15px 16px;
  }

  .modal-footer {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }

  .modal-footer > button,
  .modal-footer > .primary-action,
  .modal-footer > .secondary-action {
    flex: 1 1 120px;
  }

  .user-card {
    grid-template-columns: 42px minmax(0,1fr);
  }

  .user-card-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .toast {
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    text-align: center;
  }
}

/* Very small phones */
@media (max-width: 420px) {
  .topbar-actions {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "search search"
      "new theme";
  }

  .topbar-actions > .icon-button {
    display: none;
  }

  .topbar-actions > .primary-action {
    font-size: 10px;
  }

  .theme-toggle {
    width: 62px;
  }

  .page-heading h2 {
    font-size: 27px;
  }

  .heading-actions {
    grid-template-columns: 1fr;
  }

  .client-meta {
    grid-template-columns: 1fr;
  }

  .data-table td {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .data-table td::before {
    margin-bottom: 2px;
  }

  .offer-item-row {
    grid-template-columns: 1fr 1fr 38px;
  }
}

/* Prefer stable layout for users asking for reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* =========================================================
   Authentication — PRO SOLUTION visual system
   ========================================================= */
.auth-shell {
  min-height: 100dvh;
  position: relative;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vw, 44px);
  overflow: hidden;
}

.auth-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 20%, rgba(44, 146, 255, .16), transparent 31%),
    radial-gradient(circle at 78% 74%, rgba(0, 212, 255, .08), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.012), transparent 42%);
}

.auth-theme-toggle {
  position: fixed;
  z-index: 20;
  top: 22px;
  right: 24px;
}

.auth-stage {
  width: min(1180px, 100%);
  min-height: min(730px, calc(100dvh - 56px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, .72fr);
  border: 1px solid var(--line);
  border-radius: 32px;
  overflow: hidden;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  box-shadow: 0 34px 100px rgba(0, 0, 0, .30);
  backdrop-filter: blur(26px);
}

.auth-showcase {
  min-height: 100%;
  padding: clamp(46px, 6vw, 82px);
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(7, 15, 31, .32), rgba(6, 12, 26, .88)),
    radial-gradient(circle at 72% 28%, rgba(47, 150, 255, .24), transparent 35%),
    linear-gradient(135deg, #0b162d 0%, #08101f 55%, #060b15 100%);
}

.auth-showcase::before,
.auth-showcase::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.auth-showcase::before {
  width: 480px;
  height: 480px;
  right: -160px;
  top: -160px;
  border: 1px solid rgba(82, 182, 255, .18);
  box-shadow: 0 0 90px rgba(51, 147, 255, .08) inset;
}

.auth-showcase::after {
  width: 250px;
  height: 250px;
  right: 52px;
  top: 90px;
  border: 1px solid rgba(255,255,255,.07);
}

.auth-showcase-inner {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.auth-logo-wrap {
  width: 235px;
  height: 58px;
  margin-bottom: 46px;
  display: flex;
  align-items: center;
}

.auth-logo-wrap img,
.auth-mobile-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.auth-eyebrow,
.auth-overline {
  color: #5fb7ff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.auth-showcase h1 {
  margin: 16px 0 20px;
  color: #fff;
  font-size: clamp(39px, 4vw, 63px);
  line-height: 1.05;
  letter-spacing: -.045em;
  font-weight: 500;
}

.auth-showcase h1 span {
  color: #63baff;
}

.auth-showcase p {
  max-width: 560px;
  margin: 0;
  color: rgba(228, 239, 255, .68);
  font-size: 14px;
  line-height: 1.8;
  font-weight: 300;
}

.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 42px;
}

.auth-feature {
  min-height: 88px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-feature strong {
  color: #55b2ff;
  font-size: 10px;
  letter-spacing: .12em;
}

.auth-feature span {
  color: rgba(255,255,255,.78);
  font-size: 11px;
}

.auth-card-wrap {
  padding: clamp(24px, 4vw, 48px);
  display: grid;
  align-items: center;
  background: color-mix(in srgb, var(--panel) 91%, transparent);
}

.auth-card {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

.auth-mobile-brand {
  display: none;
}

.auth-panel {
  display: none;
  animation: authPanelIn .25s ease both;
}

.auth-panel.active {
  display: block;
}

@keyframes authPanelIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-panel h2 {
  margin: 8px 0 7px;
  color: var(--text);
  font-size: 37px;
  line-height: 1.12;
  letter-spacing: -.035em;
  font-weight: 500;
}

.auth-intro {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 15px;
}

.auth-form > label {
  display: grid;
  gap: 7px;
}

.auth-form > label > span {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.auth-input-wrap {
  height: 50px;
  display: grid;
  grid-template-columns: 32px minmax(0,1fr) auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--input-bg, rgba(255,255,255,.025));
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-input-wrap:focus-within {
  border-color: rgba(61, 158, 255, .58);
  box-shadow: 0 0 0 3px rgba(61, 158, 255, .09);
  background: color-mix(in srgb, var(--panel) 95%, #2d96ff 5%);
}

.auth-input-wrap > i {
  font-style: normal;
  text-align: center;
  color: #4aa8f9;
  font-size: 11px;
}

.auth-input-wrap input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  padding: 0 9px 0 0;
}

.auth-input-wrap input::placeholder {
  color: var(--muted-2);
  opacity: .68;
}

.password-toggle {
  width: 40px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.auth-form-row {
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-text-link,
.auth-switch button,
.auth-switch a,
.auth-back {
  border: 0;
  background: transparent;
  color: #51aefb;
  font: inherit;
  cursor: pointer;
}

.auth-text-link {
  font-size: 10px;
}

.auth-submit {
  min-height: 51px;
  margin-top: 2px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #248dff, #4ab9ff);
  color: white;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 13px 30px rgba(34, 143, 255, .20);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease;
}

.auth-submit:hover { transform: translateY(-1px); filter: brightness(1.04); }
.auth-submit:disabled { opacity: .58; cursor: wait; transform: none; }
.auth-submit span { font-size: 17px; font-weight: 300; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 18px;
  color: var(--muted-2);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.auth-switch {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.auth-switch button, .auth-switch a { font-size: 10px; font-weight: 500; padding: 4px; text-decoration: none; }

.auth-back {
  display: inline-block;
  text-decoration: none;
  margin: 0 0 22px;
  padding: 0;
  font-size: 10px;
}

.password-hint {
  margin-top: -3px;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.55;
}

.auth-message {
  display: none;
  margin-top: 16px;
  padding: 11px 13px;
  border-radius: 11px;
  font-size: 9px;
  line-height: 1.55;
}

.auth-message.show {
  display: block;
}

.auth-message.error {
  color: #ff9d9d;
  border: 1px solid rgba(255, 83, 83, .19);
  background: rgba(255, 83, 83, .07);
}

.auth-message.success {
  color: #8be4b2;
  border: 1px solid rgba(45, 195, 112, .18);
  background: rgba(45, 195, 112, .07);
}

.auth-dev-link {
  margin-top: 14px;
  padding: 13px;
  border: 1px dashed rgba(83, 177, 255, .34);
  border-radius: 12px;
  background: rgba(56, 153, 255, .055);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.auth-dev-link a {
  display: inline-block;
  margin-top: 7px;
  color: #57b3ff;
  font-weight: 500;
  text-decoration: none;
}

.auth-foot {
  margin-top: 29px;
  color: var(--muted-2);
  font-size: 8px;
  text-align: center;
  letter-spacing: .07em;
  text-transform: uppercase;
}

html[data-theme="light"] .auth-stage {
  box-shadow: 0 34px 100px rgba(35, 67, 105, .16);
}

html[data-theme="light"] .auth-card-wrap {
  background: rgba(255,255,255,.83);
}

html[data-theme="light"] .auth-input-wrap {
  background: rgba(28, 52, 85, .025);
}

@media (max-width: 960px) {
  .auth-stage {
    width: min(560px, 100%);
    min-height: auto;
    grid-template-columns: 1fr;
  }
  .auth-showcase { display: none; }
  .auth-card-wrap { padding: 38px; }
  .auth-mobile-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 40px;
  }
  .auth-mobile-brand img { width: 190px; height: 42px; }
  .auth-mobile-brand span {
    color: var(--muted-2);
    font-size: 8px;
    letter-spacing: .15em;
  }
}

@media (max-width: 600px) {
  .auth-shell {
    padding: 0;
    align-items: stretch;
  }
  .auth-theme-toggle {
    top: 14px;
    right: 14px;
  }
  .auth-stage {
    width: 100%;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    background: var(--bg);
  }
  .auth-card-wrap {
    padding: 72px 22px 30px;
    align-items: start;
  }
  .auth-card { max-width: 100%; }
  .auth-mobile-brand { margin-bottom: 48px; }
  .auth-mobile-brand img { width: 176px; }
  .auth-panel h2 { font-size: 34px; }
  .auth-input-wrap { height: 53px; }
  .auth-submit { min-height: 54px; }
  .auth-foot { margin-top: 34px; padding-bottom: env(safe-area-inset-bottom); }
}

@media (max-width: 960px) {
  .auth-mobile-brand {
    width: min(250px, 100%);
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 14px;
    background: #08101f;
  }
  .auth-mobile-brand span { color: rgba(222,236,255,.56); }
}
