:root{
  --bg: #0f1110;
  --bg-soft: #161916;
  --bg-elevated: #1c211d;
  --panel: rgba(24, 29, 25, 0.92);
  --panel-strong: #202620;
  --panel-muted: #171b18;
  --text: #f3efe4;
  --text-strong: #fffaf0;
  --muted: #a69c87;
  --line: rgba(255, 247, 230, 0.09);
  --line-strong: rgba(255, 247, 230, 0.16);
  --accent: #3d7cff;
  --accent-strong: #67b2ff;
  --accent-muted: rgba(61, 124, 255, 0.18);
  --accent-soft: rgba(61, 124, 255, 0.08);
  --secondary: #7fdcff;
  --secondary-soft: rgba(127, 220, 255, 0.12);
  --good: #58c98d;
  --warn: #f0b35a;
  --bad: #f26a63;
  --brand: var(--accent);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 18px 50px rgba(0, 0, 0, 0.28);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

*{
  box-sizing:border-box;
}

html{
  color-scheme: dark;
}

body{
  margin:0;
  font-family:"Manrope","Segoe UI Variable","Segoe UI",sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 520px at 10% -10%, rgba(127, 220, 255, 0.12), transparent 60%),
    radial-gradient(1200px 680px at 110% 0%, rgba(61, 124, 255, 0.18), transparent 55%),
    linear-gradient(180deg, #0a0c0a 0%, #111310 44%, #0c0e0c 100%);
  min-height:100vh;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size:36px 36px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
  pointer-events:none;
  opacity:.45;
}

a{
  color:inherit;
  text-decoration:none;
}

button,
input,
select,
textarea{
  font:inherit;
}

.container{
  width:min(1440px, calc(100vw - 40px));
  margin:0 auto;
}

.app-shell,
.auth-shell{
  position:relative;
  z-index:1;
}

.topbar{
  position:sticky;
  top:0;
  z-index:40;
  border-bottom:1px solid var(--line);
  background:rgba(10, 12, 10, 0.72);
  backdrop-filter:blur(18px);
}

.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 0;
}

.brand-block{
  display:flex;
  align-items:center;
  gap:12px;
}

.logo{
  position:relative;
  display:grid;
  place-items:center;
  width:52px;
  height:52px;
  border-radius:18px;
  border:1px solid rgba(255, 247, 230, 0.1);
  background:linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.06);
}

.logo::after{
  content:"";
  position:absolute;
  inset:8px;
  border-radius:14px;
  background:linear-gradient(145deg, rgba(61,124,255,0.18), rgba(127,220,255,0.08));
}

.logo-dot{
  position:relative;
  z-index:1;
  width:16px;
  height:16px;
  border-radius:999px;
  background:radial-gradient(circle at 35% 30%, #dff4ff 0%, var(--accent-strong) 42%, #2461ff 100%);
  box-shadow:0 0 24px rgba(61, 124, 255, 0.6);
}

.brand-copy{
  display:flex;
  flex-direction:column;
  gap:4px;
  max-width:420px;
}

.brand-kicker,
.eyebrow{
  font-size:11px;
  line-height:1;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--secondary);
  font-weight:800;
}

.brand-title{
  font-family:"Space Grotesk","Manrope",sans-serif;
  font-weight:700;
  font-size:22px;
  line-height:1.1;
  color:var(--text-strong);
}

.brand-sub{
  font-size:12px;
  line-height:1.4;
  color:var(--muted);
}

.pill,
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:8px 12px;
  min-height:34px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,0.04);
  color:var(--text);
  font-size:12px;
  font-weight:800;
  letter-spacing:.02em;
}

.pill{
  background:linear-gradient(135deg, rgba(126,200,184,0.14), rgba(217,164,65,0.14));
  border-color:rgba(255,247,230,0.12);
}

.badge.good{
  border-color:rgba(88, 201, 141, 0.28);
  background:rgba(88, 201, 141, 0.12);
  color:#d8ffeb;
}

.badge.warn{
  border-color:rgba(240, 179, 90, 0.28);
  background:rgba(240, 179, 90, 0.12);
  color:#fff0d5;
}

.badge.bad{
  border-color:rgba(242, 106, 99, 0.28);
  background:rgba(242, 106, 99, 0.12);
  color:#ffe0df;
}

.topbar-tools{
  display:flex;
  align-items:center;
  gap:14px;
  flex:1;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.topbar-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-left:auto;
}

