:root {
  --color-primary: #1155ff;
  --color-primary-dark: #09208f;
  --color-primary-hover: #0b43d9;
  --color-primary-soft: rgba(17, 85, 255, 0.08);

  --color-sidebar: #08162f;
  --color-sidebar-2: #0b2145;

  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-surface-soft: #f8fafc;

  --color-text: #172033;
  --color-text-light: #5b677c;
  --color-text-muted: #98a2b3;

  --color-border: #dde4f0;
  --color-border-strong: #cbd5e1;

  --color-success-bg: #ecfdf3;
  --color-success-text: #027a48;
  --color-success-border: #abefc6;

  --color-error-bg: #fef3f2;
  --color-error-text: #b42318;
  --color-error-border: #fecdca;

  --color-warning-bg: #fffaeb;
  --color-warning-text: #b54708;
  --color-warning-border: #fedf89;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 22px 50px rgba(15, 23, 42, 0.12);

  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif;

  --container-width: 1440px;
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 72px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
}

body {
  min-height: 100vh;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* AUTH */

.auth-page {
  min-height: 100vh;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

.auth-brand-panel {
  background:
    linear-gradient(135deg, rgba(8, 22, 47, 0.96), rgba(9, 32, 143, 0.84)),
    linear-gradient(180deg, #08162f, #09208f);
  color: #ffffff;
  padding: 64px;
  display: flex;
  align-items: center;
}

.auth-brand-content {
  max-width: 560px;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 24px;
}

.auth-title {
  font-size: 40px;
  line-height: 1.12;
  margin: 0 0 20px;
}

.auth-description {
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.86);
}

.auth-info-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}

.auth-info-card strong {
  display: block;
  margin-bottom: 10px;
}

.auth-info-card p {
  margin: 6px 0;
  color: rgba(255, 255, 255, 0.9);
}

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--color-surface);
  border: 1px solid rgba(9, 32, 143, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 36px;
}

.auth-card-header {
  margin-bottom: 24px;
}

.auth-card-header h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.auth-card-header p {
  margin: 0;
  color: var(--color-text-light);
  font-size: 15px;
}

.auth-form {
  display: grid;
  gap: 18px;
}

/* APP SHELL */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.24s ease;
}

.sidebar-collapsed .app-shell {
  grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

.app-main {
  min-width: 0;
  width: 100%;
  padding: 28px 32px 40px;
}

.app-container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
}

/* SIDEBAR */

