:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --panel-3: #f1f5f9;
  --ink: #111827;
  --muted: #737b8c;
  --line: #e4e8f0;
  --line-hot: rgba(232, 16, 35, 0.25);
  --accent: #ed1226;
  --accent-2: #ff2c3f;
  --sidebar: #070c13;
  --sidebar-2: #0d1520;
  --green: #22b846;
  --yellow: #ad6a00;
  --blue: #1c66f2;
  --purple: #7c3aed;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.1);
  --soft-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  /* No brand red glow — flat fills + tiny neutral depth only */
  --glow-brand: none;
  --glow-brand-active: none;
  --flat-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  /* Status LED only (not brand red) */
  --glow-led: 0 0 0 4px rgba(34, 184, 70, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 86% 8%, rgba(237, 18, 38, 0.12), transparent 28%),
    linear-gradient(90deg, rgba(237, 18, 38, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, #fff 0, var(--bg) 420px);
  background-size: auto, 64px 64px, auto;
  background-color: var(--bg);
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

h1,
h2,
p {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 0.95;
  font-weight: 950;
}

h2 {
  font-size: 20px;
  line-height: 1.15;
  font-weight: 950;
}

a {
  color: var(--blue);
  text-decoration: none;
  overflow-wrap: anywhere;
}

button,
.nav-button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--flat-shadow) !important;
  filter: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

button:hover,
.nav-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--flat-shadow) !important;
  filter: none !important;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none !important;
}

.shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  width: 100%;
  min-height: 100svh;
  margin: 0;
  background: linear-gradient(90deg, var(--sidebar) 0 300px, #ffffff 300px 100%);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100svh;
  overflow: hidden;
  padding: 24px 18px;
  background: linear-gradient(180deg, var(--sidebar-2), var(--sidebar));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.side-brand {
  display: flex;
  align-items: center;
  min-height: 74px;
  padding: 0 12px;
}

.side-logo {
  width: min(172px, 100%);
  height: 64px;
  object-fit: contain;
  object-position: left center;
  filter: none !important;
}

.tabs {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.tab {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid transparent;
  background: transparent;
  color: #aab3c2;
  font-size: 15px;
  font-weight: 850;
  box-shadow: none !important;
  filter: none !important;
  text-align: left;
}

.tab svg,
.quick-tile svg {
  display: inline-grid;
  width: 21px;
  height: 21px;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.icon-button-text svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button-text span {
  min-width: 0;
}

.tab:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none !important;
  filter: none !important;
  color: #fff;
}

.sidebar .tab {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0 20px;
  text-align: left;
  white-space: nowrap;
}

.sidebar .tab svg {
  justify-self: center;
}

.tab.active {
  border-color: rgba(237, 18, 38, 0.45);
  background: linear-gradient(135deg, rgba(237, 18, 38, 0.78), rgba(237, 18, 38, 0.36));
  color: #fff;
  box-shadow: none !important;
  filter: none !important;
}

.side-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.side-action {
  min-height: 44px;
  padding: 0 12px;
}

.side-action.ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: none;
}

.workspace,
.content {
  min-width: 0;
  width: 100%;
  min-height: 100svh;
  padding: 38px clamp(28px, 4vw, 64px) 42px;
  background:
    linear-gradient(90deg, rgba(237, 18, 38, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, #fff 0, #fff 92px, var(--bg) 100%);
  background-size: 68px 68px, auto;
  overflow: hidden;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
  min-width: 0;
}

.hero.compact h1 {
  max-width: 850px;
  font-size: clamp(40px, 4.8vw, 72px);
  line-height: 0.92;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 360px;
  max-width: 720px;
  padding-top: 18px;
}

.topbar,
.top-actions,
.panel-title,
.item-row {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  min-width: 0;
}

.hero-copy {
  display: block;
  max-width: 720px;
  margin-top: 10px;
  min-width: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.hero-copy > span,
.eyebrow,
.stats span,
label span,
small,
.status-line,
.panel-title span {
  color: var(--muted);
  font-size: 13px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 950;
  text-transform: uppercase;
}

.top-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 260px;
  max-width: 520px;
}

.system-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--soft-shadow);
}

.system-badge i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: var(--glow-led);
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  color: #fff;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  min-width: 0;
}

.route-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  min-height: 68px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 950;
  box-shadow: var(--soft-shadow);
  text-align: center;
  white-space: nowrap;
}

.route-card span {
  flex: 0 0 auto;
  color: currentColor;
  font-size: 22px;
}

.route-card.hot {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: var(--flat-shadow) !important;
  filter: none !important;
}

.route-card.dark {
  background: linear-gradient(135deg, #1c2430, #080d14);
  color: #fff;
}

.route-card.outline {
  min-height: 68px;
  border-color: var(--line-hot);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.86);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 14px 0 20px;
  min-width: 0;
}

.stats article,
.panel,
.item,
.quick-access {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
}

.stats article {
  min-height: 126px;
  padding: 20px 20px;
}

