/* ─── Admin Dashboard Styles ──────────────────────── */
:root {
  --dash-bg:        #0A0F1E;
  --dash-bg-2:      #0F1528;
  --dash-surface:   rgba(255,255,255,0.035);
  --dash-surface-hover: rgba(255,255,255,0.06);
  --dash-border:    rgba(255,255,255,0.07);
  --dash-border-h:  rgba(255,255,255,0.14);
  --dash-fg:        #ffffff;
  --dash-muted:     rgba(255,255,255,0.50);
  --dash-subtle:    rgba(255,255,255,0.28);
  --dash-grad-a:    #FF2D78;
  --dash-grad-b:    #7B2FBE;
  --dash-grad:      linear-gradient(135deg, #FF2D78, #7B2FBE);
  --dash-sidebar-w: 240px;
  --dash-topbar-h:  64px;
  --dash-radius:    12px;
  --dash-radius-sm: 8px;
  --dash-sans:      'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--dash-sans);
  background: var(--dash-bg);
  color: var(--dash-fg);
  -webkit-font-smoothing: antialiased;
}

/* ─── Layout ──────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ─────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--dash-sidebar-w);
  height: 100vh;
  background: var(--dash-bg-2);
  border-right: 1px solid var(--dash-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform .25s ease;
}
.sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--dash-border);
}
.sidebar__logo {
  font-size: 1.15rem;
  font-weight: 700;
  background: var(--dash-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -.02em;
}
.sidebar__toggle {
  display: none;
  background: none;
  border: 1px solid var(--dash-border);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  color: var(--dash-muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.sidebar__toggle svg { width: 16px; height: 16px; }
.sidebar__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: .75rem .5rem;
  overflow-y: auto;
}
.sidebar__group-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.25);
  margin: 0.85rem 0.85rem 0.35rem 0.85rem;
}
.sidebar__group-title:first-of-type {
  margin-top: 0.2rem;
}
.sidebar__link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .85rem;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--dash-muted);
  text-decoration: none;
  border-radius: var(--dash-radius-sm);
  transition: color .15s, background .15s;
}
.sidebar__link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.sidebar__link:hover { color: var(--dash-fg); background: var(--dash-surface-hover); }
.sidebar__link.is-active { color: var(--dash-fg); background: rgba(255,45,120,.12); }
.sidebar__footer {
  padding: .75rem .5rem;
  border-top: 1px solid var(--dash-border);
  display: flex;
  align-items: center;
  gap: .25rem;
}
.sidebar__view-site { flex: 1;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .85rem;
  font-size: 12.5px;
  color: var(--dash-muted);
  text-decoration: none;
  border-radius: var(--dash-radius-sm);
  transition: color .15s, background .15s;
}
.sidebar__view-site svg { width: 14px; height: 14px; flex-shrink: 0; }
.sidebar__view-site:hover { color: var(--dash-fg); background: var(--dash-surface-hover); }
.sidebar__logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--dash-muted);
  border-radius: var(--dash-radius-sm);
  cursor: pointer;
  transition: color .15s, background .15s;
}
.sidebar__logout svg { width: 16px; height: 16px; }
.sidebar__logout:hover { color: #ff6b6b; background: rgba(255,107,107,.1); }

/* ─── Main ─────────────────────────────────────────── */
.admin-main {
  flex: 1;
  margin-left: var(--dash-sidebar-w);
  min-height: 100vh;
}
.admin-topbar {
  height: var(--dash-topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  border-bottom: 1px solid var(--dash-border);
  background: rgba(10,15,30,.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-topbar__left { display: flex; flex-direction: column; gap: 2px; }
.admin-topbar__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dash-fg);
}
.admin-topbar__subtitle {
  font-size: .75rem;
  color: var(--dash-muted);
}
.admin-topbar__right { }
.admin-topbar__date {
  font-size: .8rem;
  color: var(--dash-subtle);
}

.admin-content {
  padding: 2rem;
}

/* ─── Pages ────────────────────────────────────────── */
.page { }

/* ─── Stats Grid ──────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 1rem;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  transition: border-color .18s;
}
.stat-card:hover { border-color: var(--dash-border-h); }
.stat-card__icon {
  width: 46px;
  height: 46px;
  border-radius: var(--dash-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-card__icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.stat-card__icon--portfolio { background: rgba(123,47,190,.15); color: #b388ff; }
.stat-card__icon--contacts  { background: rgba(255,45,120,.15); color: #ff6b9d; }
.stat-card__icon--bookings  { background: rgba(0,212,255,.12); color: #4dd0e1; }
.stat-card__icon--views     { background: rgba(76,175,80,.12); color: #81c784; }
.stat-card__icon--messages  { background: rgba(255,152,0,.15); color: #ffb74d; }
.stat-card__icon--alerts    { background: rgba(244,67,54,.12); color: #ef9a9a; }
.stat-card__body { }
.stat-card__num {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.03em;
}
.stat-card__label {
  font-size: .75rem;
  color: var(--dash-muted);
  margin-top: 2px;
}

/* ─── Panels ───────────────────────────────────────── */
.admin-panel {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  overflow: hidden;
}
.admin-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--dash-border);
  gap: 1rem;
  flex-wrap: wrap;
}
.admin-panel__title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--dash-fg);
}
.admin-panel__body {
  padding: 1.25rem 1.5rem;
}

