@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #050d18;
  --bg-2: #07131f;
  --panel: rgba(10, 28, 46, 0.82);
  --panel-solid: #0a1c2e;
  --line: rgba(40, 90, 130, 0.55);
  --txt: #f3f7fc;
  --muted: #8fa6bd;
  --blue: #1a8cff;
  --blue-2: #0a74ff;
  --cyan: #2eb6ff;
  --green: #14d69a;
  --teal: #1ec8b0;
  --orange: #ff8a22;
  --purple: #9a4dff;
  --red: #ff3b57;
  --sidebar: 248px;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  --glow: 0 0 28px rgba(26, 140, 255, 0.35);
  --font: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(ellipse 80% 50% at 60% -10%, #123258 0%, transparent 55%),
    radial-gradient(circle at 100% 40%, rgba(20, 70, 120, 0.18), transparent 30%),
    var(--bg);
  color: var(--txt);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

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

/* ========== Sidebar ========== */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 12px 16px;
  background: linear-gradient(180deg, #071a2d 0%, #061320 55%, #050f1a 100%);
  border-right: 1px solid rgba(30, 70, 105, 0.7);
  overflow: auto;
  z-index: 30;
}

.brand {
  display: block;
  padding: 4px 6px 16px;
  border-bottom: 1px solid rgba(30, 70, 105, 0.55);
  margin-bottom: 8px;
}
.brand a {
  display: block;
  text-decoration: none;
  padding: 10px 10px 8px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7f9fc 0%, #e8eef5 100%);
  border: 1px solid rgba(180, 200, 220, 0.55);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}
.brand-logo {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}
.brand-mark { display: none; }
.brand b, .brand small { display: none; }

@media (max-width: 1100px) {
  .brand {
    padding: 4px 2px 10px;
  }
  .brand a {
    padding: 6px;
    border-radius: 10px;
  }
  .brand-logo {
    max-width: 52px;
    height: 40px;
    width: 52px;
    object-fit: cover;
    object-position: left center;
  }
}

.sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar nav a {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #c7d6e6;
  padding: 11px 12px;
  border-radius: 12px;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.sidebar nav a i {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  opacity: 0.9;
}
.sidebar nav a i svg { width: 18px; height: 18px; }
.sidebar nav a:hover { background: rgba(26, 140, 255, 0.08); color: #fff; }
.sidebar nav a.active {
  background: linear-gradient(100deg, #0a78ff 0%, #1d5fff 50%, #7a3cf0 100%);
  box-shadow: var(--glow);
  color: #fff;
  font-weight: 600;
}
.badge {
  margin-left: auto;
  background: var(--blue);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
}
.badge.red { background: var(--red); }

.promo {
  margin-top: 18px;
  border: 1px solid rgba(40, 95, 140, 0.55);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(160deg, #0b2238, #07111c);
  padding-bottom: 12px;
}
.promo-media {
  position: relative;
  height: 110px;
  overflow: hidden;
  background: radial-gradient(circle at 70% 30%, #1a4f8a, #07111c 70%);
}
.promo-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.promo-glow {
  position: absolute;
  inset: auto -20% -40% 20%;
  height: 80px;
  background: radial-gradient(circle, rgba(40, 150, 255, 0.45), transparent 70%);
  pointer-events: none;
}
.promo h3 {
  margin: 12px 14px 10px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
}
.promo-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px;
  border-top: 1px solid rgba(35, 70, 100, 0.6);
  padding-top: 10px;
}
.promo-stats strong { display: block; font-size: 16px; }
.promo-stats span { color: var(--muted); font-size: 10px; }
.reset-link {
  display: block;
  width: calc(100% - 24px);
  margin: 10px 12px 0;
  background: transparent;
  border: 1px solid rgba(40, 80, 120, 0.5);
  color: var(--muted);
  border-radius: 8px;
  padding: 7px;
  font-size: 11px;
}
.reset-link:hover { color: #fff; border-color: var(--blue); }

/* ========== Main ========== */
.main {
  padding: 12px 18px 28px;
  min-width: 0;
}

.top {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 4px;
}
.search {
  flex: 1;
  max-width: 620px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(14, 34, 54, 0.9);
  border: 1px solid rgba(50, 90, 125, 0.7);
  padding: 0 14px;
  height: 44px;
  border-radius: 14px;
  color: #a9bfd4;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 140, 255, 0.15);
}
.search input {
  flex: 1;
  background: none;
  border: 0;
  outline: 0;
  color: var(--txt);
}
.search kbd {
  background: #172f46;
  border: 1px solid #2a4864;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 11px;
  color: #bcd0e1;
}

.user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid rgba(45, 85, 120, 0.7);
  background: rgba(12, 30, 48, 0.8);
  display: grid;
  place-items: center;
  position: relative;
  font-size: 15px;
}
.icon-btn em {
  position: absolute;
  top: -4px;
  right: -4px;
  font-style: normal;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 3px;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  color: #102033;
  background: linear-gradient(135deg, #e8f1fa, #7d97b0);
  box-shadow: 0 0 0 2px rgba(80, 150, 220, 0.25);
}
.user-meta b { display: block; font-size: 13px; }
.user-meta small { color: var(--muted); font-weight: 500; }

/* Cards */
.card {
  background: linear-gradient(155deg, rgba(12, 32, 52, 0.95), rgba(7, 18, 30, 0.92));
  border: 1px solid rgba(35, 85, 125, 0.55);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
}
.panel { padding: 14px 16px; }
.panel h2 {
  font-size: 16px;
  margin: 0 0 12px;
  font-weight: 700;
}
.panel h2 small {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.panel-head h2 { margin: 0; }
.link {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
}
.chip {
  font-size: 11px;
  color: #9ec8ef;
  background: rgba(26, 140, 255, 0.12);
  border: 1px solid rgba(40, 120, 190, 0.4);
  border-radius: 999px;
  padding: 4px 10px;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(180deg, #ffffff, #e8f1ff);
  color: #0a55c8;
  box-shadow: 0 0 24px rgba(90, 160, 255, 0.55);
}
.btn.blue {
  background: linear-gradient(135deg, #0a8fff, #1458ed);
  color: #fff;
  box-shadow: 0 0 18px rgba(10, 140, 255, 0.4);
}
.btn.ghost {
  background: #0e2135;
  color: var(--txt);
  border: 1px solid #1d3c57;
}
.btn.danger-ghost {
  background: #0c2032;
  border: 1px solid #28455f;
  color: #fff;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  min-width: 240px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(145deg, #0d2a45, #071828);
  border: 1px solid #1f5f96;
  box-shadow: var(--glow), var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast b { display: block; margin-bottom: 4px; }

/* ========== Hero ========== */
.hero {
  position: relative;
  margin-top: 10px;
  min-height: 248px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(40, 90, 135, 0.55);
  background: #07182a;
  animation: fadeUp 0.45s ease both;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
  opacity: 0.92;
  filter: saturate(1.08) contrast(1.04);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 12, 22, 0.94) 0%, rgba(4, 14, 26, 0.72) 42%, rgba(4, 14, 26, 0.15) 62%, rgba(4, 14, 26, 0.25) 100%),
    linear-gradient(180deg, transparent 55%, rgba(4, 12, 22, 0.35));
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding: 28px 30px;
  max-width: 540px;
}
.eyebrow {
  margin: 0 0 8px;
  color: #7eb8ef;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: 36px;
  line-height: 1.02;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.hero h1 span { color: var(--cyan); }
.lead {
  margin: 10px 0 16px;
  font-size: 16px;
  color: #c9d9ea;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-badges span {
  font-size: 11px;
  color: #d5e7f8;
  background: rgba(10, 30, 50, 0.65);
  border: 1px solid rgba(70, 130, 180, 0.4);
  border-radius: 999px;
  padding: 6px 10px;
  backdrop-filter: blur(8px);
}

.device-card {
  position: absolute;
  z-index: 3;
  right: 18px;
  top: 16px;
  width: 320px;
  padding: 14px;
  border: 1px solid rgba(70, 130, 180, 0.45);
  border-radius: 16px;
  background: rgba(7, 22, 38, 0.82);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(30, 120, 255, 0.12);
  animation: fadeUp 0.55s 0.08s ease both;
}
.device-row { display: flex; gap: 12px; }
.phone-preview {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  background: linear-gradient(160deg, #1a2f45, #0a1420);
  border: 1px solid rgba(90, 140, 190, 0.35);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.phone-preview img { width: 56px; height: 80px; object-fit: contain; }
.device-info { flex: 1; min-width: 0; }
.device-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.device-top em {
  font-style: normal;
  color: var(--cyan);
  font-weight: 800;
  font-size: 13px;
}
.device-info > p {
  margin: 4px 0 8px;
  color: #b7c8d8;
  font-size: 13px;
}
.progress {
  height: 7px;
  background: #1a3148;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}
.progress i {
  display: block;
  height: 100%;
  width: 75%;
  border-radius: 10px;
  background: linear-gradient(90deg, #13a8ff, #6a5cff);
  box-shadow: 0 0 12px rgba(40, 160, 255, 0.6);
  animation: growBar 1.1s ease;
}
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 11px;
  color: #a9bdd0;
  display: grid;
  gap: 4px;
}
.checklist li::before {
  content: "[ ] ";
  color: #5d7a94;
}
.checklist li.done {
  color: #9fe8c8;
}
.checklist li.done::before {
  content: "[x] ";
  color: #3dffb0;
  font-weight: 800;
}
.mini-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.mini-thumbs span {
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(70, 120, 170, 0.4);
  background:
    linear-gradient(135deg, rgba(40, 120, 200, 0.35), rgba(10, 20, 35, 0.9)),
    radial-gradient(circle at 30% 30%, #3a7ab8, transparent 50%);
}
.mini-thumbs span:nth-child(2) { background: linear-gradient(145deg, #2a4060, #0c1522); }
.mini-thumbs span:nth-child(3) { background: linear-gradient(145deg, #1a5080, #0a1828); }
.mini-thumbs span:nth-child(4) { background: linear-gradient(145deg, #3a2a60, #120e22); }

/* ========== KPIs ========== */
.kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.kpi {
  padding: 13px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  animation: fadeUp 0.4s ease both;
}
.kpi:nth-child(2) { animation-delay: 0.04s; }
.kpi:nth-child(3) { animation-delay: 0.08s; }
.kpi:nth-child(4) { animation-delay: 0.12s; }
.kpi:nth-child(5) { animation-delay: 0.16s; }
.kpi .ico {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.25);
}
.kpi .ico i,
.kpi .ico svg {
  width: 20px;
  height: 20px;
  display: block;
  color: #fff;
}
.kpi .ico .ico-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
}
.quick a span i,
.quick button span i,
.quick a span svg,
.quick button span svg {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
}
.kpi .ico.blue { background: linear-gradient(145deg, #1a8cff, #0a5fd0); }
.kpi .ico.orange { background: linear-gradient(145deg, #ff9a3a, #e06a00); }
.kpi .ico.purple { background: linear-gradient(145deg, #a85cff, #6d2fd0); }
.kpi .ico.green { background: linear-gradient(145deg, #1ad89a, #0a9e6e); }
.kpi .ico.slate { background: linear-gradient(145deg, #3d5670, #243648); }
.kpi strong {
  font-size: 24px;
  display: block;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.kpi span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.kpi .up {
  display: inline-block;
  margin-top: 4px;
  color: #3dffb0;
  background: rgba(20, 214, 154, 0.12);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
}
.date-kpi b { display: block; font-size: 14px; }
.date-kpi strong { font-size: 20px; margin-top: 2px; }

/* ========== Workflow ========== */
.workflow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
  gap: 8px;
  margin-top: 12px;
  align-items: stretch;
}
.flow-chevron {
  display: grid;
  place-items: center;
  color: rgba(140, 170, 200, 0.55);
  font-size: 22px;
  font-weight: 300;
  align-self: center;
  text-shadow: 0 0 10px rgba(80, 150, 220, 0.25);
}
.flow {
  position: relative;
  overflow: hidden;
  min-height: 158px;
  border-radius: 16px;
  text-decoration: none;
  color: #fff;
  isolation: isolate;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.flow:hover { transform: translateY(-4px); }
.flow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  transform: scale(1.02);
  transition: transform 0.35s ease;
}
.flow:hover img { transform: scale(1.08); }
.flow-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.flow-top {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 14px 0;
}
.flow-ico {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.35);
}
.flow-top strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}
.flow-top small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: rgba(235, 245, 255, 0.92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}
.flow-top small b {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}
.flow-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), 0 0 18px rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, filter 0.2s ease;
}
.flow:hover .flow-btn { transform: scale(1.08); filter: brightness(1.08); }
.flow-btn.done { font-size: 16px; }

/* Theme colors */
.flow.blue {
  border: 1px solid rgba(40, 150, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(40, 150, 255, 0.25), 0 0 28px rgba(26, 140, 255, 0.28), var(--shadow);
}
.flow.blue .flow-shade {
  background:
    linear-gradient(135deg, rgba(8, 70, 160, 0.82) 0%, rgba(8, 40, 90, 0.35) 45%, rgba(4, 14, 28, 0.2) 100%),
    linear-gradient(180deg, rgba(4, 14, 28, 0.15), rgba(4, 14, 28, 0.55));
}
.flow.blue .flow-ico,
.flow.blue .flow-btn {
  background: linear-gradient(145deg, #2ea0ff, #0a6adf);
  box-shadow: 0 0 18px rgba(46, 160, 255, 0.55);
}

.flow.purple {
  border: 1px solid rgba(170, 90, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(154, 77, 255, 0.25), 0 0 28px rgba(154, 77, 255, 0.28), var(--shadow);
}
.flow.purple .flow-shade {
  background:
    linear-gradient(135deg, rgba(90, 30, 170, 0.82) 0%, rgba(55, 20, 110, 0.35) 45%, rgba(4, 14, 28, 0.2) 100%),
    linear-gradient(180deg, rgba(4, 14, 28, 0.15), rgba(4, 14, 28, 0.55));
}
.flow.purple .flow-ico,
.flow.purple .flow-btn {
  background: linear-gradient(145deg, #b25cff, #7a2fe0);
  box-shadow: 0 0 18px rgba(178, 92, 255, 0.55);
}

.flow.orange {
  border: 1px solid rgba(255, 150, 50, 0.9);
  box-shadow: 0 0 0 1px rgba(255, 138, 34, 0.25), 0 0 28px rgba(255, 138, 34, 0.28), var(--shadow);
}
.flow.orange .flow-shade {
  background:
    linear-gradient(135deg, rgba(170, 70, 10, 0.82) 0%, rgba(110, 45, 8, 0.35) 45%, rgba(4, 14, 28, 0.2) 100%),
    linear-gradient(180deg, rgba(4, 14, 28, 0.15), rgba(4, 14, 28, 0.55));
}
.flow.orange .flow-ico,
.flow.orange .flow-btn {
  background: linear-gradient(145deg, #ff9a3a, #e06a00);
  box-shadow: 0 0 18px rgba(255, 154, 58, 0.55);
}

.flow.teal {
  border: 1px solid rgba(30, 210, 160, 0.9);
  box-shadow: 0 0 0 1px rgba(30, 200, 176, 0.25), 0 0 28px rgba(30, 200, 176, 0.28), var(--shadow);
}
.flow.teal .flow-shade {
  background:
    linear-gradient(135deg, rgba(10, 120, 95, 0.82) 0%, rgba(8, 70, 60, 0.35) 45%, rgba(4, 14, 28, 0.2) 100%),
    linear-gradient(180deg, rgba(4, 14, 28, 0.15), rgba(4, 14, 28, 0.55));
}
.flow.teal .flow-ico,
.flow.teal .flow-btn {
  background: linear-gradient(145deg, #1ad8a8, #0c9e78);
  box-shadow: 0 0 18px rgba(26, 216, 168, 0.55);
}

.flow.green {
  border: 1px solid rgba(70, 230, 140, 0.9);
  box-shadow: 0 0 0 1px rgba(20, 214, 154, 0.25), 0 0 28px rgba(20, 214, 154, 0.28), var(--shadow);
}
.flow.green .flow-shade {
  background:
    linear-gradient(135deg, rgba(20, 130, 70, 0.78) 0%, rgba(10, 70, 45, 0.32) 45%, rgba(4, 14, 28, 0.2) 100%),
    linear-gradient(180deg, rgba(4, 14, 28, 0.12), rgba(4, 14, 28, 0.5));
}
.flow.green .flow-ico {
  background: linear-gradient(145deg, #2de08a, #12a85a);
  box-shadow: 0 0 18px rgba(45, 224, 138, 0.5);
}
.flow.green .flow-btn {
  background: linear-gradient(145deg, #2ea0ff, #0a6adf);
  box-shadow: 0 0 18px rgba(46, 160, 255, 0.55);
}

/* ========== Content grid ========== */
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.72fr);
  gap: 12px;
  margin-top: 12px;
  align-items: start;
}
.side-stack { display: grid; gap: 12px; }

.filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.pill {
  padding: 7px 12px;
  background: rgba(13, 36, 58, 0.9);
  border: 1px solid rgba(40, 80, 115, 0.7);
  border-radius: 999px;
  color: #d5e4f1;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.pill.on {
  background: linear-gradient(135deg, #0a7fff, #1a5cf0);
  border-color: transparent;
  box-shadow: 0 0 16px rgba(20, 120, 255, 0.35);
}

.table-wrap { overflow: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
th, td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(30, 60, 90, 0.7);
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}
th {
  color: #8fa6bc;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: rgba(26, 140, 255, 0.06); }

.person, .device-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.person-av, .device-ico {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  background: linear-gradient(145deg, #2a4d6e, #173248);
  color: #d7e8f8;
  flex-shrink: 0;
}
.device-ico {
  border-radius: 8px;
  font-size: 14px;
  background: linear-gradient(145deg, #12324f, #0a1c2e);
  border: 1px solid rgba(50, 100, 145, 0.5);
}

.status {
  padding: 4px 9px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 11px;
  display: inline-block;
}
.s-orange { background: #9c4b06; color: #ffe0bc; }
.s-blue { background: #075eb8; color: #d4ebff; }
.s-green { background: #087c59; color: #c8ffe8; }
.s-purple { background: #4e2fae; color: #e6d9ff; }
.s-gray { background: #31475e; color: #d5e2ef; }

.status-select {
  height: 30px;
  margin: 0;
  min-width: 132px;
  background: #10253a;
  border: 1px solid #29445e;
  border-radius: 8px;
  color: white;
  padding: 0 8px;
  outline: 0;
}

.quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.quick a, .quick button {
  min-height: 72px;
  color: #fff;
  border: 0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding: 8px 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  transition: transform 0.15s, filter 0.15s;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.quick a span, .quick button span { font-size: 18px; }
.quick a:hover, .quick button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.quick a:nth-child(1), .quick button:nth-child(1) { background: linear-gradient(145deg, #1a8cff, #0a5fd0); }
.quick a:nth-child(2), .quick button:nth-child(2) { background: linear-gradient(145deg, #17c389, #0a8f62); }
.quick a:nth-child(3), .quick button:nth-child(3) { background: linear-gradient(145deg, #ff9440, #d96200); }
.quick a:nth-child(4), .quick button:nth-child(4) { background: linear-gradient(145deg, #8b4dff, #5a22c8); }
.quick a:nth-child(5), .quick button:nth-child(5) { background: linear-gradient(145deg, #ff4d72, #c81e45); }
.quick a:nth-child(6), .quick button:nth-child(6) { background: linear-gradient(145deg, #4a6782, #2a4055); }

.customer {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(30, 60, 90, 0.65);
  align-items: center;
}
.customer:last-child { border-bottom: 0; }
.rank {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #2a4d6e, #173248);
  font-size: 11px;
  font-weight: 700;
}
.customer small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.stock {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
  font-size: 12px;
}
.stock:first-child { margin-top: 0; }
.bar {
  height: 8px;
  background: #1a3148;
  border-radius: 8px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(40, 160, 255, 0.35);
}

/* ========== Bottom charts ========== */
.bottom {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 12px;
  margin-top: 12px;
}
.chart {
  height: 190px;
  position: relative;
  background: linear-gradient(180deg, transparent, rgba(11, 45, 90, 0.22));
  border-radius: 12px;
  overflow: hidden;
}
.chart svg { width: 100%; height: 100%; }
.chart-tip {
  position: absolute;
  top: 12px;
  right: 18px;
  background: rgba(8, 24, 40, 0.9);
  border: 1px solid rgba(50, 120, 190, 0.5);
  color: #9fd2ff;
  font-weight: 700;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 8px;
  box-shadow: 0 0 16px rgba(40, 140, 255, 0.25);
}

.donut-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 8px 4px;
}
.donut {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  margin: 0;
  position: relative;
  box-shadow: 0 0 30px rgba(26, 140, 255, 0.15);
}
.donut::after {
  content: attr(data-label);
  white-space: pre;
  position: absolute;
  inset: 28px;
  background: #071522;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.2;
  border: 1px solid rgba(40, 80, 120, 0.4);
}
.donut-legend {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.donut-legend span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.donut-legend b { color: #fff; }
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 7px;
  box-shadow: 0 0 8px currentColor;
}

.empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
}

/* Form pages reuse */
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.fields label, .field-label {
  font-size: 12px;
  color: #c9d5df;
  display: block;
}
.fields .wide { grid-column: 1 / -1; }
.fields input,
.fields select,
.field-control,
textarea {
  width: 100%;
  height: 40px;
  margin-top: 6px;
  background: #10253a;
  border: 1px solid #29445e;
  border-radius: 8px;
  color: white;
  padding: 0 12px;
  outline: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea {
  height: auto;
  min-height: 80px;
  padding: 10px 12px;
  resize: vertical;
}
.fields input:focus,
.fields select:focus,
.field-control:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 140, 255, 0.12);
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 14px;
}
.seg button {
  border: 1px solid #1e3a55;
  background: #0c1c2e;
  color: #c7d5e2;
  padding: 10px 16px;
}
.seg button:first-child { border-radius: 8px 0 0 8px; }
.seg button:last-child { border-radius: 0 8px 8px 0; }
.seg button.selected,
.choice.selected {
  background: linear-gradient(135deg, #068dff, #154de9);
  color: #fff;
  border-color: #149bff;
  box-shadow: 0 0 18px rgba(7, 140, 255, 0.35);
}

.choice-grid { display: grid; gap: 8px; }
.choice {
  border: 1px solid #24425d;
  background: #0e2133;
  color: #e1ebf3;
  border-radius: 10px;
  padding: 12px;
  text-align: left;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  font-size: 13px;
  color: #d5e2ee;
}
.check input { accent-color: var(--blue); }

.page-hero {
  min-height: 96px;
  height: auto;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  margin-top: 12px;
  background: linear-gradient(90deg, #07111c 0%, #07111c 45%, #0b2440 75%, #07111c);
  border-radius: 16px;
  border: 1px solid #183c5d;
}
.page-hero > div:first-child {
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 2;
}
.page-hero h1 { font-size: 30px; margin: 0 0 4px; font-weight: 800; }
.page-hero p { margin: 0; color: #c4d2df; line-height: 1.35; }
.back-btn {
  width: 48px;
  height: 48px;
  border: 1px solid #1d3c57;
  border-radius: 10px;
  background: #0e2135;
  color: white;
  font-size: 22px;
  display: grid;
  place-items: center;
}

.steps {
  height: 84px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  margin: 8px 0 4px;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #b7c6d4;
  min-width: 120px;
}
.step b {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #12283d;
  border: 1px solid #284b68;
  font-size: 16px;
}
.step.on b,
.step.done b {
  background: linear-gradient(135deg, #0a8fff, #1051f4);
  box-shadow: 0 0 20px rgba(22, 137, 255, 0.55);
  border-color: transparent;
}
.step.on span, .step.done span { color: white; font-weight: 600; }
.step.done b { background: linear-gradient(135deg, #11d58b, #0a8fff); }
.step-line {
  height: 2px;
  flex: 1;
  background: linear-gradient(90deg, #0c8cff, #24445f);
  opacity: 0.7;
}

.wizard-pane { display: none; animation: fadeUp 0.35s ease both; }
.wizard-pane.active { display: block; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: 1.25fr 1fr; }
.form-grid.three { grid-template-columns: 1.35fr 0.8fr 0.85fr; }

.history {
  background: #0c1d2e;
  border: 1px solid #1d3852;
  border-radius: 10px;
  padding: 12px;
}
.history .title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
}
.history a { color: #29a4ff; font-size: 11px; }
.history > b, .history > small { display: block; }
.history > small { color: #7891a8; margin: 4px 0 12px; }
.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid #173049;
  font-size: 12px;
}
.history-item span { flex: 1; }
.history-item small { display: block; color: #7891a8; }
.history-item em {
  font-style: normal;
  background: #087b50;
  color: #79ffd0;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 10px;
}

.problems {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.problems button {
  min-height: 78px;
  border: 1px solid #24425d;
  background: #0e2133;
  color: #e1ebf3;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.problems button span { font-size: 22px; }
.problems button.selected {
  border-color: #0799ff;
  background: linear-gradient(150deg, #0d3157, #0c1f33);
  box-shadow: 0 0 17px rgba(0, 140, 255, 0.35);
}

.condition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.condition-grid button {
  border-radius: 8px;
  padding: 10px 8px;
  font-size: 12px;
  border: 1px solid #1e3a55;
  background: #0c1c2e;
  color: #c7d5e2;
}
.condition-grid button.selected {
  background: linear-gradient(135deg, #068dff, #154de9);
  color: #fff;
  border-color: #149bff;
}
.condition-grid .danger {
  background: #381d2a;
  border-color: #6c2a42;
  color: #ffbdcb;
}

.service-list { display: grid; gap: 8px; }
.service-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #1d3852;
  border-radius: 10px;
  background: #0c1d2e;
}
.service-item input[type="checkbox"] { accent-color: var(--blue); width: 16px; height: 16px; }
.service-item .price { color: #9fd0ff; font-weight: 700; }

.summary { display: grid; gap: 10px; }
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #16334d;
}
.summary-row span:last-child { font-weight: 600; text-align: right; }
.summary-total {
  margin-top: 8px;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0d3157, #0c1f33);
  border: 1px solid #1f5f96;
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 800;
}

.form-footer {
  height: 70px;
  margin-top: 12px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #18354f;
  border-radius: 13px;
  background: #081624;
}
.form-footer > div { display: flex; gap: 8px; }

.suggest { position: relative; }
.suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  background: #0d2238;
  border: 1px solid #2a4f72;
  border-radius: 10px;
  max-height: 220px;
  overflow: auto;
  display: none;
  box-shadow: var(--shadow);
}
.suggest-list.open { display: block; }
.suggest-list button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: #e8f1fa;
  padding: 10px 12px;
  border-bottom: 1px solid #173049;
}
.suggest-list button:hover { background: rgba(22, 139, 255, 0.12); }
.suggest-list small { display: block; color: var(--muted); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes growBar {
  from { width: 0; }
}

@media (max-width: 1200px) {
  .content-grid, .bottom, .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
  .device-card { display: none; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .workflow {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .flow-chevron { display: none; }
  .flow { min-height: 150px; }
}
@media (max-width: 1100px) {
  .app { grid-template-columns: 78px 1fr; }
  .brand div, .sidebar nav a span, .promo { display: none; }
  .brand-logo { display: block; }
  .sidebar nav a { justify-content: center; padding: 12px; }
  .sidebar nav a .badge { display: none; }
}
@media (max-width: 700px) {
  .app { display: block; }
  .sidebar { height: auto; position: relative; }
  .sidebar nav { display: flex; flex-direction: row; overflow: auto; }
  .brand div { display: block; }
  .brand { padding: 6px 12px 8px; }
  .brand a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 6px 10px;
  }
  .brand-logo {
    width: 188px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
  }
  .main { padding: 10px; }
  .hero h1, .page-hero h1 { font-size: 26px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .workflow { grid-template-columns: 1fr; }
  .user-meta { display: none; }
  .form-footer { height: auto; flex-direction: column; gap: 10px; align-items: stretch; }
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
  .problems { grid-template-columns: repeat(2, 1fr); }
}

/* ========== Auftr�ge page ========== */
.page-hero .btn.primary { position: relative; z-index: 2; margin-right: 8px; }
.orders-kpis {
  grid-template-columns: repeat(6, 1fr);
}
.orders-kpis .filter-kpi {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}
.orders-kpis .filter-kpi:hover { transform: translateY(-2px); }
.orders-kpis .filter-kpi.on {
  border-color: rgba(26, 140, 255, 0.8);
  box-shadow: 0 0 22px rgba(26, 140, 255, 0.28), var(--shadow);
}
.kpi .ico.teal { background: linear-gradient(145deg, #1ec8b0, #0e8f7d); }

.orders-layout { grid-template-columns: minmax(0, 1.85fr) minmax(280px, 0.7fr); }
.toolbar { display: flex; gap: 8px; align-items: center; }
.sort-select {
  height: 36px !important;
  margin: 0 !important;
  min-width: 170px;
  background: #10253a;
  border: 1px solid #29445e;
  border-radius: 10px;
  color: #fff;
  padding: 0 10px;
}

.orders-table tbody tr { cursor: pointer; }
.orders-table tbody tr.selected {
  background: rgba(26, 140, 255, 0.12);
  box-shadow: inset 3px 0 0 var(--blue);
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-action {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(45, 85, 120, 0.7);
  background: rgba(12, 30, 48, 0.85);
  display: grid;
  place-items: center;
  font-size: 13px;
}
.icon-action:hover { border-color: var(--blue); }
.icon-action.danger:hover { border-color: var(--red); color: #ffb3bf; }

.status-bars { display: grid; gap: 10px; }
.status-bar-row {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  color: inherit;
  width: 100%;
}
.status-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 12px;
  color: var(--muted);
}
.status-bar-label b { color: #fff; }

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.detail-head > div { display: flex; align-items: center; gap: 8px; }
.detail-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(8, 24, 40, 0.8);
  border: 1px solid rgba(40, 80, 120, 0.45);
  color: #c9d8e8;
  font-size: 13px;
  line-height: 1.4;
}
.detail-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.detail-actions .status-select { width: 100%; min-width: 0; height: 38px; }

@media (max-width: 1200px) {
  .orders-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .orders-kpis { grid-template-columns: repeat(2, 1fr); }
  .page-hero { height: auto; padding: 14px; flex-wrap: wrap; gap: 12px; }
}

/* ========== Kunden page ========== */
.customers-kpis { grid-template-columns: repeat(4, 1fr); }
.customer-form .form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}
.tag-open {
  display: inline-block;
  margin-top: 3px;
  font-size: 10px;
  color: #ffd7b0;
  background: rgba(255, 138, 34, 0.18);
  border: 1px solid rgba(255, 138, 34, 0.35);
  border-radius: 999px;
  padding: 1px 7px;
}
.detail-sub {
  margin: 16px 0 8px;
  font-size: 13px;
  color: #c9d8e8;
}
.history-list { display: grid; gap: 0; }
.history-list .history-item {
  text-decoration: none;
  color: inherit;
}
.history-list .history-item em {
  font-style: normal;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
}
.row-actions a.icon-action {
  text-decoration: none;
  color: inherit;
}
@media (max-width: 1200px) {
  .customers-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* Messages */
.msg-list { display: grid; gap: 8px; }
.msg-item {
  text-align: left;
  border: 1px solid rgba(40, 80, 120, 0.55);
  background: rgba(10, 28, 46, 0.75);
  border-radius: 12px;
  padding: 12px;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.msg-item:hover, .msg-item.on {
  border-color: rgba(26, 140, 255, 0.7);
  background: rgba(20, 50, 80, 0.55);
}
.msg-item.unread { box-shadow: inset 3px 0 0 var(--blue); }
.msg-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.msg-top span { color: var(--muted); font-size: 11px; }
.msg-sub { font-weight: 600; margin-bottom: 4px; }
.msg-item small { color: var(--muted); }
.kpi .ico.teal { background: linear-gradient(145deg, #1ec8b0, #0e8f7d); }

/* ========== Phone ========== */
@media (max-width: 700px) {
  .app, .main, .content-grid, .bottom, .orders-layout, .side-stack,
  .card, .panel, .kpis, .workflow, .page-hero, .hero {
    min-width: 0;
    max-width: 100%;
  }
  .main { width: 100%; padding: 8px 10px 24px; }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: auto;
    overflow: visible;
    padding: 8px 10px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(30, 70, 105, 0.7);
    background: linear-gradient(180deg, #071a2d 0%, #061320 100%);
  }
  .sidebar nav {
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(90, 150, 200, 0.45) transparent;
    padding: 2px 2px 8px;
    margin: 0;
  }
  .sidebar nav a {
    position: relative;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    min-width: 68px;
    max-width: 84px;
    min-height: 62px;
    padding: 8px 6px 7px;
    border-radius: 12px;
  }
  .sidebar nav a span {
    display: block;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }
  .sidebar nav a .badge {
    display: grid;
    place-items: center;
    position: absolute;
    top: 3px;
    right: 4px;
    margin: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 9px;
  }

  .top { gap: 8px; margin-bottom: 8px; }
  .search {
    flex: 1;
    min-width: 0;
    max-width: none;
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
  }
  .search input { min-width: 0; font-size: 16px; }
  .search kbd, .user-meta, .user-actions, .icon-btn { display: none; }
  .user { gap: 0; margin-left: 0; }
  .avatar { width: 36px; height: 36px; }

  .hero { min-height: 0; margin-top: 2px; border-radius: 16px; }
  .hero-copy { padding: 16px 14px 14px; max-width: none; }
  .hero h1 { font-size: 24px; }
  .lead { font-size: 14px; margin: 8px 0 12px; }
  .hero-actions { gap: 10px; }
  .hero-badges span { font-size: 10px; padding: 5px 8px; }

  .kpis, .orders-kpis, .customers-kpis {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
  }
  .kpi { padding: 10px; gap: 8px; align-items: flex-start; }
  .kpi > div { min-width: 0; }
  .kpi .ico { width: 36px; height: 36px; border-radius: 10px; }
  .kpi strong, .date-kpi strong { font-size: 18px; }
  .kpi span, .date-kpi b { font-size: 11px; white-space: normal; }

  .workflow {
    display: flex;
    grid-template-columns: none;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    padding-bottom: 4px;
  }
  .flow {
    flex: 0 0 158px;
    min-height: 118px;
    scroll-snap-align: start;
  }
  .flow-top { padding: 10px 10px 0; gap: 8px; }
  .flow-ico { width: 30px; height: 30px; }
  .flow-top strong { font-size: 13px; }
  .flow-top small { font-size: 11px; }
  .flow-btn { width: 28px; height: 28px; right: 8px; bottom: 8px; font-size: 14px; }

  .page-hero {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    margin-top: 8px;
    padding: 12px;
    gap: 10px;
  }
  .page-hero > div:first-child { gap: 10px; min-width: 0; align-items: flex-start; }
  .page-hero h1 { font-size: 22px; }
  .page-hero p { font-size: 13px; }
  .page-hero p br { display: none; }
  .back-btn { width: 40px; height: 40px; flex-shrink: 0; font-size: 18px; }
  .page-hero > .btn,
  .page-hero .btn.primary { width: 100%; justify-content: center; margin: 0; }

  .panel { padding: 12px; }
  .panel-head { flex-wrap: wrap; align-items: flex-start; gap: 8px; }
  .toolbar { flex-wrap: wrap; width: 100%; }
  .sort-select { width: 100%; min-width: 0; }

  .table-wrap { max-width: 100%; overflow: visible; }
  .table-wrap table,
  .table-wrap tbody { display: block; width: 100%; min-width: 0; }
  .table-wrap thead { display: none; }
  .table-wrap tbody { display: grid; gap: 8px; }
  .table-wrap tr {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid rgba(40, 90, 130, 0.5);
    border-radius: 14px;
    background: rgba(6, 18, 32, 0.55);
  }
  .table-wrap td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    white-space: normal;
    border: 0;
    padding: 0;
    text-align: right;
    min-width: 0;
  }
  .table-wrap td::before {
    content: attr(data-label);
    color: #8fa6bd;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: left;
    flex: 0 0 34%;
  }
  .table-wrap td[data-label=""]::before,
  .table-wrap td:not([data-label])::before { content: none; flex-basis: 0; }
  .table-wrap td:has(> input[type="checkbox"]) { display: none; }
  .table-wrap .person,
  .table-wrap .device-cell { min-width: 0; justify-content: flex-end; }
  .table-wrap .status-select { width: 100%; min-width: 0; height: 36px; }
  .table-wrap .row-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .status-select { min-width: 0; }

  .quick { grid-template-columns: 1fr 1fr; }
  .quick a, .quick button { min-height: 64px; }

  .fields { grid-template-columns: 1fr; }
  .fields input, .fields select, .field-control, textarea, .sort-select { font-size: 16px; }
  .seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .seg button,
  .seg button:first-child,
  .seg button:last-child {
    border-radius: 8px;
    padding: 10px 8px;
    font-size: 12px;
  }
  .steps {
    height: auto;
    padding: 6px 0 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .step { min-width: 68px; flex: 1; gap: 4px; }
  .step b { width: 32px; height: 32px; font-size: 13px; }
  .step span { font-size: 10px; text-align: center; line-height: 1.15; }
  .step-line { min-width: 6px; align-self: center; margin-bottom: 14px; }
  .problems { grid-template-columns: 1fr 1fr; }
  .service-item { grid-template-columns: auto 1fr auto; gap: 8px; }
  .form-footer {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
  }
  .form-footer > div, .form-actions { flex-direction: column; }
  .form-footer .btn, .form-actions .btn { width: 100%; justify-content: center; }

  .chart { height: 160px; }
  .donut { width: 112px; height: 112px; }
  .donut::after { inset: 24px; font-size: 12px; }

  .toast {
    left: 10px;
    right: 10px;
    bottom: 10px;
    min-width: 0;
    max-width: none;
  }
}
