:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --text: #101827;
  --muted: #607086;
  --line: #dce4ee;
  --primary: #0b3b75;
  --primary-2: #0f5ed7;
  --accent: #ff8a1f;
  --success: #137a52;
  --danger: #c03434;
  --shadow: 0 18px 50px rgba(15, 34, 59, 0.12);
  --radius: 8px;
  color-scheme: light;
  font-family: Inter, Manrope, Onest, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  --bg: #07111f;
  --surface: #0d1b2f;
  --surface-2: #132641;
  --text: #eef5ff;
  --muted: #9eb0c6;
  --line: #263b58;
  --primary: #7ab3ff;
  --primary-2: #3f8cff;
  --accent: #ff9b3d;
  --success: #45c08a;
  --danger: #ff6b6b;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

#app {
  min-height: 100vh;
}

#app > * {
  animation: page-in 0.18s ease both;
}

body.is-routing #app > * {
  animation: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.shell {
  min-height: 100vh;
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.topnav {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 248, 251, 0.88);
  backdrop-filter: blur(18px);
}

[data-theme="dark"] .topnav {
  background: rgba(7, 17, 31, 0.9);
}

.nav-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  box-shadow: 0 10px 28px rgba(15, 94, 215, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tm-theme-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex: 0 0 48px;
  border-radius: 999px;
  cursor: pointer;
}

.tm-theme-toggle__checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.tm-theme-toggle__slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 94, 215, 0.24);
  border-radius: inherit;
  background: linear-gradient(135deg, #65b7ff, #b7dcff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  transition: background 0.22s ease, border-color 0.22s ease;
}

.tm-theme-toggle__slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
  transition: transform 0.22s ease;
}

.tm-theme-toggle__icon {
  position: absolute;
  top: 7px;
  z-index: 1;
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  pointer-events: none;
}

.tm-theme-toggle__icon svg {
  display: block;
  width: 14px;
  height: 14px;
}

.tm-theme-toggle__icon--moon {
  left: 7px;
  fill: #dbeafe;
}

.tm-theme-toggle__icon--sun {
  right: 7px;
  fill: #facc15;
  stroke: #facc15;
  stroke-width: 1.8;
  stroke-linecap: round;
  animation: tm-sun-spin 18s linear infinite;
}

.tm-theme-toggle__checkbox:checked ~ .tm-theme-toggle__slider {
  border-color: rgba(147, 197, 253, 0.25);
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.tm-theme-toggle__checkbox:checked ~ .tm-theme-toggle__slider::after {
  transform: translateX(20px);
}

.tm-theme-toggle__checkbox:checked ~ .tm-theme-toggle__icon--moon {
  fill: #93c5fd;
  animation: tm-moon-tilt 6s ease-in-out infinite;
}

.tm-theme-toggle__checkbox:focus-visible ~ .tm-theme-toggle__slider {
  outline: 2px solid var(--primary-2);
  outline-offset: 2px;
}

@keyframes tm-sun-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes tm-moon-tilt {
  0%,
  100% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(-10deg);
  }
}

.theme-switch {
  --toggle-size: 12px;
  --container-width: 5.625em;
  --container-height: 2.5em;
  --container-radius: 6.25em;
  --container-light-bg: #3d7eae;
  --container-night-bg: #1d1f2c;
  --circle-container-diameter: 3.375em;
  --sun-moon-diameter: 2.125em;
  --sun-bg: #f4d235;
  --moon-bg: #c4c9d1;
  --spot-color: #959db1;
  --circle-container-offset: calc((var(--circle-container-diameter) - var(--container-height)) / 2 * -1);
  --stars-color: #fff;
  --clouds-color: #f3fdff;
  --back-clouds-color: #aacadf;
  --transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
  --circle-transition: 0.3s cubic-bezier(0, -0.02, 0.35, 1.17);
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  font-size: var(--toggle-size);
}

.theme-switch,
.theme-switch *,
.theme-switch *::before,
.theme-switch *::after {
  box-sizing: border-box;
}

.theme-switch__checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-switch__container {
  position: relative;
  display: block;
  width: var(--container-width);
  height: var(--container-height);
  overflow: hidden;
  border-radius: var(--container-radius);
  background-color: var(--container-light-bg);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22), inset 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 1px rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.theme-switch__container::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}

.theme-switch__circle-container {
  position: absolute;
  left: var(--circle-container-offset);
  top: var(--circle-container-offset);
  z-index: 2;
  display: flex;
  width: var(--circle-container-diameter);
  height: var(--circle-container-diameter);
  border-radius: var(--container-radius);
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), 0 0 0 0.625em rgba(255, 255, 255, 0.1), 0 0 0 1.25em rgba(255, 255, 255, 0.1);
  transition: var(--circle-transition);
  pointer-events: none;
}

.theme-switch__sun-moon-container {
  position: relative;
  z-index: 2;
  width: var(--sun-moon-diameter);
  height: var(--sun-moon-diameter);
  margin: auto;
  overflow: hidden;
  border-radius: var(--container-radius);
  background-color: var(--sun-bg);
  box-shadow: 1px 1px 1px rgba(254, 255, 239, 0.61) inset, 0 -1px 1px #a1872a inset;
  filter: drop-shadow(1px 2px 2px rgba(0, 0, 0, 0.25));
  transition: var(--transition);
}