/* ─── Table ────────────────────────────────────────── */
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: .7rem .5rem;
  border-bottom: 1px solid var(--dash-border);
  vertical-align: middle;
}
.admin-table th {
  font-size: .7rem;
  font-weight: 600;
  color: var(--dash-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table td { color: var(--dash-fg); }
.admin-table td img {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--dash-border);
}
.admin-table .msg-preview {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--dash-muted);
  font-size: .8rem;
}

/* ─── Record Actions ─────────────────────────────────── */
.record-actions { display: flex; gap: .35rem; flex-wrap: nowrap; align-items: center; }

/* ─── Buttons ──────────────────────────────────────── */
.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  font-size: .82rem;
  font-weight: 500;
  font-family: var(--dash-sans);
  color: var(--dash-fg);
  background: var(--dash-surface-hover);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
  white-space: nowrap;
}
.admin-btn:hover { background: rgba(255,255,255,.08); border-color: var(--dash-border-h); }
.admin-btn--primary {
  background: var(--dash-grad);
  border-color: transparent;
  color: #fff;
}
.admin-btn--primary:hover { opacity: .9; background: var(--dash-grad); }
.admin-btn--danger {
  background: rgba(244,67,54,.12);
  border-color: rgba(244,67,54,.3);
  color: #ef9a9a;
}
.admin-btn--danger:hover { background: rgba(244,67,54,.2); border-color: rgba(244,67,54,.5); }
.admin-btn--sm {
  padding: .3rem .7rem;
  font-size: .75rem;
}
.admin-btn--xs {
  padding: .15rem .45rem;
  font-size: .68rem;
  line-height: 1.4;
}
.badge-archived {
  display: inline-block;
  font-size: .65rem;
  font-weight: 500;
  color: var(--dash-muted);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  padding: .05rem .45rem;
  margin-left: .25rem;
  vertical-align: middle;
}

/* ─── Activity ─────────────────────────────────────── */
.activity-list { }
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--dash-border);
  font-size: .83rem;
}
.activity-item:last-child { border-bottom: none; }
.activity-item__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--dash-grad-a);
  flex-shrink: 0;
  margin-top: 5px;
}
.activity-item__text { color: var(--dash-fg); }
.activity-item__time {
  font-size: .72rem;
  color: var(--dash-subtle);
  margin-left: auto;
  white-space: nowrap;
}
.activity-empty {
  font-size: .85rem;
  color: var(--dash-subtle);
  padding: 1rem 0;
  text-align: center;
}

.admin-empty {
  font-size: .85rem;
  color: var(--dash-subtle);
  text-align: center;
  padding: 2rem 0;
}

/* ─── Form ─────────────────────────────────────────── */
.admin-form { display: flex; flex-direction: column; gap: 1rem; }
.admin-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.admin-form__group { display: flex; flex-direction: column; gap: .4rem; }
.admin-form__label {
  font-size: .75rem;
  font-weight: 500;
  color: var(--dash-muted);
}
.admin-form__input {
  font-family: var(--dash-sans);
  font-size: .85rem;
  color: var(--dash-fg);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  padding: .6rem .85rem;
  outline: none;
  transition: border-color .15s, background .15s;
  width: 100%;
}
.admin-form__input::placeholder { color: var(--dash-subtle); }
.admin-form__input:focus {
  border-color: rgba(255,45,120,.5);
  background: rgba(255,255,255,.06);
}
.admin-form__textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
select.admin-form__input {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.4rem;
  background-color: rgba(255,255,255,.07);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  background-size: 14px;
}
select.admin-form__input:hover {
  border-color: var(--dash-border-h);
  background-color: rgba(255,255,255,.1);
}
select.admin-form__input:focus {
  border-color: rgba(255,45,120,.55);
  background-color: rgba(255,255,255,.09);
}
select.admin-form__input option {
  background: #1a1f2e;
  color: var(--dash-fg);
}