.app-sidebar {
  background:
    radial-gradient(
      circle at top left,
      rgba(17, 85, 255, 0.22),
      transparent 34%
    ),
    linear-gradient(180deg, var(--color-sidebar), #061123);
  color: #ffffff;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 10px;
  margin-bottom: 10px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6d7cff, #1155ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex: 0 0 auto;
}

.brand-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.brand-text strong {
  color: #ffffff;
  font-size: 14px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-text span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
}

.tenant-logo {
  max-width: 128px;
  max-height: 46px;
  width: auto;
  height: auto;
  display: block;
  border-radius: 4px;
  background: #fff;
}

.sidebar-toggle {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 17px;
  flex: 0 0 auto;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
}

.sidebar-tenant-name {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.4;
  margin: 4px 8px 22px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.app-nav {
  display: grid;
  gap: 6px;
}

.app-nav a,
.logout-link {
  color: rgba(255, 255, 255, 0.86);
  padding: 11px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.08s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-nav a:hover,
.logout-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.app-nav a.is-active {
  background: linear-gradient(135deg, #1155ff, #0d3dcc);
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(17, 85, 255, 0.22);
}

.nav-icon {
  width: 18px;
  min-width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1155ff, #65a4ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
}

.sidebar-user-info {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sidebar-user-info strong {
  font-size: 12px;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-info span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.58);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-link {
  background: rgba(255, 255, 255, 0.08);
  justify-content: flex-start;
}

.sidebar-collapsed .brand-text,
.sidebar-collapsed .sidebar-tenant-name,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .sidebar-user-info {
  opacity: 0;
  width: 0;
  pointer-events: none;
}

.sidebar-collapsed .tenant-logo {
  max-width: 38px;
  max-height: 30px;
}

.sidebar-collapsed .sidebar-top {
  justify-content: center;
}

.sidebar-collapsed .sidebar-brand {
  display: none;
}

.sidebar-collapsed .sidebar-toggle {
  margin: 0 auto;
}

.sidebar-collapsed .app-nav a,
.sidebar-collapsed .logout-link {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.sidebar-collapsed .sidebar-user-card {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

/* PAGE HEADER */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.page-header-content h2 {
  margin: 0 0 6px;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.page-header-content p {
  margin: 0;
  color: var(--color-text-light);
  font-size: 15px;
}

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

/* HELPERS */

.stack-lg {
  display: grid;
  gap: 24px;
}

.stack-md {
  display: grid;
  gap: 16px;
}

.stack-sm {
  display: grid;
  gap: 10px;
}

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

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

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

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

/* CARDS */

.card,
.box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.card-title,
.section-title {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.card-subtitle,
.inline-note {
  margin: 0;
  color: var(--color-text-light);
  font-size: 14px;
  line-height: 1.6;
}

.empty-state {
  background: var(--color-surface);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: var(--color-text-light);
}

/* ALERTS */

.flash-stack {
  display: grid;
  gap: 10px;
}

.alert {
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 14px;
}

.alert-error {
  background: var(--color-error-bg);
  color: var(--color-error-text);
  border: 1px solid var(--color-error-border);
}

.alert-success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  border: 1px solid var(--color-success-border);
}

.alert-warning {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
  border: 1px solid var(--color-warning-border);
}

/* FORMS */

.form-grid {
  display: grid;
  gap: 16px;
}

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

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

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

.form-group {
  display: grid;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--color-text);
  padding: 13px 14px;
  font-size: 15px;
  outline: none;
  min-height: 44px;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(17, 85, 255, 0.12);
}

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

/* BUTTONS */

.btn {
  appearance: none;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 17px;
  min-height: 42px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.06s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(17, 85, 255, 0.16);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
}

.btn-secondary {
  background: #ffffff;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: #f8fafc;
}

.btn-danger {
  background: #b42318;
  color: #ffffff;
}

.btn-block {
  width: 100%;
}

/* TABLES */

.table-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-header {
  padding: 20px;
  border-bottom: 1px solid var(--color-border);
}

.table-header h3 {
  margin: 0 0 6px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.table-header p {
  margin: 0;
  color: var(--color-text-light);
  font-size: 14px;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.table th,
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.table th {
  background: #f8fafc;
  color: var(--color-text-light);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table-empty {
  padding: 20px;
  color: var(--color-text-light);
}

/* BADGES */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge-primary {
  background: rgba(17, 85, 255, 0.1);
  color: var(--color-primary-dark);
}

.badge-success {
  background: #ecfdf3;
  color: #027a48;
}

.badge-muted {
  background: #f2f4f7;
  color: #475467;
}

.badge-warning {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}

/* TOOLTIP */

.info-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  cursor: help;
  position: relative;
}

/* METRICS / KPI */

.metric-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.metric-card strong {
  display: block;
  font-size: 14px;
}

.metric-card .metric-value {
  font-size: 34px;
  margin-top: 10px;
  line-height: 1;
  color: var(--color-text);
  letter-spacing: -0.04em;
}

/* TABS */

.tabs-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.tabs-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: #f8fafc;
  border-bottom: 1px solid var(--color-border);
}

.tabs-nav button,
.tabs-nav a {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 16px;
  font-size: 14px;
  font-weight: 800;
  color: var(--color-text-light);
  cursor: pointer;
  text-align: center;
}

.tabs-nav .is-active {
  background: #ffffff;
  color: var(--color-primary);
  box-shadow: inset 0 3px 0 var(--color-primary);
}

.tab-panel {
  padding: 20px;
}

/* AUDIT */

.audit-payload-block {
  margin-top: 10px;
}

.audit-payload-pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--color-text);
}

/* GEO MAP */

.geo-map-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}

#geo-map {
  width: 100%;
  height: 520px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #eef3f8;
}

.geo-map-sidepanel {
  display: grid;
  gap: 16px;
}

.geo-map-city-item,
.geo-map-legend {
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #ffffff;
}

.geo-map-city-name {
  font-weight: 800;
  margin-bottom: 4px;
}

.geo-map-city-meta {
  font-size: 13px;
  color: #667085;
  line-height: 1.45;
}

.geo-map-legend-bar {
  height: 14px;
  border-radius: 999px;
  margin-top: 10px;
  background: linear-gradient(
    90deg,
    rgba(59, 130, 246, 0.25) 0%,
    rgba(59, 130, 246, 0.5) 25%,
    rgba(16, 185, 129, 0.65) 50%,
    rgba(245, 158, 11, 0.8) 75%,
    rgba(239, 68, 68, 0.95) 100%
  );
}

.geo-map-legend-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: #667085;
}

/* REPORT EXISTING */

.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.report-nav-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 12px;
}

.report-nav,
.report-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-nav-btn,
.report-subnav-btn {
  border: 1px solid var(--color-border);
  background: #ffffff;
  color: var(--color-text);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

.report-nav-btn.is-active,
.report-subnav-btn.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

.report-tab-panel,
.report-subtab-panel {
  display: none;
}

.report-tab-panel.is-active,
.report-subtab-panel.is-active {
  display: block;
}

.report-tab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 20px;
}

.goal-progress-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.goal-progress-bar {
  width: 120px;
  height: 10px;
  border-radius: 999px;
  background: #e6ebf5;
  overflow: hidden;
}

.goal-progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #09208f 0%, #4f7bff 100%);
}

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

.report-insight-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: grid;
  gap: 8px;
}

.report-insight-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #667085;
}