.theme-switch__moon {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background-color: var(--moon-bg);
  box-shadow: 1px 1px 1px rgba(254, 255, 239, 0.61) inset, 0 -1px 1px #969696 inset;
  transform: translateX(100%);
  transition: var(--transition);
}

.theme-switch__spot {
  position: absolute;
  top: 0.75em;
  left: 0.312em;
  width: 0.75em;
  height: 0.75em;
  border-radius: var(--container-radius);
  background-color: var(--spot-color);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) inset;
}

.theme-switch__spot:nth-of-type(2) {
  top: 0.937em;
  left: 1.375em;
  width: 0.375em;
  height: 0.375em;
}

.theme-switch__spot:nth-of-type(3) {
  top: 0.312em;
  left: 0.812em;
  width: 0.25em;
  height: 0.25em;
}

.theme-switch__clouds {
  position: absolute;
  bottom: -0.625em;
  left: 0.312em;
  display: block;
  width: 1.25em;
  height: 1.25em;
  border-radius: var(--container-radius);
  background-color: var(--clouds-color);
  box-shadow: 0.937em 0.312em var(--clouds-color), -0.312em -0.312em var(--back-clouds-color), 1.437em 0.375em var(--clouds-color), 0.5em -0.125em var(--back-clouds-color), 2.187em 0 var(--clouds-color), 1.25em -0.062em var(--back-clouds-color), 2.937em 0.312em var(--clouds-color), 2em -0.312em var(--back-clouds-color), 3.625em -0.062em var(--clouds-color), 2.625em 0 var(--back-clouds-color), 4.5em -0.312em var(--clouds-color), 3.375em -0.437em var(--back-clouds-color), 4.625em -1.75em 0 0.437em var(--clouds-color), 4em -0.625em var(--back-clouds-color), 4.125em -2.125em 0 0.437em var(--back-clouds-color);
  transition: var(--transition);
}

.theme-switch__stars-container {
  position: absolute;
  top: -100%;
  left: 0.312em;
  display: block;
  width: 2.75em;
  color: var(--stars-color);
  transition: var(--transition);
}

.theme-switch__stars-container svg {
  display: block;
  width: 100%;
}

.theme-switch__checkbox:checked + .theme-switch__container {
  background-color: var(--container-night-bg);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container {
  left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter));
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__moon {
  transform: translateX(0);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__clouds {
  bottom: -4.062em;
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__stars-container {
  top: 50%;
  transform: translateY(-50%);
}

.theme-switch {
  width: 74px;
  height: 40px;
  font-size: 1px;
}

.theme-switch__container {
  width: 74px;
  height: 40px;
  border: 1px solid rgba(15, 94, 215, 0.18);
  background:
    radial-gradient(circle at 23px 20px, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px),
    linear-gradient(135deg, rgba(15, 94, 215, 0.12), rgba(15, 94, 215, 0.04));
  box-shadow: none;
}

.theme-switch__container::before {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.52);
}

.theme-switch__clouds,
.theme-switch__stars-container,
.theme-switch__moon,
.theme-switch__spot {
  display: none;
}

.theme-switch__circle-container {
  top: 4px;
  left: 4px;
  width: 32px;
  height: 32px;
  background: white;
  box-shadow: 0 9px 22px rgba(15, 94, 215, 0.2);
}

.theme-switch__sun-moon-container {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  box-shadow: none;
  filter: none;
}

.theme-switch__sun-moon-container::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 -7px 0 -5px rgba(255, 255, 255, 0.82),
    0 7px 0 -5px rgba(255, 255, 255, 0.82),
    7px 0 0 -5px rgba(255, 255, 255, 0.82),
    -7px 0 0 -5px rgba(255, 255, 255, 0.82);
  transition: var(--transition);
}

.theme-switch__container::after {
  content: "Light";
  position: absolute;
  right: 10px;
  top: 50%;
  z-index: 1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-50%);
}

.theme-switch__checkbox:checked + .theme-switch__container {
  border-color: rgba(124, 148, 190, 0.22);
  background:
    radial-gradient(circle at 19px 15px, rgba(255, 255, 255, 0.78) 0 1px, transparent 2px),
    radial-gradient(circle at 27px 25px, rgba(255, 255, 255, 0.64) 0 1px, transparent 2px),
    linear-gradient(135deg, #0f172a, #1e3a8a);
}

.theme-switch__checkbox:checked + .theme-switch__container::after {
  content: "Dark";
  left: 10px;
  right: auto;
  color: rgba(255, 255, 255, 0.72);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container {
  left: 38px;
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__sun-moon-container {
  background: linear-gradient(135deg, #dbeafe, #93c5fd);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__sun-moon-container::before {
  inset: 7px 8px 8px 12px;
  background: transparent;
  box-shadow: inset -5px 0 0 1px rgba(15, 23, 42, 0.7);
}

.btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 14px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  box-shadow: 0 14px 32px rgba(15, 94, 215, 0.24);
}

.btn.accent {
  background: var(--accent);
  color: #111827;
}

.btn.ghost {
  border-color: var(--line);
  background: transparent;
}

.btn.danger {
  background: rgba(192, 52, 52, 0.12);
  color: var(--danger);
}

.notification-switches {
  display: grid;
  gap: 10px;
}

.notification-switch {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-2);
  cursor: pointer;
}

.notification-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.notification-switch__track {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.22);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.notification-switch__track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: white;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
  transition: transform 0.18s ease;
}

.notification-switch input:checked + .notification-switch__track {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 22px rgba(15, 94, 215, 0.18);
}

.notification-switch input:checked + .notification-switch__track::after {
  transform: translateX(20px);
}

.notification-switch strong,
.notification-switch small {
  display: block;
}

.notification-switch small {
  margin-top: 3px;
  color: var(--muted);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 68px;
  background:
    radial-gradient(circle at 75% 18%, rgba(15, 94, 215, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(15, 94, 215, 0.06));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: 36px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  background: var(--surface);
  font-size: 13px;
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: 0;
}

.lead {
  max-width: 700px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.mockup {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mockup-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 14px;
}

.mockup-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.pulse-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 94, 215, 0.08), transparent);
}