/* ─── Chart Bars ──────────────────────────────────── */
.chart-bars {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.chart-bar-wrap {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.chart-bar__label {
  font-size: .78rem;
  color: var(--dash-muted);
  width: 100px;
  flex-shrink: 0;
}
.chart-bar__track {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,.06);
  border-radius: 4px;
  overflow: hidden;
}
.chart-bar__fill {
  height: 100%;
  border-radius: 4px;
  background: var(--dash-grad);
  transition: width .4s ease;
}
.chart-bar__count {
  font-size: .8rem;
  font-weight: 600;
  color: var(--dash-fg);
  width: 30px;
  text-align: right;
}

/* ─── Modal ────────────────────────────────────────── */
.dash-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.dash-modal__content {
  position: relative;
  background: var(--dash-bg-2);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  width: min(520px, 94vw);
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.dash-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.dash-modal__title {
  font-size: 1.05rem;
  font-weight: 600;
}
.dash-modal__close {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--dash-border);
  color: var(--dash-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.dash-modal__close:hover { background: var(--dash-surface-hover); color: var(--dash-fg); }
.dash-modal__close svg { width: 16px; height: 16px; }

/* ─── Status Badge ────────────────────────────────── */
.status-badge {
  display: inline-flex;
  font-size: .68rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 999px;
  text-transform: capitalize;
}
.status-badge--confirmed {
  background: rgba(76,175,80,.15);
  color: #81c784;
}
.status-badge--pending {
  background: rgba(255,152,0,.15);
  color: #ffb74d;
}
.status-badge--cancelled {
  background: rgba(244,67,54,.12);
  color: #ef9a9a;
}

/* ─── File Upload ──────────────────────────────────── */
.file-upload {
  position: relative;
}
.file-upload__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.file-upload__label {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .85rem;
  background: rgba(255,255,255,.04);
  border: 1px dashed var(--dash-border-h);
  border-radius: var(--dash-radius-sm);
  color: var(--dash-muted);
  font-size: .82rem;
  cursor: pointer;
  transition: border-color .18s, background .18s;
}
.file-upload__label:hover {
  border-color: var(--dash-grad-a);
  background: rgba(255,45,120,.06);
}
.file-upload__label svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.file-upload__input.has-file + .file-upload__label {
  border-color: rgba(76,175,80,.4);
  background: rgba(76,175,80,.06);
  color: #81c784;
}

/* ─── Image Preview ───────────────────────────────── */
.file-preview {
  display: none;
  position: relative;
  margin-top: .5rem;
  border-radius: var(--dash-radius-sm);
  overflow: hidden;
  border: 1px solid var(--dash-border);
}
.file-preview.is-visible {
  display: block;
}
.file-preview img {
  display: block;
  width: 100%;
  max-height: 140px;
  object-fit: cover;
}
.file-preview__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s;
}
.file-preview__remove:hover {
  background: rgba(244,67,54,.8);
}

.admin-form__input--file-fallback {
  margin-top: .5rem;
  font-size: .78rem;
}
.admin-form__textarea--code {
  font-family: 'Cascadia Code', 'JetBrains Mono', 'Fira Code', monospace;
  font-size: .82rem;
  line-height: 1.6;
  tab-size: 2;
}

/* ─── Toggle Switch ───────────────────────────────── */
.toggle { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; }
.toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
  pointer-events: none;
}
.toggle__track {
  position: relative;
  width: 38px; height: 22px;
  background: rgba(255,255,255,.1);
  border-radius: 999px;
  transition: background .2s;
  flex-shrink: 0;
}
.toggle__track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--dash-muted);
  transition: transform .2s, background .2s;
}
.toggle input:checked + .toggle__track {
  background: var(--dash-grad);
}
.toggle input:checked + .toggle__track::after {
  transform: translateX(16px);
  background: #fff;
}