.field-card,
.field-stack{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.field-card{
  min-width:340px;
  padding:14px 16px;
  border-radius:var(--radius-md);
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
}

.topbar-field{
  max-width:520px;
  flex:1;
}

.field-label{
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:#bfd5ff;
}

.field-help,
.small,
.muted{
  color:var(--muted);
}

.small{
  font-size:12px;
  line-height:1.5;
}

.muted{
  font-size:14px;
  line-height:1.6;
}

.field-inline{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.field-stack-full{
  width:100%;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:46px;
  padding:12px 18px;
  border:0;
  border-radius:14px;
  cursor:pointer;
  font-weight:800;
  letter-spacing:.02em;
  color:#081321;
  background:linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow:0 14px 36px rgba(61, 124, 255, 0.24);
  transition:transform .18s ease, box-shadow .18s ease, opacity .18s ease, background .18s ease;
}

.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 18px 42px rgba(61, 124, 255, 0.3);
}

.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}

.btn.ghost{
  color:var(--text);
  background:rgba(255,255,255,0.02);
  border:1px solid var(--line);
  box-shadow:none;
}

.btn.good{
  color:#05110b;
  background:linear-gradient(135deg, #69dba1, #9ef1bf);
  box-shadow:0 14px 36px rgba(88, 201, 141, 0.2);
}

.btn.bad{
  color:#fff4f3;
  background:linear-gradient(135deg, #c54843, #f26a63);
  box-shadow:0 14px 36px rgba(242, 106, 99, 0.22);
}

.btn.tab{
  min-height:44px;
}

.input{
  width:100%;
  min-height:46px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(8, 10, 9, 0.82);
  color:var(--text);
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.input:focus{
  border-color:rgba(61, 124, 255, 0.42);
  box-shadow:0 0 0 4px rgba(61, 124, 255, 0.14);
  background:rgba(9, 12, 10, 0.96);
}

.input::placeholder{
  color:#847a67;
}

textarea.input{
  min-height:120px;
  resize:vertical;
}

.workspace{
  display:grid;
  grid-template-columns:minmax(300px, 340px) minmax(0, 1fr);
  gap:18px;
  align-items:start;
  padding:22px 0 40px;
}

.sidebar{
  position:sticky;
  top:96px;
  display:flex;
  flex-direction:column;
  gap:14px;
  min-height:calc(100svh - 120px);
}

.sidebar-panel,
.site-list-wrap,
.card{
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  background:linear-gradient(180deg, rgba(24,29,25,0.88), rgba(20,24,21,0.94));
  box-shadow:var(--shadow-md);
}

.sidebar-panel,
.site-list-wrap,
.card{
  padding:18px;
}

.side-title{
  font-size:19px;
  font-weight:800;
  color:var(--text-strong);
}

.side-sub{
  margin-top:8px;
  font-size:14px;
  line-height:1.6;
  color:var(--muted);
}

.section-caption{
  margin-bottom:12px;
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:#a8c4ff;
  font-weight:800;
}

.site-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:calc(100svh - 320px);
  overflow:auto;
  padding-right:4px;
}

.site-item{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:14px 15px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.04);
  background:rgba(255,255,255,0.02);
  cursor:pointer;
  transition:transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.site-item:hover{
  transform:translateY(-1px);
  border-color:var(--line-strong);
  background:rgba(255,255,255,0.04);
}

.site-item.active{
  border-color:rgba(61, 124, 255, 0.34);
  background:linear-gradient(180deg, rgba(61, 124, 255, 0.16), rgba(61, 124, 255, 0.06));
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.05), 0 18px 40px rgba(0,0,0,0.18);
}

.site-item-top,
.site-meta-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.site-name{
  font-size:15px;
  font-weight:800;
  color:var(--text-strong);
}

.site-origin{
  margin-top:4px;
  font-size:12px;
  line-height:1.45;
  color:var(--muted);
  word-break:break-word;
}

.site-state-pill{
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:84px;
  min-height:30px;
  padding:6px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.site-state-pill.is-active{
  color:#d6ffea;
  background:rgba(88, 201, 141, 0.12);
  border:1px solid rgba(88, 201, 141, 0.25);
}

.site-state-pill.is-disabled{
  color:#ffe5e3;
  background:rgba(242, 106, 99, 0.12);
  border:1px solid rgba(242, 106, 99, 0.25);
}

.site-code{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.06);
  font-size:11px;
  color:#bfd5ff;
}

.site-item-add{
  gap:10px;
  align-items:center;
  justify-content:center;
  text-align:center;
  min-height:110px;
  border:1px dashed rgba(61, 124, 255, 0.35);
  background:linear-gradient(180deg, rgba(61, 124, 255, 0.14), rgba(61, 124, 255, 0.05));
}

.site-add-icon{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  border-radius:14px;
  background:rgba(255,255,255,0.08);
  color:var(--text-strong);
  font-size:24px;
  font-weight:700;
}

.site-add-title{
  font-size:16px;
  font-weight:800;
  color:var(--text-strong);
}

.main{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.site-hero{
  display:block;
  padding:18px 22px;
  overflow:hidden;
  position:relative;
}

.site-hero::before{
  content:"";
  position:absolute;
  inset:auto -10% -40% auto;
  width:320px;
  height:320px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(61,124,255,0.18), transparent 65%);
  pointer-events:none;
}

.site-hero-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.site-hero h1,
.site-hero h2,
.tabs-topbar h2,
.section-head h2,
.auth-intro h1,
.auth-panel h2{
  margin:10px 0 0;
  font-family:"Space Grotesk","Manrope",sans-serif;
  font-weight:700;
  line-height:1.05;
  color:var(--text-strong);
}

.site-hero h1{
  font-size:30px;
}

.site-subtitle{
  margin:12px 0 0;
  max-width:880px;
}

.hero-chip{
  display:inline-flex;
  align-items:center;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.04);
  font-size:12px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:#c8dcff;
}