.score {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 50%;
  background: rgba(19, 122, 82, 0.12);
  color: var(--success);
  font-weight: 800;
}

.section {
  padding: 58px 0;
}

.section-title {
  margin: 0 0 12px;
  font-size: 32px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
  box-shadow: 0 8px 24px rgba(15, 34, 59, 0.06);
}

.tender-card {
  cursor: pointer;
  padding: 16px 18px;
}

.tender-card:hover {
  border-color: rgba(15, 94, 215, 0.35);
  box-shadow: var(--shadow);
}

.tender-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.tender-card .page-head {
  margin-bottom: 12px;
}

.tender-card p {
  margin-bottom: 12px;
}

.card.featured {
  border-color: var(--primary-2);
  box-shadow: var(--shadow);
}

.muted {
  color: var(--muted);
}

.kpi {
  font-size: 30px;
  font-weight: 800;
}

.tender-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.meta-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface-2);
}

.meta-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.meta-item strong {
  display: block;
  overflow-wrap: anywhere;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: start;
  gap: 22px;
  margin-bottom: 18px;
  padding: 24px;
}

.detail-title-block {
  min-width: 0;
}

.detail-hero h1 {
  max-width: 980px;
  margin: 14px 0 10px;
  font-size: clamp(28px, 3.3vw, 42px);
  line-height: 1.12;
}

.detail-summary {
  max-width: 980px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.detail-highlights {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.highlight-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-2);
}

.highlight-item.primary {
  border-color: rgba(15, 94, 215, 0.28);
  background: rgba(15, 94, 215, 0.08);
}

.highlight-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.highlight-item strong {
  display: block;
  font-size: 18px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 16px;
}

.detail-section h2 {
  margin: 0 0 18px;
  font-size: 20px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
  margin: 0;
}

.detail-list div {
  border-bottom: 1px solid var(--line);
  padding: 0 0 14px;
  margin-bottom: 14px;
}

.detail-list dt {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.detail-list dd {
  display: block;
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.description-box {
  color: var(--text);
  font-size: 17px;
  line-height: 1.65;
}

.action-panel {
  position: sticky;
  top: 96px;
  padding: 20px;
}

.action-panel .btn {
  width: 100%;
}

.checkout-shell {
  display: grid;
  gap: 18px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.checkout-main {
  display: grid;
  gap: 18px;
  padding: 28px;
}

.checkout-main h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
}

.plan-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.plan-summary div,
.freedom-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-2);
}

.plan-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.plan-summary strong {
  display: block;
  font-size: 18px;
}

.checkout-aside {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 12px;
}

.checkout-aside .btn {
  width: 100%;
}

.stat-list {
  display: grid;
  gap: 10px;
}

.stat-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.stat-list span {
  color: var(--muted);
}

.stat-list strong {
  text-align: right;
}

.support-admin-list {
  display: grid;
  gap: 12px;
}

.support-admin-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-2);
}

.support-admin-item p {
  margin: 6px 0;
  line-height: 1.45;
}

.support-admin-controls {
  display: grid;
  gap: 8px;
}

.support-note {
  min-height: 80px;
}

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

.client-support-layout {
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 14px;
}

.support-form {
  position: sticky;
  top: 94px;
}

.client-support-form {
  gap: 12px;
  padding: 18px;
}

.client-support-form .grid.cols-2 {
  grid-template-columns: 1fr;
  gap: 10px;
}

.client-support-form textarea {
  min-height: 118px;
}

.support-ticket-list {
  display: grid;
  gap: 14px;
}

.admin-ticket-list {
  max-width: 1120px;
}

.support-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.support-mini-grid div,
.ticket-info-grid div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-2);
}

.support-mini-grid span,
.ticket-info-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
}

.support-mini-grid strong,
.ticket-info-grid strong {
  font-size: 22px;
}

.ticket-mini-list {
  display: grid;
  gap: 8px;
}