/* ─── Checkbox Group ──────────────────────────────── */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .4rem 0;
}
.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  color: var(--dash-fg);
  cursor: pointer;
  padding: .3rem .7rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--dash-border);
  border-radius: 6px;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.checkbox-group label:hover {
  border-color: var(--dash-border-h);
  background: rgba(255,255,255,.07);
}
.checkbox-group input[type="checkbox"] {
  accent-color: var(--dash-grad-a);
}

/* ─── Service List Item ───────────────────────────── */
.service-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--dash-border);
}
.service-list-item:last-child { border-bottom: none; }
.service-list-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,45,120,.1);
  border: 1px solid rgba(255,45,120,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.service-list-icon svg {
  width: 20px; height: 20px;
  display: block;
  stroke: var(--dash-grad-a);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── Service Icon Grid Selector ──────────────────── */
.svc-icon-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .5rem;
  padding: .5rem 0;
}
.svc-icon-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  padding: .5rem .25rem;
  min-height: 66px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: center;
}
.svc-icon-option:hover {
  border-color: var(--dash-border-h);
  background: rgba(255,255,255,.07);
}
.svc-icon-option.is-selected {
  border-color: var(--dash-grad-a);
  background: rgba(255,45,120,.12);
}
.svc-icon-option svg {
  width: 26px; height: 26px;
  display: block;
  stroke: var(--dash-fg);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.svc-icon-option.is-selected svg {
  stroke: var(--dash-grad-a);
}
.svc-icon-option span {
  font-size: .62rem;
  color: var(--dash-muted);
  line-height: 1.2;
  word-break: break-word;
}

/* ─── Email Preview ───────────────────────────────── */
.dash-modal__content--wide { width: min(680px, 94vw); }
.dash-modal__body { padding-top: .5rem; }
.email-preview-header {
  padding: .75rem 1rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  font-size: .85rem;
  color: var(--dash-fg);
  margin-bottom: 1rem;
}
.email-preview-header strong { color: var(--dash-muted); }
.email-preview-body {
  padding: 1rem;
  background: #fff;
  border-radius: var(--dash-radius-sm);
  font-size: .9rem;
  line-height: 1.7;
  color: #222;
  min-height: 120px;
  max-height: 55vh;
  overflow-y: auto;
}
.email-preview-body table { width: 100%; border-collapse: collapse; }
.email-preview-body img { max-width: 100%; height: auto; }

/* ─── Portfolio Category Chips ─────────────────────── */
.pf-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .25rem 0;
}
.pf-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .7rem .35rem .4rem;
  font-size: .78rem;
  color: var(--dash-fg);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--dash-border);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.pf-cat-chip:hover {
  border-color: var(--dash-border-h);
  background: rgba(255,255,255,.07);
}
.pf-cat-chip.is-checked {
  border-color: var(--dash-grad-a);
  background: rgba(255,45,120,.12);
}
.pf-cat-chip__indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pf-cat-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0,0,0,.3);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
}
.pf-cat-chip__remove:hover {
  background: rgba(244,67,54,.8);
}

/* ─── SMTP Test Result ────────────────────────────── */
#smtp-test-result {
  transition: opacity .2s;
}

/* ─── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .sidebar__toggle { display: flex; }
  .admin-main { margin-left: 0; }
  .admin-topbar { padding: 0 1rem; }
  .admin-content { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-form__row { grid-template-columns: 1fr; }
  .admin-panel__head { padding: .85rem 1rem; }
  .admin-panel__body { padding: 1rem; }
}

/* ─── Toggle Switch ─────────────────────────────────── */
.toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; cursor: pointer; }
.toggle-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: rgba(255,255,255,.15);
  border-radius: 20px; transition: background .2s;
}
.toggle-slider::before {
  content: ''; position: absolute; left: 2px; bottom: 2px;
  width: 16px; height: 16px; background: #fff; border-radius: 50%;
  transition: transform .2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--dash-grad-a); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .admin-table { font-size: .78rem; }
  .admin-table td, .admin-table th { padding: .5rem .35rem; }
}