.site-hero-aside{
  display:grid;
  gap:12px;
  align-content:start;
}

.hero-aside-card,
.kpi,
.nested-card,
.report-kpi,
.table-card,
.integration-block,
.empty-state,
.notice{
  border:1px solid rgba(255,255,255,0.06);
  border-radius:18px;
  background:rgba(255,255,255,0.03);
}

.hero-aside-card{
  padding:16px;
}

.aside-label,
.section-title{
  font-size:15px;
  font-weight:800;
  color:var(--text-strong);
}

.aside-text{
  margin-top:8px;
  font-size:13px;
  line-height:1.6;
  color:var(--muted);
}

.section-head,
.tabs-topbar,
.panel-toolbar,
.auth-panel-head,
.modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.section-head-meta{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.kpi-shell{
  padding:22px;
}

.kpis,
.report-kpis{
  display:grid;
  gap:14px;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  margin-top:18px;
}

.kpi,
.report-kpi{
  padding:18px;
}

.kpi .label,
.report-kpi .label{
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#a8c4ff;
  font-weight:800;
}

.kpi .value,
.report-kpi .value{
  margin-top:10px;
  font-family:"Space Grotesk","Manrope",sans-serif;
  font-size:34px;
  line-height:1;
  font-weight:700;
  color:var(--text-strong);
}

.tabs-shell{
  padding:22px;
}

.tabs-note{
  max-width:520px;
}

.tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.tab{
  min-height:44px;
  padding:10px 16px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,0.02);
  color:var(--text);
  font-weight:800;
  cursor:pointer;
  transition:border-color .18s ease, background .18s ease, transform .18s ease;
}

.tab:hover{
  transform:translateY(-1px);
  border-color:var(--line-strong);
}

.tab.active{
  color:#071221;
  border-color:transparent;
  background:linear-gradient(135deg, rgba(61,124,255,0.95), rgba(103,178,255,0.95));
}

.global-phone-filter,
.panel-toolbar{
  margin-top:18px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:20px;
  background:linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
}

.global-phone-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.tab-panels{
  display:flex;
  flex-direction:column;
  gap:18px;
  margin-top:18px;
}

.tab-panel{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.filter-actions{
  justify-content:flex-end;
}

.input-date{
  max-width:180px;
}

.toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,0.04);
  font-size:12px;
  font-weight:800;
  color:var(--text);
}

.toggle input{
  accent-color:var(--accent);
}

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

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

.nested-card{
  padding:18px;
}

.stat-list,
.compare-table,
.entity-list,
.blacklist-list,
.logs-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:14px;
}

.stat-item,
.compare-row,
.entity-row,
.blacklist-item,
.log-entry{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:14px 0;
  border-bottom:1px solid rgba(255,255,255,0.06);
}