.ticket-mini-item {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.ticket-mini-item:hover {
  border-color: rgba(15, 94, 215, 0.35);
  background: rgba(15, 94, 215, 0.05);
}

.ticket-mini-item span,
.ticket-mini-item small {
  color: var(--muted);
}

.ticket-desk {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.client-ticket-desk {
  grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
  gap: 14px;
}

.ticket-inbox {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.ticket-inbox-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.ticket-inbox-header h3 {
  margin: 0 0 4px;
}

.ticket-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}

.chip.active,
.chip:hover {
  border-color: rgba(15, 94, 215, 0.32);
  background: rgba(15, 94, 215, 0.08);
  color: var(--text);
}

.ticket-inbox-list {
  display: grid;
  gap: 8px;
  max-height: 690px;
  overflow-y: auto;
  padding-right: 3px;
}

.ticket-inbox-item {
  display: grid;
  gap: 7px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.ticket-inbox-item:hover,
.ticket-inbox-item.active {
  border-color: rgba(15, 94, 215, 0.38);
  box-shadow: 0 12px 28px rgba(15, 94, 215, 0.08);
}

.ticket-inbox-item.active {
  background: linear-gradient(180deg, rgba(15, 94, 215, 0.08), rgba(255, 255, 255, 0));
}

.ticket-inbox-top,
.ticket-inbox-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ticket-inbox-top span,
.ticket-inbox-preview,
.ticket-inbox-meta > span:not(.tag) {
  color: var(--muted);
  font-size: 13px;
}

.ticket-inbox-subject {
  font-weight: 800;
  line-height: 1.25;
}

.ticket-inbox-preview {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
}

.compact-head {
  margin-bottom: 6px;
}

.compact-head h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.ticket-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.ticket-detail {
  display: grid;
  gap: 16px;
  min-height: 640px;
}

.client-ticket-detail {
  min-height: 580px;
  align-content: start;
  gap: 12px;
}

.empty-ticket-detail {
  align-content: center;
  text-align: center;
}

.ticket-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.ticket-detail-header h2 {
  margin: 10px 0 6px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
}

.client-ticket-detail .ticket-detail-header {
  display: block;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.client-ticket-detail .ticket-detail-header h2 {
  margin: 9px 0 6px;
  font-size: clamp(22px, 2.4vw, 30px);
}

.client-ticket-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-ticket-summary span {
  display: grid;
  min-width: 132px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 11px;
  background: var(--surface-2);
}

.client-ticket-summary small {
  color: var(--muted);
  font-size: 12px;
}

.client-ticket-summary strong {
  font-size: 15px;
  line-height: 1.25;
}

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

.ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.ticket-head h3 {
  margin: 10px 0 6px;
  font-size: 21px;
  line-height: 1.25;
}

.ticket-thread {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-2);
}

.client-ticket-detail .ticket-thread {
  min-height: 300px;
  max-height: 46vh;
}

.ticket-message {
  width: min(82%, 760px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  background: var(--surface);
}

.ticket-message.other {
  justify-self: start;
  border-color: rgba(19, 122, 82, 0.22);
  background: rgba(19, 122, 82, 0.08);
}

.ticket-message.own {
  justify-self: end;
  border-color: rgba(15, 94, 215, 0.24);
  background: rgba(15, 94, 215, 0.08);
}

.ticket-message.system {
  justify-self: center;
  width: auto;
  max-width: 90%;
  color: var(--muted);
  background: transparent;
}

.ticket-message-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.ticket-message p {
  margin: 7px 0 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.ticket-reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.client-ticket-detail .ticket-reply-form {
  position: sticky;
  bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.support-reply {
  min-height: 92px;
}

.ticket-admin-panel {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.compact-empty {
  padding: 18px;
  min-height: auto;
}

.assistant-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.chat-card {
  display: grid;
  gap: 14px;
  min-height: 560px;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
}

.chat-bubble {
  max-width: 78%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  line-height: 1.5;
}

.chat-bubble.bot {
  align-self: flex-start;
  background: var(--surface-2);
}

.chat-bubble.user {
  align-self: flex-end;
  background: rgba(15, 94, 215, 0.1);
  border-color: rgba(15, 94, 215, 0.24);
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.assistant-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: grid;
  justify-items: end;
  gap: 12px;
}

.assistant-fab {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  box-shadow: 0 18px 42px rgba(15, 94, 215, 0.32);
  cursor: pointer;
  font-weight: 850;
}

.assistant-panel {
  width: min(420px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.assistant-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  background: var(--surface-2);
}

.assistant-panel-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.icon-btn {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.chat-card-compact {
  min-height: 0;
  padding: 14px;
}

.chat-card-compact .chat-messages {
  max-height: 330px;
}

.chat-card-compact .chat-bubble {
  max-width: 90%;
  font-size: 14px;
}

.assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 12px 14px 14px;
}

.chat-bubble.typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.chat-bubble.typing span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  animation: typing-dot 1s infinite ease-in-out;
}

.chat-bubble.typing span:nth-child(2) {
  animation-delay: 0.12s;
}

.chat-bubble.typing span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes typing-dot {
  0%, 80%, 100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.page-loading {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(238, 243, 248, 0.55));
  color: var(--muted);
}

[data-theme="dark"] .page-loading {
  background: linear-gradient(180deg, rgba(13, 27, 47, 0.72), rgba(19, 38, 65, 0.72));
}

.page-loading strong {
  color: var(--text);
  font-size: 20px;
}

.page-loading span {
  max-width: 360px;
  text-align: center;
}

.banter-loader {
  position: relative;
  width: 72px;
  height: 72px;
}

.banter-loader__box {
  float: left;
  position: relative;
  width: 20px;
  height: 20px;
  margin-right: 6px;
}

.banter-loader__box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 18px rgba(15, 94, 215, 0.22);
}

[data-theme="dark"] .banter-loader__box::before {
  background: linear-gradient(135deg, #dbeafe, #7ab3ff);
}

.banter-loader__box:nth-child(3n) {
  margin-right: 0;
  margin-bottom: 6px;
}

.banter-loader__box:nth-child(1)::before,
.banter-loader__box:nth-child(4)::before {
  margin-left: 26px;
}

.banter-loader__box:nth-child(3)::before {
  margin-top: 52px;
}

.banter-loader__box:last-child {
  margin-bottom: 0;
}

.banter-loader__box:nth-child(1) { animation: moveBox-1 4s infinite; }
.banter-loader__box:nth-child(2) { animation: moveBox-2 4s infinite; }
.banter-loader__box:nth-child(3) { animation: moveBox-3 4s infinite; }
.banter-loader__box:nth-child(4) { animation: moveBox-4 4s infinite; }
.banter-loader__box:nth-child(5) { animation: moveBox-5 4s infinite; }
.banter-loader__box:nth-child(6) { animation: moveBox-6 4s infinite; }
.banter-loader__box:nth-child(7) { animation: moveBox-7 4s infinite; }
.banter-loader__box:nth-child(8) { animation: moveBox-8 4s infinite; }
.banter-loader__box:nth-child(9) { animation: moveBox-9 4s infinite; }

.loader-ring {
  width: 42px;
  height: 42px;
  border: 4px solid var(--line);
  border-top-color: var(--primary-2);
  border-radius: 999px;
  animation: loader-spin 0.8s linear infinite;
}

.small {
  font-size: 13px;
}

@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes moveBox-1 {
  9.0909% { transform: translate(-26px, 0); }
  18.1818%, 27.2727% { transform: translate(0, 0); }
  36.3636% { transform: translate(26px, 0); }
  45.4545%, 54.5455%, 63.6364% { transform: translate(26px, 26px); }
  72.7273% { transform: translate(26px, 0); }
  81.8182% { transform: translate(0, 0); }
  90.9091% { transform: translate(-26px, 0); }
  100% { transform: translate(0, 0); }
}

@keyframes moveBox-2 {
  9.0909% { transform: translate(0, 0); }
  18.1818% { transform: translate(26px, 0); }
  27.2727% { transform: translate(0, 0); }
  36.3636% { transform: translate(26px, 0); }
  45.4545%, 54.5455%, 63.6364%, 72.7273% { transform: translate(26px, 26px); }
  81.8182%, 90.9091% { transform: translate(0, 26px); }
  100% { transform: translate(0, 0); }
}

@keyframes moveBox-3 {
  9.0909%, 18.1818% { transform: translate(-26px, 0); }
  27.2727% { transform: translate(0, 0); }
  36.3636%, 45.4545%, 54.5455%, 63.6364%, 72.7273% { transform: translate(-26px, 0); }
  81.8182% { transform: translate(-26px, -26px); }
  90.9091% { transform: translate(0, -26px); }
  100% { transform: translate(0, 0); }
}

@keyframes moveBox-4 {
  9.0909%, 18.1818% { transform: translate(-26px, 0); }
  27.2727% { transform: translate(-26px, -26px); }
  36.3636% { transform: translate(0, -26px); }
  45.4545% { transform: translate(0, 0); }
  54.5455%, 63.6364%, 72.7273% { transform: translate(0, -26px); }
  81.8182% { transform: translate(-26px, -26px); }
  90.9091% { transform: translate(-26px, 0); }
  100% { transform: translate(0, 0); }
}

@keyframes moveBox-5 {
  9.0909%, 18.1818%, 27.2727% { transform: translate(0, 0); }
  36.3636%, 45.4545%, 54.5455%, 63.6364%, 72.7273% { transform: translate(26px, 0); }
  81.8182% { transform: translate(26px, -26px); }
  90.9091% { transform: translate(0, -26px); }
  100% { transform: translate(0, 0); }
}

@keyframes moveBox-6 {
  9.0909% { transform: translate(0, 0); }
  18.1818%, 27.2727% { transform: translate(-26px, 0); }
  36.3636%, 45.4545%, 54.5455%, 63.6364% { transform: translate(0, 0); }
  72.7273% { transform: translate(0, 26px); }
  81.8182% { transform: translate(-26px, 26px); }
  90.9091% { transform: translate(-26px, 0); }
  100% { transform: translate(0, 0); }
}

@keyframes moveBox-7 {
  9.0909%, 18.1818%, 27.2727% { transform: translate(26px, 0); }
  36.3636% { transform: translate(0, 0); }
  45.4545% { transform: translate(0, -26px); }
  54.5455% { transform: translate(26px, -26px); }
  63.6364%, 72.7273% { transform: translate(0, -26px); }
  81.8182% { transform: translate(0, 0); }
  90.9091% { transform: translate(26px, 0); }
  100% { transform: translate(0, 0); }
}

@keyframes moveBox-8 {
  9.0909% { transform: translate(0, 0); }
  18.1818% { transform: translate(-26px, 0); }
  27.2727% { transform: translate(-26px, -26px); }
  36.3636%, 45.4545%, 54.5455%, 63.6364%, 72.7273% { transform: translate(0, -26px); }
  81.8182% { transform: translate(26px, -26px); }
  90.9091% { transform: translate(26px, 0); }
  100% { transform: translate(0, 0); }
}

@keyframes moveBox-9 {
  9.0909%, 18.1818% { transform: translate(-26px, 0); }
  27.2727% { transform: translate(0, 0); }
  36.3636% { transform: translate(-26px, 0); }
  45.4545%, 54.5455% { transform: translate(0, 0); }
  63.6364%, 72.7273% { transform: translate(-26px, 0); }
  81.8182% { transform: translate(-52px, 0); }
  90.9091% { transform: translate(-26px, 0); }
  100% { transform: translate(0, 0); }
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.activity-row {
  padding: 14px 18px;
}

.activity-row p {
  margin-bottom: 0;
}

.telegram-box {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface-2);
}

.telegram-box strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 20px;
}

.app-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 20px 14px;
}

.side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius);
  padding: 11px 12px;
  color: var(--muted);
}

.side-link.active,
.side-link:hover {
  background: var(--surface-2);
  color: var(--text);
}

.content {
  min-width: 0;
  padding: 26px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
}

.inline-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.inline-check input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--primary);
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--primary-2);
  box-shadow: 0 0 0 3px rgba(15, 94, 215, 0.14);
}