/* ─── Contacts List ─────────────────────────────────── */
.contacts-list { display: flex; flex-direction: column; gap: .35rem; }
.contacts-list-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .75rem;
  border-radius: var(--dash-radius-sm);
  border: 1px solid var(--dash-border);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.contacts-list-item:hover {
  border-color: var(--dash-border-h);
  background: rgba(255,255,255,.04);
}
.contacts-list-item__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .85rem;
  flex-shrink: 0;
}
.contacts-list-item__body { flex: 1; min-width: 0; }
.contacts-list-item__name {
  font-weight: 500; font-size: .85rem; color: var(--dash-fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.contacts-list-item__subject {
  font-size: .78rem; color: var(--dash-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.contacts-list-item__date {
  font-size: .72rem; color: var(--dash-muted); white-space: nowrap; flex-shrink: 0;
}

/* ─── Contact Detail Modal ──────────────────────────── */
.contact-detail__head {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--dash-border);
}
.contact-detail__avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.2rem;
  flex-shrink: 0;
}
.contact-detail__name { font-size: 1.05rem; font-weight: 600; color: var(--dash-fg); margin: 0; }
.contact-detail__email { font-size: .82rem; color: var(--dash-link); text-decoration: none; }
.contact-detail__email:hover { text-decoration: underline; }
.contact-detail__section { margin-bottom: 1rem; }
.contact-detail__label {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--dash-muted); margin-bottom: .2rem;
}
.contact-detail__value { font-size: .88rem; color: var(--dash-fg); line-height: 1.5; }
.contact-detail__message {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  padding: .75rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ─── Integration Panels ────────────────────────────── */
.integration-panel {
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: rgba(255,255,255,.015);
}
.integration-panel__head {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: .75rem;
}
.integration-panel__icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--dash-radius-sm);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--dash-border);
  flex-shrink: 0;
}
.integration-panel__icon svg { width: 20px; height: 20px; stroke: var(--dash-grad-a); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.integration-panel__title { font-size: .95rem; font-weight: 600; color: var(--dash-fg); margin: 0; }
.integration-panel__desc { font-size: .78rem; color: var(--dash-muted); margin: 0; }
.integration-panel .admin-form { margin-top: 0; }
.integration-panel .admin-form__row { grid-template-columns: 1fr 1fr; gap: .75rem; }

.int-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 0;
  border-bottom: 1px solid var(--dash-border);
  font-size: .85rem;
  color: var(--dash-fg);
}
.int-toggle-row:last-child { border-bottom: none; }

/* ─── Toggle Row (settings) ─────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .35rem 0;
  font-size: .85rem;
  color: var(--dash-fg);
}

/* ─── Topbar buttons ─────────────────────────────────── */
.topbar-view-site {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .65rem;
  border-radius: var(--dash-radius-sm);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--dash-border);
  color: var(--dash-fg);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 500;
  transition: background .15s, border-color .15s;
}
.topbar-view-site:hover {
  background: rgba(255,255,255,.1);
  border-color: var(--dash-border-h);
}
.topbar-view-site svg { width: 14px; height: 14px; }
.topbar-notif {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--dash-border);
  color: var(--dash-fg);
  cursor: pointer;
  transition: background .15s;
}
.topbar-notif:hover { background: rgba(255,255,255,.1); }
.topbar-notif svg { width: 18px; height: 18px; }
.topbar-notif__badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--dash-grad-a);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 0 4px;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--dash-bg);
}

/* ─── Notification Modal ────────────────────────────── */
.notif-item {
  display: flex;
  gap: .75rem;
  padding: .65rem .75rem;
  border-radius: var(--dash-radius-sm);
  border: 1px solid var(--dash-border);
  margin-bottom: .35rem;
  transition: background .15s;
}
.notif-item--unread {
  background: rgba(255,45,120,.06);
  border-color: rgba(255,45,120,.2);
}
.notif-item__icon { font-size: 1.1rem; flex-shrink: 0; line-height: 1.4; }
.notif-item__body { flex: 1; min-width: 0; }
.notif-item__msg { font-size: .85rem; color: var(--dash-fg); line-height: 1.4; }
.notif-item__time { font-size: .72rem; color: var(--dash-muted); margin-top: 2px; }

/* ─── Email Template Helper Bar ─────────────────── */
.template-helper-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .35rem;
}
.template-helper-btn {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .25rem .55rem;
  font-size: .72rem;
  font-family: var(--dash-font);
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  color: var(--dash-muted);
  cursor: pointer;
  transition: all .15s;
  line-height: 1.4;
}
.template-helper-btn:hover {
  background: var(--dash-surface-hover);
  border-color: var(--dash-border-h);
  color: var(--dash-fg);
}
.template-helper-btn::before {
  content: "{}";
  font-size: .65rem;
  opacity: .5;
  letter-spacing: -1px;
}