.stat-item:last-child,
.compare-row:last-child,
.entity-row:last-child,
.blacklist-item:last-child,
.log-entry:last-child{
  border-bottom:0;
  padding-bottom:0;
}

.stat-item:first-child,
.compare-row:first-child,
.entity-row:first-child,
.blacklist-item:first-child,
.log-entry:first-child{
  padding-top:0;
}

.stat-value,
.entity-title,
.detail-title{
  font-size:15px;
  font-weight:800;
  color:var(--text-strong);
}

.stat-meta,
.entity-meta,
.detail-meta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.report-kpis{
  grid-template-columns:repeat(6, minmax(0, 1fr));
}

.report-bar{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
  margin-top:18px;
}

.bar{
  display:flex;
  align-items:center;
  height:14px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(255,255,255,0.05);
}

.bar-fill{
  height:100%;
  border-radius:inherit;
}

.bar-allow{background:linear-gradient(90deg, rgba(88,201,141,0.95), rgba(108,219,158,0.7))}
.bar-challenge{background:linear-gradient(90deg, rgba(240,179,90,0.95), rgba(255,214,143,0.7))}
.bar-deny{background:linear-gradient(90deg, rgba(242,106,99,0.95), rgba(255,154,148,0.7))}
.bar-block{background:linear-gradient(90deg, rgba(208,80,78,0.85), rgba(242,106,99,0.55))}

.compare-row{
  display:grid;
  grid-template-columns:minmax(0, 1.2fr) repeat(3, minmax(72px, auto)) minmax(160px, 1fr);
  align-items:center;
}

.compare-bar{
  height:10px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(255,255,255,0.05);
}

.compare-bar > div{
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg, rgba(242,106,99,0.9), rgba(240,179,90,0.8));
}

.table-card{
  padding:12px;
}

.table-wrap{
  width:100%;
  overflow:auto;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.05);
}

.table{
  width:100%;
  border-collapse:collapse;
  min-width:1100px;
}

.table th,
.table td{
  padding:14px 12px;
  border-bottom:1px solid rgba(255,255,255,0.06);
  text-align:left;
  font-size:13px;
  vertical-align:top;
}

.table th{
  position:sticky;
  top:0;
  background:rgba(24,29,25,0.96);
  color:#bfd5ff;
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  z-index:1;
}

.collapsible{
  overflow:hidden;
}

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

.collapsible-title{
  margin-top:10px;
  font-family:"Space Grotesk","Manrope",sans-serif;
  font-size:28px;
  font-weight:700;
  color:var(--text-strong);
}

.collapsible-content{
  margin-top:18px;
}

.collapsible.collapsed .collapsible-content{
  display:none;
}

.install-card,
.integration-panel{
  padding:22px;
}

.install-grid,
.integration-grid,
.modal-grid,
.auth-form-grid{
  display:grid;
  gap:14px;
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.install-panel,
.integration-block{
  padding:18px;
}

.install-panel{
  border:1px solid rgba(255,255,255,0.06);
  border-radius:18px;
  background:rgba(255,255,255,0.03);
}

.install-panel.is-full,
.integration-block.is-full{
  grid-column:1 / -1;
}

.code-block,
.code-area{
  width:100%;
  min-height:180px;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.06);
  background:#0a0c0a;
  color:#f6f0e4;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:12px;
  line-height:1.6;
  resize:vertical;
}

.code-toolbar{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin-top:12px;
  flex-wrap:wrap;
}

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

.mono-input{
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.site-action-bar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:18px;
}

.integration-panel{
  margin-top:14px;
}

.integration-note{
  margin-top:12px;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
}

.integration-actions,
.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}

.integration-helper{
  margin-top:10px;
  font-size:12px;
  line-height:1.6;
  color:var(--muted);
}

.field-checkbox-grid,
.permissions-grid{
  display:grid;
  gap:10px;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  margin-top:12px;
}

.entity-row.is-active{
  border-radius:18px;
  padding:14px;
  margin:-14px -14px 0;
  background:rgba(61, 124, 255, 0.08);
  border:1px solid rgba(61, 124, 255, 0.2);
}

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

.empty-state.compact{
  padding:14px;
}

.blacklist-item-main,
.log-entry-main{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}

.log-payload{
  margin-top:12px;
  width:100%;
}

.log-entry{
  flex-direction:column;
}

.blacklist-item .detail-actions{
  margin-top:0;
}

