@import url('https://rsms.me/inter/inter.css');
/* Crooked CRM v8 unified stylesheet. Single CSS entry. */
:root {
  --page: #d9d9df;
  --shell: #f0f0f0;
  --surface: #ffffff;
  --surface-soft: #f7f7f5;
  --surface-green: #11884f;
  --surface-green-2: #0f7c49;
  --text: #101114;
  --text-soft: #4d535c;
  --muted: #8b9098;
  --border: rgba(20, 25, 30, 0.08);
  --border-strong: rgba(20, 25, 30, 0.14);
  --primary: #11884f;
  --primary-rgb: 17, 136, 79;
  --primary-dark: #0d6f41;
  --primary-soft: #e7f5ee;
  --danger-soft: rgba(220, 38, 38, 0.12);
  --accent-strong: #047857;
  --panel-2: var(--surface-soft);
  --panel-solid: var(--surface);
  --success: #11884f;
  --warning: #d97706;
  --danger: #dc2626;
  --danger-rgb: 220, 38, 38;
  --info: #2563eb;
  --radius-sm: 14px;
  --radius: 24px;
  --radius-lg: 32px;
  --radius-xl: 44px;
  --shadow: 0 24px 70px rgba(20, 25, 30, 0.08);
  --shadow-soft: 0 12px 30px rgba(20, 25, 30, 0.06);
  --ring: 0 0 0 4px rgba(var(--primary-rgb), 0.12);
  --font-ui: InterVariable, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}



* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}


html {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  font-family: var(--font-ui);
  font-optical-sizing: auto;
  font-feature-settings: "cv02" 1, "cv03" 1, "cv04" 1, "cv11" 1;
  font-variant-numeric: tabular-nums;
  background:
    radial-gradient(circle at 18% 8%, rgba(255,255,255,.45), transparent 22%),
    radial-gradient(circle at 84% 20%, rgba(var(--primary-rgb),.08), transparent 24%),
    var(--page);
  color: var(--text);
}

button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
svg { width: 1.2em; height: 1.2em; display: block; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input:focus, select:focus, textarea:focus { border-color: rgba(var(--primary-rgb), .35); box-shadow: var(--ring); }
textarea { resize: vertical; min-height: 92px; }
label, .field-label { color: var(--text-soft); font-size: 13px; font-weight: 650; }

table { width: 100%; min-width: 780px; border-collapse: separate; border-spacing: 0; font-size: 14px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; background: transparent; }
tr:last-child td { border-bottom: 0; }
code { background: rgba(var(--primary-rgb), .08); color: var(--primary); padding: 2px 6px; border-radius: 8px; }



.app {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  padding: 0;
  display: grid;
  place-items: stretch;
  overflow: hidden;
}

.glass-frame {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  padding: 24px;
  border-radius: 0;
  background: rgba(242, 242, 240, .96);
  box-shadow: none;
  backdrop-filter: blur(18px);
  border: 0;
  overflow: hidden;
}

.app-header {
  height: 78px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,.78);
}

.workspace {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 24px;
  padding-top: 34px;
  height: calc(100dvh - 136px);
  min-height: 0;
}

.side-rail {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  height: 100%;
  min-height: 0;
  overflow: auto;
  scrollbar-width: none;
}
.side-rail::-webkit-scrollbar { display: none; }

.rail-nav {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px;
  border-radius: 30px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,.75);
}

.rail-bottom {
  display: grid;
  gap: 10px;
  justify-content: center;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,.75);
  margin-top: auto;
}

.main {
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 4px 0 28px;
}

.page-actions { display: flex; align-items: center; gap: 12px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.section { display: none; }
.section.active {
  display: block;
  min-height: calc(100dvh - 240px);
}

#dashboard .grid-4 { grid-template-columns: 1.1fr repeat(3, minmax(0, .9fr)); }
#dashboard .grid-2 { grid-template-columns: 1.25fr .9fr; }


.app.rail-collapsed .workspace {
  grid-template-columns: 86px minmax(0, 1fr);
}

.app.rail-collapsed .side-rail,
.app.rail-collapsed .rail-nav,
.app.rail-collapsed .rail-global-nav {
  overflow: visible;
}

.app.rail-collapsed .rail-nav,
.app.rail-collapsed .rail-global-nav {
  justify-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 999px;
}

.app.rail-collapsed .rail-heading {
  display: none;
}

@media (max-width: 1180px) {
  .app.rail-collapsed .workspace {
    grid-template-columns: 1fr;
  }
}



.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #08e08b 0%, #08c978 54%, #078b5a 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(3, 166, 99, .26), inset 0 1px 0 rgba(255,255,255,.28);
  overflow: hidden;
}
.brand-logo svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 5.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.08));
}
.brand-logo .cc-mark-bar {
  fill: currentColor;
  stroke: none;
}
.brand-title { font-weight: 900; line-height: 1; letter-spacing: -.03em; color: var(--primary); }
.brand-subtitle { color: var(--muted); font-size: 12px; margin-top: 4px; white-space: nowrap; }

.top-nav { justify-self: center; display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 999px; background: #f4f4f2; box-shadow: inset 0 0 0 1px rgba(20,25,30,.04); }
.top-nav-btn {
  background: transparent; color: var(--text-soft); border-radius: 999px; padding: 12px 18px; font-weight: 700; min-width: auto; width: auto;
}
.top-nav-btn .nav-icon { display: none; }
.top-nav-btn.active { background: #fff; color: var(--text); box-shadow: 0 8px 22px rgba(20,25,30,.08); }

.header-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.circle-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  padding: 0;
  background: transparent;
  color: var(--text-soft);
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.rail-heading {
  padding: 10px 12px 12px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--border);
}
.rail-heading-title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--text);
}
.rail-heading-subtitle {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

.rail-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 11px 12px;
  background: transparent;
  color: var(--text-soft);
  text-align: left;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.circle-btn:hover,
.rail-btn:hover { background: var(--primary-soft); color: var(--primary); transform: translateY(-1px); }
.rail-btn.active,
.circle-btn.active { background: var(--primary); color: #fff; box-shadow: 0 16px 28px rgba(var(--primary-rgb),.22); }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.nav-label { white-space: nowrap; font-weight: 800; font-size: 13px; }
.circle-btn .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.user-chip { display: flex; align-items: center; gap: 8px; max-width: 210px; padding: 6px 10px 6px 6px; border-radius: 999px; background: #f5f5f3; color: var(--text-soft); }
.user-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #111; color: #fff; flex: 0 0 auto; }
.user-avatar svg { width: 20px; height: 20px; }
.user-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; max-width: 140px; }

.eyebrow { color: var(--primary); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 6px; }
.page-title { margin: 0; font-size: clamp(32px, 4vw, 48px); font-weight: 900; letter-spacing: -.06em; }
.page-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.card {
  background: rgba(255,255,255,.92); border: 1px solid rgba(255,255,255,.8); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); padding: 22px; overflow: hidden;
}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-title { font-size: 16px; font-weight: 900; letter-spacing: -.02em; margin: 0; }

.stat-card { min-height: 150px; display: grid; align-content: space-between; position: relative; }
.stat-card::after { content: ''; position: absolute; right: -22px; bottom: -34px; width: 130px; height: 130px; border-radius: 50%; background: rgba(var(--primary-rgb),.08); }
.stat-label { color: var(--text-soft); font-size: 13px; font-weight: 800; position: relative; z-index: 1; }
.stat-value { font-size: clamp(25px, 2.7vw, 36px); font-weight: 900; letter-spacing: -.06em; position: relative; z-index: 1; }
.stat-hint { color: var(--muted); font-size: 12px; position: relative; z-index: 1; }
.stat-card:first-child { background: var(--primary); color: #fff; min-height: 190px; }
.stat-card:first-child .stat-label,
.stat-card:first-child .stat-hint { color: rgba(255,255,255,.75); }
.stat-card:first-child::after { background: rgba(255,255,255,.13); }

.btn-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border-radius: 999px; font-weight: 800; color: #fff; background: var(--primary); transition: .18s ease; box-shadow: 0 10px 20px rgba(var(--primary-rgb),.16); }
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn.secondary { background: #fff; color: var(--text); box-shadow: 0 10px 20px rgba(20,25,30,.06); border: 1px solid var(--border); }
.btn.secondary:hover { background: #f7f7f5; }
.btn.success { background: var(--success); }
.btn.warning { background: var(--warning); }
.btn.danger { background: var(--danger); box-shadow: 0 10px 20px rgba(220,38,38,.12); }
.btn.small { padding: 9px 12px; font-size: 13px; }
.btn-icon { display: inline-flex; }
.btn-icon svg { width: 17px; height: 17px; }

.table-wrap { overflow: auto; border: 0; border-radius: var(--radius); background: #fff; }
.table-wrap table tbody tr { transition: background .16s ease; }
.table-wrap table tbody tr:hover { background: #f7fbf8; }
.badge { display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 999px; font-size: 12px; font-weight: 900; background: #eef0ef; color: var(--text-soft); }
.badge.success { background: #dbf6e9; color: #087a45; }
.badge.warning { background: #fff4db; color: #a16207; }
.badge.danger { background: #ffe5e5; color: #b91c1c; }
.badge.info { background: #e3edff; color: #1d4ed8; }
.badge.neutral { background: #eef0ef; color: #475569; }

.muted { color: var(--muted); }
.empty { padding: 30px; text-align: center; color: var(--muted); background: rgba(255,255,255,.55); border-radius: var(--radius); }
.alert { padding: 14px 16px; border-radius: 18px; margin-bottom: 18px; display: none; white-space: pre-wrap; }
.alert.show { display: block; }
.alert.info { background: #dbeafe; color: #1e3a8a; }
.alert.success { background: #dcfce7; color: #14532d; }
.alert.error { background: #fee2e2; color: #7f1d1d; }

.config-warning { border: 1px dashed rgba(217,119,6,.35); background: #fffbeb; color: #92400e; border-radius: 20px; padding: 14px; margin-bottom: 16px; }
.product-row { display: grid; grid-template-columns: 1fr 1fr 90px 150px 120px 46px; gap: 10px; margin-bottom: 10px; }
.deal-products-totals { margin: 12px 0 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface-soft); }
input[readonly], textarea[readonly] { cursor: not-allowed; color: var(--text-soft); background: var(--surface-soft); }
.kpi-line { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.mini-kpi { padding: 14px; border-radius: 20px; background: var(--surface-soft); border: 1px solid var(--border); }
.mini-kpi-label { color: var(--muted); font-size: 12px; font-weight: 750; }
.mini-kpi-value { margin-top: 5px; font-weight: 900; font-size: 18px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(12,14,17,.48); backdrop-filter: blur(10px); }
.modal-backdrop.show { display: flex; }
.modal { width: min(1040px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 34px; box-shadow: 0 32px 90px rgba(0,0,0,.22); padding: 24px; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.modal-title { margin: 0; font-size: 24px; letter-spacing: -.04em; }

.stat-head { display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; }
.stat-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #f4f5f3; color: var(--primary); }
.stat-icon svg { width: 18px; height: 18px; }
.stat-card--primary .stat-icon { background: rgba(255,255,255,.16); color: #fff; }
.mini-bars { display: flex; align-items: end; gap: 8px; height: 78px; margin-top: 12px; opacity: .8; position: relative; z-index: 1; }
.mini-bars span { width: 18px; border-radius: 999px; background: repeating-linear-gradient(135deg, rgba(var(--primary-rgb),.20) 0 3px, rgba(var(--primary-rgb),.12) 3px 6px); }
.mini-bars span.active { background: var(--primary); }
.wallet-lines { display: grid; gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.wallet-lines span { display: block; height: 8px; border-radius: 999px; background: rgba(255,255,255,.18); }
.wallet-lines span:nth-child(2) { width: 70%; }
.wallet-lines span:nth-child(3) { width: 42%; }


.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.dashboard-stat-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(20, 25, 30, .07);
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 34px rgba(20, 25, 30, .07);
  padding: 22px;
  color: var(--text);
}

.dashboard-stat-card--hero {
  grid-column: span 5;
  min-height: 276px;
  padding: 26px 26px 16px;
  color: #fff;
  background:
    radial-gradient(circle at 94% 18%, rgba(255,255,255,.18), transparent 0 32px, transparent 34px),
    linear-gradient(135deg, #078049 0%, #066d3d 48%, #0c7a48 100%);
  box-shadow: 0 16px 40px rgba(6, 109, 61, .20);
}

.dashboard-stat-card--finance {
  grid-column: span 4;
  min-height: 276px;
  display: grid;
  align-content: space-between;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.91));
}

.dashboard-stat-side-stack {
  grid-column: span 3;
  display: grid;
  gap: 18px;
  min-width: 0;
}

.dashboard-stat-card--side {
  min-height: 129px;
  padding: 20px;
}

.dashboard-stat-card--metric {
  grid-column: span 3;
  min-height: 205px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
}

.dashboard-stat-card-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dashboard-stat-card-head--hero {
  color: rgba(255,255,255,.94);
}

.dashboard-stat-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--primary);
  background: rgba(var(--primary-rgb), .08);
  box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), .04);
}

.dashboard-stat-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-stat-icon--hero {
  color: #eafff4;
  background: rgba(255,255,255,.13);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.dashboard-stat-icon--danger,
.dashboard-stat-card--danger .dashboard-stat-icon {
  color: var(--danger);
  background: rgba(var(--danger-rgb), .08);
}

.dashboard-stat-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.dashboard-stat-card--hero .dashboard-stat-title {
  color: rgba(255,255,255,.92);
}

.dashboard-stat-main {
  position: relative;
  z-index: 2;
}

.dashboard-stat-value,
.dashboard-finance-value,
.dashboard-side-value,
.dashboard-hero-value {
  font-weight: 950;
  letter-spacing: -.055em;
  line-height: .96;
}

.dashboard-hero-value {
  position: relative;
  z-index: 2;
  margin-top: 28px;
  font-size: clamp(38px, 4vw, 58px);
}

.dashboard-hero-hint {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  color: rgba(255,255,255,.82);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-stat-value {
  margin-top: 4px;
  font-size: clamp(25px, 2vw, 32px);
}

.dashboard-finance-value {
  margin-top: 12px;
  color: var(--text);
  font-size: clamp(30px, 3vw, 44px);
}

.dashboard-side-value {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  font-size: clamp(24px, 2vw, 34px);
}

.dashboard-stat-hint {
  position: relative;
  z-index: 2;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.dashboard-hero-chart {
  position: absolute;
  right: 34px;
  top: 44px;
  width: min(54%, 470px);
  height: 128px;
  opacity: .95;
}

.dashboard-hero-curve {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.dashboard-hero-area {
  fill: rgba(255,255,255,.10);
}

.dashboard-hero-line {
  fill: none;
  stroke: rgba(224,255,238,.88);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.10));
}

.dashboard-hero-dot {
  fill: #fff;
  stroke: rgba(255,255,255,.45);
  stroke-width: 8;
}

.dashboard-hero-bottom {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 24px 70px;
  color: #334155;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.92));
  border-radius: 0 0 18px 18px;
  box-shadow: 0 -1px 0 rgba(255,255,255,.45);
}

.dashboard-hero-bottom-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.dashboard-pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-top: 18px;
}

.dashboard-pipeline-stage {
  min-width: 0;
  color: #64748b;
}

.dashboard-pipeline-stage.is-active {
  color: var(--primary);
}

.dashboard-pipeline-track {
  position: relative;
  display: block;
  height: 12px;
  margin-bottom: 11px;
}

.dashboard-pipeline-track::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 5px;
  height: 4px;
  border-radius: 999px;
  background: #e6e9ee;
}

.dashboard-pipeline-track::after {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: var(--stage-width, 0%);
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  opacity: .9;
}

.dashboard-pipeline-track i {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px #fff;
}

.dashboard-pipeline-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 850;
}

.dashboard-pipeline-stage strong {
  display: block;
  margin-top: 8px;
  color: currentColor;
  font-size: 13px;
  font-weight: 950;
}

.dashboard-hero-note {
  position: absolute;
  z-index: 4;
  left: 16px;
  right: 16px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  color: #64748b;
  background: linear-gradient(90deg, rgba(240,253,244,.94), rgba(240,253,244,.74));
}

.dashboard-note-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--primary);
  border-radius: 50%;
  background: rgba(var(--primary-rgb), .09);
}

.dashboard-note-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-hero-note span:not(.dashboard-note-icon) {
  font-size: 13px;
  font-weight: 850;
}

.dashboard-hero-note b {
  margin-left: auto;
  color: var(--primary);
  font-size: 12px;
  font-weight: 950;
}

.dashboard-finance-label {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .01em;
}

.dashboard-finance-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.dashboard-finance-divider {
  height: 1px;
  margin: 18px 0;
  background: repeating-linear-gradient(90deg, rgba(148,163,184,.4) 0 6px, transparent 6px 12px);
}

.dashboard-finance-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(var(--primary-rgb), .055);
}

.dashboard-finance-footer span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.dashboard-finance-footer strong {
  display: block;
  margin-top: 8px;
  color: var(--primary);
  font-size: clamp(25px, 2.2vw, 34px);
  font-weight: 950;
  letter-spacing: -.045em;
}

.dashboard-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.dashboard-status-pill--success {
  color: var(--primary);
  background: rgba(var(--primary-rgb), .09);
}

.dashboard-status-pill--warning {
  color: #b45309;
  background: rgba(245, 158, 11, .14);
}

.dashboard-mini-bars {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: end;
  gap: 14px;
  min-height: 68px;
  margin-top: 18px;
}

.dashboard-mini-bars span {
  width: 11px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), .18);
}

.dashboard-mini-bars span.is-active {
  background: var(--primary);
}

.dashboard-mini-bars--danger span {
  background: rgba(var(--danger-rgb), .12);
}

.dashboard-mini-bars--danger span.is-active {
  background: var(--danger);
}

.dashboard-side-percent {
  position: absolute;
  right: 20px;
  bottom: 18px;
  min-width: 88px;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: center;
  color: var(--primary);
  background: rgba(var(--primary-rgb), .07);
}

.dashboard-side-percent b,
.dashboard-side-percent span {
  display: block;
  line-height: 1.05;
}

.dashboard-side-percent b {
  font-size: 15px;
  font-weight: 950;
}

.dashboard-side-percent span {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 950;
  text-transform: lowercase;
}

.dashboard-side-percent--danger {
  color: var(--danger);
  background: rgba(var(--danger-rgb), .07);
}

.dashboard-stat-visual {
  align-self: end;
}

.dashboard-stat-card--metric .dashboard-mini-bars {
  min-height: 58px;
  margin-top: 0;
  gap: 13px;
}

.dashboard-stat-card--metric .dashboard-mini-bars span {
  width: 10px;
}

.dashboard-mini-line {
  width: 100%;
  height: 72px;
  margin-top: 8px;
  overflow: visible;
}

.dashboard-mini-line-area {
  fill: rgba(var(--primary-rgb), .08);
}

.dashboard-mini-line-path {
  fill: none;
  stroke: rgba(var(--primary-rgb), .62);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-mini-line-dot {
  fill: var(--primary);
  stroke: rgba(var(--primary-rgb), .18);
  stroke-width: 8;
}

.dashboard-stat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -8px -8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(248,250,252,.94), rgba(240,253,244,.72));
}

.dashboard-stat-footer span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.dashboard-stat-footer b {
  color: var(--primary);
  font-size: 12px;
  font-weight: 950;
}

.dashboard-stat-settings {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  margin-left: auto;
  padding: 0;
  border-radius: 50%;
  color: var(--text-soft);
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.10);
}

.dashboard-stat-settings:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), .08);
  transform: translateY(-1px);
}

.dashboard-stat-settings svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-quick-actions-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
  border: 1px solid rgba(20, 25, 30, .07);
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 28px rgba(20, 25, 30, .055);
}

.dashboard-quick-title {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 950;
}

.dashboard-quick-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 18px;
}

.dashboard-quick-list button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--text-soft);
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.09);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-quick-list button:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), .08);
  transform: translateY(-1px);
}

.dashboard-quick-list button span {
  font-size: 18px;
  line-height: 1;
}

.dashboard-quick-list .dashboard-quick-more {
  color: var(--text-soft);
  background: transparent;
  box-shadow: none;
}

.dashboard-quick-list .dashboard-quick-more span {
  font-size: 22px;
}

@media (max-width: 1380px) {
  .dashboard-stat-card--hero,
  .dashboard-stat-card--finance {
    grid-column: span 6;
  }

  .dashboard-stat-side-stack,
  .dashboard-stat-card--metric {
    grid-column: span 6;
  }

  .dashboard-stat-side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-quick-actions-card {
    grid-template-columns: 1fr;
  }

  .dashboard-quick-list {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 860px) {
  .dashboard-stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-stat-card--hero,
  .dashboard-stat-card--finance,
  .dashboard-stat-side-stack,
  .dashboard-stat-card--metric {
    grid-column: 1 / -1;
  }

  .dashboard-stat-side-stack {
    grid-template-columns: 1fr;
  }

  .dashboard-stat-card--hero {
    min-height: 420px;
    padding: 22px 20px 16px;
  }

  .dashboard-hero-chart {
    right: 18px;
    top: 80px;
    width: 70%;
    height: 120px;
  }

  .dashboard-hero-bottom {
    padding: 16px 18px 76px;
  }

  .dashboard-pipeline {
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(105px, 1fr));
    padding-bottom: 3px;
  }

  .dashboard-hero-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .dashboard-hero-note b {
    margin-left: 0;
  }

  .dashboard-finance-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-quick-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

:root[data-theme="dark"] .dashboard-stat-card,
:root[data-theme="dark"] .dashboard-quick-actions-card {
  border-color: rgba(255,255,255,.08);
  background: rgba(15, 24, 19, .88);
  box-shadow: 0 14px 36px rgba(0,0,0,.30);
}

:root[data-theme="dark"] .dashboard-stat-card--hero {
  border-color: rgba(91, 255, 173, .14);
  background:
    radial-gradient(circle at 94% 18%, rgba(255,255,255,.12), transparent 0 32px, transparent 34px),
    linear-gradient(135deg, #087a49 0%, #075c38 50%, #0d7c4c 100%);
  box-shadow: 0 18px 48px rgba(0,0,0,.34);
}

:root[data-theme="dark"] .dashboard-stat-card--finance {
  background: linear-gradient(180deg, rgba(15,24,19,.92), rgba(15,24,19,.82));
}

:root[data-theme="dark"] .dashboard-hero-bottom {
  color: var(--text-soft);
  background: linear-gradient(180deg, rgba(16,25,21,.96), rgba(16,25,21,.93));
}

:root[data-theme="dark"] .dashboard-hero-bottom-title,
:root[data-theme="dark"] .dashboard-pipeline-stage,
:root[data-theme="dark"] .dashboard-hero-note {
  color: var(--text-soft);
}

:root[data-theme="dark"] .dashboard-pipeline-track::before {
  background: rgba(255,255,255,.12);
}

:root[data-theme="dark"] .dashboard-pipeline-track i {
  box-shadow: 0 0 0 3px #101914;
}

:root[data-theme="dark"] .dashboard-hero-note,
:root[data-theme="dark"] .dashboard-finance-footer,
:root[data-theme="dark"] .dashboard-stat-footer {
  background: rgba(var(--primary-rgb), .10);
}

:root[data-theme="dark"] .dashboard-quick-list button {
  color: var(--text-soft);
  background: rgba(255,255,255,.04);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

:root[data-theme="dark"] .dashboard-quick-list .dashboard-quick-more {
  background: transparent;
  box-shadow: none;
}


.switch-field {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
}

.switch-field input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch-ui {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #e3e7e4;
  box-shadow: inset 0 0 0 1px rgba(20,25,30,.07);
  transition: background .18s ease, box-shadow .18s ease;
  flex: 0 0 auto;
}

.switch-ui::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 5px 12px rgba(20,25,30,.18);
  transition: transform .18s ease;
}

.switch-field input:checked + .switch-ui {
  background: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.32), 0 10px 22px rgba(var(--primary-rgb),.16);
}

.switch-field input:checked + .switch-ui::after {
  transform: translateX(22px);
}

.field-help {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}



.rail-global-nav {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px;
  border-radius: 30px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,.75);
}

.rail-global-nav[hidden] {
  display: none !important;
}

.rail-global-btn {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), .10), rgba(var(--primary-rgb), .04));
  border: 1px solid rgba(var(--primary-rgb), .12);
}

.rail-global-btn:not(.active) {
  color: var(--primary-dark);
}


.app.rail-collapsed .rail-btn {
  position: relative;
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
  gap: 0;
}

.app.rail-collapsed .rail-btn .nav-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.app.rail-collapsed .rail-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  z-index: 100;
  transform: translateY(-50%) translateX(-6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
  padding: 9px 11px;
  border-radius: 12px;
  background: #101413;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 14px 35px rgba(20,25,30,.18);
  transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
}

.app.rail-collapsed .rail-btn::before {
  content: '';
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  z-index: 101;
  transform: translateY(-50%) translateX(-6px) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #101413;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
}

.app.rail-collapsed .rail-btn:hover::after,
.app.rail-collapsed .rail-btn:focus-visible::after,
.app.rail-collapsed .rail-btn:hover::before,
.app.rail-collapsed .rail-btn:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.app.rail-collapsed .rail-btn:hover::before,
.app.rail-collapsed .rail-btn:focus-visible::before {
  transform: translateY(-50%) translateX(0) rotate(45deg);
}
.switch-field { position: relative; }


.wizard-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.wizard-side {
  position: sticky;
  top: 0;
}

.wizard-title {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -.05em;
}

.wizard-desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.wizard-progress {
  height: 8px;
  margin: 18px 0;
  border-radius: 999px;
  overflow: hidden;
  background: #e8ece9;
}

.wizard-progress span {
  display: block;
  height: 100%;
  width: 20%;
  border-radius: inherit;
  background: var(--primary);
  transition: width .22s ease;
}

.wizard-steps {
  display: grid;
  gap: 10px;
}

.wizard-step-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-areas: 'num title' 'num subtitle';
  gap: 2px 12px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: transparent;
  color: var(--text-soft);
  text-align: left;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.wizard-step-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateY(-1px);
}

.wizard-step-btn span {
  grid-area: num;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef0ef;
  color: var(--text-soft);
  font-weight: 900;
}

.wizard-step-btn b {
  grid-area: title;
  color: inherit;
  font-size: 13px;
}

.wizard-step-btn small {
  grid-area: subtitle;
  color: var(--muted);
  font-size: 11px;
}

.wizard-step-btn.active,
.wizard-step-btn.completed {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 16px 28px rgba(var(--primary-rgb),.18);
}

.wizard-step-btn.active span,
.wizard-step-btn.completed span {
  background: rgba(255,255,255,.18);
  color: #fff;
}

.wizard-step-btn.active small,
.wizard-step-btn.completed small {
  color: rgba(255,255,255,.72);
}

.wizard-main {
  min-height: 560px;
}

.wizard-main-header {
  align-items: flex-start;
}

.deal-wizard-form,
.client-wizard-form {
  display: grid;
  gap: 18px;
}

.wizard-step-panel {
  display: none;
  animation: wizardFade .18s ease;
}

.wizard-step-panel.active {
  display: block;
}

.client-wizard-panel {
  display: none;
  animation: wizardFade .18s ease;
}

.client-wizard-panel.active {
  display: block;
}

.client-wizard-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.client-duplicate-warning p {
  margin: 6px 0 0;
  line-height: 1.5;
}

.client-new-blacklist-warning {
  margin-top: 14px;
}

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

.wizard-panel-head {
  margin-bottom: 16px;
}

.wizard-panel-head h3,
.wizard-summary-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  letter-spacing: -.02em;
}

.info-box {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
}

.info-box p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.payment-rounding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.payment-rounding-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.payment-rounding-option:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--primary-rgb), .28);
  box-shadow: var(--shadow-soft);
}

.payment-rounding-option.is-selected {
  border-color: rgba(var(--primary-rgb), .72);
  background: var(--primary-soft);
  box-shadow: 0 14px 34px rgba(var(--primary-rgb), .12);
}

.payment-rounding-option.is-disabled {
  opacity: .62;
}

.payment-rounding-option input {
  order: 2;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--primary);
  flex: 0 0 auto;
}

.payment-rounding-option-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.payment-rounding-option-body b {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.payment-rounding-option-body small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.payment-rounding-hint {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(var(--primary-rgb), .07);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.payment-rounding-hint b {
  color: var(--text);
}

.payment-rounding-hint.is-danger {
  border-color: rgba(255, 93, 93, .35);
  background: rgba(255, 93, 93, .10);
  color: #b91c1c;
}

.danger-text {
  color: #b91c1c;
  font-weight: 800;
}

.wizard-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.wizard-footer .btn:disabled {
  opacity: .45;
  pointer-events: none;
}

.wizard-summary {
  display: grid;
  gap: 14px;
}

.wizard-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.wizard-summary-card {
  box-shadow: none;
  background: rgba(255,255,255,.72);
}

.summary-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.summary-list div:last-child {
  border-bottom: 0;
}

.summary-list span {
  color: var(--muted);
}

.summary-list b {
  text-align: right;
}

.summary-list.compact {
  margin-top: 14px;
}

@media (max-width: 1100px) {
  .wizard-layout {
    grid-template-columns: 1fr;
  }

  .wizard-side {
    position: static;
  }

  .wizard-steps {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    overflow: auto;
  }

  .wizard-step-btn {
    min-width: 140px;
  }

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

@media (max-width: 680px) {
  .wizard-summary-grid,
  .client-wizard-summary-grid {
    grid-template-columns: 1fr;
  }

  .wizard-footer {
    flex-direction: column-reverse;
  }

  .wizard-footer .btn {
    width: 100%;
  }
}


.blacklist-warning {
  border: 1px solid rgba(220, 38, 38, .22);
  background: linear-gradient(135deg, rgba(254, 226, 226, .95), rgba(255, 247, 247, .88));
  color: #7f1d1d;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 16px 36px rgba(220, 38, 38, .08);
}

.blacklist-warning-title {
  font-weight: 950;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}

.blacklist-warning-body {
  font-size: 13px;
  line-height: 1.55;
}

.blacklist-warning-note {
  margin-top: 10px;
  color: #991b1b;
  font-size: 12px;
  font-weight: 800;
}

#blacklistTable .badge.danger,
#clientsTable .badge.danger {
  margin-top: 6px;
}


.deal-card-page {
  display: grid;
  gap: 18px;
}

.deal-card-empty {
  min-height: 360px;
  display: grid;
  place-items: center;
}

.deal-card-hero {
  display: grid;
  gap: 22px;
  align-items: start;
  overflow: visible;
  position: relative;
}

.deal-card-hero::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -120px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(50, 191, 138, .22), transparent 68%);
  pointer-events: none;
}

.deal-card-toolbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.deal-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 2px;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-weight: 900;
  letter-spacing: -.02em;
  transition: .18s ease;
}

.deal-back-link:hover {
  color: var(--primary);
  transform: translateX(-2px);
}

.deal-back-link span:first-child {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .06);
}

.deal-card-hero-main {
  display: grid;
  gap: 16px;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.deal-card-title-row h2 {
  margin: 4px 0 10px;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: -.055em;
  line-height: 1.04;
}

.deal-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.deal-card-actions {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.deal-primary-action {
  min-width: 168px;
  box-shadow: 0 16px 34px rgba(13, 148, 90, .22);
}

.deal-action-menu {
  position: relative;
}

.deal-action-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 40;
  display: grid;
  min-width: 210px;
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: .16s ease;
}

.deal-action-menu:hover .deal-action-dropdown,
.deal-action-menu:focus-within .deal-action-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.deal-action-dropdown button {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 800;
}

.deal-action-dropdown button:hover {
  background: rgba(50, 191, 138, .1);
  color: var(--primary);
}

.deal-progress {
  display: grid;
  gap: 8px;
  max-width: 520px;
}

.deal-progress-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.deal-progress-top b {
  color: var(--text);
}

.deal-progress-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .08);
  overflow: hidden;
}

.deal-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #74e3b3);
}

.deal-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.danger-kpi {
  border-color: rgba(220, 38, 38, .25);
  background: linear-gradient(135deg, rgba(254, 226, 226, .82), rgba(255,255,255,.78));
}

.deal-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr);
  gap: 18px;
  align-items: start;
}

.deal-card-maincol,
.deal-card-sidecol {
  display: grid;
  gap: 18px;
}

.deal-card-sidecol {
  position: sticky;
  top: 18px;
}

.deal-card-section {
  box-shadow: none;
  background: rgba(255, 255, 255, .74);
}

.deal-card-section > h3.card-title {
  margin-bottom: 12px;
}

.deal-mini-row {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.deal-mini-row:last-child {
  border-bottom: 0;
}

.deal-mini-row b {
  font-size: 14px;
}

.deal-mini-row span {
  color: var(--muted);
  font-size: 12px;
}

.deal-timeline {
  display: grid;
  gap: 0;
}

.deal-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  padding: 0 0 18px;
}

.deal-timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 17px;
  width: 2px;
  height: calc(100% - 12px);
  background: var(--border);
}

.deal-timeline-dot {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(50, 191, 138, .14);
}

.deal-timeline-item b {
  font-size: 14px;
}

.deal-timeline-item p {
  margin: 4px 0;
  color: var(--text);
  font-size: 13px;
}

.deal-timeline-item span {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1200px) {
  .deal-card-grid {
    grid-template-columns: 1fr;
  }

  .deal-card-sidecol {
    position: static;
  }
}

@media (max-width: 760px) {
  .deal-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .deal-card-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .deal-card-actions {
    justify-content: stretch;
  }

  .deal-card-actions > .btn,
  .deal-action-menu,
  .deal-action-menu > .btn {
    width: 100%;
  }

  .deal-action-dropdown {
    left: 0;
    right: 0;
  }
}

@media (max-width: 520px) {
  .deal-kpi-grid {
    grid-template-columns: 1fr;
  }
}


.theme-preview-card { min-height: 100%; }
.theme-preview {
  min-height: 250px;
  border-radius: var(--radius-lg);
  padding: 22px;
  background:
    radial-gradient(circle at 82% 16%, rgba(var(--primary-rgb),.16), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(247,247,245,.78));
  border: 1px solid var(--border);
  display: grid;
  align-content: end;
  gap: 10px;
  overflow: hidden;
}
.theme-preview-top { display: flex; gap: 7px; align-self: start; }
.theme-preview-top span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--primary);
  opacity: .7;
}
.theme-preview-top span:nth-child(2) { opacity: .38; }
.theme-preview-top span:nth-child(3) { opacity: .22; }
.theme-preview-title {
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.06em;
  color: var(--text);
}
.theme-preview-subtitle {
  color: var(--muted);
  font-size: 13px;
}
.theme-preview-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.theme-preview-tile {
  height: 72px;
  border-radius: 22px;
  background: rgba(255,255,255,.86);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.theme-preview-tile.primary { background: var(--primary); }


.rail-quick-style {
  display: none;
  gap: 8px;
  padding: 8px;
  border-radius: 28px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,.75);
}

.side-rail.rail-main-mode .rail-quick-style {
  display: grid;
}

.rail-style-btn {
  position: relative;
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: transparent;
  color: var(--text-soft);
  text-align: left;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.rail-style-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateY(-1px);
}

.rail-style-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 16px 28px rgba(var(--primary-rgb),.22);
}

.rail-style-btn svg {
  width: 18px;
  height: 18px;
}

.rail-style-label {
  white-space: nowrap;
  font-weight: 800;
  font-size: 13px;
}

.app.rail-collapsed .rail-quick-style {
  width: 58px;
  justify-self: center;
  align-self: center;
  justify-items: center;
  padding: 7px;
  border-radius: 999px;
  gap: 7px;
}

.app.rail-collapsed .rail-style-btn {
  width: 44px;
  height: 44px;
  min-height: 44px;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
}

.app.rail-collapsed .rail-style-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.app.rail-collapsed .rail-style-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 13px);
  top: 50%;
  z-index: 80;
  min-width: max-content;
  padding: 8px 10px;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(15,23,42,.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) translateX(-4px);
  pointer-events: none;
  transition: .16s ease;
}

.app.rail-collapsed .rail-style-btn::before {
  content: '';
  position: absolute;
  left: calc(100% + 7px);
  top: 50%;
  z-index: 81;
  width: 9px;
  height: 9px;
  background: #0f172a;
  transform: translateY(-50%) rotate(45deg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: .16s ease;
}

.app.rail-collapsed .rail-style-btn:hover::after,
.app.rail-collapsed .rail-style-btn:focus-visible::after,
.app.rail-collapsed .rail-style-btn:hover::before,
.app.rail-collapsed .rail-style-btn:focus-visible::before {
  opacity: 1;
  visibility: visible;
}

.app.rail-collapsed .rail-style-btn:hover::after,
.app.rail-collapsed .rail-style-btn:focus-visible::after {
  transform: translateY(-50%) translateX(0);
}


.stat-head {
  width: 100%;
}

.stat-settings-btn {
  margin-left: auto;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(20, 25, 30, .045);
  border: 1px solid rgba(20, 25, 30, .07);
  color: var(--muted);
  transition: .16s ease;
}

.stat-settings-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-settings-btn:hover,
.stat-settings-btn:focus-visible {
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateY(-1px) rotate(15deg);
  outline: none;
}

.modal-sm {
  width: min(560px, 100%);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.cashbox-choice-list {
  display: grid;
  gap: 10px;
}

.cashbox-choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-soft);
  cursor: pointer;
  transition: .16s ease;
}

.cashbox-choice:hover,
.cashbox-choice.is-selected {
  border-color: rgba(var(--primary-rgb), .35);
  background: var(--primary-soft);
  box-shadow: 0 12px 28px rgba(var(--primary-rgb), .08);
}

.cashbox-choice input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
  flex: 0 0 auto;
}

.cashbox-choice-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.cashbox-choice-title {
  color: var(--text);
  font-weight: 900;
}

.cashbox-choice-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}


.client-card-page {
  display: grid;
  gap: 18px;
}

.client-card-empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
}

.client-card-hero-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.client-avatar-lg {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--primary), #74e3b3);
  color: #fff;
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -.08em;
  box-shadow: 0 18px 42px rgba(var(--primary-rgb), .22);
}

.client-card-grid {
  align-items: start;
}

.table-actions {
  margin-top: 0;
  gap: 6px;
  flex-wrap: nowrap;
}

.table-actions .btn {
  white-space: nowrap;
}

#clientEditForm .modal-actions {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .client-card-hero-grid {
    grid-template-columns: 1fr;
  }

  .client-avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    font-size: 24px;
  }

  .table-actions {
    flex-wrap: wrap;
  }
}



.document-upload-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(var(--primary-rgb), .14);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), .08), rgba(255,255,255,.72));
}

.document-upload-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.document-upload-card-head b {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.document-upload-card-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.document-upload-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.document-upload-grid .field.full {
  grid-column: 1 / -1;
}

.document-upload-actions {
  margin-top: 0;
}

.document-actions {
  margin-top: 0;
  gap: 6px;
  flex-wrap: nowrap;
}

.document-actions .btn {
  white-space: nowrap;
}

.client-documents-section .table-wrap {
  margin-top: 10px;
}

#documentEditForm .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

#deleteDocumentFromModalBtn {
  margin-right: auto;
}

@media (max-width: 1100px) {
  .document-upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .document-upload-grid {
    grid-template-columns: 1fr;
  }

  #documentEditForm .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #deleteDocumentFromModalBtn {
    margin-right: 0;
  }
}


.dashboard-chart-slot {
  margin-top: 18px;
}

.dashboard-chart-card {
  min-height: 360px;
  overflow: hidden;
}

.chart-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}

.chart-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chart-title-icon {
  flex: 0 0 auto;
}

.chart-summary-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chart-pill {
  min-width: 145px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), .08);
  border: 1px solid rgba(var(--primary-rgb), .12);
  display: grid;
  gap: 2px;
}

.chart-pill span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-pill b {
  color: var(--text);
  font-size: 15px;
  letter-spacing: -.02em;
}

.chart-pill--profit {
  background: rgba(15, 23, 42, .04);
  border-color: rgba(15, 23, 42, .08);
}

.chart-legend {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.legend-dot.revenue {
  background: rgba(var(--primary-rgb), .34);
}

.legend-dot.profit {
  background: var(--primary);
}

.monthly-chart-wrap {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  min-height: 248px;
}

.monthly-chart-axis {
  display: grid;
  align-content: space-between;
  padding: 10px 0 34px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.monthly-chart-area {
  position: relative;
  min-width: 0;
  padding: 10px 0 0;
}

.monthly-chart-grid {
  position: absolute;
  inset: 10px 0 34px;
  display: grid;
  align-content: space-between;
  pointer-events: none;
}

.monthly-chart-grid span {
  width: 100%;
  border-top: 1px dashed rgba(15, 23, 42, .12);
}

.monthly-chart-bars {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(42px, 1fr));
  gap: 12px;
  height: 100%;
  min-height: 238px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.monthly-chart-month {
  min-width: 42px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 10px;
  align-items: end;
}

.monthly-chart-column {
  position: relative;
  height: 190px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.monthly-bar {
  position: absolute;
  bottom: 0;
  border-radius: 999px 999px 18px 18px;
  transition: height .24s ease, transform .16s ease, opacity .16s ease;
}

.monthly-bar.revenue {
  width: 32px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(var(--primary-rgb), .18) 0,
    rgba(var(--primary-rgb), .18) 5px,
    rgba(var(--primary-rgb), .28) 5px,
    rgba(var(--primary-rgb), .28) 10px
  );
  border: 1px solid rgba(var(--primary-rgb), .2);
}

.monthly-bar.profit {
  width: 16px;
  background: linear-gradient(180deg, #17a768, var(--primary));
  box-shadow: 0 14px 28px rgba(var(--primary-rgb), .22);
}

.monthly-chart-month:hover .monthly-bar {
  transform: translateY(-4px);
}

.monthly-chart-month.is-active .monthly-bar.revenue {
  background: repeating-linear-gradient(
    -45deg,
    rgba(var(--primary-rgb), .28) 0,
    rgba(var(--primary-rgb), .28) 5px,
    rgba(var(--primary-rgb), .44) 5px,
    rgba(var(--primary-rgb), .44) 10px
  );
}

.monthly-chart-month.is-active .monthly-bar.profit {
  width: 22px;
  box-shadow: 0 18px 42px rgba(var(--primary-rgb), .34);
}

.monthly-chart-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.monthly-chart-month.is-active .monthly-chart-label {
  color: var(--primary);
}


.dashboard-charts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: stretch;
}

.dashboard-charts-grid .dashboard-chart-slot {
  margin-top: 0;
  min-width: 0;
}

.dashboard-chart-card--daily {
  min-height: 360px;
}

.chart-card-head--compact {
  align-items: flex-start;
}

.chart-summary-pills--compact {
  justify-content: flex-end;
}

.chart-summary-pills--compact .chart-pill {
  min-width: 118px;
  padding: 9px 12px;
}

.chart-pill--expected {
  background: rgba(15, 23, 42, .04);
  border-color: rgba(15, 23, 42, .08);
}

.chart-pill--collected {
  background: rgba(var(--primary-rgb), .08);
  border-color: rgba(var(--primary-rgb), .12);
}

.legend-dot.expected {
  background: rgba(var(--primary-rgb), .28);
}

.legend-dot.collected {
  background: var(--primary);
}

.daily-flow-chart-wrap {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  min-height: 248px;
}

.daily-flow-bars {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(30, minmax(12px, 1fr));
  gap: 5px;
  height: 100%;
  min-height: 238px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.daily-flow-day {
  min-width: 12px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 9px;
  align-items: end;
}

.daily-flow-column {
  position: relative;
  height: 190px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.daily-flow-bar {
  position: absolute;
  bottom: 0;
  border-radius: 999px 999px 12px 12px;
  transition: height .24s ease, transform .16s ease, opacity .16s ease;
}

.daily-flow-bar.expected {
  width: 14px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(var(--primary-rgb), .16) 0,
    rgba(var(--primary-rgb), .16) 4px,
    rgba(var(--primary-rgb), .26) 4px,
    rgba(var(--primary-rgb), .26) 8px
  );
  border: 1px solid rgba(var(--primary-rgb), .18);
}

.daily-flow-bar.collected {
  width: 7px;
  background: linear-gradient(180deg, #17a768, var(--primary));
  box-shadow: 0 14px 28px rgba(var(--primary-rgb), .22);
}

.daily-flow-day:hover .daily-flow-bar {
  transform: translateY(-4px);
}

.daily-flow-day.is-active .daily-flow-bar.expected {
  background: repeating-linear-gradient(
    -45deg,
    rgba(var(--primary-rgb), .28) 0,
    rgba(var(--primary-rgb), .28) 4px,
    rgba(var(--primary-rgb), .44) 4px,
    rgba(var(--primary-rgb), .44) 8px
  );
}

.daily-flow-day.is-active .daily-flow-bar.collected {
  width: 10px;
  box-shadow: 0 18px 42px rgba(var(--primary-rgb), .34);
}

.daily-flow-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  line-height: 1;
}

.daily-flow-day.is-active .daily-flow-label {
  color: var(--primary);
}


.workspace-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.workspace-mode-option {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, .72);
  color: var(--text);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.workspace-mode-option:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--primary-rgb), .25);
  box-shadow: 0 18px 36px rgba(20, 25, 30, .08);
}

.workspace-mode-option input {
  position: absolute;
  inset: 14px 14px auto auto;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.workspace-mode-title {
  padding-right: 28px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.workspace-mode-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.workspace-mode-option:has(input:checked) {
  border-color: rgba(var(--primary-rgb), .42);
  background: var(--primary-soft);
  box-shadow: 0 18px 38px rgba(var(--primary-rgb), .14);
}

@media (max-width: 900px) {
  .workspace-mode-grid {
    grid-template-columns: 1fr;
  }
}



.team-help-list {
  display: grid;
  gap: 12px;
}
.team-help-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  padding: 13px;
  border-radius: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}
.team-help-item b {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
}
.team-roles-grid {
  align-items: start;
}
.team-roles-list {
  display: grid;
  gap: 10px;
}
.team-role-card {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 20px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text);
  text-align: left;
  transition: .18s ease;
}
.team-role-card:hover,
.team-role-card.active {
  border-color: rgba(var(--primary-rgb), .32);
  background: var(--primary-soft);
  transform: translateY(-1px);
}
.team-role-card-title {
  font-weight: 900;
  letter-spacing: -.02em;
}
.team-role-card-meta {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}
.team-role-card-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.permissions-matrix {
  display: grid;
  gap: 14px;
}
.permission-group {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface-soft);
  overflow: hidden;
}
.permission-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.permission-resource-title {
  font-weight: 900;
  letter-spacing: -.02em;
}
.permission-resource-key {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.permission-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}
.permission-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px;
  border-radius: 16px;
  background: rgba(255,255,255,.58);
  border: 1px solid transparent;
  cursor: pointer;
}
.permission-check:hover {
  border-color: rgba(var(--primary-rgb), .22);
}
.permission-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
  flex: 0 0 auto;
}
.permission-check span {
  display: grid;
  gap: 2px;
}
.permission-check b {
  font-size: 13px;
  color: var(--text);
}
.permission-check small {
  color: var(--muted);
  line-height: 1.3;
}

@media (max-width: 900px) {
  .permission-actions {
    grid-template-columns: 1fr;
  }
}


.is-permission-disabled {
  opacity: .58;
  cursor: not-allowed !important;
}

.permission-disabled-note {
  margin-bottom: 12px;
}

.permission-denied-card {
  max-width: 760px;
}


.payment-section-header {
  align-items: flex-start;
}

.payment-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  border-radius: 999px;
  padding: 9px 13px;
  background: var(--surface-soft);
  color: var(--text-soft);
  border: 1px solid var(--border);
  font-weight: 850;
  transition: .18s ease;
}

.filter-pill:hover {
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

.filter-pill.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 12px 24px rgba(var(--primary-rgb), .18);
}

.payment-search-field {
  min-width: min(360px, 100%);
  flex: 1 1 280px;
  max-width: 420px;
}

.payment-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.payment-kpi {
  padding: 14px;
  border-radius: 20px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.payment-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #eef0ef;
  margin: 8px 0 6px;
}

.payment-progress span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: var(--primary);
}

.payment-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.payment-next-card {
  display: grid;
  gap: 10px;
}

.payment-next-title {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -.02em;
}

.payment-next-meta {
  color: var(--muted);
  font-size: 13px;
}

.payment-next-amount {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.06em;
}

.payment-deal-info.empty {
  background: var(--surface-soft);
  text-align: left;
}

@media (max-width: 1100px) {
  .payment-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-search-field {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .payment-kpi-grid {
    grid-template-columns: 1fr;
  }

  .payment-toolbar {
    align-items: stretch;
  }

  .filter-pills,
  .payment-search-field {
    width: 100%;
  }
}



.finance-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
}

.finance-hero::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -90px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), .18), transparent 62%);
  pointer-events: none;
}

.finance-hero-title {
  margin: 4px 0 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: .95;
  letter-spacing: -.06em;
}

.finance-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 18px;
}

.finance-overview-grid {
  align-items: start;
}

.finance-amount.success {
  color: var(--success);
}

.finance-amount.danger {
  color: var(--danger);
}

.finance-amount.warning {
  color: var(--warning);
}

@media (max-width: 1280px) {
  .finance-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .finance-hero {
    flex-direction: column;
  }

  .finance-kpi-grid {
    grid-template-columns: 1fr;
  }
}


.catalog-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.catalog-hero::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -90px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), .18), transparent 62%);
  pointer-events: none;
}

.catalog-hero-title {
  margin: 4px 0 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: .95;
  letter-spacing: -.06em;
}

.catalog-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 18px;
}

.catalog-work-grid {
  align-items: start;
}

.catalog-toolbar {
  margin-bottom: 16px;
}

.catalog-kpi .stat-value {
  font-size: clamp(21px, 2.4vw, 28px);
}

@media (max-width: 1280px) {
  .catalog-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .catalog-hero {
    flex-direction: column;
  }

  .catalog-kpi-grid {
    grid-template-columns: 1fr;
  }
}



.audit-filter-form {
  margin-top: 12px;
}

.audit-kpi-line {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.audit-kpi .mini-kpi-value {
  font-size: 22px;
}

.audit-diff-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.audit-field-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-strong, #047857);
  font-size: 12px;
  font-weight: 700;
}

.audit-log-json {
  max-height: 62vh;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.04);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 1100px) {
  .audit-kpi-line {
    grid-template-columns: 1fr;
  }
}


.audit-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.audit-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.audit-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
  background: var(--muted);
}

.audit-dot.create { background: var(--success); }
.audit-dot.update { background: var(--info); }
.audit-dot.delete { background: var(--danger); }
.audit-dot.important { background: var(--warning); }

.audit-action-cell {
  display: grid;
  gap: 6px;
}

.audit-important-mark {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.12);
  color: var(--warning);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.audit-row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.audit-log-details {
  display: grid;
  gap: 14px;
}

.audit-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.audit-detail-item {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.03);
  min-width: 0;
}

.audit-detail-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}

.audit-detail-value {
  font-weight: 800;
  word-break: break-word;
}

.audit-diff-table {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
}

.audit-diff-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr);
  border-bottom: 1px solid var(--border);
}

.audit-diff-row:last-child {
  border-bottom: 0;
}

.audit-diff-row > div {
  padding: 10px 12px;
  border-right: 1px solid var(--border);
  min-width: 0;
  word-break: break-word;
}

.audit-diff-row > div:last-child {
  border-right: 0;
}

.audit-diff-head {
  background: rgba(15, 23, 42, 0.04);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.audit-json-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.audit-json-block {
  min-width: 0;
}

.audit-json-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.audit-json-pre {
  max-height: 42vh;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.04);
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

[data-theme="dark"] .audit-detail-item,
[data-theme="dark"] .audit-diff-head,
[data-theme="dark"] .audit-json-pre,
[data-theme="dark"] .audit-log-json {
  background: rgba(255, 255, 255, 0.055);
}

@media (max-width: 1100px) {
  .audit-detail-summary,
  .audit-json-grid,
  .audit-diff-row {
    grid-template-columns: 1fr;
  }

  .audit-diff-row > div {
    border-right: 0;
  }
}



.finance-work-grid {
  margin-top: 18px;
  align-items: start;
}

.cashbox-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cashbox-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.cashbox-card::after {
  content: '';
  position: absolute;
  inset: auto -30px -40px auto;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  pointer-events: none;
}

.cashbox-card.is-archive {
  opacity: 0.68;
}

.cashbox-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cashbox-name {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cashbox-balance {
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.cashbox-flow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 800;
}

.cashbox-flow .success,
.finance-amount.success {
  color: var(--success);
}

.cashbox-flow .danger,
.finance-amount.danger {
  color: var(--danger);
}

.finance-amount.warning {
  color: var(--warning);
}

.cashbox-actions {
  position: relative;
  z-index: 1;
}

.finance-payable-hint {
  padding: 12px 14px;
  border: 1px dashed rgba(217, 119, 6, 0.38);
  border-radius: 16px;
  background: rgba(251, 191, 36, 0.08);
  color: var(--muted);
  font-size: 13px;
}

.finance-payable-hint.has-payable {
  color: #92400e;
  background: rgba(251, 191, 36, 0.16);
}

.payment-kpi.is-warning {
  border-color: rgba(217, 119, 6, 0.22);
  background: rgba(251, 191, 36, 0.1);
}

[data-theme='dark'] .cashbox-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

[data-theme='dark'] .cashbox-card::after {
  background: rgba(34, 197, 94, 0.12);
}

[data-theme='dark'] .finance-payable-hint {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.08);
}

[data-theme='dark'] .finance-payable-hint.has-payable {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
}

[data-theme='dark'][data-glassmorphism='off'] .cashbox-card {
  background: #111827;
}

@media (max-width: 1180px) {
  .cashbox-card-grid {
    grid-template-columns: 1fr;
  }
}


.team-member-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.team-member-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.team-member-search-field {
  width: min(420px, 100%);
  margin-bottom: 0;
}

.team-member-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-member-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #74e3b3);
  color: #fff;
  font-weight: 950;
  letter-spacing: -.05em;
  box-shadow: 0 14px 30px rgba(var(--primary-rgb), .18);
}

.team-member-avatar.large {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  font-size: 22px;
}

.team-member-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .85fr);
  gap: 18px;
  align-items: start;
}

.team-member-edit-form {
  align-content: start;
}

.team-member-side-card {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--surface-soft);
  padding: 16px;
}

.team-member-summary {
  display: grid;
  gap: 16px;
}

.team-member-summary-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-member-summary-list {
  display: grid;
  gap: 8px;
}

.team-member-summary-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.team-member-summary-list > div:last-child {
  border-bottom: 0;
}

.team-member-summary-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.team-member-summary-list b {
  text-align: right;
  font-size: 13px;
}

.team-member-quick-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.team-member-quick-actions .btn {
  width: 100%;
}

@media (max-width: 980px) {
  .team-member-stats,
  .team-member-modal-grid {
    grid-template-columns: 1fr;
  }

  .team-member-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .team-member-search-field {
    width: 100%;
  }
}


.ui-setting-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.ui-setting-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .01em;
}

.interface-theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.interface-theme-card {
  position: relative;
  display: grid;
  gap: 10px;
  justify-items: center;
  cursor: pointer;
  user-select: none;
  color: var(--text-soft);
}

.interface-theme-card input,
.accent-color-dot input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.interface-theme-preview {
  position: relative;
  display: block;
  width: 100%;
  min-height: 92px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.interface-theme-card:hover .interface-theme-preview {
  transform: translateY(-2px);
}

.interface-theme-card:has(input:checked) .interface-theme-preview,
.interface-theme-card.is-selected .interface-theme-preview {
  border-color: var(--primary);
  box-shadow: 0 18px 36px rgba(var(--primary-rgb), .18);
}

.interface-theme-title {
  font-size: 13px;
  font-weight: 900;
  transition: color .18s ease;
}

.interface-theme-card:has(input:checked) .interface-theme-title,
.interface-theme-card.is-selected .interface-theme-title {
  color: var(--primary);
}

.interface-theme-check {
  position: absolute;
  left: 11px;
  bottom: 33px;
  width: 18px;
  height: 18px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(var(--primary-rgb), .28);
}

.interface-theme-card:has(input:checked) .interface-theme-check,
.interface-theme-card.is-selected .interface-theme-check {
  display: grid;
}

.interface-theme-preview--light,
.interface-theme-preview--auto {
  background: linear-gradient(135deg, #f8fafc, #ffffff);
}

.interface-theme-preview--dark {
  background: linear-gradient(135deg, #1d1b77, #6d5df8);
}

.interface-theme-preview--auto::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 47%;
  background: linear-gradient(135deg, rgba(99, 91, 255, .25), rgba(248, 250, 252, .5));
}

.interface-theme-preview .preview-sidebar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 35%;
  background: linear-gradient(180deg, rgba(var(--primary-rgb), .20), rgba(var(--primary-rgb), .08));
}

.interface-theme-preview--dark .preview-sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,.06));
}

.interface-theme-preview .preview-panel {
  position: absolute;
  top: 15px;
  right: 13px;
  width: 62%;
  height: 62px;
  border-radius: 12px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(15, 23, 42, .08);
}

.interface-theme-preview--dark .preview-panel {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.12);
}

.interface-theme-preview .preview-line {
  position: absolute;
  right: 24px;
  height: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .18);
}

.interface-theme-preview--dark .preview-line {
  background: rgba(255,255,255,.22);
}

.preview-line--one { top: 28px; width: 52%; }
.preview-line--two { top: 43px; width: 42%; }
.preview-line--three { top: 58px; width: 50%; }

.accent-color-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.accent-color-dot {
  position: relative;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.accent-color-dot:hover {
  transform: translateY(-1px) scale(1.04);
}

.accent-color-dot span {
  width: 18px;
  height: 18px;
  display: block;
  border-radius: 50%;
  background: var(--dot-color);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), 0 8px 18px rgba(15,23,42,.12);
}

.accent-color-dot:has(input:checked),
.accent-color-dot.is-selected {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--dot-color), 0 12px 26px rgba(15,23,42,.14);
}

.accent-color-dot:has(input:checked)::after,
.accent-color-dot.is-selected::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  text-shadow: 0 1px 5px rgba(0,0,0,.24);
}

@media (max-width: 760px) {
  .interface-theme-grid {
    grid-template-columns: 1fr;
  }

  .interface-theme-preview {
    min-height: 108px;
  }

  .ui-setting-head {
    flex-direction: column;
    align-items: flex-start;
  }
}


.account-security-card {
  align-self: start;
}

.account-security-summary,
.account-session-info,
.security-checklist {
  display: grid;
  gap: 14px;
}

.account-security-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary-soft), rgba(255,255,255,.72));
}

.account-security-avatar {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -.04em;
  box-shadow: 0 16px 32px rgba(var(--primary-rgb), .20);
}

.account-security-email {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
}

.security-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.security-info-grid.compact {
  margin-top: 14px;
}

.security-info-item {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
}

.security-info-item.full {
  grid-column: 1 / -1;
}

.security-info-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.security-info-item b {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.security-good {
  color: var(--success) !important;
}

.security-warning {
  color: var(--warning) !important;
}

.security-session-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface-soft);
}

.security-session-card.is-active {
  border-color: rgba(var(--primary-rgb), .18);
  background: var(--primary-soft);
}

.security-session-title {
  font-weight: 950;
  letter-spacing: -.02em;
}

.account-security-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.account-security-actions .btn {
  width: 100%;
}

.password-strength {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
}

.password-strength-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, .08);
}

.password-strength-bar span {
  width: var(--strength-width, 8%);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--muted);
  transition: width .18s ease, background-color .18s ease;
}

.password-strength[data-tone='danger'] .password-strength-bar span {
  background: var(--danger);
}

.password-strength[data-tone='warning'] .password-strength-bar span {
  background: var(--warning);
}

.password-strength[data-tone='good'] .password-strength-bar span,
.password-strength[data-tone='strong'] .password-strength-bar span {
  background: var(--success);
}

.password-strength-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.security-check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-soft);
}

.security-check-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 950;
}

.security-check-item b,
.security-check-item span:last-child {
  display: block;
}

.security-check-item b {
  margin-bottom: 4px;
  font-weight: 950;
  letter-spacing: -.02em;
}

.security-check-item span:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .security-info-grid {
    grid-template-columns: 1fr;
  }

  .account-security-profile,
  .security-session-card {
    flex-direction: column;
  }
}


.blacklist-page { display: grid; gap: 18px; }
.blacklist-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.blacklist-stat-card {
  background: rgba(255,255,255,.82);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 6px;
}
.blacklist-stat-card span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.blacklist-stat-card b { font-size: 28px; letter-spacing: -.04em; }
.blacklist-stat-card small { color: var(--muted); line-height: 1.35; }
.blacklist-stat-card.danger { border-color: rgba(220,38,38,.22); background: linear-gradient(135deg, rgba(254,226,226,.9), rgba(255,255,255,.78)); }
.blacklist-stat-card.warning { border-color: rgba(245,158,11,.24); background: linear-gradient(135deg, rgba(255,244,219,.92), rgba(255,255,255,.78)); }
.blacklist-control-grid { align-items: start; }
.blacklist-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin: 14px 0 16px;
}
.blacklist-client-cell,
.blacklist-reason-cell,
.blacklist-identity-cell { display: grid; gap: 5px; min-width: 170px; }
.blacklist-client-cell span,
.blacklist-reason-cell span,
.blacklist-identity-cell span { color: var(--muted); font-size: 12px; }
.blacklist-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.blacklist-check-results { margin-top: 16px; }
.blacklist-check-ok {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(22,163,74,.18);
  border-radius: 22px;
  background: rgba(220,252,231,.68);
}
.blacklist-check-ok span { color: var(--muted); font-size: 13px; }
.blacklist-entry-modal { display: grid; gap: 16px; }
.blacklist-entry-risk { display: flex; flex-wrap: wrap; gap: 8px; }
.blacklist-entry-note {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.66);
}
.blacklist-entry-note span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.blacklist-entry-note p { margin: 0; color: var(--muted); line-height: 1.55; }

@media (max-width: 1000px) {
  .blacklist-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blacklist-toolbar { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .blacklist-stats-grid { grid-template-columns: 1fr; }
}


.dashboard-bottom-grid {
  margin-top: 20px;
  align-items: start;
}

#dashboard .dashboard-bottom-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
  gap: 22px;
}

.dashboard-feed-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 26px 26px 18px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.82)),
    var(--surface);
  border: 1px solid rgba(20,25,30,.08);
  box-shadow: 0 18px 50px rgba(15,23,42,.06);
}

.dashboard-feed-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.dashboard-feed-title-row {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.dashboard-feed-title-row .card-title {
  margin: 0;
  letter-spacing: -.04em;
}

.dashboard-feed-title-row .muted {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}

.dashboard-feed-icon,
.dashboard-summary-icon,
.dashboard-control-icon,
.dashboard-action-btn svg,
.dashboard-footer-btn svg {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.dashboard-feed-icon {
  width: 46px;
  height: 46px;
  border-radius: 18px;
  background: rgba(var(--primary-rgb), .08);
  color: var(--primary);
}

.dashboard-feed-icon svg,
.dashboard-summary-icon svg,
.dashboard-control-icon svg,
.dashboard-action-btn svg,
.dashboard-footer-btn svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-feed-icon--deals {
  background: rgba(var(--primary-rgb), .1);
}

.dashboard-feed-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-feed-actions--controls {
  gap: 12px;
}

.dashboard-select-control,
.dashboard-action-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.72);
  color: var(--text);
  box-shadow: 0 12px 26px rgba(15,23,42,.045);
}

.dashboard-select-control {
  position: relative;
  padding: 0 14px;
}

.dashboard-select-control select {
  min-width: 108px;
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font-size: 13px;
  font-weight: 900;
  padding: 0 18px 0 0;
  cursor: pointer;
}

.dashboard-select-control::after {
  content: '';
  width: 7px;
  height: 7px;
  margin-left: -18px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .65;
  pointer-events: none;
}

.dashboard-control-icon {
  color: var(--text);
}

.dashboard-action-btn {
  padding: 0 16px;
  font-size: 13px;
  font-weight: 900;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.dashboard-action-btn:hover,
.dashboard-select-control:focus-within,
.dashboard-select-control:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--primary-rgb), .2);
  box-shadow: 0 16px 30px rgba(15,23,42,.07);
}

.dashboard-action-btn--icon {
  width: 48px;
  padding: 0;
}

.dashboard-action-btn--wide span {
  color: var(--text);
}

.dashboard-feed-body {
  min-width: 0;
  flex: 1;
  min-height: 0;
  overflow: visible;
}

.dashboard-list-loading {
  min-height: 320px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 850;
  border: 1px dashed var(--border);
  border-radius: 24px;
  background: rgba(255,255,255,.55);
}

.dashboard-summary-strip {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.dashboard-summary-strip--payments {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-summary-strip--deals {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-summary-card {
  position: relative;
  min-width: 0;
  min-height: 94px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 17px 54px 17px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.66);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.dashboard-summary-card > span:not(.dashboard-summary-icon) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.dashboard-summary-card b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -.04em;
}

.dashboard-summary-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.dashboard-summary-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  transform: translateY(-50%);
  background: rgba(var(--primary-rgb), .08);
  color: var(--primary);
}

.dashboard-summary-card--info .dashboard-summary-icon,
.dashboard-avatar--info {
  background: rgba(37,99,235,.08);
  color: #2563eb;
}

.dashboard-summary-card--danger .dashboard-summary-icon,
.dashboard-avatar--danger {
  background: rgba(220,38,38,.08);
  color: #dc2626;
}

.dashboard-summary-card--progress .dashboard-summary-icon {
  background: rgba(var(--primary-rgb), .08);
  color: var(--primary);
}

.dashboard-payments-table,
.dashboard-deals-table {
  min-width: 0;
}

.dashboard-payments-head,
.dashboard-payment-row {
  display: grid;
  grid-template-columns: 110px minmax(210px, 1.25fr) minmax(150px, .9fr) minmax(120px, .75fr) minmax(120px, .7fr);
  gap: 14px;
  align-items: center;
}

.dashboard-deals-head,
.dashboard-deal-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.25fr) 92px 126px 116px 112px 118px 142px;
  gap: 14px;
  align-items: center;
}

.dashboard-payments-head,
.dashboard-deals-head {
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(248,250,252,.76);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-payment-row,
.dashboard-deal-row {
  width: 100%;
  margin: 0;
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid rgba(15,23,42,.06);
  background: transparent;
  color: var(--text);
  text-align: left;
  transition: background .16s ease, transform .16s ease;
}

.dashboard-payment-row {
  position: relative;
  cursor: pointer;
}

.dashboard-payment-row:hover,
.dashboard-deal-row:hover {
  background: rgba(var(--primary-rgb), .035);
}

.dashboard-payment-row:last-child,
.dashboard-deal-row:last-child {
  border-bottom: 0;
}

.dashboard-date-cell {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 4px;
  padding-left: 24px;
}

.dashboard-date-cell::before {
  content: '';
  position: absolute;
  left: 6px;
  top: -22px;
  bottom: -22px;
  width: 1px;
  background: rgba(37,99,235,.18);
}

.dashboard-date-cell i {
  position: absolute;
  left: 2px;
  top: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96,165,250,.14);
}

.dashboard-payment-row--success .dashboard-date-cell i,
.dashboard-payment-row--success .dashboard-date-cell::before {
  background: var(--primary);
}

.dashboard-payment-row--success .dashboard-date-cell i {
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .14);
}

.dashboard-payment-row--danger .dashboard-date-cell i,
.dashboard-payment-row--danger .dashboard-date-cell::before {
  background: #ef4444;
}

.dashboard-payment-row--danger .dashboard-date-cell i {
  box-shadow: 0 0 0 4px rgba(239,68,68,.14);
}

.dashboard-date-cell b,
.dashboard-date-plain {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.dashboard-date-cell small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-person-cell {
  min-width: 0;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.dashboard-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(var(--primary-rgb), .09);
  color: var(--primary);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .02em;
}

.dashboard-person-cell b,
.dashboard-deal-main b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.25;
}

.dashboard-person-cell small,
.dashboard-deal-main small,
.dashboard-deal-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.dashboard-contract-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.dashboard-money-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.dashboard-money-cell--positive {
  color: var(--primary);
}

.dashboard-money-cell--negative {
  color: #ef4444;
}

.dashboard-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  background: rgba(37,99,235,.08);
  color: #2563eb;
}

.dashboard-status-pill::before,
.dashboard-deal-status-cell .badge::before {
  content: '';
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: currentColor;
}

.dashboard-status-pill.success {
  background: rgba(var(--primary-rgb), .1);
  color: var(--primary);
}

.dashboard-status-pill.danger {
  background: rgba(220,38,38,.09);
  color: #dc2626;
}

.dashboard-status-pill.info {
  background: rgba(37,99,235,.08);
  color: #2563eb;
}

.dashboard-deal-row {
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-top: 12px;
  box-shadow: 0 10px 28px rgba(15,23,42,.035);
}

.dashboard-deal-main {
  min-width: 0;
  display: grid;
  gap: 4px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.dashboard-deal-main:hover b {
  color: var(--primary);
}

.dashboard-deal-status-cell .badge {
  min-height: 28px;
  justify-content: center;
}

.dashboard-progress-cell {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.dashboard-progress-cell b {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.dashboard-progress {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15,23,42,.1);
}

.dashboard-progress span,
.dashboard-progress i {
  display: block;
  height: 100%;
  width: 0;
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  box-shadow: 0 10px 20px rgba(var(--primary-rgb), .16);
}

.dashboard-progress--info i,
.dashboard-progress--info span {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  box-shadow: 0 10px 20px rgba(37,99,235,.16);
}

.dashboard-progress--danger i,
.dashboard-progress--danger span {
  background: linear-gradient(90deg, #ef4444, #dc2626);
  box-shadow: 0 10px 20px rgba(220,38,38,.14);
}

.dashboard-feed-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  gap: 14px;
  margin-top: 18px;
  padding-top: 10px;
}

.dashboard-feed-footer--deals {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 16px 18px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.dashboard-footer-btn {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.62);
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.dashboard-footer-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--primary-rgb), .2);
  background: rgba(var(--primary-rgb), .05);
}

.dashboard-footer-btn--accent {
  color: var(--primary);
}

.dashboard-inline-empty {
  margin: 16px 0 0;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed var(--border);
  background: rgba(255,255,255,.56);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.dashboard-empty-state {
  min-height: 320px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  border-radius: 24px;
  background: rgba(255,255,255,.56);
  border: 1px dashed var(--border);
}

.dashboard-empty-state b {
  color: var(--text);
  font-size: 16px;
}

.dashboard-empty-state span {
  max-width: 340px;
  font-size: 13px;
  line-height: 1.45;
}

.dashboard-empty-icon {
  width: 46px;
  height: 46px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(var(--primary-rgb), .1);
  color: var(--primary);
  font-size: 22px;
  font-weight: 950;
}

:root[data-theme="dark"] .dashboard-feed-card {
  background:
    linear-gradient(180deg, rgba(16,25,20,.94), rgba(12,19,15,.88)),
    var(--surface);
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}

:root[data-theme="dark"] .dashboard-select-control,
:root[data-theme="dark"] .dashboard-action-btn,
:root[data-theme="dark"] .dashboard-summary-card,
:root[data-theme="dark"] .dashboard-footer-btn,
:root[data-theme="dark"] .dashboard-inline-empty,
:root[data-theme="dark"] .dashboard-empty-state,
:root[data-theme="dark"] .dashboard-list-loading {
  background: rgba(255,255,255,.045);
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 12px 26px rgba(0,0,0,.18);
}

:root[data-theme="dark"] .dashboard-payments-head,
:root[data-theme="dark"] .dashboard-deals-head {
  background: rgba(255,255,255,.045);
  border-color: rgba(255,255,255,.08);
}

:root[data-theme="dark"] .dashboard-payment-row,
:root[data-theme="dark"] .dashboard-deal-row {
  border-color: rgba(255,255,255,.08);
}

:root[data-theme="dark"] .dashboard-progress {
  background: rgba(255,255,255,.12);
}

@media (max-width: 1380px) {
  #dashboard .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .dashboard-feed-card {
    padding: 22px;
  }

  .dashboard-summary-strip--payments,
  .dashboard-summary-strip--deals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-payments-table,
  .dashboard-deals-table {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .dashboard-payments-head,
  .dashboard-payment-row {
    min-width: 780px;
  }

  .dashboard-deals-head,
  .dashboard-deal-row {
    min-width: 1020px;
  }
}

@media (max-width: 720px) {
  .dashboard-feed-header {
    display: grid;
  }

  .dashboard-feed-actions {
    justify-content: flex-start;
  }

  .dashboard-select-control {
    flex: 1 1 160px;
  }

  .dashboard-action-btn--wide {
    flex: 1 1 160px;
  }

  .dashboard-summary-strip--payments,
  .dashboard-summary-strip--deals,
  .dashboard-feed-footer,
  .dashboard-feed-footer--deals {
    grid-template-columns: 1fr;
  }

  .dashboard-feed-footer--deals {
    justify-items: stretch;
  }

  .dashboard-footer-btn {
    width: 100%;
  }
}


.team-chat-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: calc(100vh - 186px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.team-chat-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, var(--muted) 8%);
}

.team-chat-sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 10px;
}

.team-chat-eyebrow {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
}

.team-chat-hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.team-chat-add-btn,
.team-chat-close-btn,
.team-chat-send-btn {
  display: inline-grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
}

.team-chat-add-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.team-chat-add-btn:hover,
.team-chat-close-btn:hover,
.team-chat-send-btn:hover {
  transform: translateY(-1px);
}

.team-chat-add-btn svg,
.team-chat-close-btn svg,
.team-chat-send-btn svg,
.team-chat-tab svg,
.team-chat-empty-state svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.team-chat-search {
  padding: 0 18px 12px;
}

.team-chat-search input {
  width: 100%;
}

.team-chat-participants {
  display: grid;
  gap: 8px;
  padding: 0 8px 14px;
  overflow: auto;
}

.team-chat-person {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.team-chat-person:hover {
  background: color-mix(in srgb, var(--primary-soft) 55%, transparent);
}

.team-chat-person.active {
  background: color-mix(in srgb, var(--primary-soft) 68%, var(--surface) 32%);
  box-shadow: inset 3px 0 0 var(--primary);
}

.team-chat-person-body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.team-chat-person-body b,
.team-chat-person-body span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-chat-person-body b {
  font-size: 14px;
}

.team-chat-person-body span {
  font-size: 12px;
  color: var(--muted);
}

.team-chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: color-mix(in srgb, var(--primary-soft) 80%, white 20%);
  color: var(--primary-dark);
  font-weight: 900;
  font-size: 13px;
}

.team-chat-avatar.small {
  width: 44px;
  height: 44px;
}

.team-chat-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  background: var(--surface);
}

.team-chat-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.team-chat-header-profile {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-chat-header-profile h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.team-chat-header-profile p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.team-chat-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
}

.team-chat-close-btn:hover {
  background: color-mix(in srgb, var(--muted) 10%, transparent);
  color: var(--text);
}

.team-chat-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px 0;
  border-bottom: 1px solid var(--border);
}

.team-chat-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.team-chat-tab.active {
  color: var(--primary-dark);
  border-color: var(--primary);
}

.team-chat-body {
  min-height: 360px;
  overflow: auto;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--primary-soft) 18%, transparent) 0, transparent 35%),
    var(--surface);
}

.team-chat-empty-state,
.team-chat-warning,
.team-chat-empty-side {
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}

.team-chat-empty-state svg {
  width: 34px;
  height: 34px;
  color: var(--muted);
  opacity: .75;
}

.team-chat-empty-state b,
.team-chat-warning b,
.team-chat-empty-side b {
  color: var(--text);
}

.team-chat-warning {
  min-height: 280px;
  max-width: 560px;
  margin: 0 auto;
}

.team-chat-warning span {
  white-space: pre-wrap;
}

.team-chat-empty-side {
  min-height: 160px;
  padding: 18px;
  font-size: 13px;
}

.team-chat-message-list {
  display: grid;
  gap: 12px;
  align-content: end;
  min-height: 100%;
}

.team-chat-message {
  display: flex;
  justify-content: flex-start;
}

.team-chat-message.mine {
  justify-content: flex-end;
}

.team-chat-message-bubble {
  max-width: min(680px, 78%);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 15px 15px 15px 5px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.team-chat-message.mine .team-chat-message-bubble {
  border-color: color-mix(in srgb, var(--primary) 25%, var(--border));
  border-radius: 15px 15px 5px 15px;
  background: color-mix(in srgb, var(--primary-soft) 62%, var(--surface) 38%);
}

.team-chat-message-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
}

.team-chat-message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.5;
}

.team-chat-mention,
.team-chat-deal-chip {
  color: var(--primary-dark);
  font-weight: 900;
}

.team-chat-deal-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  padding: 6px 9px;
  background: color-mix(in srgb, var(--primary-soft) 78%, white 22%);
  cursor: pointer;
  font-size: 12px;
}

.team-chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 10px;
  padding: 14px 16px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.team-chat-composer input {
  width: 100%;
  height: 44px;
  border-radius: 12px;
}

.team-chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
}

.team-chat-send-btn:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.team-chat-deals-list {
  display: grid;
  gap: 10px;
}

.team-chat-deal-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.team-chat-deal-number {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .03em;
  color: var(--muted);
}

.team-chat-deal-card h3 {
  margin: 4px 0;
  font-size: 15px;
}

.team-chat-deal-meta {
  display: grid;
  gap: 5px;
  justify-items: start;
  font-size: 12px;
}

@media (max-width: 980px) {
  .team-chat-shell {
    grid-template-columns: 1fr;
  }

  .team-chat-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    max-height: 310px;
  }

  .team-chat-body {
    min-height: 380px;
  }

  .team-chat-deal-card {
    grid-template-columns: 1fr;
  }
}


.team-chat-tasks-layout {
  display: grid;
  gap: 14px;
}

.team-chat-tasks-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0 4px;
}

.team-chat-section-kicker {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary-dark);
}

.team-chat-tasks-head h3 {
  margin: 4px 0 6px;
  font-size: 18px;
}

.team-chat-tasks-head p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.team-chat-task-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.team-chat-task-stats span {
  min-width: 104px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 9px 11px;
  background: color-mix(in srgb, var(--surface) 88%, var(--primary-soft) 12%);
  color: var(--muted);
  font-size: 12px;
}

.team-chat-task-stats b {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.team-chat-task-form,
.team-chat-inline-note,
.team-chat-task-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 96%, var(--primary-soft) 4%);
  box-shadow: var(--shadow-soft);
}

.team-chat-task-form {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.team-chat-task-form-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.team-chat-task-form-title b {
  color: var(--text);
}

.team-chat-task-form-title span {
  color: var(--muted);
  font-size: 12px;
}

.team-chat-task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.team-chat-task-grid .full {
  grid-column: 1 / -1;
}

.team-chat-task-grid textarea {
  min-height: 86px;
}

.team-chat-task-form-actions {
  display: flex;
  justify-content: flex-end;
}

.team-chat-inline-note {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.team-chat-task-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-chat-task-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.team-chat-task-filter:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--primary) 42%, var(--border));
  color: var(--text);
}

.team-chat-task-filter.active {
  border-color: color-mix(in srgb, var(--primary) 52%, var(--border));
  background: color-mix(in srgb, var(--primary-soft) 72%, var(--surface) 28%);
  color: var(--primary-dark);
}

.team-chat-task-filter span {
  min-width: 22px;
  border-radius: 999px;
  padding: 2px 6px;
  background: color-mix(in srgb, var(--muted) 10%, transparent);
  color: inherit;
  text-align: center;
  font-size: 11px;
}

.team-chat-task-list {
  display: grid;
  gap: 10px;
}

.team-chat-task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
}

.team-chat-task-card.overdue {
  border-color: color-mix(in srgb, var(--danger) 38%, var(--border));
  background: color-mix(in srgb, var(--danger-soft) 32%, var(--surface) 68%);
}

.team-chat-task-card.done {
  opacity: .86;
}

.team-chat-task-main {
  min-width: 0;
}

.team-chat-task-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.team-chat-task-card h4 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
}

.team-chat-task-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.team-chat-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.team-chat-task-meta b {
  color: var(--text);
}

.team-chat-task-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.team-chat-empty-state.compact {
  min-height: 220px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 94%, var(--primary-soft) 6%);
}

@media (max-width: 760px) {
  .team-chat-tasks-head,
  .team-chat-task-form-title {
    flex-direction: column;
    align-items: stretch;
  }

  .team-chat-task-stats {
    justify-content: stretch;
  }

  .team-chat-task-stats span {
    flex: 1 1 120px;
  }

  .team-chat-task-grid,
  .team-chat-task-card {
    grid-template-columns: 1fr;
  }

  .team-chat-task-actions {
    justify-content: flex-start;
  }
}

.team-chat-task-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  margin-left: 6px;
  border: 0;
  border-radius: 999px;
  padding: 6px 9px;
  background: color-mix(in srgb, var(--primary-soft) 76%, white 24%);
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.team-chat-task-card.pulse {
  animation: team-chat-task-pulse 1.2s ease;
}

@keyframes team-chat-task-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 34%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--primary) 10%, transparent); }
  100% { box-shadow: var(--shadow-soft); }
}


.team-chat-composer {
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  position: relative;
}

.team-chat-voice-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, var(--primary-soft) 12%);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

.team-chat-voice-btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  background: color-mix(in srgb, var(--primary-soft) 72%, var(--surface) 28%);
}

.team-chat-voice-btn.recording {
  border-color: color-mix(in srgb, #ef4444 55%, var(--border));
  background: color-mix(in srgb, #ef4444 16%, var(--surface) 84%);
  color: #ef4444;
  animation: team-chat-recording-pulse 1.1s ease-in-out infinite;
}

.team-chat-voice-btn svg,
.team-chat-send-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.team-chat-voice-status {
  position: absolute;
  left: 68px;
  right: 68px;
  top: -46px;
  z-index: 2;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid color-mix(in srgb, #ef4444 24%, var(--border));
  border-radius: 999px;
  padding: 8px 11px;
  background: color-mix(in srgb, var(--surface) 92%, #ef4444 8%);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.team-chat-voice-status[hidden] {
  display: none;
}

.team-chat-voice-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 0 color-mix(in srgb, #ef4444 35%, transparent);
  animation: team-chat-voice-dot 1s ease-in-out infinite;
}

.team-chat-voice-status button {
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  padding: 5px 9px;
  background: color-mix(in srgb, #ef4444 12%, var(--surface) 88%);
  color: #b91c1c;
  font-size: 12px;
  font-weight: 900;
}

.team-chat-voice-message {
  min-width: min(360px, 64vw);
  display: grid;
  grid-template-columns: 34px minmax(160px, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.team-chat-voice-message.unavailable {
  grid-template-columns: 34px minmax(0, 1fr);
  color: var(--muted);
}

.team-chat-voice-message.unavailable b {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.team-chat-voice-message.unavailable span:last-child {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
}

.team-chat-voice-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--primary-soft) 76%, var(--surface) 24%);
  color: var(--primary-dark);
  font-size: 16px;
}

.team-chat-voice-message audio {
  width: 100%;
  min-width: 160px;
  height: 36px;
  accent-color: var(--primary);
}

.team-chat-voice-meta {
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

@keyframes team-chat-recording-pulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-1px) scale(1.03); }
}

@keyframes team-chat-voice-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, #ef4444 35%, transparent); }
  50% { opacity: .7; box-shadow: 0 0 0 7px color-mix(in srgb, #ef4444 0%, transparent); }
}

@media (max-width: 640px) {
  .team-chat-composer {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 8px;
    padding: 12px;
  }

  .team-chat-voice-btn,
  .team-chat-send-btn {
    width: 40px;
    height: 40px;
  }

  .team-chat-voice-status {
    left: 12px;
    right: 12px;
    top: -48px;
  }

  .team-chat-voice-message {
    min-width: min(270px, 72vw);
    grid-template-columns: 30px minmax(140px, 1fr);
  }

  .team-chat-voice-meta {
    grid-column: 2;
  }
}


.notification-bell-btn {
  position: relative;
}

.notification-bell-btn.has-unread::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .18);
}

.notification-bell-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 950;
  color: #fff;
  background: #ef4444;
  border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 10px 24px rgba(239, 68, 68, .28);
}

.notification-panel {
  position: fixed;
  top: 86px;
  right: clamp(16px, 3vw, 34px);
  z-index: 950;
  width: min(430px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 110px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(20, 25, 30, .08);
  border-radius: 28px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 30px 90px rgba(15, 23, 42, .18);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  overflow: hidden;
}

.notification-panel[hidden] {
  display: none;
}

.notification-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.notification-panel-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.04em;
}

.notification-panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.notification-panel-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.notification-panel-close svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.notification-panel-list,
.notifications-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.notification-panel-list {
  overflow: auto;
  padding-right: 3px;
}

.notifications-page {
  display: grid;
  gap: 18px;
}

.notifications-layout {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.notifications-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 22px;
  padding: 18px 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 16px 44px rgba(15, 23, 42, .055);
}

.notifications-sidebar-block {
  display: grid;
  gap: 10px;
}

.notifications-sidebar-block h3 {
  margin: 0;
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .05em;
}

.notification-category-list {
  display: grid;
  gap: 5px;
}

.notification-category-list.compact {
  gap: 6px;
}

.notification-category-item {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 8px 9px;
  background: transparent;
  color: var(--text);
  font-weight: 850;
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, color .16s ease;
}

.notification-category-item:hover {
  transform: translateX(1px);
  background: rgba(15, 23, 42, .04);
  border-color: rgba(20, 25, 30, .06);
}

.notification-category-item.active {
  color: var(--primary);
  border-color: rgba(var(--primary-rgb), .14);
  background: linear-gradient(135deg, rgba(var(--primary-rgb), .12), rgba(255,255,255,.68));
}

.notification-category-item span:not(.notification-category-icon) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.notification-category-item b {
  min-width: 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.notification-category-item.active b {
  color: var(--primary);
}

.notification-category-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--primary);
  background: rgba(var(--primary-rgb), .10);
}

.notification-category-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-category-item[data-notification-category="system"] .notification-category-icon { color: #7c3aed; background: rgba(124, 58, 237, .10); }
.notification-category-item[data-notification-category="tasks"] .notification-category-icon { color: #2563eb; background: rgba(37, 99, 235, .10); }
.notification-category-item[data-notification-category="chat"] .notification-category-icon { color: #10b981; background: rgba(16, 185, 129, .10); }
.notification-category-item[data-notification-category="payments"] .notification-category-icon { color: #f97316; background: rgba(249, 115, 22, .11); }
.notification-category-item[data-notification-category="team"] .notification-category-icon { color: #8b5cf6; background: rgba(139, 92, 246, .10); }
.notification-category-item[data-notification-category="reminders"] .notification-category-icon { color: #64748b; background: rgba(100, 116, 139, .10); }
.notification-category-item[data-notification-sidebar-filter="important"] .notification-category-icon { color: #f97316; background: rgba(249, 115, 22, .11); }
.notification-category-item[data-notification-sidebar-filter="attachments"] .notification-category-icon { color: #64748b; background: rgba(100, 116, 139, .10); }

.notification-sidebar-settings {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  border: 1px solid rgba(20, 25, 30, .08);
  border-radius: 14px;
  padding: 9px 12px;
  background: rgba(255,255,255,.72);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(15,23,42,.045);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.notification-sidebar-settings:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--primary-rgb), .18);
  box-shadow: 0 16px 38px rgba(15,23,42,.07);
}

.notification-sidebar-settings-icon,
.notification-sidebar-settings-icon svg {
  width: 16px;
  height: 16px;
}

.notification-sidebar-settings-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notifications-list-card {
  overflow: hidden;
}

.notifications-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), .14), rgba(255,255,255,.72));
}

.notifications-hero h2 {
  margin: 5px 0 8px;
  font-size: clamp(22px, 2.2vw, 32px);
  letter-spacing: -.05em;
}

.notifications-hero p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  line-height: 1.5;
}

.notifications-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.notification-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.notification-stat-card {
  padding: 18px;
  border: 1px solid rgba(20, 25, 30, .07);
  border-radius: 24px;
  background: rgba(255,255,255,.68);
  box-shadow: 0 16px 44px rgba(15,23,42,.06);
  display: grid;
  gap: 5px;
}

.notification-stat-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.notification-stat-card b {
  font-size: 28px;
  letter-spacing: -.05em;
}

.notification-stat-card small {
  color: var(--muted);
  line-height: 1.35;
}

.notification-stat-card.info {
  border-color: rgba(var(--primary-rgb), .22);
  background: linear-gradient(135deg, rgba(var(--primary-rgb), .13), rgba(255,255,255,.76));
}

.notification-stat-card.warning {
  border-color: rgba(245, 158, 11, .24);
  background: linear-gradient(135deg, rgba(255,244,219,.9), rgba(255,255,255,.76));
}

.notifications-grid {
  align-items: start;
}

.notifications-list-card,
.notification-create-card {
  min-height: 100%;
}

.notification-filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .05);
}

.notification-filter-tab {
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  background: transparent;
}

.notification-filter-tab.active,
.notification-filter-tab:hover {
  color: #fff;
  background: var(--primary);
}

.notification-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(20, 25, 30, .07);
  border-radius: 22px;
  background: rgba(255,255,255,.72);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.notification-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 46px rgba(15, 23, 42, .08);
}

.notification-item.is-unread {
  border-color: rgba(var(--primary-rgb), .24);
  background: linear-gradient(135deg, rgba(var(--primary-rgb), .10), rgba(255,255,255,.82));
}

.notification-item.compact {
  grid-template-columns: 40px minmax(0, 1fr);
  padding: 12px;
}

.notification-item.compact .notification-item-actions {
  grid-column: 2;
  justify-content: flex-start;
}

.notification-item-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(var(--primary-rgb), .12);
  color: var(--primary);
}

.notification-item.warning .notification-item-icon { background: rgba(245, 158, 11, .14); color: #d97706; }
.notification-item.danger .notification-item-icon { background: rgba(239, 68, 68, .13); color: #dc2626; }
.notification-item.success .notification-item-icon { background: rgba(17, 136, 79, .13); color: #11884f; }
.notification-item.neutral .notification-item-icon { background: rgba(100, 116, 139, .12); color: #64748b; }

.notification-item-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-item-body {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.notification-item-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.notification-item-topline h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -.02em;
}

.notification-item-topline time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.notification-item-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.notification-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.notification-new-label,
.notification-read-label {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}

.notification-new-label {
  color: var(--primary);
}

.notification-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.notification-empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 26px;
  border-radius: 24px;
  background: rgba(255,255,255,.55);
  color: var(--muted);
  text-align: center;
}

.notification-empty-state svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .7;
}

.notification-empty-state b {
  color: var(--text);
  font-size: 16px;
}

@media (max-width: 1100px) {
  .notifications-layout {
    grid-template-columns: 1fr;
  }

  .notifications-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .notification-sidebar-settings {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .notification-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .notifications-hero-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .notification-panel {
    top: 74px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100vh - 90px);
    border-radius: 24px;
  }

  .notification-stats-grid {
    grid-template-columns: 1fr;
  }

  .notifications-sidebar {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .notifications-list-card .card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .notification-filter-tabs {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

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

  .notification-item-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .notification-item-topline {
    flex-direction: column;
    gap: 4px;
  }
}


.rail-global-btn {
  position: relative;
}

.rail-unread-badge,
.team-chat-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(239, 68, 68, .25);
}

.rail-unread-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  font-size: 10px;
  border: 2px solid var(--surface);
}

.team-chat-person {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.team-chat-person.has-unread .team-chat-person-body b {
  color: var(--primary-dark);
}

.team-chat-person.has-unread .team-chat-person-body span::after {
  content: ' · новое';
  color: #ef4444;
  font-weight: 900;
}

.team-chat-user-mention {
  display: inline-flex;
  border-radius: 999px;
  padding: 0 5px;
  background: color-mix(in srgb, var(--primary-soft) 70%, transparent);
}

.team-chat-message-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .16s ease, transform .16s ease;
}

.team-chat-message-bubble:hover .team-chat-message-actions,
.team-chat-message-bubble:focus-within .team-chat-message-actions {
  opacity: 1;
  transform: translateY(0);
}

.team-chat-message-action,
.team-chat-source-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 900;
}

.team-chat-message-action {
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  background: color-mix(in srgb, var(--surface) 82%, var(--primary-soft) 18%);
  color: var(--primary-dark);
  cursor: pointer;
}

.team-chat-message-action:hover {
  background: color-mix(in srgb, var(--primary-soft) 78%, var(--surface) 22%);
}

.team-chat-source-chip {
  margin-top: 8px;
  background: color-mix(in srgb, var(--muted) 10%, transparent);
  color: var(--muted);
}

.team-chat-task-draft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 14px;
  border: 1px dashed color-mix(in srgb, var(--primary) 34%, var(--border));
  border-radius: 14px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--primary-soft) 48%, transparent);
  color: var(--text);
}

.team-chat-task-draft span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.team-chat-task-draft button {
  border: 0;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

@media (hover: none) {
  .team-chat-message-actions {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 640px) {
  .rail-unread-badge {
    top: 3px;
    right: 3px;
  }

  .team-chat-task-draft {
    align-items: stretch;
    flex-direction: column;
  }

  .team-chat-task-draft span {
    white-space: normal;
  }
}


#teamChat.section.active,
#teamChat.section:not([hidden]) {
  min-height: 0;
}

.team-chat-shell {
  height: clamp(620px, calc(100vh - 156px), 880px);
  max-height: calc(100vh - 128px);
  min-height: 520px;
}

@supports (height: 100dvh) {
  .team-chat-shell {
    height: clamp(620px, calc(100dvh - 156px), 880px);
    max-height: calc(100dvh - 128px);
  }
}

.team-chat-sidebar,
.team-chat-panel {
  min-height: 0;
}

.team-chat-participants {
  min-height: 0;
}

.team-chat-body {
  min-height: 0;
}

.team-chat-composer {
  isolation: isolate;
}

.team-chat-autocomplete {
  position: absolute;
  left: 68px;
  right: 68px;
  bottom: calc(100% + 8px);
  z-index: 8;
  max-height: min(360px, 44vh);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 96%, white 4%);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
}

.team-chat-autocomplete[hidden] {
  display: none;
}

.team-chat-autocomplete-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 9px;
  border-bottom: 1px solid var(--border);
}

.team-chat-autocomplete-head b {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.team-chat-autocomplete-head span {
  max-width: 54%;
  color: var(--muted);
  text-align: right;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.team-chat-autocomplete-list {
  max-height: min(295px, 34vh);
  overflow: auto;
  padding: 6px;
}

.team-chat-autocomplete-item {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 13px;
  padding: 9px 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}

.team-chat-autocomplete-item:hover,
.team-chat-autocomplete-item.active {
  background: color-mix(in srgb, var(--primary-soft) 72%, transparent);
}

.team-chat-autocomplete-item.active {
  transform: translateY(-1px);
}

.team-chat-autocomplete-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--primary-soft) 75%, var(--surface) 25%);
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 950;
}

.team-chat-autocomplete-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.team-chat-autocomplete-main b,
.team-chat-autocomplete-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-chat-autocomplete-main b {
  font-size: 13px;
  font-weight: 900;
}

.team-chat-autocomplete-main small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.team-chat-autocomplete-value {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  padding: 5px 8px;
  background: color-mix(in srgb, var(--muted) 9%, transparent);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.team-chat-autocomplete-empty {
  padding: 16px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.team-chat-client-mention,
.team-chat-task-mention {
  display: inline-flex;
  border-radius: 999px;
  padding: 0 5px;
  background: color-mix(in srgb, var(--muted) 10%, transparent);
}

@media (max-width: 980px) {
  .team-chat-shell {
    height: auto;
    max-height: none;
    min-height: 0;
  }

  .team-chat-panel {
    min-height: min(640px, calc(100vh - 170px));
  }

  @supports (height: 100dvh) {
    .team-chat-panel {
      min-height: min(640px, calc(100dvh - 170px));
    }
  }
}

@media (max-width: 640px) {
  .team-chat-autocomplete {
    left: 12px;
    right: 12px;
    bottom: calc(100% + 7px);
    max-height: min(330px, 48vh);
    border-radius: 16px;
  }

  .team-chat-autocomplete-head {
    flex-direction: column;
    gap: 4px;
  }

  .team-chat-autocomplete-head span {
    max-width: none;
    text-align: left;
  }

  .team-chat-autocomplete-item {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .team-chat-autocomplete-value {
    grid-column: 2;
    max-width: 100%;
    justify-self: start;
  }
}


.field-error {
  min-height: 0;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 650;
  color: var(--danger);
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .16s ease, transform .16s ease;
}

.field-error:not(:empty) {
  margin-top: 2px;
  opacity: 1;
  transform: translateY(0);
}

.field.has-error > label,
.field.has-error > .field-label {
  color: var(--danger);
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: rgba(var(--danger-rgb), .62);
  background: rgba(var(--danger-rgb), .04);
}

input.is-invalid:focus,
select.is-invalid:focus,
textarea.is-invalid:focus {
  border-color: rgba(var(--danger-rgb), .8);
  box-shadow: 0 0 0 4px rgba(var(--danger-rgb), .13);
}


.clients-page-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.clients-list-card,
.clients-create-card,
.client-wizard-layout {
  min-width: 0;
}

.clients-list-header {
  align-items: flex-start;
}

.clients-list-toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.clients-search-field {
  max-width: 680px;
}

.clients-search-input {
  min-height: 44px;
}

.clients-filter-pills .filter-pill span:not(:empty) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.38);
  color: currentColor;
  font-size: 11px;
  font-weight: 950;
}

.client-list-person,
.client-list-phone,
.client-list-deals,
.client-list-overdue {
  display: grid;
  gap: 4px;
}

.client-list-name,
.inline-link-btn {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.client-list-name:hover,
.inline-link-btn:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.client-list-meta,
.client-list-phone span,
.client-list-deals .inline-link-btn,
.client-list-overdue span:not(.badge) {
  color: var(--muted);
  font-size: 12px;
}

.client-list-meta {
  display: grid;
  gap: 2px;
}

.client-list-actions {
  min-width: 260px;
  flex-wrap: wrap;
}

.client-list-actions .btn {
  padding-inline: 10px;
}

.clients-mobile-cards {
  display: none;
}

.client-list-mobile-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface-soft);
}

.client-list-mobile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.client-list-mobile-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.client-list-mobile-metrics div {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.client-list-mobile-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  margin-bottom: 4px;
}

.client-list-mobile-metrics b {
  font-size: 13px;
}

@media (max-width: 1180px) {
  .clients-page-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .clients-list-header {
    display: grid;
  }

  .clients-desktop-table {
    display: none;
  }

  .clients-mobile-cards {
    display: grid;
    gap: 12px;
  }

  .client-list-mobile-head {
    display: grid;
  }

  .client-list-mobile-metrics {
    grid-template-columns: 1fr;
  }

  .client-list-actions {
    min-width: 0;
  }
}


.client-profile-hero {
  overflow: visible;
}

.client-profile-toolbar {
  align-items: flex-start;
}

.client-profile-actions {
  flex-wrap: wrap;
}

.client-profile-hero-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.client-profile-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.client-profile-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.client-profile-title-row h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 42px);
  letter-spacing: -.04em;
  line-height: 1.05;
}

.client-profile-statuses,
.client-doc-coverage {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.client-profile-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.client-profile-meta span {
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.client-profile-warning {
  margin-top: 4px;
  max-width: 760px;
}

.client-profile-kpi-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.client-profile-kpi {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px;
  background: rgba(255,255,255,.09);
  backdrop-filter: blur(12px);
}

.client-profile-kpi.danger {
  border-color: rgba(239,68,68,.34);
  background: rgba(239,68,68,.12);
}

.client-profile-kpi span,
.client-profile-kpi small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.client-profile-kpi b {
  display: block;
  margin: 6px 0 3px;
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-profile-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface-soft);
  box-shadow: var(--shadow-soft);
}

.client-profile-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.client-profile-tab:hover,
.client-profile-tab.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
}

.client-profile-tab span {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), .12);
  color: var(--primary);
  font-size: 11px;
  font-weight: 950;
}

.client-profile-panel {
  display: none;
}

.client-profile-panel.active {
  display: block;
}

.client-card-overview-grid,
.client-risk-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.client-card-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 16px;
  align-items: start;
}

.client-next-action-card {
  display: grid;
  gap: 14px;
}

.client-next-action-main {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
}

.client-next-action-main span,
.client-next-action-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.client-next-action-main b {
  color: var(--text);
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -.03em;
}

.client-risk-summary-card,
.client-risk-score-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-soft);
}

.client-risk-summary-card div {
  display: grid;
  gap: 3px;
}

.client-risk-summary-card span,
.client-risk-score-card span,
.client-risk-score-card p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.client-risk-summary-card b,
.client-risk-score-card b {
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
}

.client-risk-score-card strong {
  color: var(--text);
  font-size: 44px;
  font-weight: 950;
  letter-spacing: -.06em;
}

.client-risk-summary-card.high,
.client-risk-summary-card.critical,
.client-risk-score-card.high,
.client-risk-score-card.critical {
  border-color: rgba(239,68,68,.34);
  background: rgba(239,68,68,.08);
}

.client-risk-summary-card.medium,
.client-risk-score-card.medium {
  border-color: rgba(245,158,11,.34);
  background: rgba(245,158,11,.08);
}

.client-risk-summary-card.low,
.client-risk-score-card.low {
  border-color: rgba(var(--primary-rgb), .24);
  background: rgba(var(--primary-rgb), .08);
}

.client-risk-mini-list,
.client-risk-list,
.client-risk-checks {
  display: grid;
  gap: 8px;
}

.client-risk-mini-list div,
.client-risk-list div,
.client-risk-check {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.client-risk-list.danger div,
.client-risk-check.bad {
  border-color: rgba(239,68,68,.25);
  background: rgba(239,68,68,.07);
}

.client-risk-list.success div,
.client-risk-check.ok {
  border-color: rgba(var(--primary-rgb), .22);
  background: rgba(var(--primary-rgb), .07);
}

.client-risk-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.client-risk-check span {
  color: var(--muted);
}

.client-risk-check b {
  text-align: right;
}

.client-docs-summary {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
}

.client-docs-summary b {
  color: var(--text);
  font-size: 34px;
  font-weight: 950;
  letter-spacing: -.05em;
}

.client-docs-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.client-doc-coverage {
  margin-top: 12px;
}

.client-mini-row {
  position: relative;
  padding-right: 4px;
}

.client-history-timeline {
  position: relative;
  display: grid;
  gap: 12px;
  padding-left: 10px;
}

.client-history-timeline::before {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 18px;
  width: 2px;
  background: var(--border);
}

.client-history-item {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
}

.client-history-dot {
  width: 18px;
  height: 18px;
  margin: 5px auto 0;
  border: 4px solid var(--surface);
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 1px var(--border);
  z-index: 1;
}

.client-history-content {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
}

.client-history-content span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.client-history-content b {
  color: var(--text);
  font-weight: 950;
}

.client-history-content p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1180px) {
  .client-profile-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .client-card-two-col,
  .client-card-overview-grid,
  .client-risk-panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .client-profile-toolbar,
  .client-profile-title-row,
  .client-profile-hero-grid {
    display: grid;
  }

  .client-profile-actions {
    width: 100%;
  }

  .client-profile-actions .btn {
    flex: 1 1 auto;
  }

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

  .client-profile-tabs {
    margin-inline: -4px;
  }

  .client-profile-tab {
    min-width: max-content;
  }

  .client-risk-check {
    align-items: flex-start;
    display: grid;
  }

  .client-risk-check b {
    text-align: left;
  }
}


.employee-efficiency-card {
  overflow: hidden;
}

.employee-efficiency-header {
  align-items: end;
}

.employee-efficiency-controls {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-top: 0;
}

.employee-efficiency-controls .field {
  min-width: 180px;
  margin-bottom: 0;
}

.employee-efficiency-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.employee-efficiency-insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.employee-efficiency-insight {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface-soft);
}

.employee-efficiency-insight span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.employee-efficiency-insight b {
  display: block;
  font-size: 18px;
  letter-spacing: -.03em;
}

.employee-efficiency-insight p {
  margin: 6px 0 0;
  color: var(--text-soft);
  line-height: 1.45;
}

.employee-efficiency-warning {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.employee-efficiency-rank {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(var(--primary-rgb), .10);
  color: var(--primary-dark);
  font-weight: 950;
}

.employee-efficiency-score b {
  font-size: 20px;
  letter-spacing: -.04em;
}

.employee-efficiency-score span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.employee-efficiency-progress {
  height: 8px;
  min-width: 120px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, .08);
}

.employee-efficiency-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}

@media (max-width: 1180px) {
  .employee-efficiency-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-efficiency-insights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .employee-efficiency-header,
  .employee-efficiency-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .employee-efficiency-controls .field,
  .employee-efficiency-controls .btn {
    width: 100%;
  }

  .employee-efficiency-stats {
    grid-template-columns: 1fr;
  }
}


.app-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 17, 20, .44);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.app-dialog-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.app-dialog-backdrop.is-leaving {
  opacity: 0;
}

.app-dialog-card {
  width: min(560px, 100%);
  overflow: hidden;
  border: 1px solid rgba(20, 25, 30, .09);
  border-radius: 20px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 28px 90px rgba(15, 23, 42, .22), 0 1px 0 rgba(255, 255, 255, .7) inset;
  transform: translateY(10px) scale(.98);
  transition: transform .18s ease;
}

.app-dialog-backdrop.show .app-dialog-card {
  transform: translateY(0) scale(1);
}

.app-dialog-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 12px 18px;
  background: #eeeeef;
  color: var(--text-soft);
}

.app-dialog-strip-title {
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -.02em;
}

.app-dialog-close {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: currentColor;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease, color .15s ease;
}

.app-dialog-close:hover,
.app-dialog-close:focus-visible {
  background: rgba(0, 0, 0, .06);
  color: var(--text);
  outline: none;
  transform: rotate(8deg);
}

.app-dialog-close svg,
.app-dialog-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-dialog-body {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 22px;
  padding: 28px 30px 26px;
}

.app-dialog-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  align-self: start;
  margin-top: 2px;
  border: 2px solid rgba(20, 25, 30, .16);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .55);
}

.app-dialog-icon svg {
  width: 38px;
  height: 38px;
}

.app-dialog-content {
  min-width: 0;
}

.app-dialog-title {
  margin: 0 0 10px;
  color: var(--text);
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.app-dialog-message {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.55;
}

.app-dialog-message p {
  margin: 0;
}

.app-dialog-field {
  margin-top: 18px;
}

.app-dialog-field span {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-top: 1px solid rgba(20, 25, 30, .08);
  background: rgba(20, 25, 30, .035);
}

.app-dialog-actions .btn {
  min-width: 118px;
}

.app-dialog--success .app-dialog-strip,
.app-dialog--success .app-dialog-actions {
  background: rgba(17, 136, 79, .12);
  border-color: rgba(17, 136, 79, .12);
}

.app-dialog--success .app-dialog-strip,
.app-dialog--success .app-dialog-title,
.app-dialog--success .app-dialog-icon {
  color: var(--success);
}

.app-dialog--danger .app-dialog-strip,
.app-dialog--danger .app-dialog-actions {
  background: rgba(var(--danger-rgb), .10);
  border-color: rgba(var(--danger-rgb), .12);
}

.app-dialog--danger .app-dialog-strip,
.app-dialog--danger .app-dialog-title,
.app-dialog--danger .app-dialog-icon {
  color: var(--danger);
}

.app-dialog--warning .app-dialog-strip,
.app-dialog--warning .app-dialog-actions {
  background: rgba(217, 119, 6, .12);
  border-color: rgba(217, 119, 6, .16);
}

.app-dialog--warning .app-dialog-strip,
.app-dialog--warning .app-dialog-title,
.app-dialog--warning .app-dialog-icon {
  color: var(--warning);
}

.app-dialog--info .app-dialog-strip,
.app-dialog--info .app-dialog-actions,
.app-dialog--action .app-dialog-strip,
.app-dialog--action .app-dialog-actions {
  background: rgba(37, 99, 235, .10);
  border-color: rgba(37, 99, 235, .13);
}

.app-dialog--info .app-dialog-strip,
.app-dialog--info .app-dialog-title,
.app-dialog--info .app-dialog-icon,
.app-dialog--action .app-dialog-strip,
.app-dialog--action .app-dialog-title,
.app-dialog--action .app-dialog-icon {
  color: var(--info);
}

@media (max-width: 640px) {
  .app-dialog-backdrop {
    padding: 14px;
    align-items: flex-end;
  }

  .app-dialog-card {
    border-radius: 20px;
  }

  .app-dialog-body {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 22px 18px 20px;
  }

  .app-dialog-icon {
    width: 58px;
    height: 58px;
  }

  .app-dialog-icon svg {
    width: 28px;
    height: 28px;
  }

  .app-dialog-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .app-dialog-actions .btn {
    width: 100%;
  }
}


#tasks.section.active {
  display: block;
  min-height: calc(100dvh - 176px);
}

.tasks-page {
  --task-blue: #2f80ed;
  --task-green: #14945c;
  --task-orange: #f59e0b;
  --task-red: #ef4444;
  --task-gray: #7b8794;
  --task-card-bg: rgba(255, 255, 255, .82);
  --task-panel-bg: rgba(255, 255, 255, .64);
  --task-panel-border: rgba(20, 25, 30, .085);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: calc(100dvh - 190px);
}

.tasks-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px 2px;
}

.tasks-page-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -.055em;
  font-weight: 950;
  color: var(--text);
}

.tasks-page-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.tasks-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(var(--primary-rgb), .20);
}

.tasks-primary-action span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  font-size: 17px;
  line-height: 1;
}

.task-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.task-stat-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 118px;
  padding: 20px 22px;
  border-radius: 22px;
  background: var(--task-card-bg);
  border: 1px solid var(--task-panel-border);
  box-shadow: 0 16px 38px rgba(20, 25, 30, .055);
  overflow: hidden;
}

.task-stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 0%, rgba(255,255,255,.82), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,0));
}

.task-stat-card > * { position: relative; z-index: 1; }

.task-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--task-green);
  background: rgba(20, 148, 92, .10);
}

.task-stat-card--orange .task-stat-icon {
  color: var(--task-orange);
  background: rgba(245, 158, 11, .12);
}

.task-stat-card--red .task-stat-icon {
  color: var(--task-red);
  background: rgba(239, 68, 68, .11);
}

.task-stat-body span {
  display: block;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.task-stat-body b {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -.06em;
  color: var(--text);
}

.task-stat-body small {
  display: block;
  margin-top: 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 850;
}

.task-stat-card--orange .task-stat-body small { color: var(--task-orange); }
.task-stat-card--red .task-stat-body small { color: var(--task-red); }

.task-stat-ring {
  --progress-color: var(--task-green);
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    conic-gradient(var(--progress-color) calc(var(--task-progress) * 1%), rgba(20,25,30,.08) 0),
    #fff;
  box-shadow: inset 0 0 0 1px rgba(20,25,30,.05);
}

.task-stat-card--orange .task-stat-ring { --progress-color: var(--task-orange); }
.task-stat-card--red .task-stat-ring { --progress-color: var(--task-red); }

.task-stat-ring::before {
  content: '';
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid rgba(20,25,30,.05);
}

.task-stat-ring i {
  position: relative;
  z-index: 1;
  font-style: normal;
  font-size: 12px;
  font-weight: 950;
  color: var(--text-soft);
}

.task-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--task-panel-border);
  border-radius: 22px;
  background: rgba(255,255,255,.74);
  box-shadow: 0 14px 34px rgba(20,25,30,.045);
}

.task-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 4px;
  border-radius: 16px;
  background: rgba(246, 248, 250, .92);
  border: 1px solid rgba(20,25,30,.06);
}

.task-view-switch .filter-pill {
  min-height: 38px;
  border-radius: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--text-soft);
}

.task-view-switch .filter-pill.active {
  color: var(--primary);
  background: #fff;
  box-shadow: 0 8px 18px rgba(20,25,30,.06);
}

.task-filter-grid {
  display: grid;
  grid-template-columns: minmax(160px, 190px) minmax(150px, 170px) minmax(260px, 520px) 44px;
  gap: 10px;
  align-items: center;
  flex: 1 1 auto;
  justify-content: end;
}

.task-select-field,
.task-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.task-select-field > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.task-select-field select,
.task-search-wrap input {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(20,25,30,.08);
  background: rgba(255,255,255,.94);
  box-shadow: none;
  font-size: 14px;
}

.task-search-wrap span {
  position: absolute;
  right: 14px;
  z-index: 1;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.task-search-wrap input {
  padding-right: 42px;
}

.task-filter-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(20,25,30,.08);
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.task-filter-icon:hover {
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

.task-kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(210px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scroll-snap-type: x proximity;
}

.task-kanban-column {
  min-height: 528px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid var(--task-panel-border);
  background: rgba(255,255,255,.54);
  box-shadow: 0 16px 36px rgba(20,25,30,.045);
  scroll-snap-align: start;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.task-kanban-column--blue { background: linear-gradient(180deg, rgba(47,128,237,.045), rgba(255,255,255,.64)); }
.task-kanban-column--orange { background: linear-gradient(180deg, rgba(245,158,11,.055), rgba(255,255,255,.64)); }
.task-kanban-column--red { background: linear-gradient(180deg, rgba(239,68,68,.06), rgba(255,255,255,.64)); }
.task-kanban-column--green { background: linear-gradient(180deg, rgba(20,148,92,.055), rgba(255,255,255,.64)); }
.task-kanban-column--gray { background: linear-gradient(180deg, rgba(123,135,148,.055), rgba(255,255,255,.64)); }

.task-kanban-column.is-drop-target {
  border-color: rgba(var(--primary-rgb), .45);
  background: rgba(var(--primary-rgb), .07);
  box-shadow: inset 0 0 0 2px rgba(var(--primary-rgb), .12), 0 18px 40px rgba(20,25,30,.08);
}

.task-kanban-column[data-task-drop-disabled="true"] {
  background: linear-gradient(180deg, rgba(239,68,68,.05), rgba(255,255,255,.62));
}

.task-kanban-column-head {
  padding: 0 2px 4px;
}

.task-kanban-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.task-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: var(--task-gray);
  box-shadow: 0 0 0 4px rgba(123,135,148,.10);
}

.task-kanban-column-head--blue .task-status-dot { background: var(--task-blue); box-shadow: 0 0 0 4px rgba(47,128,237,.10); }
.task-kanban-column-head--orange .task-status-dot { background: var(--task-orange); box-shadow: 0 0 0 4px rgba(245,158,11,.12); }
.task-kanban-column-head--red .task-status-dot { background: var(--task-red); box-shadow: 0 0 0 4px rgba(239,68,68,.12); }
.task-kanban-column-head--green .task-status-dot { background: var(--task-green); box-shadow: 0 0 0 4px rgba(20,148,92,.12); }

.task-kanban-column-head h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 950;
  letter-spacing: -.025em;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-column-count {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(20,25,30,.055);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 950;
}

.task-kanban-column-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.task-kanban-list {
  display: grid;
  gap: 10px;
  align-content: start;
  flex: 1 1 auto;
}

.task-kanban-card {
  position: relative;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(20,25,30,.08);
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 26px rgba(20,25,30,.055);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, opacity .18s ease;
}

.task-kanban-card[draggable="true"] { cursor: grab; }

.task-kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(20,25,30,.095);
  border-color: rgba(var(--primary-rgb), .24);
}

.task-kanban-card.is-dragging {
  opacity: .55;
  transform: rotate(-1deg) scale(.98);
}

.task-kanban-card.is-overdue {
  border-color: rgba(239, 68, 68, .20);
  box-shadow: 0 12px 28px rgba(239,68,68,.085);
}

.task-kanban-card.is-done { border-color: rgba(20,148,92,.18); }
.task-kanban-card.is-cancelled { opacity: .82; }

.task-kanban-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.task-kanban-card h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 950;
  letter-spacing: -.018em;
  color: var(--text);
}

.task-card-menu {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
  font-size: 18px;
  line-height: 1;
}

.task-card-menu:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.task-kanban-card p {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.task-kanban-card-meta-lines {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.task-kanban-card-meta-lines b {
  color: var(--text-soft);
  font-weight: 850;
}

.task-kanban-card-topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.task-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.01em;
  background: rgba(123,135,148,.10);
  color: var(--text-soft);
}

.task-chip--blue { background: rgba(47,128,237,.12); color: #2563eb; }
.task-chip--green { background: rgba(20,148,92,.12); color: var(--primary); }
.task-chip--orange { background: rgba(245,158,11,.14); color: #c46a05; }
.task-chip--red { background: rgba(239,68,68,.12); color: var(--danger); }
.task-chip--gray { background: rgba(123,135,148,.12); color: var(--text-soft); }

.task-kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.task-card-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 850;
}

.task-card-date svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.task-date-overdue,
.task-date-overdue b {
  color: var(--danger) !important;
}

.task-card-assignee {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.task-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  border: 2px solid #fff;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: -.02em;
  box-shadow: 0 6px 14px rgba(20,25,30,.14);
}

.task-kanban-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(20,25,30,.06);
}

.task-mini-action {
  min-height: 28px;
  padding: 6px 9px;
  border-radius: 10px;
  background: rgba(47,128,237,.10);
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
}

.task-mini-action--success { color: var(--primary); background: rgba(20,148,92,.11); }
.task-mini-action--danger { color: var(--danger); background: rgba(239,68,68,.10); }
.task-action-note { color: var(--muted); font-size: 12px; font-weight: 850; }

.task-kanban-empty {
  min-height: 306px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 9px;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  border-radius: 16px;
  border: 1px dashed rgba(20,25,30,.10);
  background: rgba(255,255,255,.48);
}

.task-kanban-empty-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--task-blue);
  background: rgba(47,128,237,.10);
  margin-bottom: 8px;
}

.task-kanban-empty--orange .task-kanban-empty-icon { color: var(--task-orange); background: rgba(245,158,11,.13); }
.task-kanban-empty--red .task-kanban-empty-icon { color: var(--task-red); background: rgba(239,68,68,.11); }
.task-kanban-empty--green .task-kanban-empty-icon { color: var(--task-green); background: rgba(20,148,92,.12); }
.task-kanban-empty--gray .task-kanban-empty-icon { color: var(--task-gray); background: rgba(123,135,148,.13); }

.task-kanban-empty-icon svg {
  width: 30px;
  height: 30px;
}

.task-kanban-empty b {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 950;
}

.task-kanban-empty span {
  max-width: 210px;
  font-size: 12px;
  line-height: 1.5;
}

.task-kanban-add {
  min-height: 36px;
  margin-top: auto;
  border-radius: 12px;
  color: var(--text-soft);
  background: transparent;
  font-size: 13px;
  font-weight: 850;
  transition: color .18s ease, background .18s ease;
}

.task-kanban-add:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), .08);
}

.task-table-view {
  margin-top: 2px;
  padding: 12px;
  border: 1px solid var(--task-panel-border);
  border-radius: 22px;
  background: rgba(255,255,255,.74);
}

.task-table-overdue-badge { margin-top: 6px; }

.task-insights-grid {
  display: grid;
  grid-template-columns: 1fr 1.08fr 1.12fr;
  gap: 14px;
  padding-bottom: 6px;
}

.task-insight-card {
  min-height: 164px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.74);
  border: 1px solid var(--task-panel-border);
  box-shadow: 0 14px 32px rgba(20,25,30,.045);
}

.task-insight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.task-insight-head > div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.task-insight-head b {
  font-size: 14px;
  font-weight: 950;
  letter-spacing: -.018em;
  color: var(--text);
}

.task-insight-head button {
  flex: 0 0 auto;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.task-insight-head button:hover { color: var(--primary); }

.task-insight-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--task-blue);
  background: rgba(47,128,237,.10);
}

.task-insight-icon svg { width: 17px; height: 17px; }
.task-insight-icon--red { color: var(--task-red); background: rgba(239,68,68,.11); }
.task-insight-icon--green { color: var(--task-green); background: rgba(20,148,92,.12); }

.task-insight-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 32px;
  color: var(--text-soft);
  font-size: 13px;
}

.task-insight-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-insight-row b {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.task-insight-empty {
  min-height: 74px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  border-radius: 14px;
  border: 1px dashed rgba(20,25,30,.10);
  background: rgba(255,255,255,.46);
}

.task-workload-list {
  display: grid;
  gap: 9px;
}

.task-workload-row {
  display: grid;
  grid-template-columns: auto minmax(92px, 130px) minmax(90px, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-soft);
}

.task-workload-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
}

.task-workload-row i {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(20,25,30,.08);
  overflow: hidden;
}

.task-workload-row i em {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--primary);
}

.task-workload-row:nth-child(4n) i em { background: var(--task-orange); }

.task-workload-row b {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 900;
}

:root[data-theme="dark"] .tasks-page {
  --task-card-bg: rgba(16, 25, 20, .88);
  --task-panel-bg: rgba(16, 25, 20, .68);
  --task-panel-border: rgba(255,255,255,.08);
}

:root[data-theme="dark"] .task-stat-card,
:root[data-theme="dark"] .task-toolbar,
:root[data-theme="dark"] .task-kanban-column,
:root[data-theme="dark"] .task-table-view,
:root[data-theme="dark"] .task-insight-card {
  background: rgba(16,25,20,.76);
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 18px 44px rgba(0,0,0,.24);
  backdrop-filter: blur(16px);
}

:root[data-theme="dark"] .task-stat-card::before {
  background: linear-gradient(135deg, rgba(255,255,255,.045), rgba(255,255,255,0));
}

:root[data-theme="dark"] .task-stat-ring {
  background:
    conic-gradient(var(--progress-color) calc(var(--task-progress) * 1%), rgba(255,255,255,.10) 0),
    rgba(255,255,255,.06);
}

:root[data-theme="dark"] .task-stat-ring::before {
  background: #101914;
  border-color: rgba(255,255,255,.08);
}

:root[data-theme="dark"] .task-view-switch,
:root[data-theme="dark"] .task-select-field select,
:root[data-theme="dark"] .task-search-wrap input,
:root[data-theme="dark"] .task-filter-icon,
:root[data-theme="dark"] .task-kanban-card,
:root[data-theme="dark"] .task-kanban-empty,
:root[data-theme="dark"] .task-insight-empty {
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.08);
  box-shadow: none;
}

:root[data-theme="dark"] .task-view-switch .filter-pill.active {
  background: rgba(var(--primary-rgb), .15);
  box-shadow: none;
}

:root[data-theme="dark"] .task-kanban-column--blue { background: linear-gradient(180deg, rgba(47,128,237,.10), rgba(16,25,20,.68)); }
:root[data-theme="dark"] .task-kanban-column--orange { background: linear-gradient(180deg, rgba(245,158,11,.10), rgba(16,25,20,.68)); }
:root[data-theme="dark"] .task-kanban-column--red { background: linear-gradient(180deg, rgba(239,68,68,.11), rgba(16,25,20,.68)); }
:root[data-theme="dark"] .task-kanban-column--green { background: linear-gradient(180deg, rgba(20,148,92,.11), rgba(16,25,20,.68)); }
:root[data-theme="dark"] .task-kanban-column--gray { background: linear-gradient(180deg, rgba(123,135,148,.10), rgba(16,25,20,.68)); }

:root[data-theme="dark"] .task-avatar { border-color: #101914; }

:root[data-theme="dark"] .task-chip--blue { color: #8cbaff; }
:root[data-theme="dark"] .task-chip--orange { color: #ffd089; }

:root[data-theme="dark"] .task-workload-row i { background: rgba(255,255,255,.10); }

:root[data-theme="dark"][data-glassmorphism="off"] .task-stat-card,
:root[data-theme="dark"][data-glassmorphism="off"] .task-toolbar,
:root[data-theme="dark"][data-glassmorphism="off"] .task-kanban-column,
:root[data-theme="dark"][data-glassmorphism="off"] .task-table-view,
:root[data-theme="dark"][data-glassmorphism="off"] .task-insight-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: #101914;
  border-color: #203328;
}

@media (max-width: 1260px) {
  .task-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-kanban { grid-template-columns: repeat(6, minmax(250px, 1fr)); }
  .task-insights-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .tasks-page-header,
  .task-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .tasks-primary-action { justify-content: center; }
  .task-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-search-wrap { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .task-stats-grid,
  .task-filter-grid {
    grid-template-columns: 1fr;
  }

  .task-filter-icon { width: 100%; }
  .task-view-switch,
  .task-view-switch .filter-pill { width: 100%; }
  .task-kanban { grid-template-columns: repeat(6, minmax(260px, 86vw)); }
  .task-stat-card { grid-template-columns: auto 1fr; }
  .task-stat-ring { display: none; }
}


#calendar.section.active {
  display: block;
  min-height: calc(100dvh - 214px);
  overflow: visible;
}

.calendar-page {
  min-height: calc(100dvh - 238px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: visible;
}

.calendar-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.calendar-stat-card {
  position: relative;
  isolation: isolate;
  min-height: 112px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, .08);
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(248,250,252,.82)),
    var(--card);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .07);
  overflow: hidden;
}

.calendar-stat-card::before {
  content: '';
  position: absolute;
  inset: -55% auto auto -16%;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), .08);
  z-index: -1;
}

.calendar-stat-card--danger::before { background: rgba(var(--danger-rgb), .08); }
.calendar-stat-card--task::before { background: rgba(59, 130, 246, .08); }
.calendar-stat-card--notification::before { background: rgba(139, 92, 246, .08); }

.calendar-stat-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(var(--primary-rgb), .11);
  color: var(--primary);
}

.calendar-stat-card--danger .calendar-stat-icon {
  background: rgba(var(--danger-rgb), .10);
  color: var(--danger);
}

.calendar-stat-card--task .calendar-stat-icon {
  background: rgba(59, 130, 246, .10);
  color: #2563eb;
}

.calendar-stat-card--notification .calendar-stat-icon {
  background: rgba(139, 92, 246, .10);
  color: #7c3aed;
}

.calendar-stat-icon svg,
.calendar-icon-btn svg,
.calendar-filter-btn svg,
.calendar-side-section-head svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-stat-content {
  min-width: 0;
}

.calendar-stat-content span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -.01em;
}

.calendar-stat-content b {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.055em;
  white-space: nowrap;
}

.calendar-stat-card--danger .calendar-stat-content b { color: var(--danger); }
.calendar-stat-card--payment .calendar-stat-content b { color: var(--primary-dark); }
.calendar-stat-card--task .calendar-stat-content b { color: #1d4ed8; }
.calendar-stat-card--notification .calendar-stat-content b { color: #6d28d9; }

.calendar-stat-content small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.calendar-stat-visual {
  min-width: 92px;
  display: grid;
  justify-items: end;
  gap: 7px;
}

.calendar-stat-visual em {
  min-width: 44px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), .10);
  color: var(--primary-dark);
  font-style: normal;
  font-size: 11px;
  font-weight: 950;
}

.calendar-stat-card--danger .calendar-stat-visual em {
  background: rgba(var(--danger-rgb), .10);
  color: var(--danger);
}

.calendar-stat-card--task .calendar-stat-visual em {
  background: rgba(59, 130, 246, .10);
  color: #1d4ed8;
}

.calendar-stat-card--notification .calendar-stat-visual em {
  background: rgba(139, 92, 246, .10);
  color: #6d28d9;
}

.calendar-mini-chart {
  width: 82px;
  height: 38px;
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 5px;
}

.calendar-mini-chart span {
  width: 7px;
  min-height: 8px;
  border-radius: 999px 999px 2px 2px;
  background: var(--primary);
  opacity: .72;
}

.calendar-mini-chart.danger span { background: var(--danger); }
.calendar-mini-chart.task span { background: #3b82f6; }
.calendar-mini-chart.notification span { background: #8b5cf6; }

.calendar-board-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border-radius: 28px;
  border: 1px solid rgba(15, 23, 42, .08);
  background:
    radial-gradient(circle at top right, rgba(var(--primary-rgb), .07), transparent 30%),
    rgba(255,255,255,.72);
  box-shadow: 0 22px 60px rgba(15, 23, 42, .07);
  overflow: visible;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 4px;
}

.calendar-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, .08);
  background: rgba(255,255,255,.86);
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, .04);
}

.calendar-view-tab {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.calendar-view-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), .22);
}

.calendar-toolbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.calendar-filter-bar {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.calendar-filter-bar .filter-pill {
  height: 34px;
  padding-inline: 14px;
  border-radius: 14px;
}

.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}

.calendar-icon-btn,
.calendar-filter-btn {
  height: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, .09);
  background: rgba(255,255,255,.9);
  color: var(--text-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .04);
  transition: border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.calendar-icon-btn:hover,
.calendar-filter-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--primary-rgb), .22);
  color: var(--primary-dark);
  box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
}

.calendar-icon-btn {
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.calendar-filter-btn span {
  line-height: 1;
}

.calendar-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  align-items: stretch;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
}

.calendar-month-panel,
.calendar-day-panel {
  min-height: 0;
  border-radius: 26px;
  border: 1px solid rgba(15, 23, 42, .08);
  background: rgba(255,255,255,.86);
  overflow: visible;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.80);
}

.calendar-month-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 14px;
}

.calendar-day-panel {
  display: flex;
  flex-direction: column;
  padding: 14px;
}

.calendar-month-head,
.calendar-day-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 2px 2px 14px;
}

.calendar-month-head h3,
.calendar-day-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -.045em;
  text-transform: capitalize;
}

.calendar-month-head p,
.calendar-day-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.calendar-month-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .07);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: rgba(248, 250, 252, .74);
}

.calendar-weekdays span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-align: center;
  border-right: 1px solid rgba(15, 23, 42, .06);
}

.calendar-weekdays span:last-child {
  border-right: 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(98px, 1fr));
  gap: 0;
  flex: 1 1 auto;
  min-height: 640px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .07);
  border-radius: 0 0 18px 18px;
  background: rgba(255,255,255,.92);
}

.calendar-day-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px;
  border: 0;
  border-right: 1px solid rgba(15, 23, 42, .06);
  border-bottom: 1px solid rgba(15, 23, 42, .06);
  background: rgba(255,255,255,.72);
  cursor: pointer;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.calendar-day-cell:nth-child(7n) {
  border-right: 0;
}

.calendar-day-cell:nth-last-child(-n + 7) {
  border-bottom: 0;
}

.calendar-day-cell:hover,
.calendar-day-cell:focus-visible {
  outline: none;
  z-index: 2;
  background: rgba(var(--primary-rgb), .045);
  box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), .24), 0 18px 34px rgba(15, 23, 42, .10);
}

.calendar-day-cell.is-selected {
  z-index: 3;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), .14), rgba(var(--primary-rgb), .045));
  box-shadow: inset 0 0 0 2px rgba(var(--primary-rgb), .34), 0 18px 34px rgba(15, 23, 42, .10);
}

.calendar-day-cell.is-today .calendar-day-number {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(var(--primary-rgb), .24);
}

.calendar-day-cell.is-outside {
  background: rgba(248,250,252,.68);
  opacity: .66;
}

.calendar-day-cell.has-overdue {
  background: linear-gradient(135deg, rgba(var(--danger-rgb), .07), rgba(255,255,255,.82));
}

.calendar-day-number-stack {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex: 0 0 auto;
}

.calendar-day-number {
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--text);
  font-weight: 950;
  font-size: 12px;
  flex: 0 0 auto;
}

.calendar-open-marker {
  min-width: 28px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid rgba(var(--primary-rgb), .16);
  background: rgba(var(--primary-rgb), .08);
  color: var(--primary-dark);
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.03em;
}

.calendar-open-marker span {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  opacity: .88;
}

.calendar-open-marker span.payment { color: var(--primary); }
.calendar-open-marker span.task { color: #3b82f6; }
.calendar-open-marker span.notification { color: #8b5cf6; }
.calendar-open-marker span.warning { color: #f59e0b; }
.calendar-open-marker span.danger { color: var(--danger); }
.calendar-open-marker b { font: inherit; }
.calendar-open-marker.danger {
  border-color: rgba(var(--danger-rgb), .20);
  background: rgba(var(--danger-rgb), .09);
  color: var(--danger);
}

.calendar-day-events {
  display: grid;
  gap: 5px;
  min-height: 0;
  overflow: hidden;
}

.calendar-event-chip {
  min-width: 0;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: rgba(var(--primary-rgb), .10);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  text-align: left;
}

.calendar-event-chip::before {
  content: '';
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: currentColor;
}

.calendar-event-chip span {
  color: var(--muted);
  font-weight: 850;
}

.calendar-event-chip.payment { background: rgba(var(--primary-rgb), .11); color: var(--primary-dark); }
.calendar-event-chip.task { background: rgba(59, 130, 246, .10); color: #1d4ed8; }
.calendar-event-chip.notification { background: rgba(139, 92, 246, .10); color: #6d28d9; }
.calendar-event-chip.warning { background: rgba(245, 158, 11, .12); color: #b45309; }
.calendar-event-chip.danger { background: rgba(var(--danger-rgb), .10); color: var(--danger); }
.calendar-event-chip.success { background: rgba(var(--primary-rgb), .13); color: var(--primary-dark); }

.calendar-more-chip {
  height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.calendar-fab {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 20px 42px rgba(var(--primary-rgb), .34);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.calendar-fab:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 24px 52px rgba(var(--primary-rgb), .40);
}

.calendar-day-list {
  display: grid;
  align-content: start;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
}

.calendar-side-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, .075);
  background: rgba(248,250,252,.66);
}

.calendar-side-section-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.calendar-side-section-head span {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: rgba(var(--primary-rgb), .10);
  color: var(--primary);
}

.calendar-side-section--task .calendar-side-section-head span { background: rgba(59,130,246,.10); color: #2563eb; }
.calendar-side-section--notification .calendar-side-section-head span { background: rgba(139,92,246,.10); color: #7c3aed; }
.calendar-side-section--payment .calendar-side-section-head span { background: rgba(var(--primary-rgb),.10); color: var(--primary-dark); }
.calendar-side-section--timeline .calendar-side-section-head span { background: rgba(15,23,42,.06); color: var(--text-soft); }

.calendar-side-section-head b {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: -.02em;
}

.calendar-side-section-head em {
  min-width: 24px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(15,23,42,.06);
  color: var(--text-soft);
  font-style: normal;
  font-size: 11px;
  font-weight: 950;
}

.calendar-side-section-body {
  display: grid;
  gap: 8px;
}

.calendar-agenda-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, .08);
  background: rgba(255,255,255,.82);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.calendar-agenda-item:hover,
.calendar-agenda-item:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(var(--primary-rgb), .24);
  box-shadow: 0 14px 26px rgba(15,23,42,.08);
}

.calendar-agenda-item.danger {
  border-color: rgba(var(--danger-rgb), .22);
  background: rgba(var(--danger-rgb), .035);
}

.calendar-agenda-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: rgba(var(--primary-rgb), .11);
  color: var(--primary);
}

.calendar-agenda-item.task .calendar-agenda-icon { background: rgba(59,130,246,.10); color: #2563eb; }
.calendar-agenda-item.notification .calendar-agenda-icon { background: rgba(139,92,246,.10); color: #7c3aed; }
.calendar-agenda-item.warning .calendar-agenda-icon { background: rgba(245,158,11,.12); color: #b45309; }
.calendar-agenda-item.danger .calendar-agenda-icon { background: rgba(var(--danger-rgb),.10); color: var(--danger); }
.calendar-agenda-item.success .calendar-agenda-icon { background: rgba(var(--primary-rgb),.12); color: var(--primary-dark); }

.calendar-agenda-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-agenda-main { min-width: 0; }

.calendar-agenda-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.calendar-agenda-title-row h4 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.calendar-agenda-title-row span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.calendar-agenda-main p,
.calendar-agenda-main small {
  display: block;
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
}

.calendar-agenda-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.calendar-side-empty {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 14px;
  border: 1px dashed rgba(15,23,42,.12);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calendar-show-more {
  height: 36px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  background: rgba(255,255,255,.78);
  color: var(--text-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.calendar-day-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(var(--danger-rgb), .08);
  color: var(--danger);
  font-weight: 900;
}

.calendar-day-warning b {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(var(--danger-rgb), .12);
}

.calendar-day-warning span {
  color: var(--text-soft);
  font-size: 12px;
}

.calendar-empty-state {
  min-height: 240px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 22px;
  text-align: center;
  border-radius: 22px;
  border: 1px dashed rgba(15,23,42,.14);
  color: var(--muted);
  background: rgba(248,250,252,.72);
}

.calendar-empty-state b {
  color: var(--text);
  font-size: 15px;
}

.calendar-empty-state span {
  max-width: 280px;
  font-size: 12px;
  line-height: 1.45;
}

.calendar-empty-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

:root[data-theme="dark"] .calendar-stat-card,
:root[data-theme="dark"] .calendar-board-card,
:root[data-theme="dark"] .calendar-month-panel,
:root[data-theme="dark"] .calendar-day-panel,
:root[data-theme="dark"] .calendar-view-switch,
:root[data-theme="dark"] .calendar-icon-btn,
:root[data-theme="dark"] .calendar-filter-btn {
  background: rgba(255,255,255,.045);
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 18px 44px rgba(0,0,0,.18);
  backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .calendar-weekdays,
:root[data-theme="dark"] .calendar-grid,
:root[data-theme="dark"] .calendar-day-cell,
:root[data-theme="dark"] .calendar-side-section,
:root[data-theme="dark"] .calendar-agenda-item,
:root[data-theme="dark"] .calendar-side-empty,
:root[data-theme="dark"] .calendar-empty-state,
:root[data-theme="dark"] .calendar-show-more {
  background: rgba(255,255,255,.045);
  border-color: rgba(255,255,255,.08);
}

:root[data-theme="dark"] .calendar-day-cell {
  border-right-color: rgba(255,255,255,.075);
  border-bottom-color: rgba(255,255,255,.075);
}

:root[data-theme="dark"] .calendar-day-cell.is-outside {
  background: rgba(255,255,255,.025);
}

:root[data-theme="dark"] .calendar-day-cell:hover,
:root[data-theme="dark"] .calendar-day-cell:focus-visible,
:root[data-theme="dark"] .calendar-agenda-item:hover,
:root[data-theme="dark"] .calendar-agenda-item:focus-visible {
  box-shadow: 0 18px 42px rgba(0,0,0,.28);
}

:root[data-theme="dark"] .calendar-stat-content b,
:root[data-theme="dark"] .calendar-month-head h3,
:root[data-theme="dark"] .calendar-day-head h3,
:root[data-theme="dark"] .calendar-side-section-head b,
:root[data-theme="dark"] .calendar-agenda-title-row h4,
:root[data-theme="dark"] .calendar-empty-state b {
  color: var(--text);
}

:root[data-theme="dark"] .calendar-event-chip.payment,
:root[data-theme="dark"] .calendar-event-chip.success { color: #65e9a8; }
:root[data-theme="dark"] .calendar-event-chip.task { color: #9fc4ff; }
:root[data-theme="dark"] .calendar-event-chip.notification { color: #c4b5fd; }
:root[data-theme="dark"] .calendar-event-chip.warning { color: #fbbf24; }
:root[data-theme="dark"] .calendar-event-chip.danger { color: #ff8a8a; }

:root[data-theme="dark"] .calendar-open-marker { color: #65e9a8; }
:root[data-theme="dark"] .calendar-open-marker span.task { color: #9fc4ff; }
:root[data-theme="dark"] .calendar-open-marker span.notification { color: #c4b5fd; }
:root[data-theme="dark"] .calendar-open-marker span.warning { color: #fbbf24; }
:root[data-theme="dark"] .calendar-open-marker span.danger,
:root[data-theme="dark"] .calendar-open-marker.danger { color: #ff8a8a; }

:root[data-theme="dark"][data-glassmorphism="off"] .calendar-stat-card,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-board-card,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-month-panel,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-day-panel,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-view-switch,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-icon-btn,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-filter-btn,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-weekdays,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-grid,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-day-cell,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-side-section,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-agenda-item,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-empty-state {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

:root[data-theme="dark"][data-glassmorphism="off"] .calendar-stat-card,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-board-card,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-month-panel,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-day-panel {
  background: #142119;
  border-color: #25382d;
}

:root[data-theme="dark"][data-glassmorphism="off"] .calendar-weekdays,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-grid,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-day-cell,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-side-section,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-agenda-item,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-empty-state,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-view-switch,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-icon-btn,
:root[data-theme="dark"][data-glassmorphism="off"] .calendar-filter-btn {
  background: #101914;
  border-color: #203328;
}

@media (max-width: 1320px) {
  .calendar-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-toolbar,
  .calendar-toolbar-main {
    grid-template-columns: 1fr;
    display: grid;
  }

  .calendar-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 1180px) {
  #calendar.section.active {
    height: auto;
    overflow: visible;
  }

  .calendar-page {
    min-height: calc(100dvh - 220px);
    height: auto;
  }

  .calendar-workspace {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .calendar-grid {
    min-height: 640px;
  }

  .calendar-day-panel {
    min-height: 420px;
  }
}

@media (max-width: 760px) {
  .calendar-stats {
    grid-template-columns: 1fr;
  }

  .calendar-stat-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .calendar-stat-visual {
    display: none;
  }

  .calendar-view-switch,
  .calendar-filter-bar,
  .calendar-controls,
  .calendar-month-actions {
    width: 100%;
  }

  .calendar-view-switch {
    overflow-x: auto;
  }

  .calendar-filter-bar,
  .calendar-controls,
  .calendar-month-actions {
    justify-content: flex-start;
  }

  .calendar-grid {
    grid-template-rows: repeat(6, minmax(80px, 1fr));
    min-height: 560px;
  }

  .calendar-day-cell {
    padding: 6px;
  }

  .calendar-event-chip {
    height: 18px;
    padding: 0 5px;
    font-size: 9px;
  }

  .calendar-event-chip span,
  .calendar-open-marker {
    display: none;
  }

  .calendar-fab {
    width: 46px;
    height: 46px;
    right: 14px;
    bottom: 14px;
  }
}

.calendar-page-active .main {
  overflow: auto;
}


.account-danger-zone {
  border-color: rgba(var(--danger-rgb), .24);
  background:
    radial-gradient(circle at top right, rgba(var(--danger-rgb), .12), transparent 34%),
    var(--surface);
}

.account-danger-panel {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(var(--danger-rgb), .22);
  border-radius: 24px;
  background: rgba(var(--danger-rgb), .055);
}

.account-danger-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(var(--danger-rgb), .12);
  color: var(--danger);
}

.account-danger-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-danger-content {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.account-danger-content b {
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -.02em;
}

.account-danger-content p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.account-danger-confirmation {
  padding: 10px 12px;
  border: 1px dashed rgba(var(--danger-rgb), .35);
  border-radius: 16px;
  background: rgba(255, 255, 255, .45);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.account-danger-confirmation strong {
  color: var(--danger);
  font-weight: 950;
  overflow-wrap: anywhere;
}

.account-danger-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .account-danger-panel {
    grid-template-columns: 1fr;
  }
}


.deals-workspace {
  display: grid;
  gap: 18px;
}

.deals-hero-card {
  position: relative;
  overflow: hidden;
}

.deals-hero-card::after {
  content: '';
  position: absolute;
  right: -96px;
  top: -110px;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), .18), transparent 68%);
  pointer-events: none;
}

.deals-hero-header,
.deals-pulse-grid {
  position: relative;
  z-index: 1;
}

.deals-pulse-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.deal-pulse-card {
  display: grid;
  gap: 5px;
  align-content: start;
  min-height: 108px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .58);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition: .18s ease;
}

.deal-pulse-card:hover,
.deal-pulse-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(var(--primary-rgb), .25);
  box-shadow: 0 18px 42px rgba(20, 25, 30, .1);
  outline: none;
}

.deal-pulse-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.deal-pulse-card b {
  font-size: clamp(20px, 2.1vw, 28px);
  letter-spacing: -.04em;
}

.deal-pulse-card small {
  color: var(--text-soft);
  font-weight: 750;
}

.deal-pulse-card.success { background: linear-gradient(135deg, rgba(var(--primary-rgb), .14), rgba(255,255,255,.72)); }
.deal-pulse-card.warning { background: linear-gradient(135deg, rgba(217, 119, 6, .14), rgba(255,255,255,.72)); }
.deal-pulse-card.danger { background: linear-gradient(135deg, rgba(220, 38, 38, .13), rgba(255,255,255,.72)); }
.deal-pulse-card.info { background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(255,255,255,.72)); }

.deals-control-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.deals-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.deals-tab,
.deals-view-btn {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-soft);
  font-weight: 850;
  transition: .16s ease;
}

.deals-tab:hover,
.deals-view-btn:hover,
.deals-tab.active,
.deals-view-btn.active {
  background: var(--primary);
  border-color: rgba(var(--primary-rgb), .34);
  color: #fff;
  box-shadow: 0 12px 26px rgba(var(--primary-rgb), .18);
}

.deals-filter-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(160px, 200px) minmax(150px, 190px) auto;
  gap: 12px;
  align-items: end;
}

.deals-filter-row .field {
  margin: 0;
}

.deals-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
}

.deal-table-main,
.deal-finance-cell {
  display: grid;
  gap: 5px;
}

.deal-table-main b,
.deal-finance-cell b {
  letter-spacing: -.02em;
}

.deal-table-main span,
.deal-finance-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.deal-mini-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, .08);
}

.deal-mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #7ee7b7);
}

.deal-risk-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  border: 1px solid transparent;
}

.deal-risk-badge.low { color: var(--success); background: rgba(var(--primary-rgb), .12); border-color: rgba(var(--primary-rgb), .18); }
.deal-risk-badge.medium { color: #b45309; background: rgba(217, 119, 6, .14); border-color: rgba(217, 119, 6, .2); }
.deal-risk-badge.high,
.deal-risk-badge.critical { color: var(--danger); background: rgba(220, 38, 38, .12); border-color: rgba(220, 38, 38, .2); }

.deal-next-action {
  display: grid;
  gap: 3px;
  min-width: 170px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.deal-next-action b {
  font-size: 13px;
  letter-spacing: -.02em;
}

.deal-next-action span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.deal-next-action.danger { background: rgba(220, 38, 38, .10); border-color: rgba(220, 38, 38, .18); }
.deal-next-action.warning { background: rgba(217, 119, 6, .11); border-color: rgba(217, 119, 6, .18); }
.deal-next-action.success { background: rgba(var(--primary-rgb), .11); border-color: rgba(var(--primary-rgb), .18); }
.deal-next-action.info { background: rgba(37, 99, 235, .10); border-color: rgba(37, 99, 235, .18); }

.deal-row-actions,
.deal-list-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.deals-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.deal-list-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow-soft);
}

.deal-list-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.deal-list-card-top > div {
  display: grid;
  gap: 4px;
}

.deal-list-card-top b {
  font-size: 17px;
  letter-spacing: -.03em;
}

.deal-list-card-top span,
.deal-list-client,
.deal-list-progress span,
.deal-list-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.deal-list-progress {
  display: grid;
  gap: 8px;
}

.deal-list-progress > div:first-child,
.deal-list-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.deal-list-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.deal-list-metrics > div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 16px;
  background: var(--surface-soft);
}

.deal-list-metrics b {
  font-size: 13px;
}

.deal-hero-insights {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(220px, 360px);
  gap: 12px;
  align-items: stretch;
}

.deal-transparency-pill {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.deal-transparency-pill b {
  font-size: 13px;
}

.deal-transparency-pill span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.deal-transparency-pill.complete { background: rgba(var(--primary-rgb), .12); border-color: rgba(var(--primary-rgb), .2); }
.deal-transparency-pill.attention { background: rgba(217, 119, 6, .12); border-color: rgba(217, 119, 6, .2); }

.deal-lifecycle {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  max-width: 940px;
}

.deal-life-step {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.42);
}

.deal-life-step i {
  width: 24px;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .14);
}

.deal-life-step span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.deal-life-step.done i,
.deal-life-step.active i { background: var(--primary); }
.deal-life-step.warning i { background: var(--danger); }
.deal-life-step.active span { color: var(--text); }

.deal-transparency-list {
  display: grid;
  gap: 8px;
}

.deal-transparency-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.deal-transparency-check span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #fff;
  font-weight: 950;
}

.deal-transparency-check.ok span { background: var(--primary); }
.deal-transparency-check.missing span { background: var(--warning); }
.deal-transparency-check b { font-size: 13px; }

.deal-payment-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.deal-payment-point {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.deal-payment-point-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.deal-payment-point-dot {
  width: 32px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted);
  opacity: .45;
}

.deal-payment-point-body {
  display: grid;
  gap: 4px;
}

.deal-payment-point-body span {
  color: var(--muted);
  font-size: 12px;
}

.deal-payment-point.paid .deal-payment-point-dot { background: var(--primary); opacity: 1; }
.deal-payment-point.partial .deal-payment-point-dot { background: var(--info); opacity: 1; }
.deal-payment-point.overdue .deal-payment-point-dot { background: var(--danger); opacity: 1; }
.deal-payment-point.pending .deal-payment-point-dot { background: var(--warning); opacity: 1; }

.deal-schedule-table-toggle {
  margin-top: 14px;
}

.deal-schedule-table-toggle summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 900;
  margin-bottom: 12px;
}

@media (max-width: 1180px) {
  .deals-pulse-grid,
  .deals-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .deals-filter-row {
    grid-template-columns: 1fr 1fr;
  }

  .deal-lifecycle {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .deals-pulse-grid,
  .deals-card-grid,
  .deals-filter-row,
  .deal-hero-insights,
  .deal-lifecycle,
  .deal-list-metrics {
    grid-template-columns: 1fr;
  }

  .deals-view-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .deals-view-btn {
    flex: 1;
  }
}


.user-menu {
  position: relative;
  z-index: 980;
}

.user-menu-trigger {
  min-width: 0;
  max-width: 260px;
  border: 1px solid rgba(20,25,30,.05);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.54);
}

.user-menu-trigger:hover,
.user-menu-trigger[aria-expanded="true"] {
  background: #fff;
  color: var(--text);
  box-shadow: 0 16px 32px rgba(20,25,30,.10);
  transform: translateY(-1px);
}

.user-chip-text {
  display: grid;
  min-width: 0;
  line-height: 1.1;
  text-align: left;
}

.user-role-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.user-menu-caret {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: 2px;
  color: var(--muted);
  transition: transform .18s ease, color .18s ease;
}

.user-menu-caret svg {
  width: 16px;
  height: 16px;
}

.user-menu-trigger[aria-expanded="true"] .user-menu-caret {
  transform: rotate(180deg);
  color: var(--primary);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(360px, calc(100vw - 34px));
  padding: 12px;
  border-radius: 30px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.82);
  box-shadow: 0 26px 70px rgba(20,25,30,.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  transform: translateY(-8px) scale(.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.user-dropdown.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.user-dropdown::before {
  content: '';
  position: absolute;
  top: -7px;
  right: 30px;
  width: 14px;
  height: 14px;
  border-radius: 4px 0 0 0;
  background: inherit;
  border-left: 1px solid rgba(255,255,255,.82);
  border-top: 1px solid rgba(255,255,255,.82);
  transform: rotate(45deg);
}

.user-dropdown-profile {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), .12), rgba(var(--primary-rgb), .04));
  border: 1px solid rgba(var(--primary-rgb), .13);
}

.user-dropdown-avatar {
  width: 58px;
  height: 58px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 14px 28px rgba(var(--primary-rgb), .22);
}

.user-dropdown-profile-text {
  min-width: 0;
}

.user-dropdown-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 950;
  letter-spacing: -.03em;
}

.user-dropdown-email,
.user-dropdown-org {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.user-dropdown-org {
  color: var(--text-soft);
  font-weight: 750;
}

.user-dropdown-divider {
  height: 1px;
  margin: 10px 6px;
  background: var(--border);
}

.user-dropdown-section {
  display: grid;
  gap: 6px;
}

.user-dropdown-section-title {
  padding: 3px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.user-dropdown-item {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 20px;
  background: transparent;
  color: var(--text);
  text-align: left;
  transition: background .16s ease, transform .16s ease, color .16s ease;
}

.user-dropdown-item:hover,
.user-dropdown-item:focus-visible {
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateY(-1px);
  outline: none;
}

.user-dropdown-item strong,
.user-dropdown-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-item strong {
  font-size: 13px;
  font-weight: 900;
}

.user-dropdown-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.user-dropdown-icon {
  width: 38px;
  height: 38px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: rgba(var(--primary-rgb), .09);
}

.user-dropdown-icon svg {
  width: 19px;
  height: 19px;
}

.user-dropdown-item.danger {
  color: var(--danger);
}

.user-dropdown-item.danger .user-dropdown-icon {
  color: var(--danger);
  background: rgba(220, 38, 38, .09);
}

.user-dropdown-item.danger:hover,
.user-dropdown-item.danger:focus-visible {
  color: var(--danger);
  background: rgba(220, 38, 38, .10);
}

.user-theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.user-theme-btn {
  min-width: 0;
  display: grid;
  gap: 7px;
  justify-items: center;
  padding: 10px 8px;
  border-radius: 20px;
  background: #f6f7f5;
  color: var(--text-soft);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 900;
  transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}

.user-theme-btn:hover,
.user-theme-btn.active {
  transform: translateY(-1px);
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(var(--primary-rgb), .22);
}

.user-theme-preview {
  width: 46px;
  height: 30px;
  border-radius: 12px;
  display: block;
  border: 1px solid rgba(20,25,30,.08);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.35);
}

.user-theme-preview-light {
  background: linear-gradient(135deg, #fff, #eef4ef 54%, rgba(var(--primary-rgb), .34));
}

.user-theme-preview-dark {
  background: linear-gradient(135deg, #08110c, #17251d 58%, rgba(var(--primary-rgb), .48));
}

.user-theme-preview-solid {
  background: linear-gradient(135deg, #070b08, #101914 58%, #25382d);
}


.settings-overview-page,
.settings-section-page {
  display: grid;
  gap: 18px;
}

.section-eyebrow {
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.settings-hero-card,
.settings-section-head-card {
  position: relative;
  overflow: hidden;
}

.settings-hero-card::after,
.settings-section-head-card::after {
  content: '';
  position: absolute;
  inset: -90px -90px auto auto;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), .18), transparent 66%);
  pointer-events: none;
}

.settings-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 18px;
  align-items: stretch;
}

.settings-health-grid,
.settings-data-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.settings-health-card,
.settings-data-card,
.numbering-preview-item {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface-soft);
}

.settings-health-card span,
.settings-data-card span,
.numbering-preview-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.settings-health-card b,
.settings-data-card b,
.numbering-preview-item b {
  min-width: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

.settings-data-card b {
  font-size: 28px;
}

.settings-data-card small {
  color: var(--muted);
  font-size: 12px;
}

.settings-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.settings-nav-card {
  min-height: 168px;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(255, 255, 255, .72);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.settings-nav-card:hover,
.settings-nav-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(var(--primary-rgb), .28);
  box-shadow: 0 20px 46px rgba(15, 23, 42, .11);
  outline: none;
}

.settings-nav-card.danger-soft:hover,
.settings-nav-card.danger-soft:focus-visible {
  border-color: rgba(var(--danger-rgb), .28);
}

.settings-nav-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 20px;
  font-weight: 950;
}

.settings-nav-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.settings-nav-card.danger-soft .settings-nav-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.settings-nav-card b {
  font-size: 17px;
  font-weight: 950;
  letter-spacing: -.03em;
}

.settings-nav-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}


.settings-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 0;
  border: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  background: rgba(255, 255, 255, .64);
  overflow-x: auto;
  scrollbar-width: thin;
}

.settings-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 13px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 14px 14px 0 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: -.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.settings-tab svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
  flex: 0 0 auto;
}

.settings-tab:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--primary-soft) 48%, transparent);
}

.settings-tab.active,
.settings-tab[aria-selected='true'] {
  color: var(--primary-dark);
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary-soft) 64%, transparent);
}

.settings-tab.danger.active,
.settings-tab.danger[aria-selected='true'] {
  color: var(--danger);
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger-soft) 72%, transparent);
}

.settings-tab-panel {
  display: grid;
  gap: 18px;
}

.settings-tab-panel[hidden] {
  display: none !important;
}

.settings-tabs-form {
  display: grid;
  gap: 18px;
}

.settings-save-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.settings-save-row .btn {
  min-width: 190px;
}

.theme-preview-card.compact-preview {
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: 0;
}

.settings-check-list,
.numbering-preview-list,
.settings-export-grid,
.settings-import-box {
  display: grid;
  gap: 12px;
}

.settings-check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-soft);
  cursor: pointer;
}

.settings-check-row input {
  margin-top: 3px;
  accent-color: var(--primary);
}

.settings-check-row b,
.settings-check-row small {
  display: block;
}

.settings-check-row b {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}

.settings-check-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.settings-export-grid .btn,
.settings-import-box .btn {
  width: 100%;
}

html[data-compact-ui='on'] .card {
  padding: 18px;
}

html[data-compact-ui='on'] .form-grid {
  gap: 12px;
}

html[data-compact-ui='on'] .field {
  gap: 6px;
}

[data-theme='dark'] .settings-nav-card {
  border-color: rgba(255,255,255,.09);
  background: rgba(15, 23, 42, .62);
  box-shadow: 0 18px 44px rgba(0,0,0,.2);
}


[data-theme='dark'] .settings-tabs {
  border-color: rgba(255,255,255,.09);
  background: rgba(15, 23, 42, .58);
}

[data-theme='dark'] .settings-tab:hover,
[data-theme='dark'] .settings-tab.active,
[data-theme='dark'] .settings-tab[aria-selected='true'] {
  color: color-mix(in srgb, var(--primary) 72%, white 28%);
  background: color-mix(in srgb, var(--primary) 16%, transparent);
}

[data-theme='dark'] .settings-tab.danger.active,
[data-theme='dark'] .settings-tab.danger[aria-selected='true'] {
  color: color-mix(in srgb, var(--danger) 72%, white 28%);
  background: color-mix(in srgb, var(--danger) 16%, transparent);
}

[data-theme='dark'] .settings-health-card,
[data-theme='dark'] .settings-data-card,
[data-theme='dark'] .numbering-preview-item,
[data-theme='dark'] .settings-check-row {
  border-color: rgba(255,255,255,.08);
  background: rgba(15, 23, 42, .58);
}

[data-theme='dark'][data-glassmorphism='off'] .settings-nav-card,
[data-theme='dark'][data-glassmorphism='off'] .settings-health-card,
[data-theme='dark'][data-glassmorphism='off'] .settings-data-card,
[data-theme='dark'][data-glassmorphism='off'] .numbering-preview-item,
[data-theme='dark'][data-glassmorphism='off'] .settings-check-row {
  background: #111827;
  box-shadow: none;
}


[data-theme='dark'][data-glassmorphism='off'] .settings-tabs {
  background: #111827;
  box-shadow: none;
}

[data-theme='dark'][data-glassmorphism='off'] .settings-tab:hover,
[data-theme='dark'][data-glassmorphism='off'] .settings-tab.active,
[data-theme='dark'][data-glassmorphism='off'] .settings-tab[aria-selected='true'] {
  background: color-mix(in srgb, var(--primary) 12%, #111827 88%);
}

[data-theme='dark'][data-glassmorphism='off'] .settings-hero-card::after,
[data-theme='dark'][data-glassmorphism='off'] .settings-section-head-card::after {
  opacity: .65;
}

@media (max-width: 1180px) {
  .settings-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-hero-content,
  .settings-health-grid,
  .settings-data-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .settings-card-grid,
  .settings-export-grid {
    grid-template-columns: 1fr;
  }

  .settings-tabs {
    padding-inline: 10px;
  }

  .settings-tab {
    min-height: 42px;
    padding-inline: 11px;
  }

  .settings-nav-card {
    min-height: 140px;
  }
}


.contract-template-page {
  gap: 14px;
}

.contract-builder-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 0 2px 4px;
}

.contract-builder-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.contract-builder-actions .btn svg,
.contract-template-modal .btn svg {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}

.contract-builder-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 14px;
  min-height: 620px;
  align-items: stretch;
}

.contract-editor-area,
.contract-variables-panel {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.62);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
}

.contract-editor-area {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.contract-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-height: 48px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-soft) 74%, white 26%);
}

.contract-toolbar button {
  width: 34px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.contract-toolbar button:hover,
.contract-toolbar button:focus-visible {
  color: var(--text);
  background: var(--primary-soft);
  outline: none;
}

.contract-toolbar button:active {
  transform: translateY(1px);
}

.contract-toolbar button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.contract-toolbar-separator {
  width: 1px;
  height: 22px;
  margin: 0 5px;
  background: var(--border);
}

.contract-paper-wrap {
  min-height: 560px;
  padding: 34px 18px 54px;
  overflow: auto;
  background:
    radial-gradient(circle at 50% 0%, rgba(15, 23, 42, .06), transparent 32%),
    color-mix(in srgb, var(--surface-soft) 70%, #f5f5f5 30%);
}

.contract-editor-document {
  width: min(780px, 100%);
  min-height: 760px;
  margin: 0 auto;
  padding: 42px 46px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 2px;
  background: #fff;
  color: #111827;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .12);
  line-height: 1.65;
  font-size: 15px;
  outline: none;
}

.contract-editor-document:empty::before {
  content: attr(data-placeholder);
  color: #a1a1aa;
}

.contract-editor-document h1,
.contract-editor-document h2,
.contract-editor-document h3 {
  color: #111827;
  letter-spacing: -.03em;
}

.contract-editor-document h1 {
  font-size: 24px;
  margin: 0 0 18px;
}

.contract-editor-document h2 {
  font-size: 19px;
  margin: 22px 0 10px;
}

.contract-editor-document h3 {
  font-size: 16px;
  margin: 18px 0 8px;
}

.contract-editor-document p {
  margin: 0 0 12px;
}

.contract-editor-document table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 18px;
}

.contract-editor-document td,
.contract-editor-document th {
  border: 1px solid #d7dce5;
  padding: 9px 10px;
  vertical-align: top;
}

.contract-editor-document ul,
.contract-editor-document ol {
  padding-left: 22px;
}

.contract-variable-token {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border: 1px solid rgba(0, 128, 96, .18);
  border-radius: 7px;
  background: rgba(0, 128, 96, .08);
  color: #047857;
  font-family: var(--font-mono);
  font-size: .92em;
  font-weight: 850;
}

.contract-variables-panel {
  min-width: 0;
  max-height: 700px;
  overflow: auto;
  padding: 12px 14px;
}

.contract-variables-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  position: sticky;
  top: -12px;
  z-index: 2;
  margin: -12px -14px 12px;
  padding: 13px 14px 10px;
  background: color-mix(in srgb, var(--surface) 82%, white 18%);
  border-bottom: 1px solid var(--border);
}

.contract-variables-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: -.02em;
}

.contract-variables-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.contract-variables-close {
  display: none;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

.contract-variables-list {
  display: grid;
  gap: 16px;
}

.contract-variable-group h4 {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  font-weight: 950;
}

.contract-variable-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.contract-variable-chip {
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid rgba(0, 128, 96, .18);
  border-radius: 8px;
  background: rgba(0, 128, 96, .06);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 900;
  font-family: var(--font-mono);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contract-variable-chip:hover,
.contract-variable-chip:focus-visible {
  background: var(--primary-soft);
  outline: none;
}

.contract-save-row {
  margin-top: 0;
}

.contract-template-modal {
  width: min(760px, calc(100vw - 32px));
  border-radius: 28px;
}

.contract-template-modal-close {
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 22px;
}

.contract-template-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.contract-template-choice {
  min-height: 166px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 22px 14px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.contract-template-choice:hover,
.contract-template-choice:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
  box-shadow: 0 18px 38px rgba(15, 23, 42, .12);
  outline: none;
}

.contract-template-choice-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.contract-template-choice-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

.contract-template-choice b {
  font-size: 15px;
  font-weight: 950;
}

.contract-template-choice small {
  max-width: 170px;
  color: var(--muted);
  line-height: 1.45;
}

[data-theme='dark'] .contract-editor-area,
[data-theme='dark'] .contract-variables-panel {
  border-color: rgba(255,255,255,.09);
  background: rgba(15, 23, 42, .6);
  box-shadow: 0 18px 48px rgba(0,0,0,.22);
}

[data-theme='dark'] .contract-toolbar {
  border-color: rgba(255,255,255,.08);
  background: rgba(15, 23, 42, .74);
}

[data-theme='dark'] .contract-toolbar-separator {
  background: rgba(255,255,255,.09);
}

[data-theme='dark'] .contract-paper-wrap {
  background:
    radial-gradient(circle at 50% 0%, rgba(16, 185, 129, .08), transparent 34%),
    rgba(2, 6, 23, .44);
}

[data-theme='dark'] .contract-editor-document {
  background: #0f172a;
  color: #e5e7eb;
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 24px 70px rgba(0,0,0,.36);
}

[data-theme='dark'] .contract-editor-document h1,
[data-theme='dark'] .contract-editor-document h2,
[data-theme='dark'] .contract-editor-document h3 {
  color: #f8fafc;
}

[data-theme='dark'] .contract-editor-document td,
[data-theme='dark'] .contract-editor-document th {
  border-color: rgba(255,255,255,.14);
}

[data-theme='dark'] .contract-variables-head {
  background: rgba(15, 23, 42, .96);
  border-color: rgba(255,255,255,.08);
}

[data-theme='dark'] .contract-variable-chip {
  color: color-mix(in srgb, var(--primary) 74%, white 26%);
  border-color: color-mix(in srgb, var(--primary) 26%, transparent);
  background: color-mix(in srgb, var(--primary) 11%, transparent);
}

[data-theme='dark'] .contract-variable-token {
  color: color-mix(in srgb, var(--primary) 70%, white 30%);
  border-color: color-mix(in srgb, var(--primary) 26%, transparent);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}

[data-theme='dark'] .contract-template-modal {
  background: rgba(15, 23, 42, .94);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.08);
}

[data-theme='dark'] .contract-template-choice {
  background: rgba(15, 23, 42, .68);
  border-color: rgba(255,255,255,.07);
}

[data-theme='dark'][data-glassmorphism='off'] .contract-editor-area,
[data-theme='dark'][data-glassmorphism='off'] .contract-variables-panel,
[data-theme='dark'][data-glassmorphism='off'] .contract-toolbar,
[data-theme='dark'][data-glassmorphism='off'] .contract-variables-head,
[data-theme='dark'][data-glassmorphism='off'] .contract-template-modal,
[data-theme='dark'][data-glassmorphism='off'] .contract-template-choice {
  background: #111827;
  box-shadow: none;
}

[data-theme='dark'][data-glassmorphism='off'] .contract-paper-wrap {
  background: #0b1220;
}

@media (max-width: 1180px) {
  .contract-builder-topbar {
    flex-direction: column;
  }

  .contract-builder-actions {
    justify-content: flex-start;
  }

  .contract-builder-shell {
    grid-template-columns: 1fr;
  }

  .contract-variables-panel {
    display: none;
  }

  .contract-template-page.variables-open .contract-variables-panel {
    display: block;
  }

  .contract-variables-close {
    display: grid;
    place-items: center;
  }
}

@media (max-width: 760px) {
  .contract-builder-actions .btn {
    flex: 1 1 auto;
  }

  .contract-toolbar {
    max-height: 118px;
    overflow: auto;
  }

  .contract-paper-wrap {
    padding: 18px 10px 34px;
  }

  .contract-editor-document {
    min-height: 620px;
    padding: 28px 20px;
    font-size: 14px;
  }

  .contract-template-card-grid {
    grid-template-columns: 1fr;
  }
}


#dashboard,
#dashboard .dashboard-bottom-grid,
#dashboard .dashboard-feed-card,
#dashboard .dashboard-feed-body {
  min-width: 0;
  max-width: 100%;
}

#dashboard .dashboard-bottom-grid > .dashboard-feed-card {
  width: 100%;
}

.dashboard-feed-body {
  overflow: hidden;
}

.dashboard-payments-table,
.dashboard-deals-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 2px;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.dashboard-payments-table::-webkit-scrollbar,
.dashboard-deals-table::-webkit-scrollbar {
  height: 8px;
}

.dashboard-payments-table::-webkit-scrollbar-thumb,
.dashboard-deals-table::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(15, 23, 42, .16);
}

.dashboard-payments-head,
.dashboard-payment-row,
.dashboard-deals-head,
.dashboard-deal-row {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.dashboard-payments-head,
.dashboard-payment-row {
  grid-template-columns: 92px minmax(152px, 1.45fr) minmax(112px, .82fr) minmax(96px, .7fr) minmax(96px, .7fr);
  gap: 10px;
  padding-left: 14px;
  padding-right: 14px;
}

.dashboard-deals-head,
.dashboard-deal-row {
  grid-template-columns: minmax(150px, 1.55fr) 76px minmax(92px, .82fr) minmax(92px, .76fr) minmax(86px, .72fr) minmax(96px, .78fr) minmax(104px, .9fr);
  gap: 8px;
  padding-left: 14px;
  padding-right: 14px;
}

.dashboard-payments-head > span,
.dashboard-deals-head > span,
.dashboard-payment-row > *,
.dashboard-deal-row > * {
  min-width: 0;
}

.dashboard-payments-head > span,
.dashboard-deals-head > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-payment-row,
.dashboard-deal-row {
  min-height: 74px;
}

.dashboard-person-cell {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
}

.dashboard-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.dashboard-date-cell {
  padding-left: 20px;
}

.dashboard-date-cell::before {
  left: 5px;
}

.dashboard-date-cell i {
  left: 1px;
}

.dashboard-date-cell b,
.dashboard-date-plain,
.dashboard-contract-cell,
.dashboard-money-cell,
.dashboard-progress-cell b {
  font-size: 12.5px;
}

.dashboard-person-cell b,
.dashboard-deal-main b {
  font-size: 13px;
}

.dashboard-person-cell small,
.dashboard-deal-main small,
.dashboard-deal-main span {
  font-size: 11.5px;
}

.dashboard-status-pill,
.dashboard-deal-status-cell .badge {
  max-width: 100%;
  min-height: 26px;
  padding: 6px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
}

.dashboard-deal-status-cell .badge {
  display: inline-flex;
}

.dashboard-status-pill::before,
.dashboard-deal-status-cell .badge::before {
  width: 6px;
  height: 6px;
  margin-right: 7px;
  flex: 0 0 auto;
}

.dashboard-progress-cell {
  gap: 6px;
}

.dashboard-progress {
  height: 7px;
}

@media (min-width: 1381px) and (max-width: 1720px) {
  #dashboard .dashboard-bottom-grid {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.08fr);
    gap: 18px;
  }

  .dashboard-feed-card {
    padding: 22px 20px 16px;
  }

  .dashboard-feed-header {
    gap: 12px;
    margin-bottom: 18px;
  }

  .dashboard-feed-actions {
    gap: 8px;
  }

  .dashboard-select-control,
  .dashboard-action-btn {
    min-height: 44px;
    border-radius: 15px;
  }

  .dashboard-action-btn--icon {
    width: 44px;
  }

  .dashboard-summary-strip {
    gap: 10px;
    margin-bottom: 18px;
  }

  .dashboard-summary-card {
    min-height: 82px;
    padding: 14px 46px 14px 14px;
    border-radius: 16px;
  }

  .dashboard-summary-card b {
    font-size: 16px;
  }

  .dashboard-summary-icon {
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .dashboard-summary-icon svg {
    width: 17px;
    height: 17px;
  }
}

@media (min-width: 1181px) and (max-width: 1500px) {
  #dashboard .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .dashboard-payments-head,
  .dashboard-payment-row {
    min-width: 700px;
  }

  .dashboard-deals-head,
  .dashboard-deal-row {
    min-width: 840px;
  }
}

@media (max-width: 720px) {
  .dashboard-payments-head,
  .dashboard-payment-row {
    min-width: 660px;
  }

  .dashboard-deals-head,
  .dashboard-deal-row {
    min-width: 820px;
  }

  .dashboard-payment-row,
  .dashboard-deal-row {
    min-height: 68px;
  }
}

:root[data-theme="dark"] .dashboard-payments-table::-webkit-scrollbar-thumb,
:root[data-theme="dark"] .dashboard-deals-table::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .18);
}



#dashboard .dashboard-bottom-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  grid-auto-rows: 1fr;
  gap: 22px;
}

#dashboard .dashboard-bottom-grid > .dashboard-feed-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  align-self: stretch;
}

#dashboard .dashboard-feed-body {
  overflow: visible !important;
}

#dashboard .dashboard-payments-table,
#dashboard .dashboard-deals-table {
  width: 100%;
  max-width: 100%;
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  padding-bottom: 0 !important;
  scrollbar-width: none;
}

#dashboard .dashboard-payments-table::-webkit-scrollbar,
#dashboard .dashboard-deals-table::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

#dashboard .dashboard-payments-head,
#dashboard .dashboard-payment-row,
#dashboard .dashboard-deals-head,
#dashboard .dashboard-deal-row {
  min-width: 0 !important;
  max-width: 100%;
  box-sizing: border-box;
}

#dashboard .dashboard-payments-head,
#dashboard .dashboard-payment-row {
  grid-template-columns: 78px minmax(0, 1.5fr) minmax(0, .95fr) minmax(0, .74fr) minmax(0, .72fr) !important;
  gap: 10px;
  padding-left: 14px;
  padding-right: 14px;
}

#dashboard .dashboard-deals-head,
#dashboard .dashboard-deal-row {
  grid-template-columns: minmax(0, 1.42fr) 72px minmax(0, .82fr) minmax(0, .72fr) minmax(0, .72fr) 94px minmax(0, .72fr) !important;
  gap: 8px;
  padding-left: 14px;
  padding-right: 14px;
}

#dashboard .dashboard-deals-head,
#dashboard .dashboard-payments-head {
  white-space: nowrap;
}

#dashboard .dashboard-deals-head > span,
#dashboard .dashboard-payments-head > span,
#dashboard .dashboard-payment-row > *,
#dashboard .dashboard-deal-row > * {
  min-width: 0;
}

#dashboard .dashboard-date-cell b,
#dashboard .dashboard-date-plain,
#dashboard .dashboard-contract-cell,
#dashboard .dashboard-money-cell,
#dashboard .dashboard-progress-cell b {
  font-size: 12px;
}

#dashboard .dashboard-person-cell b,
#dashboard .dashboard-deal-main b {
  font-size: 12.5px;
}

#dashboard .dashboard-person-cell small,
#dashboard .dashboard-deal-main small,
#dashboard .dashboard-deal-main span {
  font-size: 11px;
}

#dashboard .dashboard-status-pill,
#dashboard .dashboard-deal-status-cell .badge {
  min-height: 24px;
  padding: 5px 9px;
  font-size: 11px;
}

#dashboard .dashboard-progress {
  height: 6px;
}

@media (max-width: 1180px) {
  #dashboard .dashboard-bottom-grid {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto;
  }

  #dashboard .dashboard-bottom-grid > .dashboard-feed-card {
    height: auto;
  }
}

@media (max-width: 720px) {
  #dashboard .dashboard-payments-head,
  #dashboard .dashboard-deals-head {
    display: none;
  }

  #dashboard .dashboard-payment-row,
  #dashboard .dashboard-deal-row {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
}


#dashboard .dashboard-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

#dashboard .dashboard-charts-grid .dashboard-chart-slot {
  min-width: 0;
  margin-top: 0;
}

#dashboard .dashboard-chart-card {
  min-height: 100%;
  padding: 22px 22px 18px;
  border-radius: 30px;
  overflow: hidden;
}

.dashboard-chart-shell {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  gap: 18px;
}

.dashboard-chart-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-chart-title-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.dashboard-chart-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(var(--primary-rgb), .10), rgba(var(--primary-rgb), .06));
  color: var(--primary);
}

.dashboard-chart-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-chart-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 144px;
  min-height: 44px;
  border: 1px solid rgba(var(--primary-rgb), .18);
  background: rgba(255, 255, 255, .9);
  border-radius: 18px;
  padding: 0 38px 0 14px;
  box-shadow: 0 10px 28px rgba(17, 24, 39, .06);
}

.dashboard-chart-select select {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 900;
  width: 100%;
  height: 44px;
  padding-right: 6px;
  cursor: pointer;
  outline: none;
}

.dashboard-chart-select-arrow {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: rgba(var(--primary-rgb), .72);
  pointer-events: none;
}

.dashboard-chart-select-arrow svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-chart-kpis {
  display: grid;
  gap: 16px;
}

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

.dashboard-chart-kpi {
  min-width: 0;
  min-height: 126px;
  padding: 18px 18px 16px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, .06);
  background: linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .92));
  display: grid;
  align-content: start;
  gap: 10px;
}

.dashboard-chart-kpi--accent-soft {
  background: linear-gradient(180deg, rgba(var(--primary-rgb), .05), rgba(var(--primary-rgb), .11));
  border-color: rgba(var(--primary-rgb), .08);
}

.dashboard-chart-kpi--neutral {
  background: linear-gradient(180deg, rgba(248, 250, 252, .92), rgba(255, 255, 255, .96));
}

.dashboard-chart-kpi-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.dashboard-chart-kpi-head span:first-child {
  min-width: 0;
}

.dashboard-chart-info {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-grid;
  place-items: center;
  color: rgba(107, 114, 128, .75);
}

.dashboard-chart-info svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-chart-kpi b {
  font-size: clamp(24px, 2.2vw, 28px);
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--text);
}

.dashboard-chart-kpi--accent-soft b {
  color: var(--primary);
}

.dashboard-chart-kpi-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.dashboard-chart-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 900;
}

.dashboard-chart-trend.positive {
  color: var(--primary);
}

.dashboard-chart-trend.negative {
  color: #ef4444;
}

.dashboard-chart-legend {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.dashboard-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.dashboard-chart-plot {
  flex: 1 1 auto;
  min-height: 250px;
}

#dashboard .monthly-chart-wrap,
#dashboard .daily-flow-chart-wrap {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  min-height: 252px;
}

#dashboard .monthly-chart-axis {
  padding: 6px 0 34px;
  color: #8b93a1;
  font-size: 12px;
  font-weight: 800;
}

#dashboard .monthly-chart-area {
  padding-top: 6px;
}

#dashboard .monthly-chart-grid {
  inset: 6px 0 34px;
}

#dashboard .monthly-chart-grid span {
  border-top: 1px dashed rgba(148, 163, 184, .32);
}

#dashboard .monthly-chart-bars {
  grid-template-columns: repeat(var(--chart-month-count, 12), minmax(28px, 1fr));
  gap: clamp(8px, .8vw, 14px);
  min-height: 246px;
  overflow: visible;
}

#dashboard .monthly-chart-month {
  min-width: 0;
  gap: 12px;
}

#dashboard .monthly-chart-column,
#dashboard .daily-flow-column {
  height: 198px;
}

#dashboard .monthly-bar.revenue {
  width: min(32px, 82%);
  background: repeating-linear-gradient(
    -45deg,
    rgba(var(--primary-rgb), .12) 0,
    rgba(var(--primary-rgb), .12) 5px,
    rgba(var(--primary-rgb), .20) 5px,
    rgba(var(--primary-rgb), .20) 10px
  );
  border: 1px solid rgba(var(--primary-rgb), .16);
}

#dashboard .monthly-bar.profit {
  width: min(16px, 40%);
  background: linear-gradient(180deg, #17a768, var(--primary));
  box-shadow: 0 12px 24px rgba(var(--primary-rgb), .18);
}

#dashboard .monthly-chart-month.is-active .monthly-bar.revenue {
  background: repeating-linear-gradient(
    -45deg,
    rgba(var(--primary-rgb), .22) 0,
    rgba(var(--primary-rgb), .22) 5px,
    rgba(var(--primary-rgb), .34) 5px,
    rgba(var(--primary-rgb), .34) 10px
  );
}

#dashboard .monthly-chart-month:hover .monthly-bar,
#dashboard .daily-flow-day:hover .daily-flow-bar {
  transform: translateY(-3px);
}

#dashboard .monthly-chart-label,
#dashboard .daily-flow-label {
  color: #8b93a1;
  font-size: 11px;
  font-weight: 900;
}

#dashboard .daily-flow-bars {
  grid-template-columns: repeat(var(--chart-day-count, 30), minmax(8px, 1fr));
  gap: clamp(4px, .5vw, 7px);
  min-height: 246px;
  overflow: visible;
}

#dashboard .daily-flow-day {
  min-width: 0;
  gap: 10px;
}

#dashboard .daily-flow-bar.expected {
  width: min(14px, 90%);
  background: repeating-linear-gradient(
    -45deg,
    rgba(var(--primary-rgb), .14) 0,
    rgba(var(--primary-rgb), .14) 4px,
    rgba(var(--primary-rgb), .24) 4px,
    rgba(var(--primary-rgb), .24) 8px
  );
  border: 1px solid rgba(var(--primary-rgb), .18);
}

#dashboard .daily-flow-bar.collected {
  width: min(8px, 54%);
  background: linear-gradient(180deg, #17a768, var(--primary));
  box-shadow: 0 10px 24px rgba(var(--primary-rgb), .18);
}

#dashboard .daily-flow-day.is-active .daily-flow-bar.collected {
  width: min(10px, 62%);
  box-shadow: 0 16px 32px rgba(var(--primary-rgb), .24);
}

#dashboard .daily-flow-day.is-active .daily-flow-bar.expected {
  background: repeating-linear-gradient(
    -45deg,
    rgba(var(--primary-rgb), .22) 0,
    rgba(var(--primary-rgb), .22) 4px,
    rgba(var(--primary-rgb), .34) 4px,
    rgba(var(--primary-rgb), .34) 8px
  );
}

#dashboard .daily-flow-day.is-active .daily-flow-label,
#dashboard .monthly-chart-month.is-active .monthly-chart-label {
  color: var(--primary);
}

.dashboard-chart-insight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(var(--primary-rgb), .10);
  background: linear-gradient(180deg, rgba(var(--primary-rgb), .05), rgba(255, 255, 255, .94));
}

.dashboard-chart-insight-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.dashboard-chart-insight-main > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dashboard-chart-insight-main b {
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.dashboard-chart-insight-main span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.dashboard-chart-insight-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(var(--primary-rgb), .10);
  color: var(--primary);
}

.dashboard-chart-insight-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-chart-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 132px;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 16px;
  border: 1px solid rgba(var(--primary-rgb), .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  color: var(--primary);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.dashboard-chart-cta:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--primary-rgb), .28);
  box-shadow: 0 12px 30px rgba(var(--primary-rgb), .10);
}

.dashboard-chart-cta svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:root[data-theme="dark"] #dashboard .dashboard-chart-card {
  background: linear-gradient(180deg, rgba(11, 15, 20, .96), rgba(11, 15, 20, .98));
  border-color: rgba(255, 255, 255, .06);
}

:root[data-theme="dark"] .dashboard-chart-select {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .10);
  box-shadow: none;
}

:root[data-theme="dark"] .dashboard-chart-kpi {
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .02));
  border-color: rgba(255, 255, 255, .06);
}

:root[data-theme="dark"] .dashboard-chart-kpi--accent-soft,
:root[data-theme="dark"] .dashboard-chart-insight {
  background: linear-gradient(180deg, rgba(var(--primary-rgb), .10), rgba(var(--primary-rgb), .06));
  border-color: rgba(var(--primary-rgb), .16);
}

:root[data-theme="dark"] #dashboard .monthly-chart-grid span {
  border-top-color: rgba(255, 255, 255, .10);
}

:root[data-theme="dark"] #dashboard .monthly-chart-axis,
:root[data-theme="dark"] #dashboard .monthly-chart-label,
:root[data-theme="dark"] #dashboard .daily-flow-label,
:root[data-theme="dark"] .dashboard-chart-info {
  color: rgba(226, 232, 240, .54);
}

:root[data-theme="dark"] .dashboard-chart-cta {
  background: rgba(255, 255, 255, .03);
  border-color: rgba(var(--primary-rgb), .18);
}

@media (max-width: 1380px) {
  #dashboard .dashboard-charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-chart-top,
  .dashboard-chart-insight {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-chart-select,
  .dashboard-chart-cta {
    width: 100%;
  }
}

@media (max-width: 640px) {
  #dashboard .dashboard-chart-card {
    padding: 18px;
    border-radius: 24px;
  }

  .dashboard-chart-kpis--2 {
    grid-template-columns: 1fr;
  }

  .dashboard-chart-title-row {
    gap: 12px;
  }

  .dashboard-chart-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  #dashboard .monthly-chart-wrap,
  #dashboard .daily-flow-chart-wrap {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
  }

  #dashboard .monthly-chart-bars {
    gap: 6px;
  }

  #dashboard .daily-flow-bars {
    gap: 4px;
  }

  .dashboard-chart-insight-main {
    grid-template-columns: 1fr;
  }
}


.storage-section {
  min-height: calc(100vh - 140px);
}

.storage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.storage-main,
.storage-sidebar,
.storage-details-panel {
  display: grid;
  gap: 16px;
}

.storage-usage-widget {
  position: relative;
  z-index: 1;
}

.storage-usage-widget {
  align-self: stretch;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 28px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(18px);
}

.storage-ring {
  --storage-percent: 0;
  display: grid;
  place-items: center;
  align-content: center;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(6, 53, 32, .96) 0 57%, transparent 58%),
    conic-gradient(#ffffff calc(var(--storage-percent) * 1%), rgba(255,255,255,.18) 0);
}

.storage-ring span {
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -.05em;
}

.storage-ring small {
  margin-top: -2px;
  color: rgba(255,255,255,.68);
  font-size: 11px;
  font-weight: 700;
}

.storage-usage-lines {
  display: grid;
  gap: 10px;
}

.storage-usage-lines div,
.storage-mini-stats div,
.storage-side-grid div,
.storage-properties div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.storage-usage-lines span {
  color: rgba(255,255,255,.68);
  font-size: 12px;
}

.storage-usage-lines b {
  font-size: 14px;
  color: #fff;
}

.storage-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: -8px;
}

.storage-mini-stats div {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255,255,255,.76);
  box-shadow: var(--shadow-soft);
}

.storage-mini-stats span,
.storage-side-grid span,
.storage-properties span {
  color: var(--muted);
  font-size: 12px;
}

.storage-mini-stats b,
.storage-side-grid b,
.storage-properties b {
  color: var(--text);
  font-size: 15px;
  text-align: right;
}

.storage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 28px;
}

.storage-toolbar-title,
.storage-side-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.storage-toolbar-icon,
.storage-side-title > span {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: var(--primary);
  background: var(--primary-soft);
}

.storage-toolbar-icon svg,
.storage-folder-visual svg,
.storage-file-folder svg,
.storage-side-title svg,
.storage-empty-state svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.storage-toolbar-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(140px, .8fr) minmax(140px, .8fr) auto;
  gap: 10px;
  align-items: end;
  flex: 1;
  max-width: 780px;
}

.storage-toolbar-actions .field {
  margin: 0;
}

.storage-folders-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.storage-folder-card {
  position: relative;
  overflow: hidden;
  min-height: 166px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 28px;
  text-align: left;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.54)),
    var(--surface);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.storage-folder-card:hover,
.storage-file-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--primary-rgb), .26);
  box-shadow: 0 22px 48px rgba(20,25,30,.10);
}

.storage-folder-card.active {
  color: #fff;
  border-color: rgba(255,255,255,.22);
  background:
    radial-gradient(circle at 80% 12%, rgba(255,255,255,.34), transparent 22%),
    linear-gradient(135deg, #4d9af6 0%, #72adff 100%);
}

.storage-folder-card.active .storage-folder-hint,
.storage-folder-card.active .storage-folder-meta {
  color: rgba(255,255,255,.78);
}

.storage-folder-card.active .storage-folder-progress {
  background: rgba(255,255,255,.22);
}

.storage-folder-card.active .storage-folder-progress i {
  background: #fff;
}

.storage-folder-visual,
.storage-file-folder {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: var(--primary);
  background: var(--primary-soft);
}

.storage-folder-card.active .storage-folder-visual {
  color: #fff;
  background: rgba(255,255,255,.18);
}

.storage-folder-title,
.storage-folder-hint,
.storage-folder-meta,
.storage-folder-progress {
  display: block;
}

.storage-folder-title {
  margin-top: 18px;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: -.02em;
}

.storage-folder-hint {
  margin-top: 5px;
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.storage-folder-meta {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 12px;
}

.storage-folder-progress,
.storage-linear {
  overflow: hidden;
  height: 6px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(20,25,30,.07);
}

.storage-folder-progress i,
.storage-linear i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.storage-files-card {
  border-radius: 30px;
}

.storage-files-head {
  align-items: center;
}

.storage-files-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.storage-file-card {
  display: grid;
  gap: 14px;
  min-height: 252px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.storage-file-open {
  position: relative;
  display: grid;
  place-items: start;
  min-height: 82px;
  padding: 14px;
  border: 0;
  border-radius: 22px;
  color: var(--primary);
  background:
    linear-gradient(135deg, rgba(var(--primary-rgb), .14), rgba(var(--primary-rgb), .03));
  cursor: pointer;
}

.storage-file-open::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 0;
  width: 58px;
  height: 18px;
  border-radius: 12px 12px 0 0;
  background: rgba(255,255,255,.72);
}

.storage-file-folder {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: rgba(255,255,255,.78);
}

.storage-file-body h3 {
  margin: 8px 0 6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 40px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
}

.storage-file-body p,
.storage-file-topline {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.storage-file-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.storage-file-topline b {
  color: var(--text-soft);
  white-space: nowrap;
}

.storage-file-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.storage-file-actions {
  display: flex;
  gap: 8px;
  align-self: end;
}

.storage-file-actions .btn {
  flex: 1;
}

.storage-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.storage-tag,
.storage-tag-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(var(--primary-rgb), .14);
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 750;
}

.storage-tags-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.storage-tag-filter {
  cursor: pointer;
  color: var(--text-soft);
  background: rgba(255,255,255,.62);
  border-color: var(--border);
}

.storage-tag-filter span {
  color: var(--muted);
}

.storage-tag-filter.active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.storage-tag-filter.active span {
  color: rgba(255,255,255,.72);
}

.storage-upload-card,
.storage-tags-card,
.storage-side-card {
  border-radius: 28px;
}

.storage-upload-form {
  display: grid;
  gap: 12px;
}

.storage-upload-form .field {
  margin: 0;
}

.storage-side-card {
  padding: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow-soft);
}

.storage-side-title > div {
  display: grid;
  gap: 2px;
}

.storage-side-title b {
  color: var(--text);
  font-size: 20px;
  letter-spacing: -.04em;
}

.storage-side-title small {
  color: var(--muted);
  font-size: 12px;
}

.storage-side-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.storage-side-card h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 14px;
}

.storage-side-folders {
  display: grid;
  gap: 8px;
}

.storage-side-folders button {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text-soft);
  background: var(--surface-soft);
  cursor: pointer;
}

.storage-side-folders b {
  color: var(--text);
}

.storage-properties {
  display: grid;
  gap: 12px;
}

.storage-properties div {
  align-items: flex-start;
}

.storage-properties b {
  max-width: 180px;
  overflow-wrap: anywhere;
}

.storage-empty-state,
.storage-empty-hint {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  padding: 28px;
  border: 1px dashed var(--border-strong);
  border-radius: 28px;
  color: var(--muted);
  text-align: center;
  background: rgba(255,255,255,.52);
}

.storage-empty-state svg {
  width: 42px;
  height: 42px;
  color: var(--primary);
}

.storage-empty-state b {
  color: var(--text);
}

.document-file-cell {
  display: grid;
  gap: 3px;
}

.document-file-note {
  display: block;
  margin-top: 2px;
}

:root[data-theme="dark"] .storage-mini-stats div,
:root[data-theme="dark"] .storage-folder-card,
:root[data-theme="dark"] .storage-file-card,
:root[data-theme="dark"] .storage-side-card,
:root[data-theme="dark"] .storage-empty-state,
:root[data-theme="dark"] .storage-empty-hint,
:root[data-theme="dark"] .storage-tag-filter {
  background: rgba(255,255,255,.045);
  border-color: rgba(255,255,255,.08);
}

:root[data-theme="dark"] .storage-folder-card {
  background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.035));
}

:root[data-theme="dark"] .storage-folder-card.active {
  background:
    radial-gradient(circle at 80% 12%, rgba(255,255,255,.20), transparent 22%),
    linear-gradient(135deg, #116bff 0%, #2e8cff 100%);
}

:root[data-theme="dark"] .storage-file-open {
  background: rgba(255,255,255,.055);
}

:root[data-theme="dark"] .storage-file-open::before,
:root[data-theme="dark"] .storage-file-folder {
  background: rgba(255,255,255,.08);
}

:root[data-theme="dark"] .storage-tag {
  color: var(--accent-strong);
}

:root[data-theme="dark"] .storage-side-folders button {
  background: rgba(255,255,255,.045);
  border-color: rgba(255,255,255,.08);
}

@media (max-width: 1320px) {
  .storage-layout {
    grid-template-columns: 1fr;
  }

  .storage-sidebar {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  }

  .storage-details-panel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .storage-toolbar,
  .storage-toolbar-actions {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .storage-toolbar {
    display: grid;
  }

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

@media (max-width: 760px) {
  .storage-usage-widget,
  .storage-mini-stats,
  .storage-sidebar,
  .storage-details-panel,
  .storage-folders-grid,
  .storage-files-grid {
    grid-template-columns: 1fr;
  }

  .storage-toolbar-title {
    align-items: flex-start;
  }

  .storage-file-actions {
    flex-direction: column;
  }
}


.storage-toolbar-actions {
  grid-template-columns: minmax(220px, 1.6fr) minmax(140px, .8fr) minmax(140px, .8fr) auto auto;
}

.storage-file-preview-label {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(255,255,255,.78);
  font-size: 11px;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(20,25,30,.08);
}

.storage-upload-modal {
  width: min(760px, 100%);
}

.storage-upload-modal .storage-upload-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.storage-upload-modal .storage-upload-form .field,
.storage-upload-modal .storage-upload-form .config-warning {
  margin: 0;
}

.storage-upload-modal .storage-upload-form .field.full,
.storage-upload-modal .storage-upload-form .config-warning,
.storage-upload-modal .storage-upload-form .modal-actions {
  grid-column: 1 / -1;
}

.storage-upload-dropzone {
  position: relative;
  padding: 18px;
  border: 1px dashed rgba(var(--primary-rgb), .36);
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 10%, rgba(var(--primary-rgb), .10), transparent 28%),
    linear-gradient(135deg, rgba(var(--primary-rgb), .07), rgba(255,255,255,.70));
}

.storage-upload-dropzone label {
  font-size: 14px;
  color: var(--text);
}

.storage-upload-dropzone input[type="file"] {
  margin-top: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.78);
}

.storage-upload-dropzone span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.storage-preview-modal {
  width: min(1180px, 100%);
}

.storage-preview-header {
  align-items: center;
}

.storage-preview-actions {
  margin-top: 0;
  flex-wrap: nowrap;
}

.storage-preview-body {
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: min(68vh, 720px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,255,255,.46)),
    var(--surface-soft);
}

.storage-preview-frame {
  width: 100%;
  height: min(68vh, 720px);
  border: 0;
  background: #fff;
}

.storage-preview-image-wrap {
  width: 100%;
  height: min(68vh, 720px);
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: auto;
}

.storage-preview-image-wrap img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(20,25,30,.14);
}

.storage-preview-placeholder {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 280px;
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

.storage-preview-placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--primary);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.storage-preview-placeholder b {
  color: var(--text);
  font-size: 16px;
}

.storage-preview-placeholder.error b {
  color: var(--danger);
}

.loader-dot {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(var(--primary-rgb), .16);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: storageSpin .8s linear infinite;
}

@keyframes storageSpin {
  to { transform: rotate(360deg); }
}

:root[data-theme="dark"] .storage-file-preview-label,
:root[data-theme="dark"] .storage-upload-dropzone input[type="file"] {
  color: var(--text);
  background: rgba(255,255,255,.08);
}

:root[data-theme="dark"] .storage-upload-dropzone,
:root[data-theme="dark"] .storage-preview-body {
  background: rgba(255,255,255,.045);
  border-color: rgba(255,255,255,.10);
}

:root[data-theme="dark"] .storage-preview-frame {
  background: #101418;
}

@media (max-width: 1180px) {
  .storage-toolbar-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .storage-upload-modal .storage-upload-form {
    grid-template-columns: 1fr;
  }

  .storage-preview-header,
  .storage-preview-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .storage-preview-actions .btn {
    width: 100%;
  }
}


.storage-mini-stats.storage-mini-stats--top {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0;
}

.storage-toolbar-actions {
  grid-template-columns: minmax(260px, 1.6fr) minmax(180px, .8fr) !important;
  max-width: 640px;
}

.storage-folder-directive {
  grid-column: span 3;
  min-height: 166px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(var(--primary-rgb), .18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 12%, rgba(var(--primary-rgb), .12), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.58));
  box-shadow: var(--shadow-soft);
}

.storage-folder-directive span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.storage-folder-directive b {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: clamp(22px, 2vw, 32px);
  letter-spacing: -.04em;
}

.storage-folder-directive p {
  max-width: 520px;
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.storage-sidebar-usage-card {
  padding: 16px;
  border-radius: 28px;
}

.storage-sidebar-usage-card .card-header {
  margin-bottom: 12px;
}

.storage-sidebar-usage-card .storage-usage-widget {
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-color: var(--border);
  background:
    radial-gradient(circle at 88% 10%, rgba(var(--primary-rgb), .10), transparent 34%),
    rgba(255,255,255,.72);
  backdrop-filter: none;
}

.storage-sidebar-usage-card .storage-ring {
  width: 108px;
  height: 108px;
  color: var(--text);
  background:
    radial-gradient(circle at center, var(--surface) 0 57%, transparent 58%),
    conic-gradient(var(--primary) calc(var(--storage-percent) * 1%), rgba(var(--primary-rgb), .13) 0);
}

.storage-sidebar-usage-card .storage-ring span {
  color: var(--text);
  font-size: 24px;
}

.storage-sidebar-usage-card .storage-ring small,
.storage-sidebar-usage-card .storage-usage-lines span {
  color: var(--muted);
}

.storage-sidebar-usage-card .storage-usage-lines b {
  color: var(--text);
}

:root[data-theme="dark"] .storage-folder-directive,
:root[data-theme="dark"] .storage-sidebar-usage-card .storage-usage-widget {
  background: rgba(255,255,255,.045);
  border-color: rgba(255,255,255,.08);
}

:root[data-theme="dark"] .storage-sidebar-usage-card .storage-ring {
  background:
    radial-gradient(circle at center, #101418 0 57%, transparent 58%),
    conic-gradient(var(--primary) calc(var(--storage-percent) * 1%), rgba(255,255,255,.10) 0);
}

@media (max-width: 1180px) {
  .storage-mini-stats.storage-mini-stats--top,
  .storage-toolbar-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .storage-folder-directive {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .storage-mini-stats.storage-mini-stats--top,
  .storage-toolbar-actions,
  .storage-sidebar-usage-card .storage-usage-widget {
    grid-template-columns: 1fr !important;
  }

  .storage-folder-directive {
    flex-direction: column;
    align-items: stretch;
  }

  .storage-sidebar-usage-card .storage-ring {
    justify-self: center;
  }
}



.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--page);
}

.auth-card {
  width: min(520px, 100%);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 34px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.auth-brand {
  padding: 0;
  margin-bottom: 18px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(17, 24, 39, .04);
}

.auth-tab {
  border: 0;
  border-radius: 14px;
  padding: 11px 14px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: .18s ease;
}

.auth-tab:hover {
  color: var(--text);
  background: rgba(255,255,255,.72);
}

.auth-tab.is-active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 10px 24px rgba(22, 163, 74, .20);
}

.auth-title {
  margin: 0;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -.06em;
}

.auth-subtitle {
  margin: 8px 0 22px;
  color: var(--muted);
}

.auth-form[hidden] {
  display: none !important;
}

.auth-inline-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.auth-link {
  border: 0;
  padding: 0;
  color: var(--primary);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-note {
  padding: 12px 14px;
  border: 1px solid rgba(22, 163, 74, .18);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(22, 163, 74, .08);
  line-height: 1.45;
}



@media (max-width: 1180px) {
  body { overflow: auto; }
  .app {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .glass-frame {
    height: auto;
    min-height: 100dvh;
    padding: 18px;
    overflow: visible;
  }
  .app-header { grid-template-columns: 1fr auto; border-radius: 28px; height: auto; }
  .top-nav { grid-column: 1 / -1; justify-self: stretch; overflow: auto; justify-content: flex-start; }
  .workspace {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }
  .main {
    height: auto;
    min-height: 0;
    overflow: visible;
    padding-right: 0;
  }
  .side-rail { position: sticky; top: 12px; z-index: 10; min-height: auto; height: auto; flex-direction: row; justify-content: space-between; overflow: visible; }
  .rail-nav { grid-auto-flow: column; grid-auto-columns: minmax(150px, max-content); overflow: auto; max-width: calc(100vw - 190px); border-radius: 28px; }
  .rail-global-nav { flex: 0 0 auto; border-radius: 28px; }
  .rail-global-nav .rail-btn { min-width: 150px; }
  .rail-heading { display: none; }
  .rail-btn { min-width: 150px; }
  .rail-bottom { margin-top: 0; }
  #dashboard .grid-4,
  #dashboard .grid-2,
  .grid-4,
  .grid-3,
  .grid-2,
  .form-grid,
  .kpi-line,
  .payment-rounding-grid { grid-template-columns: 1fr; }
}


@media (max-width: 760px) {
  .chart-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .chart-summary-pills {
    width: 100%;
  }

  .chart-pill {
    flex: 1 1 150px;
  }

  .monthly-chart-wrap {
    grid-template-columns: 42px 1fr;
  }

  .monthly-chart-bars {
    gap: 10px;
    grid-template-columns: repeat(12, minmax(36px, 1fr));
  }

  .monthly-bar.revenue {
    width: 26px;
  }
}

@media (max-width: 1380px) {
  .dashboard-charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .dashboard-charts-grid {
    gap: 14px;
  }

  .daily-flow-chart-wrap {
    grid-template-columns: 42px 1fr;
  }

  .daily-flow-bars {
    grid-template-columns: repeat(30, minmax(10px, 1fr));
    gap: 4px;
  }

  .daily-flow-bar.expected {
    width: 12px;
  }
}



@media (max-width: 760px) {
  .product-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-soft);
  }

  .product-row .btn {
    width: 100%;
  }
}

@media (max-width: 1180px) {
  .user-dropdown {
    right: 0;
  }
}

@media (max-width: 760px) {
  .header-actions {
    gap: 8px;
  }

  .user-menu-trigger {
    max-width: 54px;
    padding: 6px;
  }

  .user-chip-text,
  .user-menu-caret {
    display: none;
  }

  .user-dropdown {
    position: fixed;
    top: 86px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 104px);
    overflow: auto;
  }

  .user-dropdown::before {
    display: none;
  }
}




.toast-root {
  position: fixed;
  top: clamp(18px, 3vw, 34px);
  right: clamp(16px, 3vw, 36px);
  z-index: 1200;
  display: grid;
  gap: 14px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 14px 14px 14px 16px;
  border: 1px solid rgba(20, 25, 30, .06);
  border-radius: 26px;
  color: #111827;
  background: rgba(238, 240, 239, .94);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .14);
  overflow: hidden;
  pointer-events: auto;
  opacity: 0;
  transform: translate3d(18px, -8px, 0) scale(.98);
  animation: toastIn .22s cubic-bezier(.21, 1.02, .73, 1) forwards;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.toast.is-leaving {
  animation: toastOut .18s ease forwards;
}

.toast-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255,255,255,.62);
  color: #58605d;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.42);
}

.toast-icon svg,
.toast-close svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast-content {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.toast-title {
  font-weight: 950;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: -.035em;
  color: #0f172a;
}

.toast-message {
  color: rgba(15, 23, 42, .68);
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.toast-close {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  padding: 0;
  color: rgba(15, 23, 42, .54);
  background: transparent;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.toast-close:hover {
  background: rgba(255,255,255,.54);
  color: #0f172a;
  transform: scale(1.04);
}

.toast-progress {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: currentColor;
  opacity: .34;
  transform-origin: left center;
  animation: toastProgress var(--toast-duration, 5600ms) linear forwards;
}

.toast-info {
  background: rgba(231, 238, 255, .95);
  color: #4f7deb;
}
.toast-info .toast-icon {
  color: #4f7deb;
  background: rgba(255,255,255,.60);
}
.toast-info .toast-close:hover {
  background: rgba(191, 211, 255, .78);
}

.toast-success {
  background: rgba(224, 246, 238, .96);
  color: #12b981;
}
.toast-success .toast-icon {
  color: #12b981;
}
.toast-success .toast-close:hover {
  background: rgba(180, 236, 216, .78);
}

.toast-warning {
  background: rgba(255, 242, 225, .96);
  color: #f59e0b;
}
.toast-warning .toast-icon {
  color: #f59e0b;
}
.toast-warning .toast-close:hover {
  background: rgba(255, 223, 184, .82);
}

.toast-error {
  background: rgba(253, 235, 232, .96);
  color: #ef4444;
}
.toast-error .toast-icon {
  color: #ef4444;
}
.toast-error .toast-close:hover {
  background: rgba(255, 205, 200, .82);
}

@keyframes toastIn {
  from { opacity: 0; transform: translate3d(18px, -8px, 0) scale(.98); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  to { opacity: 0; transform: translate3d(18px, -8px, 0) scale(.98); }
}

@keyframes toastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

:root[data-theme="dark"] .toast {
  border-color: rgba(238, 255, 246, .11);
  background: rgba(20, 28, 24, .95);
  color: var(--text-soft);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .44), inset 0 1px 0 rgba(255,255,255,.05);
}

:root[data-theme="dark"] .toast-title {
  color: var(--text);
}

:root[data-theme="dark"] .toast-message {
  color: rgba(196, 208, 200, .72);
}

:root[data-theme="dark"] .toast-icon {
  background: rgba(255,255,255,.07);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

:root[data-theme="dark"] .toast-close {
  color: rgba(238,255,246,.55);
}

:root[data-theme="dark"] .toast-close:hover {
  background: rgba(255,255,255,.08);
  color: var(--text);
}

:root[data-theme="dark"] .toast-info {
  background: rgba(22, 34, 56, .95);
  color: #79a8ff;
}
:root[data-theme="dark"] .toast-success {
  background: rgba(14, 42, 30, .95);
  color: #62e7a5;
}
:root[data-theme="dark"] .toast-warning {
  background: rgba(55, 38, 17, .95);
  color: #ffc266;
}
:root[data-theme="dark"] .toast-error {
  background: rgba(55, 24, 24, .95);
  color: #ff8a8a;
}

:root[data-theme="dark"][data-glassmorphism="off"] .toast {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: #26362d;
  background: #101914;
}

:root[data-theme="dark"][data-glassmorphism="off"] .toast-info { background: #111c2d; }
:root[data-theme="dark"][data-glassmorphism="off"] .toast-success { background: #10251a; }
:root[data-theme="dark"][data-glassmorphism="off"] .toast-warning { background: #2a1f10; }
:root[data-theme="dark"][data-glassmorphism="off"] .toast-error { background: #2a1515; }

@media (max-width: 640px) {
  .toast-root {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .toast {
    grid-template-columns: 48px minmax(0, 1fr) 36px;
    gap: 11px;
    min-height: 76px;
    padding: 12px;
    border-radius: 22px;
  }

  .toast-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .toast-icon svg {
    width: 26px;
    height: 26px;
  }

  .toast-title {
    font-size: 16px;
  }

  .toast-message {
    font-size: 13px;
  }
}





.cashier-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(var(--primary-rgb), .13), transparent 30%),
    radial-gradient(circle at 86% 0%, rgba(99, 91, 255, .12), transparent 24%),
    var(--bg);
}

.cashier-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.cashier-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 28px;
  border-bottom: 1px solid rgba(17, 24, 39, .08);
  background: rgba(255, 255, 255, .84);
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 34px rgba(17, 24, 39, .07);
}

[data-theme="dark"] .cashier-header {
  background: rgba(18, 24, 32, .82);
  border-bottom-color: rgba(255, 255, 255, .08);
}

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

.cashier-brand .brand-logo {
  flex: 0 0 auto;
}

.cashier-title-wrap {
  min-width: 0;
}

.cashier-title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.03em;
}

.cashier-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 52vw;
}

.cashier-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cashier-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid rgba(17, 24, 39, .08);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  font-weight: 800;
  max-width: 280px;
}

.cashier-user-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cashier-main {
  width: min(1560px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 34px;
}

.cashier-alert {
  margin-bottom: 16px;
}

.cashier-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.cashier-shift-card {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(var(--primary-rgb), .98), rgba(18, 114, 71, .88)),
    var(--primary);
  color: #fff;
  box-shadow: 0 28px 60px rgba(var(--primary-rgb), .22);
}

.cashier-shift-card::after {
  content: '';
  position: absolute;
  right: -62px;
  top: -72px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
}

.cashier-shift-content {
  position: relative;
  z-index: 1;
}

.cashier-shift-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.cashier-shift-title {
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -.04em;
  font-weight: 950;
  margin: 6px 0 5px;
}

.cashier-shift-meta {
  color: rgba(255, 255, 255, .78);
  font-weight: 650;
}

.cashier-shift-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, .17);
  border: 1px solid rgba(255, 255, 255, .2);
  font-weight: 900;
  white-space: nowrap;
}

.cashier-shift-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .14);
}

.cashier-shift-dot.closed {
  background: #fecaca;
}

.cashier-shift-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cashier-shift-metric {
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .17);
}

.cashier-shift-metric span {
  display: block;
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cashier-shift-metric b {
  display: block;
  margin-top: 7px;
  font-size: 20px;
  letter-spacing: -.03em;
}

.cashier-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cashier-kpi {
  min-height: 118px;
  border-radius: 28px;
  padding: 18px;
  background: var(--card);
  border: 1px solid rgba(17, 24, 39, .08);
  box-shadow: var(--shadow-soft);
}

.cashier-kpi-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cashier-kpi-value {
  margin-top: 10px;
  font-size: 25px;
  font-weight: 950;
  letter-spacing: -.04em;
}

.cashier-kpi-hint {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.cashier-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(360px, .82fr);
  gap: 16px;
  align-items: start;
}

.cashier-stack {
  display: grid;
  gap: 16px;
}

.cashier-card {
  border-radius: 30px;
  background: var(--card);
  border: 1px solid rgba(17, 24, 39, .08);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.cashier-card-body {
  padding: 20px;
}

.cashier-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 20px 0;
}

.cashier-card-title {
  margin: 0;
  font-size: 19px;
  font-weight: 950;
  letter-spacing: -.03em;
}

.cashier-card-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.cashier-payment-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
}

.cashier-payment-grid .full {
  grid-column: 1 / -1;
}

.cashier-deal-info {
  border-radius: 22px;
  padding: 14px;
  background: var(--subtle);
  border: 1px dashed rgba(17, 24, 39, .12);
  min-height: 70px;
}

.cashier-last-receipt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(var(--primary-rgb), .09);
  border: 1px solid rgba(var(--primary-rgb), .15);
  margin-top: 14px;
}

.cashier-table-scroll {
  overflow: auto;
  max-height: 420px;
  padding: 0 20px 20px;
}

.cashier-receipts-list,
.cashier-task-list,
.cashier-notification-list {
  display: grid;
  gap: 10px;
}

.cashier-receipt-row,
.cashier-task-row,
.cashier-notification-row,
.cashier-chat-message {
  border-radius: 20px;
  padding: 13px;
  background: var(--subtle);
  border: 1px solid rgba(17, 24, 39, .07);
}

.cashier-receipt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.cashier-receipt-title,
.cashier-task-title,
.cashier-notification-title {
  font-weight: 900;
  color: var(--text);
}

.cashier-receipt-meta,
.cashier-task-meta,
.cashier-notification-meta,
.cashier-chat-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.cashier-receipt-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cashier-shift-forms {
  display: grid;
  gap: 14px;
}

.cashier-shift-form {
  padding: 14px;
  border-radius: 24px;
  background: var(--subtle);
  border: 1px solid rgba(17, 24, 39, .08);
}

.cashier-chat {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
}

.cashier-chat-participants {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.cashier-chat-participant {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 18px;
  padding: 10px 11px;
  background: var(--subtle);
  color: var(--text);
  cursor: pointer;
  font-weight: 850;
}

.cashier-chat-participant.active {
  background: var(--primary);
  color: #fff;
}

.cashier-chat-window {
  display: grid;
  grid-template-rows: auto minmax(220px, 320px) auto;
  min-width: 0;
}

.cashier-chat-header {
  min-height: 38px;
  padding: 0 0 8px;
  font-weight: 900;
}

.cashier-chat-messages {
  display: grid;
  gap: 8px;
  align-content: start;
  overflow: auto;
  padding: 10px;
  border-radius: 22px;
  background: var(--subtle);
}

.cashier-chat-message.mine {
  background: rgba(var(--primary-rgb), .11);
  border-color: rgba(var(--primary-rgb), .16);
}

.cashier-chat-message-body {
  white-space: pre-wrap;
  line-height: 1.45;
}

.cashier-chat-form {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.cashier-chat-form textarea {
  min-height: 48px;
  resize: vertical;
}

.cashier-auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.cashier-auth-screen[hidden],
.cashier-shell[hidden] {
  display: none !important;
}

.cashier-auth-card {
  width: min(460px, 100%);
  border-radius: 32px;
  padding: 26px;
  background: var(--card);
  border: 1px solid rgba(17, 24, 39, .08);
  box-shadow: 0 24px 70px rgba(17, 24, 39, .15);
}

.cashier-denied {
  width: min(780px, 100%);
  margin: 48px auto;
  padding: 28px;
  border-radius: 32px;
  background: var(--card);
  border: 1px solid rgba(17, 24, 39, .08);
  box-shadow: var(--shadow-soft);
}

@media (max-width: 1180px) {
  .cashier-hero,
  .cashier-layout {
    grid-template-columns: 1fr;
  }

  .cashier-payment-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .cashier-header {
    position: static;
    align-items: flex-start;
    padding: 14px;
    flex-direction: column;
  }

  .cashier-main {
    width: min(100% - 20px, 1560px);
    padding-top: 14px;
  }

  .cashier-shift-metrics,
  .cashier-kpi-grid,
  .cashier-chat {
    grid-template-columns: 1fr;
  }

  .cashier-card-header,
  .cashier-last-receipt,
  .cashier-receipt-row {
    align-items: flex-start;
    flex-direction: column;
    display: flex;
  }

  .cashier-receipt-actions {
    justify-content: flex-start;
  }
}


.cashier-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid rgba(17, 24, 39, .08);
  box-shadow: var(--shadow-soft);
  font-weight: 850;
  color: var(--text);
}

.cashier-live-chip b {
  font-variant-numeric: tabular-nums;
}

.cashier-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(var(--primary-rgb), .13);
}

.cashier-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.btn.light {
  background: rgba(255, 255, 255, .94);
  color: #0f172a;
  border-color: rgba(255, 255, 255, .22);
}

.btn.light.secondary {
  background: rgba(255, 255, 255, .16);
  color: #fff;
  border-color: rgba(255, 255, 255, .22);
}

.cashier-quick-nav {
  position: sticky;
  top: 78px;
  z-index: 12;
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 8px;
  margin: 0 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(17, 24, 39, .08);
  box-shadow: 0 12px 30px rgba(17, 24, 39, .06);
}

[data-theme="dark"] .cashier-quick-nav {
  background: rgba(18, 24, 32, .76);
  border-color: rgba(255, 255, 255, .08);
}

.cashier-nav-pill {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.cashier-nav-pill.active,
.cashier-nav-pill:hover {
  background: rgba(var(--primary-rgb), .12);
  color: var(--primary-dark);
}

.cashier-payment-card {
  position: sticky;
  top: 142px;
  z-index: 6;
}

.cashier-card-tools,
.cashier-receipt-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cashier-shortcut {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--subtle);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.cashier-readiness {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.cashier-ready-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--subtle);
  color: var(--muted);
  border: 1px solid rgba(17, 24, 39, .06);
  font-size: 12px;
  font-weight: 900;
}

.cashier-ready-chip.ok {
  color: var(--primary-dark);
  background: rgba(var(--primary-rgb), .1);
  border-color: rgba(var(--primary-rgb), .16);
}

.cashier-search-field {
  position: relative;
}

.cashier-quick-results {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.cashier-quick-result {
  width: 100%;
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 18px;
  padding: 11px 12px;
  background: var(--subtle);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.cashier-quick-result:hover {
  border-color: rgba(var(--primary-rgb), .28);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .08);
}

.cashier-quick-result span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cashier-quick-result small {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.cashier-quick-empty {
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--subtle);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.cashier-deal-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.cashier-deal-badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cashier-deal-badges span,
.cashier-receipt-number,
.cashier-receipt-time {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), .1);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.cashier-deal-badges .danger {
  background: rgba(239, 68, 68, .11);
  color: #b91c1c;
}

.cashier-next-payment {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 24, 39, .08);
  color: var(--muted);
  line-height: 1.45;
}

.cashier-amount-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cashier-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--subtle);
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.cashier-toggle input {
  margin: 0;
}

.cashier-amount-preview {
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--subtle);
  border: 1px solid rgba(17, 24, 39, .07);
  color: var(--muted);
  font-weight: 750;
}

.cashier-amount-preview.success {
  background: rgba(var(--primary-rgb), .1);
  border-color: rgba(var(--primary-rgb), .16);
  color: var(--primary-dark);
}

.cashier-amount-preview.danger {
  background: rgba(239, 68, 68, .1);
  border-color: rgba(239, 68, 68, .18);
  color: #b91c1c;
}

.cashier-submit-btn {
  width: 100%;
  min-height: 48px;
  font-size: 15px;
}

.cashier-card-header-wide {
  align-items: center;
}

.cashier-receipt-toolbar input {
  min-width: 220px;
  min-height: 36px;
}

.cashier-segmented {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--subtle);
  border: 1px solid rgba(17, 24, 39, .07);
}

.cashier-segmented button {
  border: 0;
  border-radius: 999px;
  padding: 8px 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.cashier-segmented button.active {
  background: var(--card);
  color: var(--primary-dark);
  box-shadow: 0 8px 18px rgba(17, 24, 39, .08);
}

.cashier-receipt-row.cancelled {
  opacity: .75;
}

.cashier-receipt-topline {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.cashier-receipt-time {
  background: var(--card);
  color: var(--muted);
}

.cashier-shift-summary {
  display: grid;
}

.cashier-summary-note {
  padding: 13px;
  border-radius: 20px;
  background: rgba(var(--primary-rgb), .1);
  color: var(--primary-dark);
  border: 1px solid rgba(var(--primary-rgb), .15);
  font-weight: 800;
  line-height: 1.45;
}

.cashier-summary-note.warning {
  background: rgba(245, 158, 11, .12);
  border-color: rgba(245, 158, 11, .2);
  color: #a16207;
}

.cashier-shift-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cashier-shift-summary-grid div {
  border-radius: 18px;
  padding: 11px;
  background: var(--subtle);
  border: 1px solid rgba(17, 24, 39, .07);
}

.cashier-shift-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cashier-shift-summary-grid b {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-cashier-loading] .cashier-shell::after {
  content: 'Загрузка данных кассы...';
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  padding: 12px 14px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(17, 24, 39, .08);
  color: var(--text);
  font-weight: 900;
}

@media (max-width: 1180px) {
  .cashier-payment-card {
    position: static;
  }

  .cashier-quick-nav {
    top: 0;
  }
}

@media (max-width: 760px) {
  .cashier-header-actions,
  .cashier-card-tools,
  .cashier-receipt-toolbar,
  .cashier-amount-actions,
  .cashier-hero-actions {
    width: 100%;
    justify-content: stretch;
  }

  .cashier-header-actions > *,
  .cashier-card-tools > *,
  .cashier-receipt-toolbar > *,
  .cashier-amount-actions > *,
  .cashier-hero-actions > * {
    flex: 1 1 auto;
  }

  .cashier-quick-nav {
    position: static;
    border-radius: 22px;
  }

  .cashier-deal-summary,
  .cashier-receipt-row {
    grid-template-columns: 1fr;
  }

  .cashier-deal-badges,
  .cashier-receipt-actions {
    justify-content: flex-start;
  }

  .cashier-shift-summary-grid {
    grid-template-columns: 1fr;
  }

  .cashier-quick-result {
    align-items: flex-start;
    flex-direction: column;
  }

  .cashier-quick-result span {
    white-space: normal;
  }
}



html,
body.cashier-body {
  min-height: 100%;
}

.cashier-body {
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 4% 0%, rgba(15, 23, 42, .055), transparent 22%),
    radial-gradient(circle at 92% 2%, rgba(var(--primary-rgb), .095), transparent 25%),
    linear-gradient(135deg, #eef1f6 0%, #f7f8fb 42%, #eceff5 100%);
  color: #161a24;
}

[data-theme="dark"] .cashier-body {
  background:
    radial-gradient(circle at 4% 0%, rgba(255,255,255,.07), transparent 22%),
    radial-gradient(circle at 92% 2%, rgba(var(--primary-rgb), .18), transparent 25%),
    linear-gradient(135deg, #0f1720 0%, #121820 48%, #0d131b 100%);
}

.cashier-shell {
  width: min(1740px, calc(100vw - 46px));
  min-height: auto;
  margin: 24px auto 42px;
  border-radius: 34px;
  overflow: visible;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(15, 23, 42, .055);
  box-shadow: 0 26px 80px rgba(31, 41, 55, .10);
}

[data-theme="dark"] .cashier-shell {
  background: rgba(18, 24, 32, .72);
  border-color: rgba(255,255,255,.08);
}

.cashier-header {
  position: relative;
  top: auto;
  z-index: 10;
  padding: 26px 36px 18px;
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.cashier-brand .brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #08e08b 0%, #08c978 54%, #078b5a 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(3, 166, 99, .22), inset 0 1px 0 rgba(255,255,255,.24);
}

.cashier-title {
  font-size: 17px;
  letter-spacing: -.02em;
}

.cashier-subtitle {
  max-width: 440px;
  font-size: 12px;
}

.cashier-header-actions .btn.small.secondary,
.cashier-live-chip,
.cashier-user-chip,
.logout-btn {
  min-height: 36px;
  border: 0;
  box-shadow: none;
  background: rgba(255,255,255,.62);
}

[data-theme="dark"] .cashier-header-actions .btn.small.secondary,
[data-theme="dark"] .cashier-live-chip,
[data-theme="dark"] .cashier-user-chip,
[data-theme="dark"] .logout-btn {
  background: rgba(255,255,255,.07);
}

.cashier-main {
  width: 100%;
  padding: 10px 36px 36px;
}

.cashier-alert:not(:empty) {
  margin: 0 0 18px;
}

.cashier-hero {
  grid-template-columns: minmax(520px, 1.35fr) minmax(390px, .95fr);
  gap: 28px;
  margin-bottom: 28px;
}

.cashier-shift-card,
.cashier-kpi,
.cashier-card {
  border-radius: 18px;
  border: 0;
  box-shadow: 0 18px 48px rgba(35, 41, 61, .075);
}

.cashier-shift-card {
  min-height: 270px;
  padding: 34px 36px;
  color: #111827;
  background: rgba(255,255,255,.96);
  box-shadow: 0 20px 46px rgba(31,41,55,.075);
}

[data-theme="dark"] .cashier-shift-card {
  color: var(--text);
  background: rgba(18, 24, 32, .94);
}

.cashier-shift-card::before {
  content: '';
  position: absolute;
  inset: auto 24px 24px auto;
  width: 210px;
  height: 110px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(var(--primary-rgb), .10), rgba(var(--primary-rgb), .02)),
    repeating-linear-gradient(135deg, transparent 0 11px, rgba(15,23,42,.035) 12px 13px);
  opacity: .9;
}

.cashier-shift-card::after {
  right: 36px;
  top: 50%;
  width: 128px;
  height: 128px;
  transform: translateY(-38%);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 50%, rgba(var(--primary-rgb), .12) 0 36%, transparent 37%),
    conic-gradient(from 20deg, #0f7b57 0 62%, #eff4f0 62% 100%);
  box-shadow: inset 0 0 0 18px rgba(255,255,255,.55), 0 22px 42px rgba(var(--primary-rgb), .12);
}

.cashier-shift-title {
  max-width: 440px;
  margin-top: 16px;
  font-size: clamp(28px, 3.5vw, 46px);
  letter-spacing: -.055em;
  color: inherit;
}

.cashier-shift-meta {
  max-width: 480px;
  margin-top: 8px;
  color: #6b7280;
}

[data-theme="dark"] .cashier-shift-meta {
  color: var(--muted);
}

.cashier-shift-status {
  background: #f3f5f8;
  color: #1f2937;
  border: 0;
}

[data-theme="dark"] .cashier-shift-status {
  background: rgba(255,255,255,.08);
  color: var(--text);
}

.cashier-shift-dot {
  background: #0f7b57;
  box-shadow: 0 0 0 5px rgba(var(--primary-rgb), .13);
}

.cashier-shift-metrics {
  width: min(560px, 100%);
  margin-top: 24px;
  gap: 18px;
}

.cashier-shift-metric {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.cashier-shift-metric span {
  color: #6b7280;
  font-size: 11px;
}

[data-theme="dark"] .cashier-shift-metric span {
  color: var(--muted);
}

.cashier-shift-metric b {
  color: inherit;
  font-size: 23px;
}

.cashier-hero-actions .btn.light {
  min-width: 150px;
  background: #0f7b57;
  color: #fff;
  border: 0;
  box-shadow: 0 12px 28px rgba(var(--primary-rgb), .18);
}

.cashier-hero-actions .btn.light.secondary {
  background: #f1f4f7;
  color: #111827;
  box-shadow: none;
}

[data-theme="dark"] .cashier-hero-actions .btn.light.secondary {
  background: rgba(255,255,255,.08);
  color: var(--text);
}

.cashier-kpi-grid {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 28px 30px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 72% 45%, rgba(255,255,255,.12), transparent 22%),
    linear-gradient(135deg, #0a6f51, #087047 68%, #0a5d3f);
  box-shadow: 0 22px 54px rgba(15, 123, 87, .18);
  overflow: hidden;
}

.cashier-kpi-grid::before {
  content: 'Кассовый день';
  display: block;
  margin-bottom: 15px;
  color: rgba(255,255,255,.82);
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -.03em;
}

.cashier-kpi {
  min-height: 0;
  padding: 15px 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.cashier-kpi:last-child {
  border-bottom: 0;
}

.cashier-kpi-label,
.cashier-kpi-hint {
  color: rgba(255,255,255,.70);
}

.cashier-kpi-value {
  margin-top: 6px;
  color: #fff;
  font-size: 25px;
}

.cashier-quick-nav {
  position: relative;
  top: auto;
  z-index: 6;
  width: max-content;
  max-width: 100%;
  margin: 0 0 28px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  box-shadow: none;
  border: 1px solid rgba(15,23,42,.045);
  backdrop-filter: none;
}

[data-theme="dark"] .cashier-quick-nav {
  background: rgba(255,255,255,.06);
}

.cashier-nav-pill {
  min-height: 38px;
  padding: 10px 16px;
  border-radius: 12px;
  color: #6b7280;
}

.cashier-nav-pill.active,
.cashier-nav-pill:hover {
  color: #111827;
  background: #fff;
  box-shadow: 0 8px 18px rgba(31,41,55,.07);
}

[data-theme="dark"] .cashier-nav-pill.active,
[data-theme="dark"] .cashier-nav-pill:hover {
  color: var(--text);
  background: rgba(255,255,255,.10);
}

.cashier-layout {
  grid-template-columns: minmax(560px, 1.18fr) minmax(420px, .82fr);
  gap: 28px;
}

.cashier-stack {
  gap: 28px;
}

.cashier-card {
  background: rgba(255,255,255,.96);
  overflow: visible;
}

[data-theme="dark"] .cashier-card {
  background: rgba(18, 24, 32, .94);
}

.cashier-card-header {
  padding: 28px 28px 0;
}

.cashier-card-body {
  padding: 24px 28px 28px;
}

.cashier-card-title {
  font-size: 21px;
}

.cashier-card-subtitle {
  max-width: 620px;
  color: #6b7280;
}

[data-theme="dark"] .cashier-card-subtitle {
  color: var(--muted);
}

.cashier-payment-card {
  position: static;
}

.cashier-payment-grid {
  grid-template-columns: minmax(0, 1fr) minmax(220px, .58fr);
  gap: 16px;
}

.cashier-readiness,
.cashier-amount-actions,
.cashier-pay-actions,
.cashier-receipt-toolbar,
.cashier-card-tools {
  gap: 10px;
}

.cashier-ready-chip,
.cashier-shortcut,
.cashier-toggle,
.cashier-deal-info,
.cashier-amount-preview,
.cashier-shift-form,
.cashier-receipt-row,
.cashier-task-row,
.cashier-notification-row,
.cashier-chat-message,
.cashier-chat-messages,
.cashier-chat-participant,
.cashier-quick-result,
.cashier-quick-empty,
.cashier-segmented,
.cashier-summary-note,
.cashier-shift-summary-grid div {
  border-radius: 14px;
}

.cashier-deal-info,
.cashier-amount-preview,
.cashier-shift-form,
.cashier-receipt-row,
.cashier-task-row,
.cashier-notification-row,
.cashier-chat-message,
.cashier-chat-messages,
.cashier-chat-participant,
.cashier-quick-result,
.cashier-quick-empty,
.cashier-summary-note,
.cashier-shift-summary-grid div,
.cashier-ready-chip,
.cashier-toggle,
.cashier-segmented {
  background: #f5f7fa;
  border-color: rgba(15, 23, 42, .055);
}

[data-theme="dark"] .cashier-deal-info,
[data-theme="dark"] .cashier-amount-preview,
[data-theme="dark"] .cashier-shift-form,
[data-theme="dark"] .cashier-receipt-row,
[data-theme="dark"] .cashier-task-row,
[data-theme="dark"] .cashier-notification-row,
[data-theme="dark"] .cashier-chat-message,
[data-theme="dark"] .cashier-chat-messages,
[data-theme="dark"] .cashier-chat-participant,
[data-theme="dark"] .cashier-quick-result,
[data-theme="dark"] .cashier-quick-empty,
[data-theme="dark"] .cashier-summary-note,
[data-theme="dark"] .cashier-shift-summary-grid div,
[data-theme="dark"] .cashier-ready-chip,
[data-theme="dark"] .cashier-toggle,
[data-theme="dark"] .cashier-segmented {
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.07);
}

.cashier-receipts-list {
  gap: 0;
}

.cashier-receipt-row {
  border-radius: 0;
  background: transparent;
  border-width: 0 0 1px;
  padding: 15px 0;
}

.cashier-receipt-row:first-child {
  padding-top: 0;
}

.cashier-receipt-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.cashier-receipt-number,
.cashier-receipt-time,
.cashier-deal-badges span {
  min-height: 24px;
  border-radius: 8px;
}

.cashier-chat-window {
  grid-template-rows: auto minmax(260px, 360px) auto;
}

.cashier-auth-card,
.cashier-denied {
  border: 0;
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 26px 80px rgba(31, 41, 55, .13);
}

[data-theme="dark"] .cashier-auth-card,
[data-theme="dark"] .cashier-denied {
  background: rgba(18, 24, 32, .94);
}

@media (max-width: 1180px) {
  .cashier-shell {
    width: min(100vw - 28px, 980px);
    margin-top: 14px;
  }

  .cashier-hero,
  .cashier-layout {
    grid-template-columns: 1fr;
  }

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

  .cashier-kpi-grid::before {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .cashier-shell {
    width: 100%;
    margin: 0;
    border-radius: 0;
  }

  .cashier-header,
  .cashier-main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .cashier-hero,
  .cashier-layout,
  .cashier-stack {
    gap: 14px;
  }

  .cashier-shift-card {
    min-height: auto;
    padding: 24px;
  }

  .cashier-shift-card::before,
  .cashier-shift-card::after {
    display: none;
  }

  .cashier-shift-top,
  .cashier-card-header-wide {
    flex-direction: column;
  }

  .cashier-shift-metrics,
  .cashier-kpi-grid,
  .cashier-payment-grid,
  .cashier-chat {
    grid-template-columns: 1fr;
  }

  .cashier-kpi-grid {
    padding: 20px;
  }

  .cashier-card-header,
  .cashier-card-body {
    padding-left: 18px;
    padding-right: 18px;
  }
}





:root,
:root[data-theme="light"],
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #070707;
  --shell: #0c0c0d;
  --surface: #151515;
  --surface-soft: #1b1b1d;
  --surface-green: #ff4b1f;
  --surface-green-2: #dc3d17;
  --text: #f6f6f3;
  --text-soft: #c4c4bf;
  --muted: #747676;
  --border: rgba(255, 255, 255, .075);
  --border-strong: rgba(255, 255, 255, .14);
  --primary: #ff4b1f;
  --primary-rgb: 255, 75, 31;
  --primary-dark: #dc3d17;
  --primary-soft: rgba(255, 75, 31, .13);
  --danger-soft: rgba(255, 79, 92, .14);
  --accent-strong: #ff7a45;
  --panel-2: #1b1b1d;
  --panel-solid: #151515;
  --success: #37d67a;
  --warning: #ffb020;
  --danger: #ff4f5c;
  --danger-rgb: 255, 79, 92;
  --info: #6ea8ff;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --shadow: 0 30px 80px rgba(0, 0, 0, .42);
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, .28);
  --ring: 0 0 0 4px rgba(255, 75, 31, .18);
  --fin-card: #151516;
  --fin-card-2: #19191a;
  --fin-elevated: #202022;
  --fin-sidebar: #0c0c0d;
  --fin-main: #111112;
  --fin-top: #101011;
  --fin-line: rgba(255, 255, 255, .078);
  --fin-line-strong: rgba(255, 255, 255, .14);
  --fin-orange: #ff4b1f;
  --fin-orange-2: #e64219;
  --fin-orange-3: #ff7a45;
  --fin-green: #34d399;
  --fin-yellow: #ffb020;
  --fin-blue: #79aaff;
  --fin-purple: #bda1ff;
  --fin-red: #ff5c70;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 75, 31, .45) rgba(255, 255, 255, .04);
}

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: rgba(255, 255, 255, .035); border-radius: 999px; }
*::-webkit-scrollbar-thumb { background: rgba(255, 75, 31, .45); border-radius: 999px; border: 2px solid rgba(10,10,10,.95); }
*::-webkit-scrollbar-thumb:hover { background: rgba(255, 75, 31, .72); }

html,
body {
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 75, 31, .15), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(255, 255, 255, .06), transparent 22%),
    linear-gradient(135deg, #050505 0%, #080809 48%, #11100f 100%) !important;
  color: var(--text) !important;
}

body {
  letter-spacing: -.005em;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .34;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at 50% 12%, #000 0, transparent 68%);
}

.app {
  padding: clamp(14px, 2.3vw, 34px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.glass-frame {
  width: min(100%, 1440px);
  height: min(100%, 920px);
  min-height: min(920px, calc(100dvh - clamp(28px, 4.6vw, 68px)));
  border-radius: 22px;
  padding: 0;
  overflow: hidden;
  background: var(--fin-sidebar) !important;
  border: 1px solid rgba(255, 255, 255, .11) !important;
  box-shadow: 0 34px 100px rgba(0,0,0,.62), 0 0 0 1px rgba(255,255,255,.02) inset !important;
  backdrop-filter: none !important;
}

.app-header {
  height: 76px;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 0 18px 0 18px;
  border-radius: 0;
  background: var(--fin-top) !important;
  border: 0;
  border-bottom: 1px solid var(--fin-line) !important;
  box-shadow: none !important;
}

.brand {
  gap: 11px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--fin-orange), var(--fin-orange-2));
  box-shadow: 0 16px 30px rgba(255,75,31,.22), inset 0 1px 0 rgba(255,255,255,.22);
}

.brand-logo svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.35;
}

.brand-title {
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.brand-subtitle {
  color: rgba(255,255,255,.46);
  font-size: 11px;
  font-weight: 650;
}

.top-nav {
  justify-self: stretch;
  width: 100%;
  min-width: 0;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  border-radius: 14px;
  background: #151516 !important;
  border: 1px solid rgba(255,255,255,.055);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

.top-nav-btn {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 11px;
  color: rgba(255,255,255,.54);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}

.top-nav-btn:hover {
  color: #fff;
  background: rgba(255,255,255,.055);
}

.top-nav-btn.active {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(255,75,31,.92), rgba(224,56,20,.92)) !important;
  box-shadow: 0 12px 28px rgba(255,75,31,.26) !important;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-width: 0;
}

.user-chip,
.circle-btn,
.btn.secondary,
.btn.light.secondary,
.rail-style-btn,
.dashboard-action-btn,
.calendar-icon-btn,
.calendar-filter-btn,
.task-filter-icon,
.stat-settings-btn {
  background: #171718 !important;
  color: rgba(255,255,255,.7) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  box-shadow: none !important;
}

.circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.circle-btn:hover,
.btn.secondary:hover,
.user-chip:hover,
.rail-style-btn:hover,
.dashboard-action-btn:hover,
.calendar-icon-btn:hover,
.calendar-filter-btn:hover,
.task-filter-icon:hover,
.stat-settings-btn:hover {
  color: #fff !important;
  border-color: rgba(255,75,31,.35) !important;
  background: rgba(255,75,31,.12) !important;
  transform: translateY(-1px);
}

.user-chip {
  border-radius: 14px;
  min-height: 42px;
  padding: 5px 9px 5px 5px;
}

.user-avatar,
.task-avatar,
.team-chat-avatar,
.user-dropdown-avatar,
.cashier-user-chip .user-avatar {
  background: linear-gradient(135deg, rgba(255,75,31,.92), rgba(255,122,69,.82)) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.12) !important;
}

.user-email { color: #fff; }
.user-role-label { color: rgba(255,255,255,.46); }

.workspace {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0;
  height: calc(100% - 76px);
  padding: 0;
  background: var(--fin-sidebar);
}

.side-rail {
  height: 100%;
  gap: 14px;
  padding: 16px 14px;
  background: var(--fin-sidebar);
  border-right: 1px solid var(--fin-line);
  overflow-y: auto;
}

.rail-quick-style,
.rail-nav,
.rail-global-nav,
.rail-bottom {
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.rail-quick-style {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--fin-line) !important;
}

.rail-style-btn {
  justify-content: center;
  min-height: 36px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 800;
}

.rail-style-btn.active {
  color: #fff !important;
  background: var(--primary) !important;
  border-color: transparent !important;
}

.rail-heading {
  padding: 9px 8px 11px;
}

.rail-heading-title {
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.rail-heading-subtitle {
  color: rgba(255,255,255,.38);
  font-size: 11px;
  line-height: 1.35;
}

.rail-nav,
.rail-global-nav {
  display: grid;
  gap: 5px;
}

.rail-btn,
.rail-global-btn {
  position: relative;
  width: 100%;
  min-height: 42px;
  justify-content: flex-start;
  gap: 12px;
  border-radius: 12px;
  padding: 0 12px;
  color: rgba(255,255,255,.55);
  background: transparent;
  border: 1px solid transparent;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.rail-btn:hover,
.rail-global-btn:hover {
  color: #fff;
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.06);
  transform: translateX(2px);
}

.rail-btn.active,
.rail-global-btn.active,
.circle-btn.active {
  color: #fff !important;
  background: rgba(255,75,31,.16) !important;
  border-color: rgba(255,75,31,.28) !important;
  box-shadow: inset 3px 0 0 var(--primary) !important;
}

.rail-btn .nav-icon,
.rail-global-btn .nav-icon {
  width: 18px;
  color: currentColor;
}

.rail-btn .nav-label,
.rail-global-btn .nav-label {
  font-size: 13px;
  font-weight: 780;
}

.rail-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 12px;
  border-top: 1px solid var(--fin-line) !important;
}

.rail-unread-badge,
.notification-bell-badge {
  background: var(--primary) !important;
  color: #fff !important;
  border: 2px solid var(--fin-sidebar) !important;
  box-shadow: 0 8px 16px rgba(255,75,31,.25);
}

.main {
  height: 100%;
  background: var(--fin-main);
  padding: 22px 24px 26px;
  border-top-left-radius: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}

.page-header {
  margin: 0 0 18px;
  min-height: 58px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--fin-line);
}

.page-header > div:first-child {
  min-width: 0;
}

.eyebrow {
  color: var(--primary) !important;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

#pageTitle,
.auth-title,
.cashier-title,
.card-title,
.wizard-title,
.deal-card-title-row h2,
.calendar-month-head h3,
.calendar-day-head h3 {
  color: #fff !important;
}

#pageTitle {
  margin: 0;
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1;
  letter-spacing: -.055em;
}

#pageSubtitle,
.muted,
.card-subtitle,
.auth-subtitle,
.wizard-desc,
.dashboard-stat-hint,
.dashboard-hero-hint,
.dashboard-feed-title-row .muted,
.calendar-month-head p,
.calendar-day-head p,
.team-chat-hint {
  color: rgba(255,255,255,.48) !important;
}

.page-actions,
.btn-row {
  gap: 9px;
}

.card,
.table-wrap,
.modal,
.auth-card,
.cashier-auth-card,
.notification-panel,
.user-dropdown,
.deal-action-dropdown,
.popover,
.dropdown,
.theme-preview,
.deal-card-section,
.deal-card-shell,
.wizard-main,
.wizard-side,
.dashboard-chart-card,
.dashboard-feed-card,
.task-stat-card,
.task-toolbar,
.task-kanban-column,
.task-table-view,
.task-insight-card,
.calendar-stat-card,
.calendar-board-card,
.calendar-month-panel,
.calendar-day-panel,
.calendar-side-section,
.team-chat-sidebar,
.team-chat-panel,
.team-chat-task-form,
.team-chat-inline-note,
.team-chat-task-card,
.team-chat-deal-card,
.document-upload-card,
.blacklist-warning,
.settings-home-card,
.settings-card,
.client-card-panel,
.client-profile-card,
.client-documents-card,
.storage-toolbar,
.cashbox-choice {
  background: var(--fin-card) !important;
  border: 1px solid var(--fin-line) !important;
  border-radius: 18px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.card {
  padding: 18px;
}

.card:hover,
.dashboard-stat-card:hover,
.dashboard-chart-card:hover,
.dashboard-feed-card:hover,
.task-kanban-card:hover,
.calendar-day-cell:hover,
.calendar-agenda-item:hover,
.cashbox-choice:hover {
  border-color: rgba(255,75,31,.19) !important;
}

.card-header,
.dashboard-feed-header,
.cashier-card-header,
.calendar-toolbar,
.task-toolbar,
.team-chat-sidebar-header,
.team-chat-header,
.notification-panel-head {
  border-bottom-color: var(--fin-line) !important;
}

.card-title {
  font-size: 15px;
  letter-spacing: -.025em;
}

.btn {
  min-height: 40px;
  padding: 10px 15px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--fin-orange), var(--fin-orange-2));
  color: #fff;
  font-weight: 850;
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 14px 30px rgba(255,75,31,.20);
}

.btn:hover {
  background: linear-gradient(135deg, var(--fin-orange-3), var(--fin-orange));
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(255,75,31,.28);
}

.btn.small { min-height: 34px; padding: 8px 11px; border-radius: 11px; }
.btn.success { background: linear-gradient(135deg, #32d583, #11a95b); box-shadow: 0 14px 30px rgba(50,213,131,.18); }
.btn.warning { background: linear-gradient(135deg, #ffbd3d, #df8414); color: #19120a; }
.btn.danger { background: linear-gradient(135deg, #ff5c70, #d92d46); }
.btn.light { color: #111; background: #fff; box-shadow: 0 14px 30px rgba(255,255,255,.14); }

input,
select,
textarea,
.search-input,
.clients-search-input,
.task-select-field select,
.task-search-wrap input,
.team-chat-composer input,
.team-chat-search input,
.dashboard-chart-select select,
.dashboard-select-control select,
.calendar-view-switch,
.task-view-switch,
.auth-tab,
.filter-pill,
.calendar-view-tab,
.workspace-mode-option,
.user-theme-btn {
  background: #111112 !important;
  color: #f6f6f3 !important;
  border: 1px solid rgba(255,255,255,.09) !important;
  box-shadow: none !important;
}

input::placeholder,
textarea::placeholder { color: rgba(255,255,255,.31) !important; }
select option { color: #f6f6f3; background: #111112; }
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255,75,31,.5) !important;
  box-shadow: var(--ring) !important;
}

label,
.field-label,
.dashboard-select-control,
.task-select-field > span {
  color: rgba(255,255,255,.58) !important;
}

.auth-tab.is-active,
.filter-pill.active,
.calendar-view-tab.active,
.task-view-switch .filter-pill.active,
.workspace-mode-option:has(input:checked),
.user-theme-btn.is-active,
.user-theme-btn.active {
  color: #fff !important;
  background: rgba(255,75,31,.16) !important;
  border-color: rgba(255,75,31,.35) !important;
}

.table-wrap,
.task-table-view,
.data-table,
.audit-table-wrap,
.clients-table-wrap {
  overflow: auto;
}

table {
  color: var(--text);
  border-spacing: 0;
}

th {
  color: rgba(255,255,255,.36) !important;
  background: rgba(255,255,255,.025) !important;
  border-bottom: 1px solid var(--fin-line) !important;
}

td {
  color: rgba(255,255,255,.72) !important;
  border-bottom: 1px solid var(--fin-line) !important;
}

tbody tr:hover,
.table-wrap table tbody tr:hover {
  background: rgba(255,75,31,.055) !important;
}

.badge,
.status-badge,
.task-chip,
.team-chat-task-chip,
.dashboard-status-pill,
.calendar-event-chip,
.calendar-agenda-title-row span,
.cashier-live-chip,
.cashier-shortcut {
  border: 1px solid rgba(255,255,255,.08) !important;
  background: rgba(255,255,255,.055) !important;
  color: rgba(255,255,255,.72) !important;
  border-radius: 999px !important;
}

.badge.success,
.dashboard-status-pill--success,
.calendar-event-chip.success,
.calendar-event-chip.payment,
.task-chip--green {
  background: rgba(52,211,153,.12) !important;
  border-color: rgba(52,211,153,.22) !important;
  color: #6ee7b7 !important;
}

.badge.warning,
.dashboard-status-pill--warning,
.calendar-event-chip.warning,
.task-chip--orange {
  background: rgba(255,176,32,.13) !important;
  border-color: rgba(255,176,32,.26) !important;
  color: #ffd37a !important;
}

.badge.danger,
.calendar-event-chip.danger,
.task-chip--red {
  background: rgba(255,79,92,.13) !important;
  border-color: rgba(255,79,92,.25) !important;
  color: #ff9aa5 !important;
}

.badge.info,
.task-chip--blue,
.calendar-event-chip.task {
  background: rgba(121,170,255,.13) !important;
  border-color: rgba(121,170,255,.23) !important;
  color: #a9c9ff !important;
}

.alert,
.config-warning,
.empty,
.calendar-empty-state,
.task-kanban-empty,
.task-insight-empty,
.team-chat-empty-state,
.team-chat-warning,
.team-chat-empty-side,
.calendar-side-empty,
.payment-deal-info.empty {
  border: 1px solid rgba(255,255,255,.08) !important;
  background: rgba(255,255,255,.045) !important;
  color: rgba(255,255,255,.62) !important;
  border-radius: 16px !important;
}

.alert.success { background: rgba(52,211,153,.11) !important; color: #a7f3d0 !important; border-color: rgba(52,211,153,.24) !important; }
.alert.error { background: rgba(255,79,92,.12) !important; color: #ffc0c7 !important; border-color: rgba(255,79,92,.26) !important; }
.alert.info { background: rgba(121,170,255,.12) !important; color: #c8dcff !important; border-color: rgba(121,170,255,.24) !important; }
.config-warning { background: rgba(255,176,32,.10) !important; color: #ffd37a !important; border-color: rgba(255,176,32,.24) !important; }
code { background: rgba(255,75,31,.14); color: #ff9f7d; }


.dashboard-stats-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.18fr) minmax(240px, .95fr) minmax(230px, .75fr);
  gap: 14px;
  margin-bottom: 16px;
}

.dashboard-stat-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 18px !important;
  border: 1px solid var(--fin-line) !important;
  border-radius: 18px !important;
  background: var(--fin-card) !important;
  box-shadow: none !important;
}

.dashboard-stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 82% -18%, rgba(255,255,255,.08), transparent 34%);
}

.dashboard-stat-card > * { position: relative; z-index: 1; }

.dashboard-stat-card--hero,
.dashboard-stat-card--finance,
.stat-card:first-child,
.cashier-shift-card {
  color: #fff !important;
  background:
    radial-gradient(circle at 86% 10%, rgba(255,255,255,.19), transparent 23%),
    linear-gradient(135deg, #ff5b20 0%, #de3a12 58%, #a8270d 100%) !important;
  border-color: rgba(255, 118, 72, .45) !important;
  box-shadow: 0 24px 52px rgba(255,75,31,.18) !important;
}

.dashboard-stat-card--finance {
  background:
    radial-gradient(circle at 90% 8%, rgba(255,75,31,.18), transparent 28%),
    linear-gradient(135deg, #19191a, #141414) !important;
}

.dashboard-stat-card--side,
.dashboard-stat-card--metric {
  min-height: 118px;
}

.dashboard-stat-side-stack {
  display: grid;
  gap: 14px;
}

.dashboard-stat-card-head,
.dashboard-stat-card-head--hero,
.dashboard-feed-title-row,
.dashboard-chart-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-stat-icon,
.stat-icon,
.dashboard-feed-icon,
.dashboard-chart-icon,
.calendar-stat-icon,
.task-stat-icon,
.task-insight-icon,
.cashier-kpi::before {
  color: var(--primary) !important;
  background: rgba(255,75,31,.12) !important;
  border: 1px solid rgba(255,75,31,.20) !important;
  border-radius: 12px !important;
}

.dashboard-stat-icon--hero,
.dashboard-stat-card--hero .dashboard-stat-icon {
  color: #fff !important;
  background: rgba(255,255,255,.14) !important;
  border-color: rgba(255,255,255,.18) !important;
}

.dashboard-stat-title,
.dashboard-finance-label,
.dashboard-feed-title-row h2,
.dashboard-chart-title h2 {
  color: rgba(255,255,255,.78) !important;
}

.dashboard-hero-value,
.dashboard-stat-value,
.dashboard-finance-value,
.dashboard-side-value,
.stat-value,
.cashier-kpi-value {
  color: #fff !important;
  letter-spacing: -.055em;
}

.dashboard-hero-line,
.dashboard-mini-line-path {
  stroke: #fff !important;
  opacity: .92;
}
.dashboard-hero-area,
.dashboard-mini-line-area { fill: rgba(255,255,255,.14) !important; }
.dashboard-hero-dot,
.dashboard-mini-line-dot { fill: #fff !important; }

.dashboard-pipeline-track,
.task-workload-row i,
.deal-progress-bar,
.wizard-progress,
.calendar-stat-visual {
  background: rgba(255,255,255,.09) !important;
}

.dashboard-pipeline-track i,
.deal-progress-bar span,
.wizard-progress span,
.task-workload-row i em,
.calendar-stat-visual em {
  background: linear-gradient(90deg, var(--fin-orange), var(--fin-orange-3)) !important;
}

.dashboard-mini-bars span,
.mini-bars span,
.monthly-bar.profit,
.daily-flow-bar.collected,
.calendar-mini-chart span {
  background: linear-gradient(180deg, var(--fin-orange-3), var(--fin-orange)) !important;
  box-shadow: 0 10px 20px rgba(255,75,31,.14) !important;
}

.dashboard-mini-bars span:not(.is-active),
.mini-bars span:not(.active),
.monthly-bar.revenue,
.daily-flow-bar.expected {
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.09) !important;
  box-shadow: none !important;
}

.dashboard-charts-grid,
.dashboard-bottom-grid {
  gap: 14px;
}

.dashboard-chart-card {
  min-height: 318px;
}

.monthly-chart-grid span,
.daily-flow-grid span {
  border-top-color: rgba(255,255,255,.08) !important;
}

.monthly-chart-axis,
.monthly-chart-label,
.daily-flow-label,
.dashboard-pipeline-label,
.dashboard-stat-footer,
.dashboard-finance-footer,
.dashboard-side-percent span {
  color: rgba(255,255,255,.44) !important;
}

.chart-pill,
.dashboard-select-control,
.dashboard-action-btn,
.dashboard-feed-filter,
.dashboard-list-loading {
  background: rgba(255,255,255,.045) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  color: rgba(255,255,255,.66) !important;
}

.dashboard-deal-row,
.dashboard-reminder-row,
.dashboard-feed-row {
  background: rgba(255,255,255,.035) !important;
  border: 1px solid rgba(255,255,255,.07) !important;
  border-radius: 14px !important;
}

.dashboard-deal-row:hover,
.dashboard-reminder-row:hover,
.dashboard-feed-row:hover {
  background: rgba(255,75,31,.06) !important;
  border-color: rgba(255,75,31,.22) !important;
}


.wizard-layout,
.deal-card-grid,
.client-card-grid {
  gap: 16px;
}

.wizard-step-btn,
.wizard-summary-card,
.wizard-summary-row,
.deal-mini-row,
.deal-action-menu,
.deal-timeline-item,
.client-profile-item,
.client-document-item,
.cashbox-choice,
.workspace-mode-option,
.theme-preview-tile {
  background: rgba(255,255,255,.04) !important;
  border: 1px solid rgba(255,255,255,.075) !important;
  color: rgba(255,255,255,.72) !important;
  border-radius: 14px !important;
}

.wizard-step-btn:hover,
.wizard-step-btn.active,
.wizard-step-btn.completed,
.cashbox-choice.is-selected {
  background: rgba(255,75,31,.12) !important;
  border-color: rgba(255,75,31,.3) !important;
  color: #fff !important;
}

.wizard-step-btn span,
.wizard-step-btn.active span,
.wizard-step-btn.completed span {
  background: rgba(255,75,31,.18) !important;
  color: #fff !important;
  border-color: rgba(255,75,31,.3) !important;
}

.deal-card-hero,
.client-card-hero {
  background:
    radial-gradient(circle at 92% 10%, rgba(255,255,255,.13), transparent 28%),
    linear-gradient(135deg, #19191a, #151515) !important;
  border: 1px solid var(--fin-line) !important;
  border-radius: 22px !important;
  box-shadow: none !important;
}

.deal-primary-action {
  background: linear-gradient(135deg, var(--fin-orange), var(--fin-orange-2)) !important;
}

.deal-back-link,
.deal-card-meta,
.deal-mini-row span,
.deal-timeline-item p,
.deal-timeline-item span,
.wizard-panel-head p,
.wizard-summary-card p,
.client-profile-item span {
  color: rgba(255,255,255,.5) !important;
}

.deal-timeline-dot {
  background: var(--primary) !important;
  box-shadow: 0 0 0 5px rgba(255,75,31,.14) !important;
}

.deal-timeline-item:not(:last-child)::before {
  background: rgba(255,255,255,.08) !important;
}


.clients-list-toolbar,
.search-toolbar,
.filter-bar,
.document-upload-actions,
.document-actions,
.catalog-toolbar,
.finance-toolbar,
.storage-tabs,
.blacklist-toolbar,
.team-toolbar {
  background: rgba(255,255,255,.035) !important;
  border: 1px solid rgba(255,255,255,.07) !important;
  border-radius: 16px !important;
}

.document-upload-card {
  background:
    radial-gradient(circle at 92% 4%, rgba(255,75,31,.12), transparent 28%),
    var(--fin-card) !important;
}

.document-actions .btn,
.task-kanban-card-actions .btn,
.team-chat-task-actions .btn {
  box-shadow: none;
}


#tasks.section.active {
  --task-blue: var(--fin-blue);
  --task-green: var(--fin-green);
  --task-orange: var(--fin-orange);
  --task-red: var(--fin-red);
  --task-gray: #858585;
  --task-card-bg: var(--fin-card);
  --task-panel-bg: rgba(255,255,255,.04);
  --task-panel-border: rgba(255,255,255,.08);
}

.task-kanban-column--blue,
.task-kanban-column--orange,
.task-kanban-column--red,
.task-kanban-column--green,
.task-kanban-column--gray {
  background: linear-gradient(180deg, rgba(255,75,31,.055), rgba(255,255,255,.025)) !important;
}

.task-kanban-card,
.team-chat-task-card {
  background: #111112 !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 15px !important;
}

.task-kanban-card h4,
.team-chat-task-card h4,
.team-chat-deal-card h3,
.calendar-agenda-title-row h4 {
  color: #fff !important;
}

.task-stat-ring {
  background:
    conic-gradient(var(--fin-orange) calc(var(--task-progress) * 1%), rgba(255,255,255,.1) 0),
    rgba(255,255,255,.045) !important;
}
.task-stat-ring::before { background: var(--fin-card) !important; }


#calendar.section.active { overflow: visible; }
.calendar-page { gap: 14px; }
.calendar-stats { gap: 14px; }
.calendar-stat-card { min-height: 122px; }
.calendar-workspace { gap: 14px; }
.calendar-weekdays,
.calendar-grid {
  background: rgba(255,255,255,.035) !important;
  border-color: rgba(255,255,255,.07) !important;
}

.calendar-day-cell {
  background: #121213 !important;
  border-color: rgba(255,255,255,.07) !important;
}

.calendar-day-cell.is-selected {
  background: rgba(255,75,31,.14) !important;
  border-color: rgba(255,75,31,.42) !important;
  box-shadow: inset 0 0 0 1px rgba(255,75,31,.28) !important;
}

.calendar-day-cell.is-today .calendar-day-number {
  background: var(--primary) !important;
  color: #fff !important;
}

.calendar-day-cell.is-outside {
  background: rgba(255,255,255,.018) !important;
  color: rgba(255,255,255,.26) !important;
}

.calendar-day-number { color: #fff !important; }
.calendar-weekdays span { color: rgba(255,255,255,.4) !important; }
.calendar-agenda-item {
  background: rgba(255,255,255,.04) !important;
  border-color: rgba(255,255,255,.075) !important;
}
.calendar-agenda-icon,
.calendar-side-section-head span {
  background: rgba(255,75,31,.12) !important;
  color: var(--primary) !important;
}
.calendar-fab {
  background: linear-gradient(135deg, var(--fin-orange), var(--fin-orange-2)) !important;
  box-shadow: 0 18px 38px rgba(255,75,31,.25) !important;
}


.team-chat-shell {
  background: transparent !important;
  gap: 14px;
}

.team-chat-person,
.team-chat-tab,
.team-chat-message-bubble,
.team-chat-task-filter,
.team-chat-task-stats span,
.team-chat-deal-card {
  background: rgba(255,255,255,.04) !important;
  border: 1px solid rgba(255,255,255,.075) !important;
  color: rgba(255,255,255,.72) !important;
  border-radius: 14px !important;
}

.team-chat-person:hover,
.team-chat-person.active,
.team-chat-tab.active,
.team-chat-task-filter.active {
  background: rgba(255,75,31,.13) !important;
  border-color: rgba(255,75,31,.3) !important;
  color: #fff !important;
}

.team-chat-message.mine .team-chat-message-bubble {
  background: linear-gradient(135deg, rgba(255,75,31,.92), rgba(224,56,20,.92)) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.team-chat-message-text,
.team-chat-person-body b { color: #fff !important; }
.team-chat-person-body span,
.team-chat-message-meta,
.team-chat-task-card p,
.team-chat-deal-meta { color: rgba(255,255,255,.48) !important; }
.team-chat-send-btn { background: var(--primary) !important; color: #fff !important; }


.settings-home-grid,
.settings-grid,
.interface-grid,
.account-security-grid,
.notification-settings-grid,
.template-settings-grid,
.numbering-settings-grid,
.data-settings-grid {
  gap: 14px;
}

.switch-ui {
  background: rgba(255,255,255,.12) !important;
}
.switch-ui::after { background: #fff !important; }
input:checked + .switch-ui,
.switch-ui.is-on { background: rgba(255,75,31,.88) !important; }

.theme-preview {
  background:
    radial-gradient(circle at 80% 10%, rgba(255,75,31,.18), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.025)) !important;
}

.theme-preview-tile.primary { background: var(--primary) !important; }


.user-dropdown,
.notification-panel,
.deal-action-dropdown {
  background: #151516 !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.52) !important;
}

.user-dropdown-item,
.deal-action-dropdown button,
.notification-panel-list > * {
  border-radius: 13px !important;
}

.user-dropdown-item:hover,
.deal-action-dropdown button:hover {
  background: rgba(255,75,31,.11) !important;
  color: #fff !important;
}

.user-dropdown-section-title,
.notification-panel-hint {
  color: rgba(255,255,255,.38) !important;
}

.user-dropdown-divider { background: rgba(255,255,255,.08) !important; }


.auth-screen,
.cashier-auth-screen {
  background:
    radial-gradient(circle at 28% 15%, rgba(255,75,31,.20), transparent 34%),
    radial-gradient(circle at 70% 10%, rgba(255,255,255,.05), transparent 26%),
    #070707 !important;
}

.auth-card,
.cashier-auth-card {
  max-width: 520px;
  padding: 30px !important;
  box-shadow: 0 32px 90px rgba(0,0,0,.58) !important;
}

.auth-title { letter-spacing: -.05em; }
.auth-tabs { background: rgba(255,255,255,.045) !important; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; }
.auth-link { color: var(--primary) !important; }
.auth-note { background: rgba(255,255,255,.045) !important; border-color: rgba(255,255,255,.08) !important; color: rgba(255,255,255,.58) !important; }


.cashier-body {
  overflow: auto;
}
.cashier-shell {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 16% 0%, rgba(255,75,31,.15), transparent 28%),
    #090909 !important;
  color: var(--text);
}
.cashier-header {
  background: var(--fin-top) !important;
  border-bottom: 1px solid var(--fin-line) !important;
  box-shadow: none !important;
}
.cashier-main {
  background: var(--fin-main) !important;
}
.cashier-card,
.cashier-kpi,
.cashier-quick-nav,
.cashier-deal-info,
.cashier-readiness,
.cashier-amount-preview,
.cashier-last-receipt,
.cashier-shift-status,
.cashier-receipts-toolbar,
.cashier-task-card,
.cashier-notification-card,
.cashier-chat-card {
  background: var(--fin-card) !important;
  border: 1px solid var(--fin-line) !important;
  border-radius: 18px !important;
  box-shadow: none !important;
}
.cashier-kpi-label,
.cashier-kpi-hint,
.cashier-card-subtitle,
.cashier-shift-meta { color: rgba(255,255,255,.5) !important; }
.cashier-nav-pill {
  background: rgba(255,255,255,.045) !important;
  color: rgba(255,255,255,.62) !important;
  border: 1px solid rgba(255,255,255,.075) !important;
}
.cashier-nav-pill:hover,
.cashier-nav-pill.active {
  color: #fff !important;
  background: rgba(255,75,31,.14) !important;
  border-color: rgba(255,75,31,.32) !important;
}
.cashier-submit-btn { background: linear-gradient(135deg, var(--fin-orange), var(--fin-orange-2)) !important; }
.cashier-live-dot,
.cashier-shift-dot:not(.closed) { background: #35d37d !important; box-shadow: 0 0 0 5px rgba(53,211,125,.12) !important; }
.cashier-shift-dot.closed { background: var(--danger) !important; box-shadow: 0 0 0 5px rgba(255,79,92,.12) !important; }


@media (max-width: 1180px) {
  .app { padding: 0; }
  .glass-frame { width: 100%; height: 100dvh; min-height: 100dvh; border-radius: 0; border: 0 !important; }
  .app-header { grid-template-columns: auto 1fr auto; padding-inline: 12px; }
  .top-nav { overflow-x: auto; justify-content: flex-start; }
  .workspace { grid-template-columns: 76px minmax(0, 1fr); }
  .side-rail { padding: 12px 9px; }
  .rail-heading,
  .rail-btn .nav-label,
  .rail-global-btn .nav-label,
  .rail-style-label { display: none; }
  .rail-quick-style { grid-template-columns: 1fr; }
  .rail-btn,
  .rail-global-btn { justify-content: center; padding: 0; }
  .main { padding: 18px; }
  .dashboard-stats-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-stat-card--hero { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  body { overflow: auto; }
  .app { min-height: 100dvh; height: auto; overflow: visible; }
  .app-header { height: auto; min-height: 76px; grid-template-columns: 1fr auto; padding-block: 10px; }
  .top-nav { grid-column: 1 / -1; order: 3; }
  .header-actions { gap: 6px; }
  .workspace { grid-template-columns: 1fr; height: auto; min-height: calc(100dvh - 134px); }
  .side-rail {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    display: block;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--fin-line);
  }
  .rail-nav,
  .rail-global-nav,
  .rail-quick-style {
    display: flex;
    overflow-x: auto;
    gap: 8px;
  }
  .rail-btn,
  .rail-global-btn,
  .rail-style-btn {
    width: auto;
    min-width: 46px;
    white-space: nowrap;
    padding-inline: 12px;
  }
  .rail-btn .nav-label,
  .rail-global-btn .nav-label,
  .rail-style-label { display: inline; }
  .rail-heading,
  .rail-bottom { display: none; }
  .main { height: auto; min-height: calc(100dvh - 190px); overflow: visible; padding: 16px; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .page-actions { width: 100%; overflow-x: auto; justify-content: flex-start; padding-bottom: 3px; }
  .dashboard-stats-grid,
  .dashboard-charts-grid,
  .dashboard-bottom-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .form-grid,
  .wizard-layout,
  .deal-card-grid,
  .calendar-workspace,
  .team-chat-shell,
  .task-insights-grid,
  .task-stats-grid,
  .calendar-stats {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 520px) {
  .brand-subtitle,
  .user-chip-text,
  #cashierModeLink { display: none; }
  .brand-title { font-size: 14px; }
  .card,
  .auth-card,
  .cashier-auth-card { padding: 15px !important; }
  .dashboard-stat-card { min-height: 140px; }
  .top-nav-btn { padding-inline: 11px; }
}




:root {
  --ux-sidebar: 282px;
  --ux-topbar: 70px;
  --ux-gap: 16px;
}

.app {
  padding: 18px !important;
  place-items: stretch !important;
}

.glass-frame {
  width: 100% !important;
  max-width: none !important;
  height: calc(100dvh - 36px) !important;
  min-height: 720px !important;
  display: grid;
  grid-template-rows: var(--ux-topbar) minmax(0, 1fr);
  border-radius: 24px !important;
}

.app-header {
  height: var(--ux-topbar) !important;
  grid-template-columns: var(--ux-sidebar) minmax(0, 1fr) auto !important;
  padding: 0 18px !important;
}

.top-nav {
  display: none !important;
}

.header-actions {
  justify-self: end;
}

.workspace {
  height: auto !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: var(--ux-sidebar) minmax(0, 1fr) !important;
  padding: 0 !important;
  overflow: hidden;
}

.side-rail {
  padding: 14px 14px 16px !important;
  gap: 12px !important;
  background: #0a0a0b !important;
  border-right: 1px solid rgba(255,255,255,.08) !important;
}

.rail-command-center {
  display: grid;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.rail-search {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 14px;
  background: #141415;
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.46) !important;
}

.rail-search:focus-within {
  border-color: rgba(255,75,31,.45);
  box-shadow: 0 0 0 4px rgba(255,75,31,.13);
}

.rail-search svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-search input {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: none !important;
  outline: 0;
  font-size: 13px;
  font-weight: 720;
}

.rail-fast-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rail-fast-action {
  min-height: 38px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 13px;
  background: rgba(255,255,255,.045);
  color: rgba(255,255,255,.72);
  font-weight: 850;
  font-size: 12px;
  cursor: pointer;
}

.rail-fast-action span {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 5px;
  border-radius: 7px;
  background: rgba(255,255,255,.08);
  color: #fff;
}

.rail-fast-action:hover,
.rail-fast-action--primary {
  background: linear-gradient(135deg, rgba(255,75,31,.94), rgba(224,56,20,.94));
  color: #fff;
  border-color: transparent;
}

.rail-quick-style {
  display: none !important;
}

.rail-nav {
  display: grid !important;
  gap: 10px !important;
  padding: 0 !important;
  overflow: visible;
}

.rail-nav-group {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid transparent;
}

.rail-nav-group.is-current {
  background: rgba(255,255,255,.025);
  border-color: rgba(255,255,255,.055);
}

.rail-module-head {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: left;
}

.rail-module-head:hover {
  background: rgba(255,75,31,.095);
}

.rail-module-icon,
.ux-metric-icon,
.ux-wallet-head .dashboard-stat-settings {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255,75,31,.12);
  color: var(--primary);
  border: 1px solid rgba(255,75,31,.20);
  flex: 0 0 auto;
}

.rail-module-icon svg,
.ux-metric-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-module-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.rail-module-text b {
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.rail-module-text small {
  max-width: 185px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,.38);
  font-size: 10px;
  font-weight: 650;
}

.rail-module-items {
  display: grid;
  gap: 4px;
  padding-left: 7px;
  border-left: 1px solid rgba(255,255,255,.07);
  margin-left: 24px;
}

.rail-btn,
.rail-global-btn {
  min-height: 36px !important;
  padding: 0 10px !important;
  border-radius: 12px !important;
  gap: 10px !important;
}

.rail-btn .nav-icon,
.rail-global-btn .nav-icon {
  width: 16px !important;
  opacity: .78;
}

.rail-btn .nav-label,
.rail-global-btn .nav-label {
  font-size: 12px !important;
  font-weight: 800 !important;
}

.rail-btn.active,
.rail-global-btn.active {
  background: linear-gradient(135deg, rgba(255,75,31,.22), rgba(255,75,31,.10)) !important;
  border-color: rgba(255,75,31,.32) !important;
  box-shadow: none !important;
}

.rail-global-nav {
  margin-top: auto;
  padding-top: 12px !important;
  border-top: 1px solid rgba(255,255,255,.08) !important;
}

.rail-bottom {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: 0 !important;
  justify-content: stretch !important;
}

.rail-bottom .logout-btn {
  width: 100% !important;
  border-radius: 14px !important;
}

.main {
  padding: 0 !important;
  background:
    radial-gradient(circle at 45% -20%, rgba(255,255,255,.04), transparent 30%),
    #101011 !important;
  overflow: auto !important;
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 !important;
  min-height: 86px !important;
  padding: 18px 28px 16px !important;
  background: rgba(16,16,17,.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
}


.page-actions {
  align-self: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

#appAlert,
.section.active {
  margin-inline: 28px;
}

.section.active {
  padding-top: 20px;
  padding-bottom: 28px;
}

#dashboard.section.active {
  display: grid;
  gap: 16px;
}


.dashboard-stats-grid--ux {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin-bottom: 0 !important;
}

.ux-dashboard-hero-card,
.ux-dashboard-metric-card,
.ux-dashboard-wallet-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  background: #151516;
  box-shadow: none;
}

.ux-dashboard-hero-card {
  grid-column: span 6;
  min-height: 254px;
  padding: 20px;
  background:
    radial-gradient(circle at 87% 8%, rgba(255,255,255,.18), transparent 23%),
    linear-gradient(135deg, #fb551f 0%, #df3d15 52%, #98240d 100%);
  border-color: rgba(255,118,72,.42);
}

.ux-dashboard-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ux-kicker {
  color: rgba(255,255,255,.62);
  text-transform: uppercase;
  letter-spacing: .11em;
  font-size: 11px;
  font-weight: 920;
}

.ux-dashboard-hero-card h2,
.ux-dashboard-wallet-card h3 {
  margin: 5px 0 4px;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.055em;
}

.ux-dashboard-hero-card p {
  margin: 0;
  max-width: 460px;
  color: rgba(255,255,255,.68);
  font-size: 13px;
}

.ux-focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.ux-focus-grid button,
.ux-wallet-grid button {
  min-width: 0;
  text-align: left;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(10,10,10,.18);
  color: #fff;
  padding: 13px;
  cursor: pointer;
}

.ux-focus-grid button:hover,
.ux-wallet-grid button:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.09);
}

.ux-focus-grid span,
.ux-wallet-grid span,
.ux-metric-label {
  display: block;
  color: rgba(255,255,255,.58);
  font-size: 12px;
  font-weight: 800;
}

.ux-focus-grid strong,
.ux-wallet-grid b,
.ux-dashboard-metric-card strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -.055em;
}

.ux-focus-grid small,
.ux-wallet-grid small,
.ux-dashboard-metric-card small {
  display: block;
  margin-top: 7px;
  color: rgba(255,255,255,.46);
  font-size: 11px;
  font-weight: 720;
}

.ux-dashboard-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.ux-dashboard-primary-actions .btn {
  min-height: 36px;
}

.ux-dashboard-metric-card {
  grid-column: span 2;
  min-height: 158px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.ux-dashboard-metric-card:hover,
.ux-dashboard-wallet-card:hover {
  border-color: rgba(255,75,31,.24);
}

.ux-dashboard-metric-card--accent {
  background: linear-gradient(135deg, rgba(255,75,31,.18), rgba(255,255,255,.035));
}

.ux-dashboard-metric-card .ux-metric-label {
  margin-top: 14px;
}

.ux-dashboard-metric-card strong {
  font-size: 23px;
}

.ux-dashboard-metric-card i {
  display: block;
  height: 5px;
  margin-top: 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  overflow: hidden;
}

.ux-dashboard-metric-card i::before {
  content: '';
  display: block;
  width: var(--value, 12%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--fin-orange), var(--fin-orange-3));
}

.ux-dashboard-wallet-card {
  grid-column: span 6;
  min-height: 212px;
  padding: 18px;
}

.ux-wallet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ux-wallet-head .ux-kicker {
  color: var(--primary);
}

.ux-wallet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ux-wallet-grid button {
  background: rgba(255,255,255,.035);
  min-height: 118px;
}

.ux-wallet-grid b {
  font-size: 20px;
}

.dashboard-charts-grid,
.dashboard-bottom-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr) !important;
  gap: 14px !important;
}

.dashboard-chart-card,
.dashboard-feed-card {
  border-radius: 20px !important;
}

.dashboard-chart-card {
  min-height: 300px !important;
}

.dashboard-feed-body {
  max-height: 420px;
  overflow: auto;
  padding-right: 2px;
}

.dashboard-feed-header,
.card-header,
.task-toolbar,
.calendar-toolbar,
.clients-list-toolbar,
.search-toolbar,
.catalog-toolbar,
.finance-toolbar,
.storage-toolbar,
.blacklist-toolbar,
.team-toolbar {
  position: sticky;
  top: 103px;
  z-index: 8;
  background: rgba(21,21,22,.95) !important;
  backdrop-filter: blur(14px);
}


.table-wrap thead th,
.task-table-view thead th,
.audit-table-wrap thead th,
.clients-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.form-grid {
  gap: 12px !important;
}

.field label {
  min-height: 16px;
}

input,
select,
textarea {
  min-height: 40px;
}

textarea {
  min-height: 96px;
}

.btn,
button,
input,
select,
textarea {
  touch-action: manipulation;
}


.clients-page-grid,
.blacklist-control-grid,
.finance-grid,
.catalog-grid,
.settings-grid,
.notification-settings-grid,
.template-settings-grid,
.numbering-settings-grid,
.data-settings-grid,
.account-security-grid {
  gap: 14px !important;
}

.card,
.table-wrap,
.task-toolbar,
.calendar-toolbar {
  scroll-margin-top: 120px;
}

@media (max-width: 1280px) {
  :root { --ux-sidebar: 88px; }
  .app { padding: 0 !important; }
  .glass-frame { height: 100dvh !important; min-height: 100dvh !important; border-radius: 0 !important; }
  .app-header { grid-template-columns: 88px minmax(0, 1fr) auto !important; }
  .brand-subtitle,
  .brand-title,
  .rail-search,
  .rail-fast-actions,
  .rail-module-text,
  .rail-module-items,
  .rail-btn .nav-label,
  .rail-global-btn .nav-label { display: none !important; }
  .side-rail { padding-inline: 10px !important; }
  .rail-nav-group { padding: 6px; }
  .rail-module-head,
  .rail-btn,
  .rail-global-btn { justify-content: center !important; padding-inline: 0 !important; }
  .rail-module-items { margin: 0; padding: 0; border: 0; display: grid !important; }
  .rail-btn { width: 44px !important; justify-self: center; }
  .dashboard-stats-grid--ux { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .ux-dashboard-hero-card,
  .ux-dashboard-wallet-card { grid-column: span 6; }
  .ux-dashboard-metric-card { grid-column: span 2; }
}

@media (max-width: 900px) {
  .app-header { grid-template-columns: 1fr auto !important; }
  .workspace { grid-template-columns: 1fr !important; overflow: visible; }
  .glass-frame { display: block; overflow: auto; }
  .side-rail {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    overflow-x: auto !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
  }
  .rail-command-center,
  .rail-global-nav,
  .rail-bottom { display: none !important; }
  .rail-nav { display: flex !important; gap: 8px !important; }
  .rail-nav-group { display: contents; }
  .rail-module-head { display: none !important; }
  .rail-module-items { display: flex !important; margin: 0; padding: 0; border: 0; gap: 8px; }
  .rail-btn { width: auto !important; min-width: max-content; padding-inline: 12px !important; }
  .rail-btn .nav-label { display: inline !important; }
  .main { min-height: calc(100dvh - 132px); }
  .page-header { position: relative; top: auto; padding: 16px !important; }
  #appAlert,
  .section.active { margin-inline: 16px; }
  .dashboard-stats-grid--ux,
  .dashboard-charts-grid,
  .dashboard-bottom-grid,
  .ux-focus-grid,
  .ux-wallet-grid {
    grid-template-columns: 1fr !important;
  }
  .ux-dashboard-hero-card,
  .ux-dashboard-metric-card,
  .ux-dashboard-wallet-card { grid-column: 1 / -1; }
  .dashboard-feed-header,
  .card-header,
  .task-toolbar,
  .calendar-toolbar,
  .clients-list-toolbar,
  .search-toolbar,
  .catalog-toolbar,
  .finance-toolbar,
  .storage-toolbar,
  .blacklist-toolbar,
  .team-toolbar { position: static; }
}

@media (max-width: 560px) {
  .header-actions .circle-btn,
  #cashierModeLink { display: none !important; }
  .ux-dashboard-hero-card,
  .ux-dashboard-wallet-card,
  .ux-dashboard-metric-card { padding: 15px; }
  .ux-dashboard-primary-actions { display: grid; }
}

.rail-module-head.active {
  background: rgba(255,75,31,.10);
}



:root,
:root[data-theme="light"],
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #070707;
  --shell: #0c0c0d;
  --surface: #151516;
  --surface-soft: #1b1b1d;
  --surface-green: #ff4b1f;
  --surface-green-2: #dc3d17;
  --text: #f6f6f3;
  --text-soft: #c4c4bf;
  --muted: #747676;
  --border: rgba(255,255,255,.075);
  --border-strong: rgba(255,255,255,.14);
  --primary: #ff4b1f;
  --primary-rgb: 255, 75, 31;
  --primary-dark: #dc3d17;
  --primary-soft: rgba(255,75,31,.13);
  --accent-strong: #ff7a45;
  --panel-2: #1b1b1d;
  --panel-solid: #151516;
  --success: #37d67a;
  --warning: #ffb020;
  --danger: #ff4f5c;
  --danger-rgb: 255, 79, 92;
  --info: #6ea8ff;
  --ring: 0 0 0 4px rgba(255, 75, 31, .18);

  
  --action-primary: #ff4b1f;
  --action-dark: #dc3d17;
  --action-soft: rgba(255,75,31,.16);
  --action-rgb: 255, 75, 31;
  --action-ring: 0 0 0 4px rgba(255,75,31,.16);
}

.app {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  overflow: hidden !important;
  place-items: stretch !important;
  background: #070707 !important;
}

.glass-frame {
  width: 100% !important;
  max-width: none !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.app-header {
  border-radius: 0 !important;
}

.main {
  padding: 0 !important;
}

#appAlert,
.section.active {
  margin-inline: 28px;
}

.section.active {
  padding-top: 20px;
  padding-bottom: 28px;
}


.brand-logo,
.top-nav-btn.active,
.rail-style-btn.active,
.rail-btn.active,
.rail-global-btn.active,
.circle-btn.active,
.rail-module-icon,
.ux-metric-icon,
.dashboard-stat-icon,
.stat-icon,
.dashboard-feed-icon,
.dashboard-chart-icon,
.calendar-stat-icon,
.task-stat-icon,
.calendar-day-cell.is-today .calendar-day-number,
input:checked + .switch-ui,
.switch-ui.is-on {
  --action-primary: var(--primary);
  --action-dark: var(--primary-dark);
  --action-rgb: var(--primary-rgb);
}


.btn:not(.secondary):not(.danger):not(.warning):not(.success),
.btn.primary,
.settings-save-row .btn:not(.secondary):not(.danger),
.wizard-footer .btn:not(.secondary):not(.danger):not(.warning):not(.success),
.modal-footer .btn:not(.secondary):not(.danger):not(.warning):not(.success),
.app-dialog-actions .btn:not(.secondary):not(.danger):not(.warning):not(.success),
.deal-primary-action,
.calendar-fab,
.cashier-submit-btn,
.team-chat-send-btn,
.rail-fast-action--primary,
.ux-dashboard-primary-actions .btn:not(.secondary):not(.danger):not(.warning):not(.success) {
  background: linear-gradient(135deg, var(--action-primary), var(--action-dark)) !important;
  border-color: rgba(255,255,255,.08) !important;
  color: #fff !important;
  box-shadow: 0 14px 32px rgba(var(--action-rgb), .22) !important;
}

.btn:not(.secondary):not(.danger):not(.warning):not(.success):hover,
.btn.primary:hover,
.settings-save-row .btn:not(.secondary):not(.danger):hover,
.wizard-footer .btn:not(.secondary):not(.danger):not(.warning):not(.success):hover,
.modal-footer .btn:not(.secondary):not(.danger):not(.warning):not(.success):hover,
.app-dialog-actions .btn:not(.secondary):not(.danger):not(.warning):not(.success):hover,
.deal-primary-action:hover,
.calendar-fab:hover,
.cashier-submit-btn:hover,
.team-chat-send-btn:hover,
.rail-fast-action--primary:hover,
.ux-dashboard-primary-actions .btn:not(.secondary):not(.danger):not(.warning):not(.success):hover {
  background: linear-gradient(135deg, var(--action-dark), var(--action-primary)) !important;
  box-shadow: 0 17px 38px rgba(var(--action-rgb), .30) !important;
}

.btn.success {
  background: linear-gradient(135deg, #32d583, #11a95b) !important;
  box-shadow: 0 14px 30px rgba(50,213,131,.18) !important;
}
.btn.warning {
  background: linear-gradient(135deg, #ffbd3d, #df8414) !important;
  color: #19120a !important;
  box-shadow: 0 14px 30px rgba(255,189,61,.16) !important;
}
.btn.danger {
  background: linear-gradient(135deg, #ff5c70, #d92d46) !important;
  box-shadow: 0 14px 30px rgba(255,92,112,.18) !important;
}

.rail-fast-action:hover:not(.rail-fast-action--primary) {
  background: rgba(255,75,31,.12) !important;
  border-color: rgba(255,75,31,.28) !important;
}

.theme-preview-tile.primary,
.interface-theme-card:has(input:checked) .interface-theme-preview,
.interface-theme-card.is-selected .interface-theme-preview {
  border-color: var(--primary) !important;
}

.accent-color-dot:has(input:checked),
.accent-color-dot.is-selected {
  box-shadow: 0 0 0 2px #151516, 0 0 0 4px var(--dot-color), 0 14px 28px rgba(0,0,0,.28) !important;
}

@media (max-width: 900px) {
  #appAlert,
  .section.active { margin-inline: 16px; }
}


:root {
  --ux-sidebar: 296px;
  --ux-topbar: 72px;
  --sidebar-bg: #09090a;
  --sidebar-panel: #121214;
  --sidebar-panel-2: #171719;
  --sidebar-line: rgba(255,255,255,.075);
  --sidebar-text: rgba(255,255,255,.78);
  --sidebar-muted: rgba(255,255,255,.42);
}

html.rail-collapsed {
  --ux-sidebar: 84px;
}

.glass-frame {
  display: grid !important;
  grid-template-columns: var(--ux-sidebar) minmax(0, 1fr) !important;
  grid-template-rows: var(--ux-topbar) minmax(0, 1fr) !important;
  transition: grid-template-columns .18s ease !important;
}

.app-header {
  grid-column: 2 !important;
  grid-row: 1 !important;
  z-index: 30;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  min-width: 0;
  padding: 0 24px !important;
  background: rgba(13,13,14,.94) !important;
  border-bottom: 1px solid var(--sidebar-line) !important;
}

.app-header .brand,
.app-header .top-nav,
#cashierModeLink {
  display: none !important;
}

.header-actions {
  grid-column: 2;
}

.workspace {
  grid-column: 1 / -1 !important;
  grid-row: 1 / -1 !important;
  z-index: 10;
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: var(--ux-sidebar) minmax(0, 1fr) !important;
  grid-template-rows: var(--ux-topbar) minmax(0, 1fr) !important;
  background: transparent !important;
  overflow: hidden !important;
  transition: grid-template-columns .18s ease !important;
}

.side-rail {
  grid-column: 1 !important;
  grid-row: 1 / -1 !important;
  z-index: 40;
  min-width: 0;
  min-height: 0;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  padding: 16px 14px !important;
  overflow: hidden !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.018), transparent 22%),
    var(--sidebar-bg) !important;
  border-right: 1px solid var(--sidebar-line) !important;
  box-shadow: 22px 0 54px rgba(0,0,0,.18) !important;
}

.main {
  grid-column: 2 !important;
  grid-row: 2 !important;
  min-width: 0;
  min-height: 0;
}

.sidebar-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.sidebar-brand {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.sidebar-brand:hover {
  background: rgba(255,255,255,.045);
}

.sidebar-brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--fin-orange), var(--fin-orange-2));
  box-shadow: 0 14px 28px rgba(255,75,31,.22), inset 0 1px 0 rgba(255,255,255,.22);
}

.sidebar-brand-mark svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 4.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-brand-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.sidebar-brand-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -.04em;
}

.sidebar-brand-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--sidebar-muted);
  font-size: 11px;
  font-weight: 750;
}

.sidebar-collapse-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--sidebar-line);
  border-radius: 14px;
  background: #131315;
  color: rgba(255,255,255,.66);
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.sidebar-collapse-btn:hover {
  background: rgba(255,255,255,.065);
  border-color: rgba(255,255,255,.14);
  color: #fff;
}

.sidebar-collapse-btn svg,
.rail-footer-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-command-center {
  display: grid !important;
  gap: 10px !important;
  padding: 0 0 14px !important;
  border-bottom: 1px solid var(--sidebar-line) !important;
}

.rail-search {
  height: 42px !important;
  border-radius: 14px !important;
  background: var(--sidebar-panel) !important;
  border: 1px solid var(--sidebar-line) !important;
}

.rail-search:focus-within {
  border-color: rgba(255,255,255,.16) !important;
  box-shadow: none !important;
}

.rail-fast-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
}

.rail-fast-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 40px !important;
  padding: 0 10px;
  border-radius: 14px !important;
  background: var(--sidebar-panel) !important;
  border: 1px solid var(--sidebar-line) !important;
  color: var(--sidebar-text) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

.rail-fast-action span {
  margin: 0 !important;
  flex: 0 0 auto;
  background: rgba(255,255,255,.08) !important;
}

.rail-fast-action b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-fast-action--primary {
  background: linear-gradient(135deg, var(--action-primary), var(--action-dark)) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.rail-nav {
  flex: 1 1 auto;
  min-height: 0;
  display: flex !important;
  flex-direction: column;
  gap: 16px !important;
  padding: 2px 2px 6px 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.rail-nav-group {
  display: grid !important;
  gap: 6px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.rail-nav-group.is-current {
  background: transparent !important;
  border-color: transparent !important;
}

.rail-section-label {
  padding: 0 10px;
  color: rgba(255,255,255,.34);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.rail-module-head,
.rail-module-icon,
.rail-module-text {
  display: none !important;
}

.rail-module-items {
  display: grid !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.rail-btn,
.rail-global-btn,
.rail-footer-action {
  min-height: 42px !important;
  width: 100%;
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 11px !important;
  padding: 0 11px !important;
  border-radius: 14px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--sidebar-text) !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.rail-btn:hover,
.rail-global-btn:hover,
.rail-footer-action:hover {
  background: rgba(255,255,255,.055) !important;
  border-color: rgba(255,255,255,.08) !important;
  color: #fff !important;
  transform: none !important;
}

.rail-btn .nav-icon,
.rail-global-btn .nav-icon,
.rail-footer-action .nav-icon {
  width: 20px !important;
  height: 20px !important;
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  color: rgba(255,255,255,.56);
  opacity: 1 !important;
}

.rail-btn .nav-icon svg,
.rail-global-btn .nav-icon svg,
.rail-footer-action .nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-btn .nav-label,
.rail-global-btn .nav-label,
.rail-footer-action .nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px !important;
  font-weight: 760 !important;
  letter-spacing: -.01em;
}

.rail-btn.active,
.rail-global-btn.active {
  background: rgba(255,75,31,.12) !important;
  border-color: rgba(255,75,31,.22) !important;
  color: #fff !important;
  box-shadow: inset 3px 0 0 var(--fin-orange) !important;
}

.rail-btn.active .nav-icon,
.rail-global-btn.active .nav-icon {
  color: var(--fin-orange) !important;
}

.rail-global-nav {
  flex: 0 0 auto;
  display: grid !important;
  gap: 6px !important;
  margin-top: 0 !important;
  padding: 14px 0 0 !important;
  border-top: 1px solid var(--sidebar-line) !important;
}

.rail-bottom {
  flex: 0 0 auto;
  display: grid !important;
  gap: 6px;
  margin-top: 0 !important;
  padding-top: 12px !important;
  border-top: 1px solid var(--sidebar-line) !important;
}

.rail-footer-action--danger {
  color: rgba(255,255,255,.62) !important;
}

.rail-footer-action--danger:hover {
  color: #fff !important;
  border-color: rgba(255,92,112,.26) !important;
  background: rgba(255,92,112,.10) !important;
}

.rail-unread-badge {
  margin-left: auto;
  min-width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

#app.rail-collapsed .side-rail {
  padding: 14px 10px !important;
  align-items: center;
}

#app.rail-collapsed .sidebar-head {
  width: 100%;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 8px;
}

#app.rail-collapsed .sidebar-brand {
  width: 46px;
  height: 46px;
  min-height: 46px;
  justify-content: center;
  padding: 0;
}

#app.rail-collapsed .sidebar-brand-text,
#app.rail-collapsed .rail-search input,
#app.rail-collapsed .rail-fast-action-label,
#app.rail-collapsed .rail-section-label,
#app.rail-collapsed .rail-btn .nav-label,
#app.rail-collapsed .rail-global-btn .nav-label,
#app.rail-collapsed .rail-footer-action .nav-label {
  display: none !important;
}

#app.rail-collapsed .rail-command-center,
#app.rail-collapsed .rail-nav,
#app.rail-collapsed .rail-global-nav,
#app.rail-collapsed .rail-bottom {
  width: 100%;
}

#app.rail-collapsed .rail-search,
#app.rail-collapsed .rail-fast-action,
#app.rail-collapsed .rail-btn,
#app.rail-collapsed .rail-global-btn,
#app.rail-collapsed .rail-footer-action {
  width: 46px !important;
  min-width: 46px !important;
  justify-content: center !important;
  padding-inline: 0 !important;
  justify-self: center;
}

#app.rail-collapsed .rail-fast-actions {
  grid-template-columns: 1fr !important;
  justify-items: center;
}

#app.rail-collapsed .rail-btn.active,
#app.rail-collapsed .rail-global-btn.active {
  box-shadow: inset 0 -3px 0 var(--fin-orange) !important;
}

#app.rail-collapsed .rail-unread-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  margin: 0;
}

@media (max-width: 1280px) {
  :root { --ux-sidebar: 252px; }
  html.rail-collapsed { --ux-sidebar: 84px; }
  .brand-title,
  .brand-subtitle,
  .rail-search,
  .rail-fast-actions,
  .rail-module-text,
  .rail-module-items,
  .rail-btn .nav-label,
  .rail-global-btn .nav-label {
    display: revert !important;
  }
}

@media (max-width: 900px) {
  :root,
  html.rail-collapsed { --ux-sidebar: 100%; --ux-topbar: 64px; }

  .glass-frame {
    display: block !important;
    overflow: auto !important;
  }

  .app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex !important;
    justify-content: flex-end;
    min-height: var(--ux-topbar) !important;
    padding: 0 12px !important;
  }

  .workspace {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }

  .side-rail {
    position: sticky !important;
    top: var(--ux-topbar) !important;
    z-index: 45;
    height: 62px !important;
    min-height: 62px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 9px 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--sidebar-line) !important;
  }

  .sidebar-head,
  .rail-command-center,
  .rail-global-nav,
  .rail-bottom {
    display: none !important;
  }

  .rail-nav {
    display: flex !important;
    flex: 1 0 auto;
    flex-direction: row !important;
    gap: 8px !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  .rail-nav-group {
    display: contents !important;
  }

  .rail-section-label {
    display: none !important;
  }

  .rail-module-items {
    display: flex !important;
    gap: 8px !important;
  }

  .rail-btn {
    width: auto !important;
    min-width: max-content !important;
    min-height: 42px !important;
    padding-inline: 12px !important;
  }

  .rail-btn .nav-label {
    display: inline !important;
  }

  .main {
    min-height: calc(100dvh - 126px) !important;
  }
}

@media (min-width: 901px) and (max-width: 1280px) {
  .rail-search { display: flex !important; }
  .rail-fast-actions { display: grid !important; }
  .rail-module-items { display: grid !important; }
  .sidebar-brand-text { display: grid !important; }
  .rail-btn .nav-label,
  .rail-global-btn .nav-label,
  .rail-footer-action .nav-label { display: inline !important; }
  #app.rail-collapsed .sidebar-brand-text,
  #app.rail-collapsed .rail-btn .nav-label,
  #app.rail-collapsed .rail-global-btn .nav-label,
  #app.rail-collapsed .rail-footer-action .nav-label { display: none !important; }
}


:root {
  --ux-topbar: 92px;
}

.app-header {
  min-height: var(--ux-topbar) !important;
  gap: 18px !important;
  overflow: visible !important;
}

.app-page-context {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
}

.app-page-breadcrumb {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,.42);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  line-height: 1.1;
  text-transform: uppercase;
}

.app-page-title {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.05;
  letter-spacing: -.055em;
}

.app-page-subtitle {
  margin: 0;
  max-width: 720px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,.46);
  font-size: 12px;
  font-weight: 650;
}

.app-header-controls {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.app-header .page-actions {
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}

.app-header .page-actions [hidden] {
  display: none !important;
}

.page-header {
  display: none !important;
}

.dashboard-feed-header,
.card-header,
.task-toolbar,
.calendar-toolbar,
.clients-list-toolbar,
.search-toolbar,
.catalog-toolbar,
.finance-toolbar,
.storage-toolbar,
.blacklist-toolbar,
.team-toolbar {
  top: 0 !important;
}

#appAlert,
.section.active {
  margin-inline: 28px;
}

.section.active {
  padding-top: 22px;
}

@media (max-width: 1120px) {
  :root { --ux-topbar: 84px; }
  .app-header { padding-inline: 16px !important; }
  .app-header-controls { gap: 8px; }
  .app-header .page-actions { max-width: 46vw; overflow-x: auto; padding-bottom: 2px; }
  .app-page-subtitle { max-width: 50vw; }
}

@media (max-width: 900px) {
  :root,
  html.rail-collapsed { --ux-topbar: 74px; }
  .app-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    justify-content: initial !important;
    min-height: var(--ux-topbar) !important;
  }
  .app-page-breadcrumb { font-size: 10px; }
  .app-page-title { font-size: 19px; }
  .app-page-subtitle { display: none; }
  .app-header .page-actions { max-width: 34vw; }
  .header-actions .user-chip-text { display: none; }
}

@media (max-width: 560px) {
  .app-header .page-actions .btn:not(#refreshBtn),
  .app-header .header-actions .circle-btn:not(#notificationBellBtn) {
    display: none !important;
  }
  .app-header .page-actions { max-width: max-content; }
}


:root[data-theme="light"] {
  color-scheme: light;
  --page: #f4f2ed;
  --shell: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f6f7f9;
  --surface-green: #ff4b1f;
  --surface-green-2: #dc3d17;
  --text: #111827;
  --text-soft: #475569;
  --muted: #64748b;
  --border: rgba(15,23,42,.10);
  --border-strong: rgba(15,23,42,.16);
  --primary: #ff4b1f;
  --primary-rgb: 255, 75, 31;
  --primary-dark: #dc3d17;
  --primary-soft: rgba(255,75,31,.11);
  --accent-strong: #cc3c16;
  --panel-2: #f8fafc;
  --panel-solid: #ffffff;
  --success: #0f9f62;
  --warning: #b76b00;
  --danger: #d92d46;
  --danger-rgb: 217, 45, 70;
  --info: #2563eb;
  --ring: 0 0 0 4px rgba(255,75,31,.15);
  --fin-card: #ffffff;
  --fin-card-2: #f8fafc;
  --fin-elevated: #ffffff;
  --fin-sidebar: #f7f7f4;
  --fin-main: #f2f4f7;
  --fin-top: #ffffff;
  --fin-line: rgba(15,23,42,.10);
  --fin-line-strong: rgba(15,23,42,.16);
  --sidebar-bg: #f7f7f4;
  --sidebar-panel: #ffffff;
  --sidebar-panel-2: #f1f5f9;
  --sidebar-line: rgba(15,23,42,.10);
  --sidebar-text: #334155;
  --sidebar-muted: #64748b;
}

html[data-theme="light"],
html[data-theme="light"] body {
  background:
    radial-gradient(circle at 16% 0%, rgba(255,75,31,.10), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(15,23,42,.06), transparent 24%),
    #f4f2ed !important;
  color: var(--text) !important;
}

html[data-theme="light"] body::before {
  opacity: .42;
  background-image:
    linear-gradient(rgba(15,23,42,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.035) 1px, transparent 1px);
}

html[data-theme="light"] .app {
  background: #f4f2ed !important;
}

html[data-theme="light"] .glass-frame {
  background: #f2f4f7 !important;
}

html[data-theme="light"] .app-header,
html[data-theme="light"] .cashier-header {
  background: rgba(255,255,255,.92) !important;
  border-bottom-color: rgba(15,23,42,.10) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.75) inset !important;
}

html[data-theme="light"] .app-page-breadcrumb,
html[data-theme="light"] .eyebrow {
  color: #c2410c !important;
}

html[data-theme="light"] .app-page-title,
html[data-theme="light"] #pageTitle,
html[data-theme="light"] .auth-title,
html[data-theme="light"] .cashier-title,
html[data-theme="light"] .card-title,
html[data-theme="light"] .wizard-title,
html[data-theme="light"] .deal-card-title-row h2,
html[data-theme="light"] .calendar-month-head h3,
html[data-theme="light"] .calendar-day-head h3,
html[data-theme="light"] .task-kanban-card h4,
html[data-theme="light"] .team-chat-task-card h4,
html[data-theme="light"] .team-chat-deal-card h3,
html[data-theme="light"] .calendar-agenda-title-row h4,
html[data-theme="light"] .team-chat-message-text,
html[data-theme="light"] .team-chat-person-body b,
html[data-theme="light"] .dashboard-stat-value,
html[data-theme="light"] .dashboard-finance-value,
html[data-theme="light"] .dashboard-side-value,
html[data-theme="light"] .stat-value,
html[data-theme="light"] .cashier-kpi-value,
html[data-theme="light"] .dashboard-hero-value {
  color: #111827 !important;
}

html[data-theme="light"] .app-page-subtitle,
html[data-theme="light"] #pageSubtitle,
html[data-theme="light"] .muted,
html[data-theme="light"] .card-subtitle,
html[data-theme="light"] .auth-subtitle,
html[data-theme="light"] .wizard-desc,
html[data-theme="light"] .dashboard-stat-hint,
html[data-theme="light"] .dashboard-hero-hint,
html[data-theme="light"] .dashboard-feed-title-row .muted,
html[data-theme="light"] .calendar-month-head p,
html[data-theme="light"] .calendar-day-head p,
html[data-theme="light"] .team-chat-hint,
html[data-theme="light"] .deal-back-link,
html[data-theme="light"] .deal-card-meta,
html[data-theme="light"] .deal-mini-row span,
html[data-theme="light"] .deal-timeline-item p,
html[data-theme="light"] .deal-timeline-item span,
html[data-theme="light"] .wizard-panel-head p,
html[data-theme="light"] .wizard-summary-card p,
html[data-theme="light"] .client-profile-item span,
html[data-theme="light"] .team-chat-person-body span,
html[data-theme="light"] .team-chat-message-meta,
html[data-theme="light"] .team-chat-task-card p,
html[data-theme="light"] .team-chat-deal-meta,
html[data-theme="light"] .cashier-kpi-label,
html[data-theme="light"] .cashier-kpi-hint,
html[data-theme="light"] .cashier-card-subtitle,
html[data-theme="light"] .cashier-shift-meta,
html[data-theme="light"] .monthly-chart-axis,
html[data-theme="light"] .monthly-chart-label,
html[data-theme="light"] .daily-flow-label,
html[data-theme="light"] .dashboard-pipeline-label,
html[data-theme="light"] .dashboard-stat-footer,
html[data-theme="light"] .dashboard-finance-footer,
html[data-theme="light"] .dashboard-side-percent span {
  color: #64748b !important;
}

html[data-theme="light"] .side-rail {
  background:
    linear-gradient(180deg, rgba(255,255,255,.65), transparent 28%),
    #f7f7f4 !important;
  border-right-color: rgba(15,23,42,.10) !important;
  box-shadow: 18px 0 42px rgba(15,23,42,.05) !important;
}

html[data-theme="light"] .sidebar-brand,
html[data-theme="light"] .rail-btn,
html[data-theme="light"] .rail-global-btn,
html[data-theme="light"] .rail-footer-action,
html[data-theme="light"] .rail-fast-action,
html[data-theme="light"] .sidebar-collapse-btn {
  color: #334155 !important;
}

html[data-theme="light"] .sidebar-brand:hover,
html[data-theme="light"] .rail-btn:hover,
html[data-theme="light"] .rail-global-btn:hover,
html[data-theme="light"] .rail-footer-action:hover,
html[data-theme="light"] .sidebar-collapse-btn:hover {
  background: rgba(15,23,42,.045) !important;
  border-color: rgba(15,23,42,.10) !important;
  color: #111827 !important;
}

html[data-theme="light"] .sidebar-brand-text strong,
html[data-theme="light"] .rail-btn.active,
html[data-theme="light"] .rail-global-btn.active,
html[data-theme="light"] .rail-btn.active .nav-icon,
html[data-theme="light"] .rail-global-btn.active .nav-icon {
  color: #111827 !important;
}

html[data-theme="light"] .sidebar-brand-text small,
html[data-theme="light"] .rail-section-label {
  color: #64748b !important;
}

html[data-theme="light"] .rail-search,
html[data-theme="light"] .rail-fast-action,
html[data-theme="light"] .sidebar-collapse-btn,
html[data-theme="light"] .user-chip,
html[data-theme="light"] .circle-btn,
html[data-theme="light"] .btn.secondary,
html[data-theme="light"] .btn.light.secondary,
html[data-theme="light"] .rail-style-btn,
html[data-theme="light"] .dashboard-action-btn,
html[data-theme="light"] .calendar-icon-btn,
html[data-theme="light"] .calendar-filter-btn,
html[data-theme="light"] .task-filter-icon,
html[data-theme="light"] .stat-settings-btn {
  background: #ffffff !important;
  color: #475569 !important;
  border-color: rgba(15,23,42,.10) !important;
  box-shadow: none !important;
}

html[data-theme="light"] .circle-btn:hover,
html[data-theme="light"] .btn.secondary:hover,
html[data-theme="light"] .user-chip:hover,
html[data-theme="light"] .rail-style-btn:hover,
html[data-theme="light"] .dashboard-action-btn:hover,
html[data-theme="light"] .calendar-icon-btn:hover,
html[data-theme="light"] .calendar-filter-btn:hover,
html[data-theme="light"] .task-filter-icon:hover,
html[data-theme="light"] .stat-settings-btn:hover {
  color: #111827 !important;
  border-color: rgba(255,75,31,.24) !important;
  background: rgba(255,75,31,.07) !important;
}

html[data-theme="light"] .main,
html[data-theme="light"] .cashier-main {
  background:
    radial-gradient(circle at 46% -20%, rgba(255,75,31,.055), transparent 30%),
    #f2f4f7 !important;
}

html[data-theme="light"] .card,
html[data-theme="light"] .table-wrap,
html[data-theme="light"] .modal,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .cashier-auth-card,
html[data-theme="light"] .notification-panel,
html[data-theme="light"] .user-dropdown,
html[data-theme="light"] .deal-action-dropdown,
html[data-theme="light"] .popover,
html[data-theme="light"] .dropdown,
html[data-theme="light"] .theme-preview,
html[data-theme="light"] .deal-card-section,
html[data-theme="light"] .deal-card-shell,
html[data-theme="light"] .wizard-main,
html[data-theme="light"] .wizard-side,
html[data-theme="light"] .dashboard-chart-card,
html[data-theme="light"] .dashboard-feed-card,
html[data-theme="light"] .dashboard-stat-card,
html[data-theme="light"] .ux-dashboard-metric-card,
html[data-theme="light"] .ux-dashboard-wallet-card,
html[data-theme="light"] .task-stat-card,
html[data-theme="light"] .task-toolbar,
html[data-theme="light"] .task-kanban-column,
html[data-theme="light"] .task-table-view,
html[data-theme="light"] .task-insight-card,
html[data-theme="light"] .calendar-stat-card,
html[data-theme="light"] .calendar-board-card,
html[data-theme="light"] .calendar-month-panel,
html[data-theme="light"] .calendar-day-panel,
html[data-theme="light"] .calendar-side-section,
html[data-theme="light"] .team-chat-sidebar,
html[data-theme="light"] .team-chat-panel,
html[data-theme="light"] .team-chat-task-form,
html[data-theme="light"] .team-chat-inline-note,
html[data-theme="light"] .team-chat-task-card,
html[data-theme="light"] .team-chat-deal-card,
html[data-theme="light"] .document-upload-card,
html[data-theme="light"] .blacklist-warning,
html[data-theme="light"] .settings-home-card,
html[data-theme="light"] .settings-card,
html[data-theme="light"] .client-card-panel,
html[data-theme="light"] .client-profile-card,
html[data-theme="light"] .client-documents-card,
html[data-theme="light"] .storage-toolbar,
html[data-theme="light"] .cashbox-choice,
html[data-theme="light"] .cashier-card,
html[data-theme="light"] .cashier-kpi,
html[data-theme="light"] .cashier-quick-nav,
html[data-theme="light"] .cashier-deal-info,
html[data-theme="light"] .cashier-readiness,
html[data-theme="light"] .cashier-amount-preview,
html[data-theme="light"] .cashier-last-receipt,
html[data-theme="light"] .cashier-shift-status,
html[data-theme="light"] .cashier-receipts-toolbar,
html[data-theme="light"] .cashier-task-card,
html[data-theme="light"] .cashier-notification-card,
html[data-theme="light"] .cashier-chat-card {
  background: #ffffff !important;
  border-color: rgba(15,23,42,.10) !important;
  box-shadow: 0 1px 2px rgba(15,23,42,.04) !important;
  color: #111827 !important;
}

html[data-theme="light"] .dashboard-feed-header,
html[data-theme="light"] .card-header,
html[data-theme="light"] .task-toolbar,
html[data-theme="light"] .calendar-toolbar,
html[data-theme="light"] .clients-list-toolbar,
html[data-theme="light"] .search-toolbar,
html[data-theme="light"] .catalog-toolbar,
html[data-theme="light"] .finance-toolbar,
html[data-theme="light"] .storage-toolbar,
html[data-theme="light"] .blacklist-toolbar,
html[data-theme="light"] .team-toolbar {
  background: rgba(255,255,255,.94) !important;
  border-color: rgba(15,23,42,.10) !important;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .search-input,
html[data-theme="light"] .clients-search-input,
html[data-theme="light"] .task-select-field select,
html[data-theme="light"] .task-search-wrap input,
html[data-theme="light"] .team-chat-composer input,
html[data-theme="light"] .team-chat-search input,
html[data-theme="light"] .dashboard-chart-select select,
html[data-theme="light"] .dashboard-select-control select,
html[data-theme="light"] .calendar-view-switch,
html[data-theme="light"] .task-view-switch,
html[data-theme="light"] .auth-tab,
html[data-theme="light"] .filter-pill,
html[data-theme="light"] .calendar-view-tab,
html[data-theme="light"] .workspace-mode-option,
html[data-theme="light"] .user-theme-btn {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: rgba(15,23,42,.12) !important;
  box-shadow: none !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #94a3b8 !important;
}

html[data-theme="light"] select option {
  color: #111827;
  background: #ffffff;
}

html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  border-color: rgba(255,75,31,.44) !important;
  box-shadow: var(--ring) !important;
}

html[data-theme="light"] label,
html[data-theme="light"] .field-label,
html[data-theme="light"] .dashboard-select-control,
html[data-theme="light"] .task-select-field > span {
  color: #475569 !important;
}

html[data-theme="light"] th {
  color: #64748b !important;
  background: #f8fafc !important;
  border-bottom-color: rgba(15,23,42,.10) !important;
}

html[data-theme="light"] td {
  color: #334155 !important;
  border-bottom-color: rgba(15,23,42,.08) !important;
}

html[data-theme="light"] tbody tr:hover,
html[data-theme="light"] .table-wrap table tbody tr:hover {
  background: rgba(255,75,31,.055) !important;
}

html[data-theme="light"] .badge,
html[data-theme="light"] .status-badge,
html[data-theme="light"] .task-chip,
html[data-theme="light"] .team-chat-task-chip,
html[data-theme="light"] .dashboard-status-pill,
html[data-theme="light"] .calendar-event-chip,
html[data-theme="light"] .calendar-agenda-title-row span,
html[data-theme="light"] .cashier-live-chip,
html[data-theme="light"] .cashier-shortcut,
html[data-theme="light"] .chart-pill,
html[data-theme="light"] .dashboard-select-control,
html[data-theme="light"] .dashboard-action-btn,
html[data-theme="light"] .dashboard-feed-filter,
html[data-theme="light"] .dashboard-list-loading,
html[data-theme="light"] .wizard-step-btn,
html[data-theme="light"] .wizard-summary-card,
html[data-theme="light"] .wizard-summary-row,
html[data-theme="light"] .deal-mini-row,
html[data-theme="light"] .deal-action-menu,
html[data-theme="light"] .deal-timeline-item,
html[data-theme="light"] .client-profile-item,
html[data-theme="light"] .client-document-item,
html[data-theme="light"] .theme-preview-tile,
html[data-theme="light"] .team-chat-person,
html[data-theme="light"] .team-chat-tab,
html[data-theme="light"] .team-chat-message-bubble,
html[data-theme="light"] .team-chat-task-filter,
html[data-theme="light"] .team-chat-task-stats span,
html[data-theme="light"] .team-chat-deal-card,
html[data-theme="light"] .dashboard-deal-row,
html[data-theme="light"] .dashboard-reminder-row,
html[data-theme="light"] .dashboard-feed-row,
html[data-theme="light"] .clients-list-toolbar,
html[data-theme="light"] .search-toolbar,
html[data-theme="light"] .filter-bar,
html[data-theme="light"] .document-upload-actions,
html[data-theme="light"] .document-actions,
html[data-theme="light"] .catalog-toolbar,
html[data-theme="light"] .finance-toolbar,
html[data-theme="light"] .storage-tabs,
html[data-theme="light"] .blacklist-toolbar,
html[data-theme="light"] .team-toolbar,
html[data-theme="light"] .calendar-weekdays,
html[data-theme="light"] .calendar-grid,
html[data-theme="light"] .calendar-agenda-item,
html[data-theme="light"] .cashier-nav-pill {
  background: #f8fafc !important;
  border-color: rgba(15,23,42,.10) !important;
  color: #475569 !important;
}

html[data-theme="light"] .auth-tab.is-active,
html[data-theme="light"] .filter-pill.active,
html[data-theme="light"] .calendar-view-tab.active,
html[data-theme="light"] .task-view-switch .filter-pill.active,
html[data-theme="light"] .workspace-mode-option:has(input:checked),
html[data-theme="light"] .user-theme-btn.is-active,
html[data-theme="light"] .user-theme-btn.active,
html[data-theme="light"] .wizard-step-btn:hover,
html[data-theme="light"] .wizard-step-btn.active,
html[data-theme="light"] .wizard-step-btn.completed,
html[data-theme="light"] .cashbox-choice.is-selected,
html[data-theme="light"] .team-chat-person:hover,
html[data-theme="light"] .team-chat-person.active,
html[data-theme="light"] .team-chat-tab.active,
html[data-theme="light"] .team-chat-task-filter.active,
html[data-theme="light"] .cashier-nav-pill:hover,
html[data-theme="light"] .cashier-nav-pill.active {
  color: #111827 !important;
  background: rgba(255,75,31,.09) !important;
  border-color: rgba(255,75,31,.24) !important;
}

html[data-theme="light"] .calendar-day-cell,
html[data-theme="light"] .task-kanban-card,
html[data-theme="light"] .team-chat-task-card {
  background: #ffffff !important;
  border-color: rgba(15,23,42,.10) !important;
}

html[data-theme="light"] .calendar-day-cell.is-outside {
  background: #f8fafc !important;
  color: #94a3b8 !important;
}

html[data-theme="light"] .calendar-day-number,
html[data-theme="light"] .user-email {
  color: #111827 !important;
}

html[data-theme="light"] .calendar-weekdays span,
html[data-theme="light"] .user-role-label {
  color: #64748b !important;
}

html[data-theme="light"] .monthly-chart-grid span,
html[data-theme="light"] .daily-flow-grid span,
html[data-theme="light"] .dashboard-pipeline-track,
html[data-theme="light"] .task-workload-row i,
html[data-theme="light"] .deal-progress-bar,
html[data-theme="light"] .wizard-progress,
html[data-theme="light"] .calendar-stat-visual {
  border-top-color: rgba(15,23,42,.10) !important;
  background: rgba(15,23,42,.08) !important;
}

html[data-theme="light"] .dashboard-mini-bars span:not(.is-active),
html[data-theme="light"] .mini-bars span:not(.active),
html[data-theme="light"] .monthly-bar.revenue,
html[data-theme="light"] .daily-flow-bar.expected {
  background: rgba(15,23,42,.12) !important;
  border-color: rgba(15,23,42,.10) !important;
}

html[data-theme="light"] .alert,
html[data-theme="light"] .config-warning,
html[data-theme="light"] .empty,
html[data-theme="light"] .calendar-empty-state,
html[data-theme="light"] .task-kanban-empty,
html[data-theme="light"] .task-insight-empty,
html[data-theme="light"] .team-chat-empty-state,
html[data-theme="light"] .team-chat-warning,
html[data-theme="light"] .team-chat-empty-side,
html[data-theme="light"] .calendar-side-empty,
html[data-theme="light"] .payment-deal-info.empty,
html[data-theme="light"] .auth-note {
  background: #f8fafc !important;
  border-color: rgba(15,23,42,.10) !important;
  color: #475569 !important;
}

html[data-theme="light"] .alert.success { background: rgba(16,185,129,.10) !important; color: #047857 !important; border-color: rgba(16,185,129,.22) !important; }
html[data-theme="light"] .alert.error { background: rgba(217,45,70,.10) !important; color: #b42318 !important; border-color: rgba(217,45,70,.22) !important; }
html[data-theme="light"] .alert.info { background: rgba(37,99,235,.10) !important; color: #1d4ed8 !important; border-color: rgba(37,99,235,.22) !important; }
html[data-theme="light"] .config-warning { background: rgba(245,158,11,.12) !important; color: #92400e !important; border-color: rgba(245,158,11,.24) !important; }

html[data-theme="light"] .user-dropdown,
html[data-theme="light"] .notification-panel,
html[data-theme="light"] .deal-action-dropdown {
  background: #ffffff !important;
  box-shadow: 0 24px 70px rgba(15,23,42,.18) !important;
}

html[data-theme="light"] .user-dropdown-item:hover,
html[data-theme="light"] .deal-action-dropdown button:hover {
  background: rgba(255,75,31,.08) !important;
  color: #111827 !important;
}

html[data-theme="light"] .user-dropdown-section-title,
html[data-theme="light"] .notification-panel-hint {
  color: #64748b !important;
}

html[data-theme="light"] .user-dropdown-divider {
  background: rgba(15,23,42,.10) !important;
}

html[data-theme="light"] .auth-screen,
html[data-theme="light"] .cashier-auth-screen,
html[data-theme="light"] .cashier-shell {
  background:
    radial-gradient(circle at 28% 15%, rgba(255,75,31,.12), transparent 34%),
    radial-gradient(circle at 70% 10%, rgba(15,23,42,.06), transparent 26%),
    #f4f2ed !important;
  color: #111827 !important;
}

html[data-theme="light"] .cashier-shift-card,
html[data-theme="light"] .ux-dashboard-hero-card,
html[data-theme="light"] .dashboard-stat-card--hero,
html[data-theme="light"] .stat-card:first-child {
  color: #fff !important;
  background:
    radial-gradient(circle at 86% 10%, rgba(255,255,255,.22), transparent 23%),
    linear-gradient(135deg, #ff5b20 0%, #de3a12 58%, #a8270d 100%) !important;
  border-color: rgba(255,118,72,.42) !important;
  box-shadow: 0 24px 52px rgba(255,75,31,.16) !important;
}

html[data-theme="light"] .ux-dashboard-hero-card h2,
html[data-theme="light"] .ux-dashboard-hero-card p,
html[data-theme="light"] .ux-dashboard-hero-card .ux-kicker,
html[data-theme="light"] .ux-dashboard-hero-card strong,
html[data-theme="light"] .ux-dashboard-hero-card small,
html[data-theme="light"] .cashier-shift-card .eyebrow,
html[data-theme="light"] .cashier-shift-title,
html[data-theme="light"] .cashier-shift-card .cashier-shift-meta,
html[data-theme="light"] .cashier-shift-metric span,
html[data-theme="light"] .cashier-shift-metric b {
  color: #fff !important;
}

html[data-theme="light"] .ux-focus-grid button,
html[data-theme="light"] .ux-wallet-grid button {
  background: #f8fafc !important;
  border-color: rgba(15,23,42,.10) !important;
  color: #111827 !important;
}

html[data-theme="light"] .ux-dashboard-hero-card .ux-focus-grid button {
  background: rgba(255,255,255,.14) !important;
  border-color: rgba(255,255,255,.22) !important;
  color: #fff !important;
}

html[data-theme="light"] .badge.success,
html[data-theme="light"] .dashboard-status-pill--success,
html[data-theme="light"] .calendar-event-chip.success,
html[data-theme="light"] .calendar-event-chip.payment,
html[data-theme="light"] .task-chip--green {
  background: rgba(16,185,129,.10) !important;
  border-color: rgba(16,185,129,.22) !important;
  color: #047857 !important;
}
html[data-theme="light"] .badge.warning,
html[data-theme="light"] .dashboard-status-pill--warning,
html[data-theme="light"] .calendar-event-chip.warning,
html[data-theme="light"] .task-chip--orange {
  background: rgba(245,158,11,.12) !important;
  border-color: rgba(245,158,11,.26) !important;
  color: #92400e !important;
}
html[data-theme="light"] .badge.danger,
html[data-theme="light"] .calendar-event-chip.danger,
html[data-theme="light"] .task-chip--red {
  background: rgba(217,45,70,.10) !important;
  border-color: rgba(217,45,70,.22) !important;
  color: #b42318 !important;
}
html[data-theme="light"] .badge.info,
html[data-theme="light"] .task-chip--blue,
html[data-theme="light"] .calendar-event-chip.task {
  background: rgba(37,99,235,.10) !important;
  border-color: rgba(37,99,235,.22) !important;
  color: #1d4ed8 !important;
}





:root {
  --text-2xs: 10.5px;
  --text-xs: 11.5px;
  --text-sm: 12.5px;
  --text-md: 13.5px;
  --text-base: 14px;
  --text-lg: 15px;
  --text-xl: 16px;
  --text-2xl: 18px;
  --text-3xl: 21px;
  --text-4xl: 24px;
  --text-5xl: 28px;
  --text-6xl: 32px;
  --line-tight: 1.12;
  --line-title: 1.18;
  --line-body: 1.45;
  --letter-tight: -.025em;
}

html {
  font-size: 14px;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body,
button,
input,
select,
textarea,
table {
  font-size: var(--text-base) !important;
  line-height: var(--line-body);
}

body {
  font-weight: 500;
}


h1,
.app-page-title,
.page-title,
.auth-title,
.modal-title,
.cashier-title,
.cashier-shift-title,
.deal-card-title,
.contract-preview-actions h1 {
  line-height: var(--line-title) !important;
  letter-spacing: var(--letter-tight) !important;
}

.app-page-title {
  font-size: clamp(21px, 1.45vw, 24px) !important;
  font-weight: 850 !important;
}

.page-title {
  font-size: clamp(24px, 2.2vw, 32px) !important;
  font-weight: 850 !important;
}

.auth-title {
  font-size: clamp(25px, 2.3vw, 29px) !important;
  font-weight: 850 !important;
}

.modal-title,
.deal-card-title,
.contract-preview-actions h1 {
  font-size: var(--text-3xl) !important;
  font-weight: 850 !important;
}

.card-title,
.dashboard-card-title,
.dashboard-feed-title,
.dashboard-chart-title,
.task-column-title,
.task-insight-title,
.calendar-board-title,
.calendar-side-title,
.team-chat-panel-title,
.settings-card-title,
.storage-title,
.blacklist-title,
.client-profile-title,
.client-documents-title,
.cashier-card-title,
.cashier-section-title,
.cashier-chat-title,
.document-section-title,
.finance-section-title,
.catalog-section-title {
  font-size: var(--text-xl) !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
  letter-spacing: -.015em !important;
}

h2,
.section-title,
.wizard-title,
.settings-home-title,
.cashier-shift-title {
  font-size: var(--text-2xl) !important;
  line-height: 1.22 !important;
  font-weight: 850 !important;
}

h3,
.subsection-title,
.form-section-title,
.dashboard-list-title,
.team-chat-task-title,
.calendar-agenda-title,
.cashier-kpi-title {
  font-size: var(--text-lg) !important;
  line-height: 1.28 !important;
  font-weight: 800 !important;
}

p,
li,
.muted,
.empty,
.alert,
.config-warning,
.auth-subtitle,
.page-subtitle,
.app-page-subtitle,
.card-subtitle,
.card-description,
.dashboard-feed-subtitle,
.task-insight-copy,
.calendar-empty-state,
.team-chat-empty-state,
.team-chat-message-text,
.client-profile-value,
.deal-card-subtitle,
.cashier-subtitle,
.cashier-kpi-hint,
.cashier-shift-meta,
.invite-password-hint,
.contract-body {
  font-size: var(--text-md) !important;
  line-height: var(--line-body) !important;
}


label,
.field-label,
.eyebrow,
th,
.badge,
.status-badge,
.task-chip,
.team-chat-task-chip,
.dashboard-status-pill,
.calendar-event-chip,
.filter-pill,
.calendar-view-tab,
.user-role-label,
.user-email,
.stat-label,
.stat-hint,
.mini-kpi-label,
.cashier-kpi-label,
.cashier-live-chip,
.cashier-nav-pill,
.cashier-shortcut,
.dashboard-select-control,
.dashboard-feed-filter,
.rail-heading,
.app-page-breadcrumb,
.brand-subtitle,
.client-document-meta,
.blacklist-entry-note span,
.contract-payment-schedule th,
.contract-payment-schedule td,
.contract-footer-note,
.contract-signature-line span,
.contract-signature-line b {
  font-size: var(--text-sm) !important;
  line-height: 1.32 !important;
}

.eyebrow,
.rail-heading,
.app-page-breadcrumb,
th {
  font-size: var(--text-xs) !important;
  letter-spacing: .075em !important;
}


.brand-title,
.sidebar-brand-title {
  font-size: var(--text-lg) !important;
  line-height: 1.15 !important;
  font-weight: 850 !important;
}

.nav-label,
.rail-btn,
.rail-global-btn,
.rail-footer-action,
.rail-fast-action,
.rail-search,
.rail-style-label,
.top-nav-btn,
.user-chip,
.user-dropdown-item,
.notification-item,
.deal-action-dropdown button {
  font-size: var(--text-md) !important;
  line-height: 1.25 !important;
  font-weight: 750 !important;
}

.sidebar-brand-subtitle,
.rail-search input,
.rail-footer-meta,
.notification-panel-hint,
.user-dropdown-section-title {
  font-size: var(--text-sm) !important;
}


.btn,
button,
input,
select,
textarea,
.search-input,
.clients-search-input,
.task-search-wrap input,
.team-chat-composer input,
.team-chat-search input,
.dashboard-chart-select select,
.dashboard-select-control select,
.auth-tab,
.workspace-mode-option,
.user-theme-btn {
  font-size: var(--text-md) !important;
  line-height: 1.25 !important;
}

.btn,
.auth-tab,
.filter-pill,
.calendar-view-tab,
.cashier-nav-pill,
.user-theme-btn {
  font-weight: 800 !important;
}

input,
select,
textarea {
  font-weight: 600 !important;
}

input::placeholder,
textarea::placeholder {
  font-size: var(--text-md) !important;
}


table,
td,
.table-wrap,
.dashboard-deal-row,
.dashboard-reminder-row,
.dashboard-feed-row,
.deal-mini-row,
.client-document-item,
.team-chat-person,
.task-kanban-card,
.calendar-agenda-item,
.cashier-task-card,
.cashier-notification-card,
.cashier-receipt-row,
.document-row,
.storage-row,
.blacklist-row {
  font-size: var(--text-md) !important;
  line-height: 1.36 !important;
}

td {
  font-weight: 580 !important;
}

th {
  font-weight: 850 !important;
}


.stat-value,
.dashboard-stat-value,
.ux-dashboard-metric-value,
.ux-wallet-value,
.task-stat-value,
.calendar-stat-value,
.blacklist-stat-card b,
.cashier-kpi-value,
.cashier-shift-metric b,
.mini-kpi-value {
  line-height: var(--line-tight) !important;
  letter-spacing: -.045em !important;
  font-weight: 900 !important;
}

.stat-value,
.dashboard-stat-value,
.ux-dashboard-metric-value,
.cashier-kpi-value {
  font-size: clamp(23px, 2.15vw, 30px) !important;
}

.ux-wallet-value,
.blacklist-stat-card b,
.cashier-shift-metric b {
  font-size: clamp(21px, 1.8vw, 26px) !important;
}

.mini-kpi-value,
.task-stat-value,
.calendar-stat-value {
  font-size: var(--text-2xl) !important;
}


.ux-dashboard-hero-card h2,
.dashboard-stat-card--hero .dashboard-stat-value,
.stat-card:first-child .stat-value {
  font-size: clamp(26px, 2.8vw, 36px) !important;
  line-height: 1.05 !important;
}

.ux-dashboard-hero-card p,
.ux-dashboard-hero-card small,
.ux-dashboard-hero-card strong,
.dashboard-stat-card--hero .stat-hint,
.stat-card:first-child .stat-hint {
  font-size: var(--text-md) !important;
}


.calendar-day-number {
  font-size: var(--text-md) !important;
  font-weight: 850 !important;
}

.calendar-event-title,
.calendar-agenda-title-row,
.calendar-side-event-title {
  font-size: var(--text-sm) !important;
  line-height: 1.25 !important;
}

.calendar-weekdays span {
  font-size: var(--text-xs) !important;
  font-weight: 850 !important;
  letter-spacing: .06em !important;
}


.team-chat-message-author,
.team-chat-task-card-title,
.team-chat-deal-card-title {
  font-size: var(--text-md) !important;
  font-weight: 800 !important;
}

.team-chat-message-time,
.team-chat-task-meta,
.team-chat-deal-card-meta,
.team-chat-person-meta {
  font-size: var(--text-sm) !important;
}


.cashier-title {
  font-size: var(--text-3xl) !important;
  font-weight: 850 !important;
}

.cashier-shift-title {
  font-size: clamp(22px, 2vw, 28px) !important;
}

.cashier-header-actions,
.cashier-user-chip,
.cashier-shift-status,
.cashier-readiness,
.cashier-amount-preview,
.cashier-last-receipt,
.cashier-deal-info {
  font-size: var(--text-md) !important;
}


.auth-card,
.cashier-auth-card,
.invite-email-box {
  font-size: var(--text-base) !important;
}

.auth-note,
.invite-password-hint {
  font-size: var(--text-md) !important;
}


.contract-body h1 {
  font-size: var(--text-4xl) !important;
}

.contract-body h2 {
  font-size: var(--text-xl) !important;
}

.contract-body h3 {
  font-size: var(--text-md) !important;
}


@media (max-width: 900px) {
  :root {
    --text-base: 13.5px;
    --text-md: 13px;
    --text-sm: 12px;
    --text-xs: 11px;
  }

  .app-page-title {
    font-size: 19px !important;
  }

  .page-title,
  .auth-title {
    font-size: 24px !important;
  }

  .card-title,
  .dashboard-card-title,
  .cashier-card-title,
  .modal-title {
    font-size: 15px !important;
  }

  .stat-value,
  .dashboard-stat-value,
  .ux-dashboard-metric-value,
  .cashier-kpi-value {
    font-size: 23px !important;
  }
}

@media (max-width: 560px) {
  :root {
    --text-base: 13px;
    --text-md: 12.5px;
  }

  .app-page-title {
    font-size: 18px !important;
  }

  .cashier-title,
  .modal-title,
  .auth-title {
    font-size: 22px !important;
  }
}





:root {
  --ux-topbar: 74px;
}

.app-header {
  min-height: var(--ux-topbar) !important;
  padding-block: 10px !important;
}

.app-page-context {
  gap: 2px !important;
  align-content: center !important;
}

.app-page-breadcrumb {
  display: none !important;
}

.app-page-title {
  font-size: clamp(20px, 1.35vw, 23px) !important;
  line-height: 1.12 !important;
}

.app-page-subtitle {
  max-width: 680px !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

@media (max-width: 1120px) {
  :root { --ux-topbar: 70px; }
  .app-header { padding-block: 8px !important; }
}

@media (max-width: 900px) {
  :root,
  html.rail-collapsed { --ux-topbar: 66px; }
  .app-header { min-height: var(--ux-topbar) !important; }
}

@media (max-width: 560px) {
  :root,
  html.rail-collapsed { --ux-topbar: 62px; }
  .app-header { padding-block: 7px !important; }
}


html[data-theme="light"] {
  --text: #111827;
  --text-soft: #334155;
  --muted: #64748b;
  --border: rgba(15, 23, 42, .11);
  --border-strong: rgba(15, 23, 42, .18);
}

html[data-theme="light"] :where(.app-header, .side-rail, .main, .section, .card, .table-wrap, .modal, .app-dialog-card, .user-dropdown, .notification-panel, .deal-action-dropdown, .cashier-shell, .cashier-main, .cashier-card, .auth-card) {
  color: #111827 !important;
}

html[data-theme="light"] :where(.app-page-title, .section-title, .page-title, .card-title, .dashboard-card-title, .dashboard-feed-title, .dashboard-chart-title, .settings-card-title, .settings-home-title, .settings-nav-card b, .settings-health-card b, .settings-data-card b, .settings-tab-panel b, .interface-theme-title, .workspace-mode-title, .calendar-board-title, .calendar-side-title, .calendar-agenda-title, .task-column-title, .task-insight-title, .task-kanban-card h4, .team-chat-panel-title, .team-chat-task-card h4, .team-chat-deal-card h3, .client-profile-title, .client-documents-title, .storage-title, .blacklist-title, .finance-section-title, .catalog-section-title, .document-section-title, .contract-editor-document, .contract-variables-head h3, .contract-variable-group h4, .contract-template-choice-title, .dashboard-stat-value, .dashboard-finance-value, .dashboard-side-value, .stat-value, .cashier-kpi-value, .cashier-card-title, .cashier-section-title, .cashier-chat-title, .user-email) {
  color: #111827 !important;
}

html[data-theme="light"] :where(.app-page-subtitle, .card-subtitle, .card-description, .muted, .empty, .dashboard-stat-hint, .dashboard-stat-footer, .dashboard-finance-footer, .dashboard-side-percent span, .dashboard-feed-subtitle, .settings-nav-card small, .settings-health-card span, .settings-data-card span, .settings-data-card small, .workspace-mode-text, .wizard-desc, .wizard-panel-head p, .wizard-summary-card p, .deal-card-meta, .deal-mini-row span, .deal-timeline-item p, .deal-timeline-item span, .client-profile-item span, .client-document-meta, .calendar-month-head p, .calendar-day-head p, .calendar-side-empty, .team-chat-hint, .team-chat-message-meta, .team-chat-person-body span, .team-chat-task-card p, .team-chat-deal-meta, .cashier-kpi-label, .cashier-kpi-hint, .cashier-card-subtitle, .cashier-shift-meta, .cashier-receipt-meta, .cashier-task-meta, .user-role-label, .notification-panel-hint, .user-dropdown-section-title, .contract-variables-head p, .contract-helper-text) {
  color: #64748b !important;
}

html[data-theme="light"] :where(.settings-nav-card, .settings-tabs, .settings-health-card, .settings-data-card, .settings-check-row, .settings-import-box, .interface-theme-card, .workspace-mode-option, .numbering-preview-item, .contract-editor-area, .contract-variables-panel, .contract-toolbar, .contract-variable-chip, .contract-template-choice, .app-dialog-card, .app-dialog-field, .notification-item, .user-dropdown-item, .document-row, .storage-row, .blacklist-row, .cashier-receipt-row) {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, .11) !important;
  color: #111827 !important;
}

html[data-theme="light"] :where(.settings-tab, .settings-check-row small, .contract-toolbar button, .contract-variable-chip, .contract-variables-close, .app-dialog-close, .notification-panel-close, .notification-sidebar-settings-icon, .calendar-icon-btn, .calendar-filter-btn, .task-filter-icon, .dashboard-action-btn, .dashboard-footer-btn, .stat-settings-btn, .circle-btn, .btn.secondary, .rail-style-btn, .sidebar-collapse-btn, .user-chip, .rail-btn, .rail-global-btn, .rail-footer-action) {
  color: #475569 !important;
}

html[data-theme="light"] :where(.settings-tab:hover, .settings-tab.active, .settings-tab[aria-selected="true"], .contract-toolbar button:hover, .contract-variable-chip:hover, .contract-variables-close:hover, .app-dialog-close:hover, .notification-panel-close:hover, .calendar-icon-btn:hover, .calendar-filter-btn:hover, .task-filter-icon:hover, .dashboard-action-btn:hover, .dashboard-footer-btn:hover, .stat-settings-btn:hover, .circle-btn:hover, .btn.secondary:hover, .rail-style-btn:hover, .sidebar-collapse-btn:hover, .user-chip:hover, .rail-btn:hover, .rail-global-btn:hover, .rail-footer-action:hover) {
  color: #111827 !important;
}

html[data-theme="light"] :where(svg, .nav-icon, .btn-icon, .settings-nav-icon, .settings-tab svg, .contract-toolbar button svg, .contract-variables-close svg, .app-dialog-close svg, .notification-panel-close svg, .calendar-icon-btn svg, .calendar-filter-btn svg, .task-filter-icon svg, .dashboard-action-btn svg, .dashboard-footer-btn svg, .stat-settings-btn svg, .circle-btn svg, .sidebar-collapse-btn svg, .rail-footer-action svg, .user-menu-caret svg) {
  stroke: currentColor !important;
  color: inherit !important;
}

html[data-theme="light"] :where(input, select, textarea, .search-input, .clients-search-input, .rail-search input, .team-chat-search input, .team-chat-composer input, .task-search-wrap input, .contract-editor-document) {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: rgba(15, 23, 42, .13) !important;
}

html[data-theme="light"] :where(input::placeholder, textarea::placeholder, .contract-editor-document:empty::before) {
  color: #94a3b8 !important;
}

html[data-theme="light"] :where(th, .calendar-weekdays span, .rail-heading, .sidebar-brand-subtitle, .rail-section-label) {
  color: #64748b !important;
}

html[data-theme="light"] :where(td, label, .field-label) {
  color: #334155 !important;
}


html[data-theme="light"] :where(.btn:not(.secondary):not(.light), button[type="submit"].btn, .team-chat-send-btn, .cashier-pay-btn, .cashier-primary-action, .dashboard-chart-cta) {
  color: #ffffff !important;
}

html[data-theme="light"] :where(.btn:not(.secondary):not(.light), button[type="submit"].btn, .team-chat-send-btn, .cashier-pay-btn, .cashier-primary-action, .dashboard-chart-cta) :where(svg, .btn-icon, .nav-icon) {
  color: #ffffff !important;
  stroke: currentColor !important;
}


html[data-theme="light"] :where(.ux-dashboard-hero-card, .dashboard-stat-card--hero, .stat-card:first-child, .cashier-shift-card),
html[data-theme="light"] :where(.ux-dashboard-hero-card, .dashboard-stat-card--hero, .stat-card:first-child, .cashier-shift-card) :where(h1, h2, h3, h4, p, span, small, strong, b, svg, .btn, .ux-kicker, .eyebrow) {
  color: #ffffff !important;
}

html[data-theme="light"] :where(.badge, .status-badge, .task-chip, .team-chat-task-chip, .calendar-event-chip, .dashboard-status-pill) svg {
  color: currentColor !important;
  stroke: currentColor !important;
}



#app.rail-collapsed .rail-search {
  display: none !important;
}

#app.rail-collapsed .rail-command-center {
  padding-bottom: 12px !important;
}

html[data-theme="light"] #app.rail-collapsed .rail-command-center {
  border-bottom-color: rgba(15,23,42,.10) !important;
}

/* Blacklist modal workflow */
.blacklist-action-card {
  align-self: start;
}

.blacklist-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.blacklist-action-tile {
  width: 100%;
  min-height: 162px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface-soft);
  color: var(--text);
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.blacklist-action-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--primary-rgb), .28);
  background: rgba(var(--primary-rgb), .08);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .12);
}

.blacklist-action-tile.danger:hover {
  border-color: rgba(var(--danger-rgb), .28);
  background: rgba(var(--danger-rgb), .10);
}

.blacklist-action-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 18px;
  font-weight: 950;
}

.blacklist-action-tile.danger .blacklist-action-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.blacklist-action-tile b {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.blacklist-action-tile small,
.blacklist-action-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.blacklist-action-note {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
}

.blacklist-manage-modal {
  width: min(920px, 100%);
}

.blacklist-modal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
}

.blacklist-modal-tab {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.blacklist-modal-tab:hover,
.blacklist-modal-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
}

.blacklist-modal-panel {
  display: none;
}

.blacklist-modal-panel.active {
  display: block;
}

.field-optional {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

:root[data-theme="dark"] .blacklist-action-tile,
:root[data-theme="dark"] .blacklist-action-note,
:root[data-theme="dark"] .blacklist-modal-tabs {
  background: rgba(255, 255, 255, .035);
  border-color: rgba(255, 255, 255, .08);
}

:root[data-theme="dark"] .blacklist-modal-tab.active,
:root[data-theme="dark"] .blacklist-modal-tab:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

html[data-theme="light"] .blacklist-action-tile,
html[data-theme="light"] .blacklist-action-note,
html[data-theme="light"] .blacklist-modal-tabs {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, .11) !important;
  color: #111827 !important;
}

html[data-theme="light"] .blacklist-action-tile b,
html[data-theme="light"] .blacklist-modal-tab.active,
html[data-theme="light"] .blacklist-modal-tab:hover {
  color: #111827 !important;
}

html[data-theme="light"] .blacklist-action-tile small,
html[data-theme="light"] .blacklist-action-note,
html[data-theme="light"] .field-optional {
  color: #64748b !important;
}

@media (max-width: 760px) {
  .blacklist-action-grid {
    grid-template-columns: 1fr;
  }

  .blacklist-action-tile {
    min-height: 132px;
  }
}

/* v12 component size normalization: consistent CRM controls, text, cards and tables */
:root {
  --ui-text-2xs: 10px;
  --ui-text-xs: 11px;
  --ui-text-sm: 12px;
  --ui-text: 13px;
  --ui-text-md: 14px;
  --ui-text-lg: 16px;
  --ui-text-xl: 18px;
  --ui-title-sm: 20px;
  --ui-title: 24px;
  --ui-title-lg: 30px;
  --ui-line-tight: 1.12;
  --ui-line: 1.42;
  --ui-control-xs: 32px;
  --ui-control-sm: 36px;
  --ui-control: 42px;
  --ui-control-lg: 46px;
  --ui-icon-btn: 40px;
  --ui-radius-control: 13px;
  --ui-radius-card: 20px;
  --ui-radius-panel: 24px;
  --ui-gap-xs: 6px;
  --ui-gap-sm: 8px;
  --ui-gap: 12px;
  --ui-gap-md: 16px;
  --ui-gap-lg: 20px;
  --ui-card-pad: 20px;
}

html {
  font-size: 14px;
}

body {
  font-size: var(--ui-text-md) !important;
  line-height: var(--ui-line) !important;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  line-height: 1.25 !important;
}

/* Text scale */
.app-page-breadcrumb,
.eyebrow,
th,
.rail-section-label,
.field-optional,
.notification-bell-badge,
.rail-unread-badge {
  font-size: var(--ui-text-xs) !important;
  line-height: 1.2 !important;
}

label,
.field-label,
.field-help,
.field-error,
.card-subtitle,
.card-description,
.page-subtitle,
.app-page-subtitle,
.muted,
.stat-hint,
.dashboard-stat-hint,
.dashboard-stat-footer,
.cashier-card-subtitle,
.cashier-kpi-label,
.cashier-kpi-hint,
.cashier-shift-meta,
.cashier-receipt-meta,
.task-meta,
.task-chip,
.team-chat-message-meta,
.team-chat-person-body span,
.user-role-label,
.user-email,
.client-document-meta,
.client-profile-item span,
.deal-card-meta,
.deal-mini-row span,
.calendar-month-head p,
.calendar-day-head p,
.calendar-side-empty,
.contract-helper-text,
.blacklist-action-note,
.blacklist-action-tile small {
  font-size: var(--ui-text-sm) !important;
  line-height: 1.4 !important;
}

.nav-label,
.rail-btn .nav-label,
.rail-global-btn .nav-label,
.rail-footer-action .nav-label,
td,
table,
.btn,
.top-nav-btn,
.auth-tab,
.filter-pill,
.calendar-view-tab,
.cashier-nav-pill,
.dashboard-action-btn,
.dashboard-footer-btn,
.dashboard-chart-cta,
.cashier-submit-btn,
.cashier-primary-action,
.team-chat-send-btn,
.team-chat-add-btn,
.team-chat-close-btn,
.deals-tab,
.deals-view-btn,
.blacklist-modal-tab,
.user-theme-btn,
.settings-tab,
.contract-toolbar button,
.contract-variable-chip,
.wizard-step-btn,
.cashier-pay-btn {
  font-size: var(--ui-text) !important;
}

.card-title,
.dashboard-card-title,
.dashboard-feed-title,
.dashboard-chart-title,
.settings-card-title,
.cashier-card-title,
.cashier-section-title,
.team-chat-panel-title,
.team-chat-task-card h4,
.team-chat-deal-card h3,
.task-column-title,
.task-insight-title,
.calendar-board-title,
.calendar-side-title,
.calendar-agenda-title,
.client-profile-title,
.client-documents-title,
.storage-title,
.blacklist-title,
.form-section-title,
.contract-variable-group h4,
.contract-template-choice-title {
  font-size: var(--ui-text-lg) !important;
  line-height: 1.2 !important;
  letter-spacing: -.025em !important;
}

.app-page-title,
.page-title,
.auth-title,
.cashier-title,
.tasks-page-title,
.deal-card-title-row h2,
.calendar-month-head h3,
.calendar-day-head h3 {
  font-size: clamp(22px, 2.2vw, var(--ui-title-lg)) !important;
  line-height: var(--ui-line-tight) !important;
  letter-spacing: -.045em !important;
}

.modal-title,
.wizard-title,
.settings-home-title,
.deal-card-title,
.client-profile-title-row h2 {
  font-size: var(--ui-title) !important;
  line-height: var(--ui-line-tight) !important;
  letter-spacing: -.04em !important;
}

.stat-value,
.dashboard-stat-value,
.dashboard-hero-value,
.dashboard-finance-value,
.dashboard-side-value,
.cashier-kpi-value,
.mini-kpi-value {
  line-height: .98 !important;
  letter-spacing: -.05em !important;
}

/* Form controls */
input,
select,
textarea,
.search-input,
.clients-search-input,
.rail-search input,
.cashier-search-field input,
.payment-search-field input,
.team-member-search-field input,
.team-chat-search input,
.team-chat-composer input,
.task-search-wrap input,
.dashboard-chart-select select,
.dashboard-select-control select,
.app-dialog-field input,
.app-dialog-field select,
.app-dialog-field textarea,
.auth-form input,
.cashier-shift-form input,
.cashier-payment-grid input,
.cashier-payment-grid select,
.client-wizard-form input,
.client-wizard-form select,
.client-wizard-form textarea,
.deal-wizard-form input,
.deal-wizard-form select,
.deal-wizard-form textarea,
.team-member-edit-form input,
.team-member-edit-form select,
.team-member-edit-form textarea,
.notification-create-card input,
.notification-create-card select,
.notification-create-card textarea,
.storage-upload-form input,
.storage-upload-form select,
.storage-upload-form textarea {
  min-height: var(--ui-control) !important;
  padding: 0 13px !important;
  border-radius: var(--ui-radius-control) !important;
  font-size: var(--ui-text) !important;
  font-weight: 600 !important;
}

textarea,
.app-dialog-field textarea,
.client-wizard-form textarea,
.deal-wizard-form textarea,
.notification-create-card textarea,
.storage-upload-form textarea {
  min-height: 96px !important;
  padding: 12px 13px !important;
  line-height: 1.45 !important;
}

.field,
.app-dialog-field {
  gap: var(--ui-gap-xs) !important;
}

.form-grid,
.client-wizard-form,
.deal-wizard-form,
.auth-form.grid,
.cashier-payment-grid,
.team-member-modal-grid,
.settings-tabs-form,
.storage-upload-form {
  gap: var(--ui-gap) !important;
}

.product-row,
.deals-filter-row,
.blacklist-control-grid,
.cashier-shift-forms {
  gap: var(--ui-gap-sm) !important;
}

/* Buttons and clickable controls */
.btn,
button.btn,
a.btn,
.top-nav-btn,
.auth-tab,
.filter-pill,
.calendar-view-tab,
.cashier-nav-pill,
.dashboard-action-btn,
.dashboard-footer-btn,
.dashboard-chart-cta,
.cashier-submit-btn,
.cashier-primary-action,
.team-chat-send-btn,
.team-chat-add-btn,
.team-chat-close-btn,
.deals-tab,
.deals-view-btn,
.blacklist-modal-tab,
.user-theme-btn,
.settings-tab,
.contract-toolbar button,
.contract-variable-chip,
.deal-schedule-table-toggle,
.inline-link-btn {
  min-height: var(--ui-control) !important;
  padding: 0 14px !important;
  border-radius: var(--ui-radius-control) !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
}

.btn.small,
.btn-row .btn.small,
.cashier-shortcut,
.badge,
.status-badge,
.task-chip,
.team-chat-task-chip,
.team-chat-source-chip,
.team-chat-deal-chip,
.calendar-event-chip,
.calendar-more-chip,
.chart-pill,
.dashboard-status-pill,
.deal-risk-badge,
.deal-transparency-pill,
.client-profile-tab,
.blacklist-tags .badge {
  min-height: var(--ui-control-xs) !important;
  padding: 0 10px !important;
  font-size: var(--ui-text-sm) !important;
  line-height: 1 !important;
  border-radius: 999px !important;
  align-items: center !important;
}

.circle-btn,
.notification-bell-btn,
.sidebar-collapse-btn,
.calendar-icon-btn,
.stat-settings-btn,
.task-filter-icon,
.dashboard-action-btn--icon,
.contract-variables-close,
.contract-template-modal-close,
.app-dialog-close,
.notification-panel-close,
.team-chat-voice-btn {
  width: var(--ui-icon-btn) !important;
  height: var(--ui-icon-btn) !important;
  min-width: var(--ui-icon-btn) !important;
  min-height: var(--ui-icon-btn) !important;
  padding: 0 !important;
  border-radius: var(--ui-radius-control) !important;
}

.rail-btn,
.rail-global-btn,
.rail-footer-action,
.rail-fast-action,
.rail-style-btn {
  min-height: var(--ui-control) !important;
  padding: 0 12px !important;
  border-radius: var(--ui-radius-control) !important;
  font-size: var(--ui-text) !important;
}

.btn-icon svg,
.nav-icon svg,
.circle-btn svg,
.sidebar-collapse-btn svg,
.calendar-icon-btn svg,
.stat-settings-btn svg,
.dashboard-action-btn svg,
.contract-toolbar button svg,
.team-chat-send-btn svg {
  width: 18px !important;
  height: 18px !important;
}

/* Cards, panels and modals */
.card,
.table-wrap,
.modal,
.auth-card,
.cashier-auth-card,
.notification-panel,
.user-dropdown,
.deal-action-dropdown,
.popover,
.dropdown,
.deal-card-section,
.deal-card-shell,
.wizard-main,
.wizard-side,
.dashboard-chart-card,
.dashboard-feed-card,
.dashboard-summary-card,
.dashboard-quick-actions-card,
.dashboard-stat-card,
.task-stat-card,
.task-toolbar,
.task-kanban-column,
.task-table-view,
.task-insight-card,
.calendar-stat-card,
.calendar-board-card,
.calendar-month-panel,
.calendar-day-panel,
.calendar-side-section,
.team-chat-sidebar,
.team-chat-panel,
.team-chat-task-form,
.team-chat-inline-note,
.team-chat-task-card,
.team-chat-deal-card,
.document-upload-card,
.settings-home-card,
.settings-card,
.settings-nav-card,
.settings-health-card,
.settings-data-card,
.interface-theme-card,
.workspace-mode-option,
.client-card-panel,
.client-profile-card,
.client-documents-card,
.client-list-mobile-card,
.storage-toolbar,
.storage-side-card,
.storage-files-card,
.storage-upload-card,
.storage-folder-card,
.cashbox-choice,
.cashbox-card,
.cashier-card,
.cashier-payment-card,
.cashier-task-card,
.cashier-chat-card,
.cashier-notification-card,
.blacklist-action-tile,
.blacklist-action-note,
.blacklist-warning {
  border-radius: var(--ui-radius-card) !important;
}

.card,
.modal,
.auth-card,
.cashier-auth-card,
.deal-card-section,
.wizard-main,
.wizard-side,
.dashboard-chart-card,
.dashboard-feed-card,
.dashboard-summary-card,
.dashboard-quick-actions-card,
.task-toolbar,
.task-insight-card,
.calendar-board-card,
.calendar-month-panel,
.calendar-day-panel,
.calendar-side-section,
.team-chat-panel,
.team-chat-task-form,
.document-upload-card,
.settings-home-card,
.settings-card,
.client-card-panel,
.client-profile-card,
.client-documents-card,
.storage-side-card,
.storage-files-card,
.storage-upload-card,
.cashbox-card,
.cashier-card,
.cashier-payment-card,
.cashier-task-card,
.cashier-chat-card,
.cashier-notification-card,
.blacklist-action-tile {
  padding: var(--ui-card-pad) !important;
}

.card-header,
.cashier-card-header,
.dashboard-feed-header,
.dashboard-chart-top,
.clients-list-toolbar,
.task-toolbar,
.calendar-toolbar,
.storage-toolbar,
.blacklist-toolbar,
.modal-header,
.app-dialog-header,
.notification-panel-header,
.team-chat-header,
.team-chat-sidebar-header {
  gap: var(--ui-gap) !important;
  margin-bottom: var(--ui-gap-md) !important;
}

.grid,
.dashboard-charts-grid,
.dashboard-bottom-grid,
.dashboard-stats-grid,
.deals-card-grid,
.deal-card-grid,
.client-card-grid,
.client-card-overview-grid,
.settings-card-grid,
.cashier-stack,
.cashier-payment-grid,
.calendar-workspace,
.team-chat-tasks-layout,
.storage-layout {
  gap: var(--ui-gap-md) !important;
}

/* Tables */
table,
.data-table,
.deal-table-main,
.dashboard-deals-table,
.dashboard-payments-table,
.clients-desktop-table,
.audit-diff-table {
  font-size: var(--ui-text) !important;
}

th,
td,
.data-table th,
.data-table td,
.deal-table-main th,
.deal-table-main td,
.dashboard-deals-table th,
.dashboard-deals-table td,
.dashboard-payments-table th,
.dashboard-payments-table td,
.clients-desktop-table th,
.clients-desktop-table td,
.audit-diff-table th,
.audit-diff-table td {
  padding: 11px 14px !important;
  line-height: 1.35 !important;
  vertical-align: middle !important;
}

th,
.data-table th,
.deal-table-main th,
.dashboard-deals-table th,
.dashboard-payments-table th,
.clients-desktop-table th,
.audit-diff-table th {
  font-size: var(--ui-text-xs) !important;
  font-weight: 850 !important;
  letter-spacing: .07em !important;
}

.table-actions {
  gap: var(--ui-gap-sm) !important;
}

.table-actions .btn,
.table-actions button {
  min-height: var(--ui-control-sm) !important;
  padding: 0 10px !important;
  font-size: var(--ui-text-sm) !important;
}

/* Dense lists */
.dashboard-deal-row,
.dashboard-reminder-row,
.dashboard-feed-row,
.client-document-item,
.client-profile-item,
.deal-mini-row,
.deal-timeline-item,
.wizard-summary-row,
.team-chat-person,
.team-chat-task-card,
.team-chat-deal-card,
.notification-item,
.cashier-receipt-row,
.cashier-task-row,
.blacklist-row,
.storage-row {
  min-height: var(--ui-control-lg) !important;
  padding: 12px 14px !important;
  border-radius: var(--ui-radius-control) !important;
}

.kpi-line,
.cashier-kpi-grid,
.dashboard-stat-side-stack,
.blacklist-stats-grid,
.task-stats-grid,
.calendar-stats {
  gap: var(--ui-gap) !important;
}

.mini-kpi,
.cashier-kpi,
.calendar-stat-card,
.task-stat-card,
.blacklist-stat-card {
  padding: 14px !important;
  border-radius: var(--ui-radius-card) !important;
}

/* Cashier workspace */
.cashier-pay-btn {
  min-height: var(--ui-control-lg) !important;
  padding: 0 18px !important;
  border-radius: var(--ui-radius-control) !important;
  font-size: var(--ui-text-md) !important;
  font-weight: 850 !important;
}

.cashier-amount-preview,
.cashier-shift-metric,
.cashier-summary-note,
.cashier-last-receipt {
  border-radius: var(--ui-radius-card) !important;
  padding: 14px !important;
}

/* Responsive density */
@media (max-width: 900px) {
  :root {
    --ui-card-pad: 16px;
    --ui-control: 40px;
    --ui-control-lg: 44px;
    --ui-icon-btn: 38px;
    --ui-radius-card: 18px;
  }

  body {
    font-size: var(--ui-text) !important;
  }

  .app-page-title,
  .page-title,
  .auth-title,
  .cashier-title,
  .tasks-page-title {
    font-size: clamp(20px, 6vw, 26px) !important;
  }

  #appAlert,
  .section.active {
    margin-inline: 14px !important;
  }

  th,
  td,
  .data-table th,
  .data-table td {
    padding: 10px 12px !important;
  }
}

@media (max-width: 620px) {
  :root {
    --ui-card-pad: 14px;
    --ui-gap-md: 12px;
    --ui-control: 40px;
  }

  .form-grid,
  .client-wizard-form,
  .deal-wizard-form,
  .cashier-payment-grid,
  .team-member-modal-grid,
  .blacklist-action-grid {
    grid-template-columns: 1fr !important;
  }

  .btn,
  button.btn,
  a.btn,
  .cashier-pay-btn,
  .cashier-submit-btn,
  .cashier-primary-action {
    min-height: 42px !important;
  }
}