/* ─── Authentication Overlay ────────────────────── */
.auth-box {
  width: 380px;
  max-width: 92vw;
  background: #0F1528;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 2rem 2rem 1.5rem;
  animation: authFadeIn .3s ease;
}
@keyframes authFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.auth-header { text-align: center; margin-bottom: 1.25rem; }
.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg,#ff2d78,#ff6b2d);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: .75rem;
}
.auth-title { font-size: 1.1rem; font-weight: 600; color: #fff; margin: 0; }
.auth-step { }
.auth-step-title { font-size: .85rem; font-weight: 600; color: #fff; margin: 0 0 .5rem; text-align: center; }
.auth-desc { font-size: .8rem; color: rgba(255,255,255,.55); line-height: 1.5; margin: 0 0 1rem; text-align: center; }
.auth-form { display: flex; flex-direction: column; gap: .85rem; }
.auth-field { display: flex; flex-direction: column; gap: .35rem; }
.auth-field label { font-size: .72rem; font-weight: 500; color: rgba(255,255,255,.6); }
.auth-input {
  font-family: "Inter", system-ui, sans-serif;
  font-size: .85rem;
  color: #fff;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: .65rem .8rem;
  outline: none;
  transition: border-color .15s, background .15s;
  width: 100%;
  box-sizing: border-box;
}
.auth-input:focus { border-color: rgba(255,45,120,.5); background: rgba(255,255,255,.08); }
.auth-input::placeholder { color: rgba(255,255,255,.25); }
.auth-btn {
  margin-top: .85rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: .82rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg,#ff2d78,#ff6b2d);
  border: none;
  border-radius: 8px;
  padding: .7rem 1rem;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  width: 100%;
}
.auth-btn:hover { opacity: .9; }
.auth-btn:active { transform: scale(.98); }
.auth-btn:disabled { opacity: .4; cursor: not-allowed; }
.auth-btn--ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.55);
}
.auth-btn--ghost:hover { background: rgba(255,255,255,.04); color: rgba(255,255,255,.8); }
.auth-btn-sm {
  font-family: "Inter", system-ui, sans-serif;
  font-size: .7rem;
  color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 5px;
  padding: .25rem .55rem;
  cursor: pointer;
  transition: all .15s;
}
.auth-btn-sm:hover { background: rgba(255,255,255,.1); color: #fff; }
.auth-error { font-size: .75rem; color: #ff6b6b; margin: .25rem 0 0; text-align: center; min-height: 1.1em; }
.auth-footer-link { text-align: center; margin-top: .85rem; font-size: .75rem; }
.auth-footer-link a { color: rgba(255,255,255,.4); text-decoration: none; transition: color .15s; }
.auth-footer-link a:hover { color: rgba(255,255,255,.7); }
.auth-remember {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  color: rgba(255,255,255,.5);
  cursor: pointer;
}
.auth-remember input { accent-color: #ff2d78; }
.auth-lockout {
  font-size: .75rem;
  color: #ff8800;
  background: rgba(255,136,0,.1);
  border: 1px solid rgba(255,136,0,.2);
  border-radius: 6px;
  padding: .5rem .65rem;
  text-align: center;
}
.password-strength { font-size: .7rem; min-height: 1.1em; margin-top: -2px; }
.auth-qr-wrap { text-align: center; margin: .75rem 0; }
.auth-qr-wrap img { border-radius: 8px; max-width: 180px; height: auto; }
.auth-secret-wrap {
  display: flex;
  align-items: center;
  gap: .4rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: .5rem 0;
}
.auth-secret-label { font-size: .72rem; color: rgba(255,255,255,.5); }
.auth-secret {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: .75rem;
  color: rgba(255,255,255,.8);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 4px;
  padding: .25rem .5rem;
  word-break: break-all;
}

/* ═══════════════════════════════════════════════════════
   ANALYTICS PAGE
   ═══════════════════════════════════════════════════════ */

/* Analytics Top Bar */
.analytics-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.analytics-topbar__left {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.analytics-topbar__right {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.analytics-date-select {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  color: var(--dash-fg);
  padding: .5rem 1rem;
  border-radius: var(--dash-radius-sm);
  font-size: .82rem;
  font-family: var(--dash-sans);
  cursor: pointer;
  transition: border-color .2s;
}
.analytics-date-select:hover,
.analytics-date-select:focus {
  border-color: var(--dash-border-h);
  outline: none;
}
.analytics-date-select option {
  background: var(--dash-bg);
  color: var(--dash-fg);
}
.analytics-refresh-btn {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  color: var(--dash-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--dash-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.analytics-refresh-btn:hover {
  border-color: var(--dash-grad-a);
  color: var(--dash-fg);
}
.analytics-refresh-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.analytics-refresh-btn.is-spinning svg {
  animation: ga-spin .8s linear infinite;
}
@keyframes ga-spin {
  to { transform: rotate(360deg); }
}
.ga-property-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(123,47,190,.12);
  border: 1px solid rgba(123,47,190,.25);
  color: #c9a0ff;
  padding: .35rem .75rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 500;
}
.ga-property-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: ga-pulse 2s ease-in-out infinite;
}
@keyframes ga-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* KPI Cards */
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 1100px) {
  .analytics-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .analytics-kpi-grid {
    grid-template-columns: 1fr;
  }
}
.analytics-kpi {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 1.25rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color .25s, transform .25s;
}
.analytics-kpi:hover {
  border-color: var(--dash-border-h);
  transform: translateY(-2px);
}
.analytics-kpi::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--dash-grad);
  opacity: 0;
  transition: opacity .25s;
}
.analytics-kpi:hover::before {
  opacity: 1;
}
.analytics-kpi__label {
  font-size: .75rem;
  color: var(--dash-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .5rem;
  font-weight: 500;
}
.analytics-kpi__value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dash-fg);
  line-height: 1.2;
}
.analytics-kpi__value--realtime {
  background: var(--dash-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.analytics-kpi__icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.analytics-kpi__icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.analytics-kpi__icon--active {
  background: rgba(74,222,128,.12);
  color: #4ade80;
}
.analytics-kpi__icon--sessions {
  background: rgba(96,165,250,.12);
  color: #60a5fa;
}
.analytics-kpi__icon--views {
  background: rgba(251,146,60,.12);
  color: #fb923c;
}
.analytics-kpi__icon--duration {
  background: rgba(167,139,250,.12);
  color: #a78bfa;
}

/* Chart Cards */
.analytics-chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.analytics-chart-row--full {
  grid-template-columns: 1fr;
}
.analytics-chart-row--triple {
  grid-template-columns: 1fr 1fr 1fr;
}
@media (max-width: 900px) {
  .analytics-chart-row,
  .analytics-chart-row--triple {
    grid-template-columns: 1fr;
  }
}
.analytics-chart-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 1.25rem;
  transition: border-color .25s;
}
.analytics-chart-card:hover {
  border-color: var(--dash-border-h);
}
.analytics-chart-card__title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--dash-fg);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.analytics-chart-card__title svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--dash-muted);
}
.analytics-chart-card__canvas {
  width: 100%;
  max-height: 280px;
}
.analytics-chart-card__canvas--doughnut {
  max-width: 240px;
  max-height: 240px;
  margin: 0 auto;
}