.topic-smart-field {
  position: relative;
}

.topic-live-suggestions {
  position: absolute;
  z-index: 8;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.topic-live-suggestions[hidden] {
  display: none;
}

.topic-live-suggestions button,
.suggestion-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.topic-live-suggestions button:hover,
.suggestion-card:hover {
  border-color: rgba(15, 94, 215, 0.38);
  background: rgba(15, 94, 215, 0.08);
  transform: translateY(-1px);
}

.topic-live-suggestions strong,
.suggestion-card strong {
  display: block;
  margin-bottom: 3px;
}

.topic-live-suggestions span,
.suggestion-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.topic-suggestion-box {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: linear-gradient(135deg, rgba(15, 94, 215, 0.08), rgba(255, 138, 31, 0.06));
}

.topic-suggestion-box p {
  margin: 4px 0 0;
}

.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: 328px;
  overflow-y: auto;
  padding-right: 4px;
}

.keyword-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 34px;
}

.keyword-hints button {
  border: 1px solid rgba(15, 94, 215, 0.18);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(15, 94, 215, 0.07);
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.keyword-hints button:hover {
  border-color: rgba(15, 94, 215, 0.42);
  background: rgba(15, 94, 215, 0.12);
  transform: translateY(-1px);
}

.keyword-hints.muted-hints button {
  border-color: rgba(255, 138, 31, 0.22);
  background: rgba(255, 138, 31, 0.08);
  color: var(--accent);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.tag.ok {
  background: rgba(19, 122, 82, 0.12);
  color: var(--success);
}

.reason-line {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.reason-grid {
  display: grid;
  gap: 12px;
}

.reason-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-2);
}

.reason-grid span {
  color: var(--muted);
  font-size: 12px;
}

.reason-grid strong {
  line-height: 1.45;
}

.admin-kpi {
  min-height: 108px;
}

.admin-summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.admin-summary-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(15, 34, 59, 0.06);
}