.profile-grid,
.detail-shell{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.detail-panel{
  padding:16px;
}

.detail-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

.notice{
  margin-top:14px;
  padding:12px 14px;
}

.notice-error{
  border-color:rgba(242, 106, 99, 0.25);
  background:rgba(242, 106, 99, 0.08);
  color:#ffd9d7;
}

.notice-success{
  border-color:rgba(88, 201, 141, 0.22);
  background:rgba(88, 201, 141, 0.08);
  color:#dcffec;
}

.modal-overlay{
  position:fixed;
  inset:0;
  z-index:100;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(6, 7, 6, 0.74);
  backdrop-filter:blur(14px);
}

.modal{
  width:min(760px, 100%);
  max-height:calc(100vh - 40px);
  overflow:auto;
  padding:24px;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:28px;
  background:linear-gradient(180deg, rgba(26,30,27,0.98), rgba(18,21,19,0.98));
  box-shadow:var(--shadow-lg);
}

.modal-wide{
  width:min(860px, 100%);
}

.modal h3{
  margin:10px 0 0;
  font-family:"Space Grotesk","Manrope",sans-serif;
  font-size:28px;
  line-height:1.08;
  color:var(--text-strong);
}

.consent-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-top:16px;
  padding:14px;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(255,255,255,0.03);
}

.consent-row input{
  margin-top:3px;
  accent-color:var(--accent);
}

.auth-body .topbar{
  position:relative;
}

.auth-layout{
  display:grid;
  grid-template-columns:minmax(0, 1.08fr) minmax(420px, .92fr);
  gap:18px;
  padding:32px 0 40px;
  align-items:stretch;
}

.auth-intro,
.auth-panel{
  padding:28px;
}

.auth-intro h1{
  font-size:54px;
  max-width:720px;
}

.auth-feature-list{
  display:grid;
  gap:12px;
  margin-top:22px;
}

.auth-feature{
  padding:16px 18px;
  border:1px solid rgba(255,255,255,0.06);
  border-radius:18px;
  background:rgba(255,255,255,0.03);
}

.auth-feature-title{
  font-size:16px;
  font-weight:800;
  color:var(--text-strong);
}

.auth-panel{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.auth-form-section{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.auth-primary-btn{
  align-self:flex-start;
}

.auth-divider{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.auth-divider::before,
.auth-divider::after{
  content:"";
  flex:1;
  height:1px;
  background:var(--line);
}

.auth-divider::before{
  margin-right:12px;
}

.auth-divider::after{
  margin-left:12px;
}

.auth-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.token-issued-row{
  margin-top:16px;
}

::-webkit-scrollbar{
  width:10px;
  height:10px;
}

::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,0.12);
  border-radius:999px;
}

::-webkit-scrollbar-track{
  background:transparent;
}

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

  .sidebar{
    position:relative;
    top:auto;
    min-height:auto;
  }

  .site-list{
    max-height:none;
  }

  .site-hero,
  .auth-layout{
    grid-template-columns:1fr;
  }

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

  .report-kpis{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px){
  .container{
    width:min(100vw - 24px, 100%);
  }

  .topbar-inner{
    padding:16px 0;
  }

  .brand-title{
    font-size:20px;
  }

  .brand-sub{
    font-size:12px;
  }

  .field-card,
  .topbar-field{
    min-width:100%;
    max-width:none;
  }

  .site-hero h1{
    font-size:28px;
  }

  .tabs-shell,
  .kpi-shell,
  .card,
  .sidebar-panel,
  .site-list-wrap,
  .auth-intro,
  .auth-panel,
  .modal{
    padding:18px;
  }

  .kpis,
  .analytics-grid,
  .compare-grid,
  .install-grid,
  .integration-grid,
  .modal-grid,
  .auth-form-grid,
  .report-kpis{
    grid-template-columns:1fr;
  }

  .report-bar{
    grid-template-columns:1fr;
  }

  .compare-row{
    grid-template-columns:1fr;
    gap:8px;
    padding:14px;
    border:1px solid rgba(255,255,255,0.06);
    border-radius:16px;
    background:rgba(255,255,255,0.03);
  }

  .compare-row:first-child,
  .compare-row:last-child{
    padding:14px;
  }

  .stat-item,
  .entity-row,
  .blacklist-item,
  .log-entry{
    flex-direction:column;
  }

  .table{
    min-width:920px;
  }

  .auth-intro h1{
    font-size:34px;
  }
}