/* Top Pages Table */
.ga-pages-table {
  width: 100%;
  border-collapse: collapse;
}
.ga-pages-table th {
  text-align: left;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--dash-muted);
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--dash-border);
  font-weight: 600;
}
.ga-pages-table td {
  padding: .6rem .75rem;
  font-size: .82rem;
  color: var(--dash-fg);
  border-bottom: 1px solid var(--dash-border);
}
.ga-pages-table tr:last-child td {
  border-bottom: none;
}
.ga-pages-table tr:hover td {
  background: var(--dash-surface-hover);
}
.ga-pages-table .page-path {
  color: var(--dash-muted);
  font-size: .75rem;
  margin-top: .15rem;
}

/* Not Connected Prompt */
.ga-not-connected {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  text-align: center;
  padding: 3rem;
}
.ga-not-connected__icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: var(--dash-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  animation: ga-float 3s ease-in-out infinite;
}
@keyframes ga-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.ga-not-connected__icon svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ga-not-connected__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dash-fg);
  margin-bottom: .5rem;
}
.ga-not-connected__desc {
  font-size: .85rem;
  color: var(--dash-muted);
  max-width: 400px;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.ga-not-connected__btn {
  background: var(--dash-grad);
  color: #fff;
  border: none;
  padding: .65rem 1.5rem;
  border-radius: var(--dash-radius-sm);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--dash-sans);
  transition: opacity .2s, transform .2s;
}
.ga-not-connected__btn:hover {
  opacity: .9;
  transform: scale(1.02);
}