.admin-summary-item span,
.admin-summary-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.admin-summary-item strong {
  display: block;
  margin: 4px 0;
  font-size: 26px;
  line-height: 1;
}

.admin-service-strip,
.admin-system-actions,
.support-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-service-strip {
  margin-bottom: 18px;
}

.admin-system-actions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-support-overview {
  margin: 0 0 18px;
}

.admin-table table {
  min-width: 1120px;
}

.admin-table td {
  min-width: 150px;
}

.admin-table p {
  margin: 6px 0 0;
}

.admin-plan-select {
  min-width: 130px;
}

.admin-actions {
  display: grid;
  gap: 8px;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
}

.tender-filter-panel {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.result-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 20px 0 0;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.compact-stats {
  margin-bottom: 20px;
}

.compact-stats .card {
  min-height: 104px;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.health-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
  min-width: 0;
}

.health-grid span,
.health-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.health-grid strong {
  display: block;
  margin: 4px 0;
  overflow-wrap: anywhere;
}

.ok-text {
  color: var(--ok);
}

.warn-text {
  color: var(--warn);
}

.finance-selector {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.tender-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tender-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-2);
  cursor: pointer;
}

.tender-check strong,
.tender-check small {
  display: block;
  overflow-wrap: anywhere;
}

.tender-check small {
  margin-top: 4px;
  color: var(--muted);
}

.tag.warn {
  background: rgba(255, 138, 31, 0.16);
  color: #985100;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.7fr);
  gap: 16px;
}

.empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  padding: 28px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.mobile-only {
  display: none;
}