.report-insight-text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
  font-weight: 700;
}

/* CREATIVE VERSION */

.creative-version-top,
.creative-current-version-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

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

.creative-version-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.creative-version-grid {
  align-items: start;
}

.creative-version-preview-wrap,
.creative-current-version-preview-wrap {
  display: flex;
  justify-content: flex-end;
}

.creative-version-preview-card {
  width: 100%;
  max-width: 360px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.creative-version-preview {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.creative-current-version-card {
  border: 1px solid rgba(9, 32, 143, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.creative-version-card-active {
  border: 1px solid rgba(22, 163, 74, 0.35);
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f6fff8 100%);
}

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

.info-list-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf0f5;
}

.info-list-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-list-label {
  font-size: 13px;
  font-weight: 800;
  color: #667085;
}

.info-list-value {
  font-size: 14px;
  color: var(--color-text);
  word-break: break-word;
}

.creative-version-url a {
  word-break: break-all;
}

.section-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #667085;
}

/* RESPONSIVE */

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

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

@media (max-width: 1100px) {
  .geo-map-shell,
  .report-tab-grid {
    grid-template-columns: 1fr;
  }

  #geo-map {
    height: 460px;
  }
}

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

  .auth-brand-panel {
    padding: 40px 24px 28px;
  }

  .auth-title {
    font-size: 30px;
  }

  .auth-description {
    font-size: 15px;
  }

  .auth-form-panel {
    padding: 0 16px 32px;
    margin-top: -8px;
  }

  .auth-card {
    max-width: 100%;
    padding: 28px 22px;
  }

  .app-shell,
  .sidebar-collapsed .app-shell {
    grid-template-columns: 1fr;
  }

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

  .sidebar-toggle {
    display: none;
  }

  .sidebar-collapsed .brand-text,
  .sidebar-collapsed .sidebar-tenant-name,
  .sidebar-collapsed .nav-label,
  .sidebar-collapsed .sidebar-user-info {
    opacity: 1;
    width: auto;
    pointer-events: auto;
  }

  .sidebar-collapsed .sidebar-brand {
    display: flex;
  }

  .sidebar-collapsed .app-nav a,
  .sidebar-collapsed .logout-link {
    justify-content: flex-start;
    padding-left: 12px;
    padding-right: 12px;
  }

  .app-main {
    padding: 20px 16px 28px;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .form-row,
  .form-row-3,
  .form-row-4,
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-6 {
    grid-template-columns: 1fr;
  }

  .tabs-nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .report-kpi-grid,
  .report-insights {
    grid-template-columns: 1fr;
  }

  .report-nav,
  .report-subnav {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
}

/* =========================================================
   AUTH / LOGIN
========================================================= */

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at top left,
      rgba(59, 130, 246, 0.18),
      transparent 28%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(99, 102, 241, 0.18),
      transparent 28%
    ),
    #0f172a;

  color: #ffffff;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 520px;
}

.auth-brand-panel {
  position: relative;
  overflow: hidden;
  padding: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-brand-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.1),
    rgba(99, 102, 241, 0.1)
  );
}

.auth-brand-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 620px;
}

.auth-logo {
  width: 240px;
  max-width: 100%;
  margin-bottom: 32px;
  display: block;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 16px;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.08);

  border: 1px solid rgba(255, 255, 255, 0.08);

  color: #dbeafe;

  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;

  margin-bottom: 28px;
}

.auth-title {
  font-size: 52px;
  line-height: 1.05;
  font-weight: 800;
  margin-bottom: 24px;
  color: #ffffff;
}

.auth-description {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 40px;
}

.auth-feature-list {
  display: grid;
  gap: 16px;
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 14px;

  padding: 18px 20px;

  border-radius: 18px;

  background: rgba(255, 255, 255, 0.05);

  border: 1px solid rgba(255, 255, 255, 0.06);

  backdrop-filter: blur(12px);
}

.auth-feature-item span {
  width: 32px;
  height: 32px;

  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(59, 130, 246, 0.2);

  color: #60a5fa;

  font-weight: 700;
}

.auth-feature-item p {
  margin: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}

.auth-form-panel {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card-header {
  margin-bottom: 32px;
}

.auth-card-header h2 {
  font-size: 36px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

.auth-card-header p {
  color: #667085;
  font-size: 15px;
}

.auth-form {
  display: grid;
  gap: 22px;
}

.auth-form .form-group {
  display: grid;
  gap: 8px;
}

.auth-form label {
  font-size: 14px;
  font-weight: 600;
  color: #344054;
}

.auth-form input {
  height: 54px;
  border-radius: 14px;
  border: 1px solid #d0d5dd;
  padding: 0 16px;
  font-size: 15px;
  transition: all 0.2s ease;
}

.auth-form input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  outline: none;
}

.auth-submit-btn {
  height: 56px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  margin-top: 8px;
}

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

  .auth-brand-panel {
    display: none;
  }

  .auth-form-panel {
    min-height: 100vh;
  }
}