/* GA Settings OAuth Card */
.ga-oauth-card {
  background: linear-gradient(135deg, rgba(255,45,120,.04), rgba(123,47,190,.04));
  border: 1px solid rgba(123,47,190,.15);
  border-radius: var(--dash-radius);
  padding: 1.5rem;
}
.ga-oauth-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--dash-surface);
  border-radius: var(--dash-radius-sm);
  margin-top: 1rem;
}
.ga-oauth-status__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dash-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: .9rem;
  color: #fff;
}
.ga-oauth-status__info {
  flex: 1;
  min-width: 0;
}
.ga-oauth-status__email {
  font-size: .82rem;
  color: var(--dash-fg);
  font-weight: 500;
}
.ga-oauth-status__label {
  font-size: .72rem;
  color: #4ade80;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .3rem;
}
.ga-oauth-status__label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
}
.ga-disconnect-btn {
  background: transparent;
  border: 1px solid rgba(239,68,68,.3);
  color: #ef4444;
  padding: .4rem .85rem;
  border-radius: var(--dash-radius-sm);
  font-size: .78rem;
  cursor: pointer;
  font-family: var(--dash-sans);
  transition: all .2s;
}
.ga-disconnect-btn:hover {
  background: rgba(239,68,68,.1);
  border-color: #ef4444;
}
.ga-connect-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--dash-grad);
  color: #fff;
  border: none;
  padding: .55rem 1.25rem;
  border-radius: var(--dash-radius-sm);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--dash-sans);
  transition: opacity .2s, transform .2s;
  margin-top: .75rem;
}
.ga-connect-btn:hover {
  opacity: .9;
  transform: scale(1.02);
}
.ga-connect-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.ga-setup-guide {
  margin-top: 1rem;
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  overflow: hidden;
}
.ga-setup-guide__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--dash-muted);
  padding: .75rem 1rem;
  font-size: .78rem;
  cursor: pointer;
  font-family: var(--dash-sans);
  transition: color .2s;
}
.ga-setup-guide__toggle:hover {
  color: var(--dash-fg);
}
.ga-setup-guide__toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform .2s;
}
.ga-setup-guide__toggle.is-open svg {
  transform: rotate(180deg);
}
.ga-setup-guide__content {
  display: none;
  padding: 0 1rem 1rem;
  font-size: .78rem;
  color: var(--dash-muted);
  line-height: 1.7;
}
.ga-setup-guide__content.is-open {
  display: block;
}
.ga-setup-guide__content ol {
  padding-left: 1.25rem;
  margin: .5rem 0;
}
.ga-setup-guide__content li {
  margin-bottom: .35rem;
}
.ga-setup-guide__content code {
  background: var(--dash-surface);
  padding: .15rem .4rem;
  border-radius: 4px;
  font-size: .75rem;
  color: #c9a0ff;
}
.ga-property-select {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  color: var(--dash-fg);
  padding: .5rem .75rem;
  border-radius: var(--dash-radius-sm);
  font-size: .82rem;
  font-family: var(--dash-sans);
  width: 100%;
  margin-top: .5rem;
  cursor: pointer;
}
.ga-property-select option {
  background: var(--dash-bg);
  color: var(--dash-fg);
}

/* Loading skeleton for analytics */
.ga-skeleton {
  background: linear-gradient(90deg, var(--dash-surface) 25%, var(--dash-surface-hover) 50%, var(--dash-surface) 75%);
  background-size: 200% 100%;
  animation: ga-shimmer 1.5s infinite;
  border-radius: var(--dash-radius-sm);
}
@keyframes ga-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.ga-skeleton-kpi {
  height: 90px;
}
.ga-skeleton-chart {
  height: 280px;
}

/* Analytics loading overlay */
.analytics-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--dash-muted);
  font-size: .85rem;
  gap: .5rem;
}
.analytics-loading__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--dash-border);
  border-top-color: var(--dash-grad-a);
  border-radius: 50%;
  animation: ga-spin .6s linear infinite;
}