.stats span {
  display: block;
  font-weight: 800;
}

.stats strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1;
  font-weight: 950;
}

.quick-access {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 18px 0 0;
  padding: 14px;
  min-width: 0;
}

.quick-tile {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: center;
  gap: 9px;
  min-width: 0;
  min-height: 94px;
  padding: 10px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  text-align: center;
  box-shadow: none;
  white-space: normal;
}

.quick-tile span {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: currentColor;
  font-size: 22px;
  line-height: 1;
}

.quick-tile svg {
  width: 26px;
  height: 26px;
}

.quick-tile strong {
  font-size: 15px;
  line-height: 1.1;
}

.quick-access .tab {
  width: 100%;
  max-width: none;
  margin: 0;
  text-align: center;
}

.quick-access .tab svg {
  justify-self: center;
}

.quick-tile:hover {
  border-color: var(--line-hot);
  background: #fff5f6;
  color: var(--accent);
  box-shadow: none !important;
  filter: none !important;
}

.quick-tile.active {
  border-color: var(--line-hot);
  background: linear-gradient(180deg, #fff3f4, #fff);
  color: var(--accent);
  box-shadow: none !important;
  filter: none !important;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.panel {
  padding: 24px;
  margin-top: 14px;
}

.action-panel {
  border-color: var(--line-hot);
}

.panel-title {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.import-status {
  display: grid;
  gap: 8px;
  justify-items: end;
  max-width: min(900px, 100%);
  text-align: right;
}

.import-status .import-total {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.import-status .import-result {
  color: var(--accent, #0b6bcb);
  max-width: 42rem;
  line-height: 1.35;
  white-space: normal;
}

.import-status .import-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

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

.panel-actions select {
  width: 132px;
  min-height: 38px;
  padding: 0 10px;
}

.form,
.upload,
.list {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.settings-block {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.is-hidden,
.settings-block.is-hidden {
  display: none;
}

.count-remaining-block {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.count-remaining-block .section-label {
  margin: 0;
  font-size: 13px;
}

.choice-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-btn {
  min-width: 96px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.choice-btn:hover {
  border-color: rgba(237, 18, 38, 0.35);
}

.choice-btn.is-active {
  border-color: var(--accent);
  background: rgba(237, 18, 38, 0.1);
  color: var(--accent);
}

.edit-form .count-remaining-block {
  padding: 10px 12px;
}

.settings-block .section-label {
  margin: 0;
}

.category-chat-form {
  align-items: start;
}

.category-chat-form textarea {
  min-height: 132px;
}

.category-chats-list {
  max-height: 520px;
  overflow: auto;
}

.category-chat-item .item-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.settings-quick {
  margin: 0 0 18px;
}

.form-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.form-hint code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 11px;
}

.radio-group {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  display: grid;
  gap: 10px;
}

.radio-group legend {
  padding: 0 4px;
  font-size: 12px;
  color: var(--muted);
}

label.radio-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  font-size: 14px;
}

label.radio-option input[type="radio"] {
  width: auto;
  min-width: 0;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  accent-color: var(--accent);
}

label.radio-option input[type="radio"]:focus {
  border: none;
  box-shadow: none;
  outline: 2px solid rgba(237, 18, 38, 0.35);
  outline-offset: 2px;
}

label.radio-option span {
  flex: 0 1 auto;
}

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

label {
  display: grid;
  gap: 8px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: none;
}

textarea {
  min-height: 110px;
  padding: 14px;
  resize: vertical;
}

select[multiple] {
  min-height: 166px;
  padding: 8px;
}

option {
  padding: 8px;
  border-radius: 6px;
}

input[type="file"] {
  display: grid;
  align-items: center;
  padding: 12px 14px;
}

button[type="submit"] {
  min-height: 54px;
}

.mini-button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.danger-button {
  background: linear-gradient(135deg, #151b25, #05070b);
  box-shadow: none;
}

.item {
  display: grid;
  gap: 8px;
  padding: 16px;
  overflow-wrap: anywhere;
  background: var(--panel-2);
}

.item.compact {
  padding: 14px;
}

.item-row {
  justify-content: space-between;
  gap: 12px;
}

.balance-panel {
  margin-bottom: 12px;
}

.proxy-health-summary {
  margin-bottom: 12px;
}

.proxy-health-card.needs-renew {
  border-color: rgba(237, 18, 38, 0.28);
  background: linear-gradient(180deg, #fff, #fff7f7);
}

.proxy-health-card.ok {
  border-color: rgba(34, 184, 70, 0.24);
  background: linear-gradient(180deg, #fff, #f5fbf6);
}

.proxy-health-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.proxy-filter-row {
  margin: 12px 0 8px;
  flex-wrap: wrap;
}

.invite-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.invite-filter-row select {
  min-height: 36px;
  min-width: 140px;
  flex: 1 1 140px;
}

.warning-text {
  color: var(--yellow);
  font-weight: 700;
}

.proxy-item.status-expired {
  border-color: rgba(237, 18, 38, 0.35);
}

.proxy-item.status-today,
.proxy-item.status-soon {
  border-color: rgba(255, 176, 32, 0.45);
}

.proxy-renew-hint {
  color: var(--accent);
  font-weight: 800;
}

.proxy-renew {
  display: grid;
  grid-template-columns: minmax(150px, 220px) auto auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.proxy-renew select,
.proxy-renew button {
  min-height: 40px;
}

.proxy-renew button {
  padding: 0 14px;
}

.renew-status {
  min-width: 0;
  overflow-wrap: anywhere;
}

.proxy-geo-summary {
  border-color: rgba(28, 102, 242, 0.28);
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.proxy-geo-table {
  display: grid;
  gap: 6px;
}

.proxy-geo-row {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) repeat(3, minmax(90px, auto));
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.proxy-geo-row span {
  color: var(--muted);
  font-size: 13px;
}

.task-item {
  cursor: pointer;
}

.task-item.expanded {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(237, 18, 38, 0.16), var(--soft-shadow);
}

.task-details {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.edit-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.delivery-row {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.account-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(170px, 220px) minmax(220px, 1fr);
  gap: 12px;
  margin: 0 0 16px;
  align-items: end;
}

.account-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.account-toolbar input,
.account-toolbar select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.accounts-table {
  width: 100%;
  min-width: 1460px;
  border-collapse: collapse;
  font-size: 13px;
}

.accounts-table th,
.accounts-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.accounts-table th {
  color: var(--muted);
  background: var(--panel-3);
  font-weight: 950;
}

.accounts-table tbody tr:hover {
  background: #fff5f6;
}

.account-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--avatar-bg, var(--accent));
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.12);
}

.accounts-table td strong,
.accounts-table td small,
.accounts-table details small {
  display: block;
}

.accounts-table details {
  max-width: 320px;
}

.accounts-table summary {
  color: var(--blue);
  cursor: pointer;
  font-weight: 900;
}

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

.section-label {
  margin: 16px 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.badge.green {
  color: var(--green);
  background: rgba(34, 184, 70, 0.11);
}

.badge.red {
  color: var(--accent);
  background: rgba(237, 18, 38, 0.1);
}

.badge.yellow {
  color: var(--yellow);
  background: rgba(255, 176, 32, 0.14);
}

.badge.orange {
  color: #c45a00;
  background: rgba(255, 140, 0, 0.14);
}

.badge.blue {
  color: var(--blue);
  background: rgba(28, 102, 242, 0.1);
}

.badge.purple {
  color: var(--purple);
  background: rgba(124, 58, 237, 0.12);
}

.hint {
  color: var(--accent);
  font-weight: 900;
}

.error-text {
  color: var(--accent);
}

.info-text {
  color: var(--blue);
}

.empty {
  padding: 16px;
  border: 1px dashed var(--line-hot);
  border-radius: 8px;
  color: var(--muted);
  background: #fff8f9;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-panel {
  width: min(430px, 100%);
  display: grid;
  gap: 14px;
  padding: 26px;
  border: 1px solid var(--line-hot);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-logo {
  width: min(220px, 100%);
  height: 84px;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 1280px) {
  .shell {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .sidebar {
    padding: 20px 12px;
  }

  .workspace,
  .content {
    padding-inline: 22px;
  }

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

  .top-actions,
  .hero-actions {
    width: 100%;
    max-width: none;
    min-width: 0;
    justify-content: flex-start;
  }

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

  .route-card.outline {
    grid-column: 1 / -1;
  }

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

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

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
  }

  .tabs {
    grid-template-columns: repeat(4, 1fr);
  }

  .side-footer {
    grid-template-columns: repeat(2, 1fr);
  }

  .workspace,
  .content {
    padding: 22px 16px 28px;
  }

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

  .top-actions,
  .hero-actions {
    width: 100%;
    justify-content: flex-start;
    min-width: 0;
  }

  .route-grid,
  .stats,
  .quick-access,
  .form-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-card.outline {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .tabs,
  .route-grid,
  .stats,
  .quick-access,
  .form-grid,
  .category-grid,
  .proxy-renew {
    grid-template-columns: 1fr;
  }

  .top-actions,
  .panel-title,
  .panel-actions,
  .item-row {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-button,
  .system-badge {
    width: 100%;
  }

  .panel {
    padding: 16px;
  }
}

.sidebar .tab.tab-fast { color: #ffb4bb; }
.sidebar .tab.tab-fast.active,
.sidebar .tab.tab-fast:hover { color: #fff; background: linear-gradient(135deg, rgba(237,18,38,.35), rgba(255,44,63,.2)); }
.quick-tile-fast { border-color: rgba(237,18,38,.35); }
.quick-tile-fast strong { color: var(--accent); }
.fast-submit { background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important; border: 0 !important; color: #fff !important; }
#fastView .compact-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
#fastPhoneStatus {
  color: #ffc9ce;
  font-size: 0.9rem;
}