@media (max-width: 900px) {
  .hero-grid,
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .admin-summary-strip,
  .filter-panel,
  .health-grid,
  .support-admin-item,
  .tender-check-grid,
  .split,
  .app-layout {
    grid-template-columns: 1fr;
  }

  .detail-hero,
  .detail-layout,
  .checkout-grid,
  .assistant-layout,
  .suggestion-grid,
  .support-layout,
  .ticket-desk,
  .ticket-reply-form {
    grid-template-columns: 1fr;
  }

  .support-mini-grid,
  .ticket-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ticket-detail {
    min-height: auto;
  }

  .ticket-thread,
  .ticket-inbox-list {
    max-height: 520px;
  }

  .client-support-layout,
  .client-ticket-desk {
    gap: 12px;
  }

  .client-ticket-detail .ticket-thread {
    min-height: 260px;
    max-height: 520px;
  }

  .detail-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-panel,
  .checkout-aside,
  .support-form {
    position: static;
  }

  .tender-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar {
    position: sticky;
    top: 72px;
    z-index: 9;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px;
    scrollbar-width: none;
  }

  .sidebar::-webkit-scrollbar {
    display: none;
  }

  .side-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 20px, 1160px);
  }

  .page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-inner {
    min-height: 64px;
    align-items: center;
    gap: 10px;
  }

  .brand {
    min-width: 0;
    gap: 8px;
  }

  .brand span:last-child {
    overflow: hidden;
    max-width: 160px;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }

  .nav-actions {
    margin-left: auto;
    flex-wrap: nowrap;
  }

  .account-button {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .account-avatar {
    width: 28px;
    height: 28px;
  }

  .sidebar {
    top: 64px;
    padding: 8px 10px;
  }

  .side-link {
    padding: 9px 12px;
  }

  .content {
    padding: 18px 12px;
  }

  .support-mini-grid,
  .ticket-info-grid {
    grid-template-columns: 1fr;
  }

  .client-ticket-summary {
    display: grid;
    grid-template-columns: 1fr;
  }

  .client-ticket-summary span {
    min-width: 0;
  }

  .ticket-detail-header,
  .ticket-inbox-top,
  .ticket-inbox-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-ticket-detail .ticket-detail-header {
    padding-bottom: 10px;
  }

  .client-ticket-detail .ticket-reply-form {
    position: static;
    grid-template-columns: 1fr;
  }

  .ticket-message {
    width: 100%;
  }

  .hero {
    padding: 44px 0;
  }

  .hero h1 {
    font-size: 42px;
  }

  .tender-meta {
    grid-template-columns: 1fr;
  }

  .detail-list,
  .detail-highlights,
  .plan-summary,
  .filter-actions,
  .chat-form {
    grid-template-columns: 1fr;
  }

  .filter-actions .btn {
    width: 100%;
  }

  .chat-bubble {
    max-width: 100%;
  }

  .assistant-widget {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .assistant-panel {
    width: 100%;
  }

  .assistant-fab {
    width: 54px;
    height: 54px;
  }
}

.assistant-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  display: grid;
  justify-items: end;
  gap: 12px;
  pointer-events: none;
}

.assistant-widget > * {
  pointer-events: auto;
}

.assistant-fab {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 18px 44px rgba(15, 94, 215, 0.35);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.assistant-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 52px rgba(15, 94, 215, 0.42);
}

