:root {
  --brand: #852c84;
  --magenta: #d946ef;
  --cyan: #18e3ee;
  --blue: #6677ff;
  --ink: #f8fbff;
  --muted: #aeb8d8;
  --panel: rgba(19, 27, 55, .74);
  --panel-strong: rgba(22, 31, 67, .92);
  --stroke: rgba(214, 226, 255, .14);
  --shadow: 0 28px 90px rgba(0, 0, 0, .42);
  --font-heading: "PeydaWeb", "YekanBakh", Tahoma, Arial, sans-serif;
  --font-body: "YekanBakh", Tahoma, Arial, sans-serif;
}
@font-face {
  font-family: "PeydaWeb";
  src: url("/assets/fonts/PeydaWeb-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YekanBakh";
  src: url("/assets/fonts/YekanBakh-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: #0a1024;
  color: var(--ink);
}
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(circle at 12% 16%, rgba(133, 44, 132, .55), transparent 28%),
    radial-gradient(circle at 88% 22%, rgba(24, 227, 238, .24), transparent 24%),
    radial-gradient(circle at 54% 92%, rgba(217, 70, 239, .22), transparent 30%),
    linear-gradient(135deg, #0a1024 0%, #121932 48%, #080d1f 100%);
  z-index: -2;
}
button, input, textarea, select { font: inherit; }
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: .72;
}
h1, h2, h3, h4, h5, h6, .brand strong, .stat strong, th {
  font-family: var(--font-heading);
  font-weight: 500;
}
.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 288px 1fr;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
}
.shell-app {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: linear-gradient(145deg, rgba(13,19,43,.9), rgba(11,16,35,.78));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.sidebar {
  margin: 0;
  background: rgba(12, 18, 42, .72);
  border: 0;
  border-left: 1px solid var(--stroke);
  border-radius: 0;
  color: #fff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px);
}
.brand {
  display: grid;
  place-items: center;
  padding: 10px 8px 20px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: rgba(255,255,255,.06);
  border-radius: 14px;
  padding: 7px;
}
.brand strong { display: block; font-size: 22px; }
.brand span { color: var(--muted); font-size: 12px; }
nav { display: grid; gap: 8px; }
nav button, .panel button {
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    color .18s ease,
    opacity .18s ease;
}
nav button:not(:disabled):hover,
.panel button:not(:disabled):hover,
.route-chip:hover,
.seo-tab:hover,
.seo-subtab:hover,
.user-menu-trigger:hover,
.user-menu-item:hover,
.choice-item:hover {
  transform: translateY(-1px);
}
nav button:not(:disabled):active,
.panel button:not(:disabled):active,
.user-menu-trigger:not(:disabled):active,
.user-menu-item:not(:disabled):active,
.seo-tab:not(:disabled):active,
.seo-subtab:not(:disabled):active {
  transform: translateY(0) scale(.985);
}
nav button:focus-visible,
.panel button:focus-visible,
.route-chip:focus-visible,
.user-menu-trigger:focus-visible,
.user-menu-item:focus-visible,
.seo-tab:focus-visible,
.seo-subtab:focus-visible,
.choice-item:focus-within {
  outline: 0;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.12),
    0 0 0 4px rgba(24,227,238,.14);
}
nav button {
  justify-content: flex-start;
  color: #dbe5ff;
  background: transparent;
  padding: 12px;
}
nav button svg { width: 18px; height: 18px; }
nav button.active, nav button:hover {
  background: linear-gradient(90deg, rgba(133, 44, 132, .92), rgba(126, 87, 255, .36));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.11);
  transform: translateX(-2px);
}
.roles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.roles span {
  border: 1px solid rgba(255,255,255,.16);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
}
.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.content { padding: 24px; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(520px, 48vw);
}
.route-chip {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  color: #83f6ff;
  text-decoration: none;
  background: rgba(24,227,238,.09);
  border: 1px solid rgba(24,227,238,.24);
  border-radius: 14px;
  padding: 0 12px;
  direction: ltr;
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    color .18s ease;
}
.route-chip:hover {
  background: rgba(24,227,238,.14);
  border-color: rgba(24,227,238,.34);
  box-shadow: 0 10px 24px rgba(24,227,238,.12);
}
h1, h2, p { margin: 0; }
h1 { font-size: 28px; }
.topbar p { color: var(--muted); margin-top: 8px; }
.search {
  min-width: 300px;
  height: 44px;
  background: rgba(255,255,255,.055);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  backdrop-filter: blur(18px);
}
.search input { border: 0; outline: 0; width: 100%; background: transparent; color: #fff; }
.search input::placeholder { color: #95a0c2; }
.user-menu {
  position: relative;
}
.user-menu-trigger {
  height: 44px;
  padding: 6px 10px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.055);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: none;
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
}
.user-menu-trigger:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.2);
  box-shadow: 0 10px 24px rgba(0,0,0,.16);
}
.user-menu.open .user-menu-trigger {
  border-color: rgba(24,227,238,.3);
  box-shadow: inset 0 0 0 1px rgba(24,227,238,.12);
}
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.14);
}
.user-avatar-empty {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(133,44,132,.72), rgba(24,227,238,.18));
  font-family: var(--font-heading);
}
.user-menu-copy {
  display: grid;
  gap: 2px;
  text-align: right;
}
.user-menu-copy strong {
  font-family: var(--font-heading);
  font-size: 14px;
  line-height: 1.05;
}
.user-menu-copy span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}
.user-menu-caret {
  color: #95a0c2;
  font-size: 12px;
}
.user-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(18, 27, 61, .98);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  z-index: 20;
}
.user-menu-item {
  min-height: 40px;
  justify-content: flex-start;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.02);
  color: #f8fbff;
  box-shadow: none;
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    color .18s ease;
}
.user-menu-item:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.2);
  box-shadow: 0 10px 20px rgba(0,0,0,.14);
}
.user-menu-item.danger {
  color: #fecaca;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.stats.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.stats.compact .stat {
  padding: 12px;
}
.stats.compact .stat strong {
  font-size: 24px;
}
.stat, .panel {
  position: relative;
  background: linear-gradient(160deg, rgba(26,37,80,.78), rgba(15,22,50,.62));
  border: 1px solid var(--stroke);
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(0,0,0,.22);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease;
}
.stat:hover, .panel:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.24); }
.stat {
  padding: 18px;
  display: grid;
  gap: 10px;
}
.stat::before {
  content: "";
  position: absolute;
  inset: auto auto -32px -28px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cyan), transparent 65%);
  opacity: .22;
}
.stat svg { color: var(--cyan); }
.stat span { color: var(--muted); }
.stat strong { font-size: 30px; }
.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.grid.three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.stack { display: grid; gap: 18px; }
.panel { padding: 18px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 10, 24, .56);
  backdrop-filter: blur(10px);
}
.modal-card {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}
.user-form-modal {
  padding: 20px;
}
.user-detail-modal {
  width: min(920px, calc(100vw - 32px));
  padding: 20px;
}
.role-form-modal {
  width: min(980px, calc(100vw - 32px));
  padding: 20px;
}
.customer-form-modal {
  width: min(980px, calc(100vw - 32px));
  padding: 20px;
}
.customer-detail-modal,
.customer-archive-modal {
  width: min(1120px, calc(100vw - 32px));
  padding: 20px;
}
.panel h2 { font-size: 18px; }
.panel button {
  background: linear-gradient(135deg, var(--brand), #7c5cff);
  color: #fff;
  min-height: 38px;
  padding: 0 13px;
  box-shadow: 0 12px 30px rgba(133,44,132,.35);
  border: 1px solid rgba(255,255,255,.08);
}
.panel button:not(.ghost):not(.danger):not(:disabled):hover {
  background: linear-gradient(135deg, #953394, #8870ff);
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 16px 34px rgba(133,44,132,.42);
}
.panel button.ghost {
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: none;
}
.panel button.ghost:not(.danger):not(:disabled):hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.26);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
}
.panel button.danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, .28);
  background: rgba(248, 113, 113, .08);
}
.panel button.danger:not(:disabled):hover {
  background: rgba(248, 113, 113, .14);
  border-color: rgba(248, 113, 113, .42);
  box-shadow: 0 12px 24px rgba(127, 29, 29, .18);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.form-grid.compact-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.inline-form {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.crm-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.toolbar-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.toolbar-spacer {
  flex: 1 1 auto;
}
.empty-state {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  text-align: center;
  padding: 18px;
}
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}
th, td {
  text-align: right;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 13px 10px;
  white-space: nowrap;
}
th { color: #93a1c6; font-weight: 600; background: rgba(255,255,255,.025); }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(24,227,238,.12);
  color: #76f6ff;
  border: 1px solid rgba(24,227,238,.28);
  font-size: 12px;
}
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.department-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.department {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.045);
  border-radius: 14px;
  padding: 0 12px;
  color: #dbe5ff;
}
.department svg {
  color: var(--cyan);
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
}
.choice-item {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255,255,255,.04);
  color: #dbe5ff;
  cursor: pointer;
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
}
.choice-item:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.2);
  box-shadow: 0 10px 20px rgba(0,0,0,.12);
}
.choice-item input {
  width: auto;
  accent-color: var(--magenta);
}
.profile-upload {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.profile-upload img,
.profile-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
}
.profile-placeholder {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px dashed rgba(255,255,255,.22);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.profile-upload input {
  align-self: center;
}
.profile-upload small {
  grid-column: 2;
  color: var(--muted);
}
.profile-preview {
  margin-bottom: 14px;
}
.profile-thumb {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.065);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 14px;
}
.profile-thumb-empty {
  background: linear-gradient(135deg, rgba(133,44,132,.72), rgba(24,227,238,.18));
}
.policy-list {
  display: grid;
  gap: 10px;
}
.policy-list p {
  margin: 0;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.045);
  border-radius: 14px;
  color: #dbe5ff;
}
.policy-list strong {
  font-family: var(--font-heading);
  color: #fff;
}
.auth-note {
  margin-top: 14px;
}
.auth-debug-code {
  color: #83f6ff;
  font-family: var(--font-heading);
}
.timeline {
  display: grid;
  gap: 10px;
}
.timeline > div {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.timeline small {
  color: var(--muted);
}
.pipeline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.pipeline span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.1);
  color: #dbe5ff;
}
.pipeline .active {
  background: rgba(24,227,238,.12);
  border-color: rgba(24,227,238,.34);
  color: #84f6ff;
}
.convert-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.convert-step {
  min-height: 142px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.1);
}
.convert-step h3 {
  margin: 10px 0;
  font-size: 16px;
}
.convert-step p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
}
.form { display: grid; gap: 12px; }
label { display: grid; gap: 7px; color: var(--muted); }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255,255,255,.055);
  color: #fff;
}
select {
  min-height: 44px;
  cursor: pointer;
}
select option {
  color: #0f172a;
  background: #fff;
}
textarea { min-height: 92px; resize: vertical; }
.crm-filterbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(420px, 1.8fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
.crm-filterbar label {
  gap: 5px;
  font-size: 12px;
}
.crm-filterbar input,
.crm-filterbar select {
  min-height: 38px;
  border-radius: 12px;
  padding: 8px 11px;
}
.crm-search {
  align-self: end;
}
.crm-filter-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
}
.crm-page .table-wrap {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
}
.crm-page table {
  min-width: 920px;
}
.row-actions {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}
.row-actions button {
  min-height: 32px;
  padding: 0 10px;
}
.warning {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(251, 191, 36, .36);
  color: #fde68a;
  background: rgba(251, 191, 36, .1);
}
.warning p {
  margin: 0 0 6px;
}
.warning p:last-child {
  margin-bottom: 0;
}
.warning .table-wrap {
  margin-top: 10px;
  border-color: rgba(251, 191, 36, .2);
}
.compact-message {
  margin-bottom: 0;
}
.success {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(34, 197, 94, .32);
  color: #bbf7d0;
  background: rgba(34, 197, 94, .1);
}
.crm-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 14px;
}
.seo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.seo-tab {
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  padding: 0 14px;
  color: #dbe5ff;
  background: rgba(255,255,255,.045);
  cursor: pointer;
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    color .18s ease;
}
.seo-tab.active,
.seo-tab:hover {
  color: #fff;
  background: linear-gradient(135deg, rgba(133,44,132,.92), rgba(24,227,238,.16));
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 12px 24px rgba(133,44,132,.18);
}
.seo-subtabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
}
.seo-subtab {
  min-height: 36px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition:
    transform .18s ease,
    background .18s ease,
    color .18s ease,
    box-shadow .18s ease;
}
.seo-subtab.active,
.seo-subtab:hover {
  color: #fff;
  background: rgba(133,44,132,.76);
  box-shadow: 0 10px 20px rgba(133,44,132,.16);
}
.seo-tool-grid {
  display: grid;
  grid-template-columns: minmax(360px, .72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: start;
}
.seo-anchor-list {
  display: grid;
  gap: 10px;
}
.seo-anchor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.seo-anchor-head strong {
  font-family: var(--font-heading);
  color: #fff;
}
.seo-anchor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
}
.seo-anchor-row button {
  min-height: 44px;
}
.seo-html-input {
  min-height: 240px;
  direction: ltr;
  text-align: left;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.55;
}
.seo-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.seo-result-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.seo-result-metric {
  min-height: 84px;
  display: grid;
  align-content: center;
  gap: 6px;
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.14);
}
.seo-result-metric strong {
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1;
}
.seo-result-metric span {
  color: var(--muted);
}
.seo-result-metric.passed {
  color: #bbf7d0;
  background: linear-gradient(135deg, rgba(34,197,94,.18), rgba(255,255,255,.045));
  border-color: rgba(34,197,94,.34);
}
.seo-result-metric.failed {
  color: #fecaca;
  background: linear-gradient(135deg, rgba(248,113,113,.18), rgba(255,255,255,.045));
  border-color: rgba(248,113,113,.36);
}
.seo-check-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  min-width: 86px;
  border-radius: 999px;
  padding: 0 10px;
  font-family: var(--font-heading);
  font-size: 12px;
  border: 1px solid transparent;
}
.seo-check-status.passed {
  color: #bbf7d0;
  background: rgba(34,197,94,.13);
  border-color: rgba(34,197,94,.34);
}
.seo-check-status.failed {
  color: #fecaca;
  background: rgba(248,113,113,.13);
  border-color: rgba(248,113,113,.36);
}
.seo-check-message {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.seo-check-message button {
  min-height: 30px;
  padding: 0 10px;
}
.seo-image-evidence-modal {
  width: min(980px, calc(100vw - 32px));
  padding: 20px;
}
.seo-image-evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.seo-image-evidence-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
}
.seo-image-evidence-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.seo-image-evidence-meta {
  display: grid;
  gap: 5px;
}
.seo-image-evidence-meta strong {
  font-family: var(--font-heading);
}
.seo-image-evidence-meta small,
.seo-image-evidence-meta span {
  color: var(--muted);
  font-size: 12px;
}
.operator-quote {
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid rgba(217,70,239,.24);
  border-right: 4px solid var(--magenta);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(217,70,239,.12), rgba(255,255,255,.035));
  color: #f8fbff;
}
.operator-quote strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-heading);
  color: #f5d0fe;
}
.operator-quote p {
  color: #e9d5ff;
  line-height: 2;
}
.seo-score {
  min-width: 108px;
  min-height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  font-family: var(--font-heading);
  font-size: 27px;
}
.seo-score.low {
  color: #fecaca;
  background: rgba(248,113,113,.12);
  border-color: rgba(248,113,113,.32);
}
.seo-score.mid {
  color: #fde68a;
  background: rgba(251,191,36,.12);
  border-color: rgba(251,191,36,.32);
}
.seo-score.high {
  color: #bbf7d0;
  background: rgba(34,197,94,.12);
  border-color: rgba(34,197,94,.32);
}
.muted-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
  margin-top: 12px;
}
.url-text {
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.timeline { margin: 0; padding: 0 22px 0 0; display: grid; gap: 12px; }
.audit-list { display: grid; gap: 10px; }
.audit-list p {
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 12px;
}
.project-row {
  display: grid;
  grid-template-columns: 1fr 220px;
  align-items: center;
  gap: 18px;
}
.project-row p { color: var(--muted); margin-top: 8px; direction: ltr; text-align: right; }
.progress {
  height: 34px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
}
.progress strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
}
.ticket-card {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.ticket-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
}
.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(26,37,80,.86), rgba(15,22,50,.72));
  box-shadow: 0 28px 90px rgba(0,0,0,.34);
  backdrop-filter: blur(24px);
}
.login-logo {
  display: grid;
  place-items: center;
}
.login-logo img {
  width: 85%;
  height: 85%;
  object-fit: contain;
  border-radius: 20px;
  padding: 10px;
  background: rgba(255,255,255,.06);
  border: 0;
}
.login-card h1 {
  text-align: center;
  font-size: 25px;
}
.login-steps {
  display: grid;
  gap: 8px;
  margin: -4px 0 2px;
  padding: 0;
  list-style: none;
}
.login-steps li {
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255,255,255,.035);
  font-size: 13px;
  line-height: 1.75;
}
.login-steps li.active {
  color: #f8fbff;
  border-color: rgba(133, 44, 132, .45);
  background: rgba(133, 44, 132, .14);
}
.login-steps li.done {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, .32);
  background: rgba(34, 197, 94, .1);
}
.login-form-grid,
.login-field {
  display: grid;
  gap: 10px;
}
.login-field {
  color: var(--muted);
}
.login-field input {
  min-height: 48px;
}
.login-field input.is-ready {
  border-color: rgba(34, 197, 94, .45);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .1);
}
.login-code-timer {
  color: var(--muted);
  text-align: center;
}
.login-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.login-actions button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  cursor: pointer;
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    opacity .18s ease;
}
.login-actions .primary {
  background: linear-gradient(135deg, var(--brand), #7c5cff);
  box-shadow: 0 12px 30px rgba(133,44,132,.35);
}
.login-actions .primary:hover {
  background: linear-gradient(135deg, #953394, #8870ff);
  box-shadow: 0 16px 34px rgba(133,44,132,.42);
}
.login-actions .secondary {
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.16);
}
.login-actions .secondary:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.26);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
}
.login-actions .verify,
.login-actions .verify.ready {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  border: 1px solid rgba(187, 247, 208, .18);
  box-shadow: 0 12px 30px rgba(22, 163, 74, .28);
}
.login-actions .verify.ready:not(:disabled):hover {
  background: linear-gradient(135deg, #15803d, #2bd96b);
  box-shadow: 0 16px 34px rgba(22, 163, 74, .36);
}
.login-actions .verify:disabled {
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: none;
  color: rgba(255,255,255,.48);
}
@media (max-width: 920px) {
  .app { grid-template-columns: 1fr; }
  .shell-app { width: 100%; margin: 0; border-radius: 0; }
  .sidebar { margin: 12px; }
  .stats, .grid.two, .grid.three { grid-template-columns: 1fr; }
  .stats.compact, .convert-flow, .form-grid, .form-grid.compact-form, .crm-filterbar, .crm-filter-chips, .crm-hub-grid, .choice-grid, .seo-tool-grid, .seo-anchor-row, .seo-result-metrics { grid-template-columns: 1fr; }
  .topbar { align-items: stretch; flex-direction: column; }
  .topbar-actions { align-items: stretch; flex-direction: column; min-width: 0; width: 100%; }
  .route-chip { justify-content: flex-start; }
  .search { min-width: 0; width: 100%; }
  .project-row { grid-template-columns: 1fr; }
  .ticket-detail-head { grid-template-columns: 1fr; }
  .login-card { padding: 22px; }
  .login-actions { grid-template-columns: 1fr; }
}