.assistant-fab svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.assistant-panel {
  position: fixed;
  top: 88px;
  right: 22px;
  bottom: 92px;
  width: min(430px, calc(100vw - 44px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(6, 24, 56, 0.22);
}

.assistant-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.assistant-panel-head strong {
  display: block;
  font-size: 18px;
}

.assistant-panel-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.chat-card-compact {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  padding: 0;
}

.chat-card-compact .chat-messages {
  max-height: none;
  overflow-y: auto;
  padding: 16px;
}

.message-row {
  display: grid;
  gap: 4px;
}

.message-row.from-user {
  justify-items: end;
}

.message-row.from-bot {
  justify-items: start;
}

.chat-bubble {
  overflow-wrap: anywhere;
}

.chat-card-compact .chat-bubble {
  max-width: 88%;
  border-radius: 14px;
  padding: 11px 13px;
  font-size: 14px;
  line-height: 1.45;
}

.chat-card-compact .chat-bubble.user {
  border-color: rgba(15, 94, 215, 0.28);
  background: linear-gradient(180deg, rgba(15, 94, 215, 0.14), rgba(15, 94, 215, 0.08));
}

.chat-card-compact .chat-bubble.bot {
  background: var(--surface-2);
}

.chat-bubble.bot strong {
  color: var(--text);
  font-weight: 850;
}

.chat-bubble.bot a {
  color: var(--primary);
  font-weight: 750;
  text-decoration: none;
}

.chat-bubble.bot a:hover {
  text-decoration: underline;
}

.chat-bubble.bot br {
  content: "";
  display: block;
  margin-top: 7px;
}

.message-status {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.message-status.failed {
  color: #b42318;
}

.chat-card-compact .chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 12px;
  background: var(--surface);
}

.chat-card-compact .chat-form .input {
  min-height: 46px;
}

.chat-card-compact .chat-form .btn {
  min-height: 46px;
}

.voice-btn {
  min-width: 78px;
  white-space: nowrap;
}

.voice-btn.listening {
  border-color: rgba(19, 122, 82, 0.38);
  background: rgba(19, 122, 82, 0.12);
  color: var(--success);
}

.message-voice {
  border: 0;
  padding: 1px 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}

.message-voice:hover {
  color: var(--primary-2);
}

.assistant-locked {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 12px;
  min-height: 260px;
  padding: 22px;
}

.assistant-locked svg {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: var(--primary-2);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.assistant-locked h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.assistant-locked p {
  margin: 0;
  line-height: 1.5;
}

.assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 12px 14px 14px;
  background: var(--surface-2);
}

.chat-bubble.typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.chat-bubble.typing em {
  font-style: normal;
}

/* Compact day/night switch requested by user, adapted to existing markup. */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 64px;
  height: 34px;
  font-size: 17px;
}

.theme-switch__checkbox {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.theme-switch__container {
  position: absolute;
  inset: 0;
  width: 64px;
  height: 34px;
  overflow: hidden;
  border: 0;
  border-radius: 30px;
  background-color: #73c0fc;
  cursor: pointer;
  box-shadow: none;
  transition: 0.4s;
}

.theme-switch__container::before,
.theme-switch__container::after {
  content: none;
}

.theme-switch__circle-container {
  position: absolute;
  left: 2px;
  bottom: 2px;
  top: auto;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 20px;
  background-color: #e8e8e8;
  box-shadow: none;
  transition: 0.4s;
}

.theme-switch__sun-moon-container {
  display: none;
}

.theme-switch__clouds {
  position: absolute;
  top: 6px;
  left: 36px;
  z-index: 1;
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #ffd43b;
  box-shadow:
    0 -9px 0 -7px #ffd43b,
    0 9px 0 -7px #ffd43b,
    9px 0 0 -7px #ffd43b,
    -9px 0 0 -7px #ffd43b,
    6px 6px 0 -7px #ffd43b,
    -6px -6px 0 -7px #ffd43b,
    6px -6px 0 -7px #ffd43b,
    -6px 6px 0 -7px #ffd43b;
  animation: rotate 15s linear infinite;
}

.theme-switch__stars-container {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 1;
  display: block;
  width: 24px;
  height: 24px;
  color: #73c0fc;
  animation: tilt 5s linear infinite;
}

.theme-switch__stars-container svg {
  display: none;
}

.theme-switch__stars-container::before {
  content: "";
  position: absolute;
  inset: 2px 4px 2px 2px;
  border-radius: 50%;
  background: #73c0fc;
  box-shadow: 6px 0 0 0 #e8e8e8;
}

.theme-switch__checkbox:checked + .theme-switch__container {
  background-color: #183153;
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container {
  left: 32px;
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__clouds {
  top: 6px;
  bottom: auto;
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__stars-container {
  top: 5px;
  transform: none;
}

@media (max-width: 560px) {
  .assistant-widget {
    right: 12px;
    bottom: 12px;
    left: auto;
  }

  .assistant-panel {
    top: 78px;
    right: 10px;
    bottom: 84px;
    left: 10px;
    width: auto;
  }

  .assistant-fab {
    width: 56px;
    height: 56px;
  }

  .chat-card-compact .chat-form {
    grid-template-columns: 1fr;
  }

  .voice-btn {
    width: 100%;
  }
}

.account-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.account-button {
  position: relative;
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.account-button:hover {
  transform: translateY(-1px);
  border-color: rgba(21, 96, 214, 0.35);
  box-shadow: 0 16px 34px rgba(15, 94, 215, 0.15);
}

.account-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.account-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid var(--bg);
  border-radius: 999px;
  background: #ffedd5;
  color: #9a3412;
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
}

.account-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 80;
  width: min(280px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.16);
  animation: account-menu-in 0.14s ease both;
}

.account-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 15px;
  width: 12px;
  height: 12px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--surface);
  transform: rotate(45deg);
}

.account-menu-user {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.account-menu-user strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-user span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-item {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 9px 14px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.account-menu-item:hover {
  background: var(--surface-2);
}

.account-menu-item-static {
  cursor: default;
}

.account-menu-item-static:hover {
  background: transparent;
}

.account-menu-item:last-child {
  border-bottom: 0;
}

.account-menu-item.danger {
  color: #b91c1c;
  font-weight: 700;
}

.account-menu .theme-switch {
  flex: 0 0 auto;
}

.account-menu .tm-theme-toggle {
  flex: 0 0 48px;
}

@keyframes account-menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.theme-switch {
  width: 54px;
  height: 30px;
  font-size: 16px;
}

.theme-switch__container {
  width: 54px;
  height: 30px;
  overflow: hidden;
  border: 1px solid rgba(2, 132, 199, 0.35);
  border-radius: 999px;
  background-color: #73c0fc;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.theme-switch__circle-container {
  left: 2px;
  bottom: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #f8fafc;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.theme-switch__clouds {
  top: 8px;
  left: 35px;
  width: 12px;
  height: 12px;
  overflow: visible;
  border-radius: 50%;
  background: #ffd43b;
  box-shadow: none;
}

.theme-switch__clouds::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: repeating-conic-gradient(#ffd43b 0deg 12deg, transparent 12deg 42deg);
}

.theme-switch__clouds::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #ffd43b;
}

.theme-switch__stars-container {
  top: 7px;
  left: 7px;
  width: 16px;
  height: 16px;
}

.theme-switch__stars-container::before {
  inset: 1px 4px 1px 1px;
  background: #73c0fc;
  box-shadow: 5px 0 0 0 #f8fafc;
}

.theme-switch__checkbox:checked + .theme-switch__container {
  border-color: rgba(24, 49, 83, 0.7);
  background-color: #183153;
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container {
  left: 28px;
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__clouds {
  top: 8px;
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__stars-container {
  top: 7px;
}

@media (max-width: 560px) {
  .account-menu {
    position: fixed;
    top: 70px;
    right: 12px;
    left: auto;
    width: min(280px, calc(100vw - 24px));
    max-height: calc(100dvh - 86px);
    overflow-y: auto;
    border-radius: 12px;
  }

  .account-menu::before {
    display: none;
  }

  .account-menu-item {
    min-height: 46px;
  }

  .account-menu .tm-theme-toggle {
    transform: none;
  }
}
