/* ==========================================================================
   Teymensel Ödeme Merkezi — Google Ödeme Merkezi Estetiği + Modern İyileştirmeler
   Açık Tema (Varsayılan — Google Payments Center uyumlu) & Koyu Tema (Teymensel Hesap uyumlu)
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-subtle: #f8f9fa;
  --surface: #ffffff;
  --surface-2: #f1f3f4;
  --surface-hover: #f8f9fa;
  --border: #dadce0;
  --border-soft: #e8eaed;
  --text: #202124;
  --text-2: #3c4043;
  --muted: #5f6368;
  --blue: #1a73e8;
  --blue-hover: #1557b0;
  --blue-soft: #e8f0fe;
  --red: #d93025;
  --red-hover: #b3261e;
  --red-soft: #fce8e6;
  --green: #188038;
  --green-soft: #e6f4ea;
  --amber: #b06000;
  --amber-soft: #fef7e0;
  --shadow-sm: 0 1px 2px rgba(60, 64, 67, .12), 0 1px 3px rgba(60, 64, 67, .08);
  --shadow-md: 0 4px 16px rgba(60, 64, 67, .16);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, .2);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

[data-theme="dark"] {
  --bg: #131314;
  --bg-subtle: #18191b;
  --surface: #1e1f20;
  --surface-2: #28292a;
  --surface-hover: #2a2b2d;
  --border: #3c4043;
  --border-soft: #2f3032;
  --text: #e3e3e3;
  --text-2: #c4c7c5;
  --muted: #9aa0a6;
  --blue: #8ab4f8;
  --blue-hover: #aecbfa;
  --blue-soft: rgba(138, 180, 248, .14);
  --red: #f28b82;
  --red-hover: #f6aea9;
  --red-soft: rgba(242, 139, 130, .14);
  --green: #81c995;
  --green-soft: rgba(129, 201, 149, .14);
  --amber: #fdd663;
  --amber-soft: rgba(253, 214, 99, .14);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .45);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-xs { width: 15px; height: 15px; }
.ico-sm { width: 17px; height: 17px; }
.hidden { display: none !important; }

/* ===================== TOP BAR ===================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 64px;
  background: var(--bg);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; min-width: 0; }

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 6px 8px;
  border-radius: 8px;
  text-decoration: none !important;
  white-space: nowrap;
}
.brand-word { font-size: 21px; font-weight: 700; letter-spacing: -.03em; }
.g-b { color: #4285f4; }
.g-r { color: #ea4335; }
.g-y { color: #fbbc04; }
.g-g { color: #34a853; }
[data-theme="dark"] .g-b { color: #8ab4f8; }
[data-theme="dark"] .g-r { color: #f28b82; }
[data-theme="dark"] .g-y { color: #fdd663; }
[data-theme="dark"] .g-g { color: #81c995; }
.brand-sub { font-size: 19px; font-weight: 400; color: var(--muted); letter-spacing: -.01em; }

/* Profile Switcher Pill */
.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-size: 12.5px;
  max-width: 340px;
  white-space: nowrap;
}
.profile-chip:hover { background: var(--surface-hover); border-color: var(--border); }
.profile-chip-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; color: var(--text); font-size: 12px; white-space: nowrap; flex: none; }
.profile-chip-type { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* Critical Alerts Pill (exact Screenshot 2 look!) */
.alerts-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px 0 11px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s, box-shadow .15s;
  white-space: nowrap;
}
.alerts-pill:hover { background: var(--red-soft); border-color: rgba(217, 48, 37, .25); }
.alerts-tri { color: var(--red); display: inline-flex; }
.alerts-tri svg { width: 17px; height: 17px; }
.alerts-bell { color: var(--text-2); display: inline-flex; }
.alerts-bell svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }

.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.avatar-btn {
  width: 40px;
  height: 40px;
  border: 2px solid transparent;
  background: none;
  border-radius: 50%;
  padding: 2px;
  display: inline-grid;
  place-items: center;
}
.avatar-btn:hover { border-color: var(--border); }
.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a73e8, #6d5dfc);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
}
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }

/* ===================== TAB BAR (Screenshot 2) ===================== */
.tabbar {
  position: sticky;
  top: 64px;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabbar::-webkit-scrollbar { display: none; }
.tabbar-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
}
.tab-link {
  position: relative;
  padding: 13px 16px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  text-decoration: none !important;
  transition: color .15s;
}
.tab-link:hover { color: var(--text); }
.tab-link.active { color: var(--blue); }
.tab-link.active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--blue);
}

/* ===================== POPOVERS ===================== */
.slot { position: relative; }
.pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 120;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-width: 280px;
}
.pop.pop-left { right: auto; left: 0; }
.pop-head { padding: 20px 18px 14px; text-align: center; border-bottom: 1px solid var(--border-soft); }
.pop-head .av-lg { width: 60px; height: 60px; font-size: 22px; margin: 0 auto 10px; }
.pop-head .p-name { font-weight: 600; font-size: 15px; }
.pop-head .p-mail { color: var(--muted); font-size: 13px; margin-top: 2px; }
.pop-head .p-pid { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--text-2); }
.pop-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border: 0;
  border-top: 1px solid var(--border-soft);
  background: transparent;
  text-align: left;
  color: var(--text);
  text-decoration: none !important;
}
.pop-item:first-child { border-top: 0; }
.pop-item:hover { background: var(--surface-hover); }
.pop-item .pi-meta { flex: 1; min-width: 0; }
.pop-item .pi-title { font-weight: 500; font-size: 13.5px; }
.pop-item .pi-sub { font-size: 12px; color: var(--muted); }
.pop-apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 14px; width: 310px; }
.app-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 6px;
  border-radius: 12px;
  color: var(--text);
  font-size: 12px;
  text-align: center;
  text-decoration: none !important;
}
.app-tile:hover { background: var(--surface-2); }
.app-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
}

/* ===================== MAIN LAYOUT ===================== */
.main-wrap {
  max-width: 840px;
  margin: 0 auto;
  padding: 28px 20px 56px;
  min-height: calc(100vh - 180px);
}
.app-view { width: 100%; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  flex-wrap: wrap;
}
.section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 400;
  margin: 0;
  letter-spacing: -.01em;
}
.info-tip {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.info-tip:hover { background: var(--surface-2); color: var(--text); }
.info-tip svg { width: 18px; height: 18px; }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none !important;
  transition: background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 11px 22px; font-size: 14.5px; border-radius: 8px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
[data-theme="dark"] .btn-primary { color: #062e6f; font-weight: 600; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-hover); }
[data-theme="dark"] .btn-danger { color: #2b0b09; font-weight: 600; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: var(--surface-2); }
.btn-tonal { background: var(--blue-soft); color: var(--blue); }
.btn-tonal:hover { filter: brightness(.96); }
.btn-text { background: transparent; color: var(--blue); padding: 7px 12px; }
.btn-text:hover { background: var(--blue-soft); }
.btn-text.danger { color: var(--red); }
.btn-text.danger:hover { background: var(--red-soft); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===================== CARDS & PANELS ===================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
}
.card-pad { padding: 20px 24px; }
.card-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.card-head h2, .card-head h3 { margin: 0; font-size: 16px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.card-sub { color: var(--muted); font-size: 13px; margin: 4px 0 0; }

/* KPI Strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.kpi-box {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}
.kpi-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.kpi-val { font-size: 20px; font-weight: 600; margin-top: 6px; letter-spacing: -.02em; }
.kpi-val.danger { color: var(--red); }
.kpi-val.ok { color: var(--green); }
.kpi-foot { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}
.search-input-wrap input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  outline: none;
}
.search-input-wrap input:focus { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }

.select-sm {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  outline: none;
  font-size: 13px;
}
.select-sm:focus { border-color: var(--blue); }

/* ===================== ACTIVITY LIST (Exact Screenshot 2!) ===================== */
.activity-list {
  border-top: 1px solid var(--border-soft);
}
.activity-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 12px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background .12s;
  border-radius: 4px;
}
.activity-row:hover { background: var(--surface-hover); }
.act-ico {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--surface-2);
  color: var(--blue);
}
.act-ico.server { background: #ede9fe; color: #5b21b6; }
.act-ico.globe { background: #e0f2fe; color: #0369a1; }
.act-ico.cpu { background: #fef3c7; color: #b45309; }
.act-ico.wallet { background: var(--green-soft); color: var(--green); }
.act-ico.sparkles { background: var(--blue-soft); color: var(--blue); }
.act-ico.alert { background: var(--red-soft); color: var(--red); }
[data-theme="dark"] .act-ico.server { background: rgba(139, 92, 246, .2); color: #c4b5fd; }
[data-theme="dark"] .act-ico.globe { background: rgba(56, 189, 248, .2); color: #7dd3fc; }
[data-theme="dark"] .act-ico.cpu { background: rgba(251, 191, 36, .2); color: #fcd34d; }

.act-main { flex: 1; min-width: 0; }
.act-title { font-size: 14.5px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.act-sub { font-size: 13px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-right { text-align: right; flex: none; display: flex; align-items: center; gap: 12px; }
.act-amount { font-size: 14.5px; font-weight: 500; color: var(--text); white-space: nowrap; }
.act-amount.credit { color: var(--green); }
.act-amount.overdue { color: var(--red); font-weight: 600; }

/* Status Badges */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.pill-badge.paid, .pill-badge.active { background: var(--green-soft); color: var(--green); }
.pill-badge.pending { background: var(--amber-soft); color: var(--amber); }
.pill-badge.overdue, .pill-badge.failed, .pill-badge.expired, .pill-badge.rejected, .pill-badge.incomplete { background: var(--red-soft); color: var(--red); }
.pill-badge.cancelled, .pill-badge.muted { background: var(--surface-2); color: var(--muted); }
.pill-badge.blue { background: var(--blue-soft); color: var(--blue); }

/* Monthly Mini Analytics */
.chart-panel {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  background: var(--bg-subtle);
}
.chart-bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  align-items: end;
  height: 110px;
  margin-top: 14px;
}
.chart-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bar-wrap { width: 100%; max-width: 44px; height: 74px; display: flex; align-items: flex-end; background: var(--border-soft); border-radius: 6px; overflow: hidden; }
.chart-bar { width: 100%; background: var(--blue); border-radius: 6px 6px 0 0; transition: height .35s ease; min-height: 3px; }
.chart-val { font-size: 11px; color: var(--muted); }
.chart-lbl { font-size: 12px; font-weight: 500; color: var(--text-2); }

/* ===================== PAYMENT METHODS (Cards + Wallet + IBAN) ===================== */
.wallet-banner {
  background: linear-gradient(135deg, #1a73e8 0%, #174ea6 60%, #0d2b6b 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.wallet-banner .wb-lbl { font-size: 12.5px; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }
.wallet-banner .wb-bal { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0; }
.wallet-banner .wb-sub { font-size: 12.5px; opacity: .88; }
.wallet-banner .wb-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-white { background: #fff; color: #174ea6; font-weight: 600; }
.btn-white:hover { background: #f1f3f4; }
.btn-glass { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.32); }
.btn-glass:hover { background: rgba(255,255,255,.26); }

.pm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.pm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: box-shadow .15s, border-color .15s;
}
.pm-card:hover { box-shadow: var(--shadow-sm); }
.pm-card.is-problem { border-color: rgba(217, 48, 37, .45); }
.pm-card-top { display: flex; align-items: flex-start; gap: 14px; }
.card-mini-art {
  width: 64px;
  height: 42px;
  border-radius: 7px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 8px;
  font-size: 9px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: .03em;
  flex: none;
  white-space: nowrap;
  background: linear-gradient(135deg, #1f2937, #0f172a);
}
.card-mini-art.navy { background: linear-gradient(135deg, #1e3a8a, #0f172a); }
.card-mini-art.purple { background: linear-gradient(135deg, #6d28d9, #312e81); }
.card-mini-art.crimson { background: linear-gradient(135deg, #b91c1c, #450a0a); }
.card-mini-art.emerald { background: linear-gradient(135deg, #047857, #064e3b); }
.pm-card-title { font-weight: 600; font-size: 14.5px; }
.pm-card-num { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.pm-card-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.pm-card-warn { font-size: 12.5px; color: var(--red); background: var(--red-soft); padding: 8px 10px; border-radius: 6px; }
.pm-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border-soft); flex-wrap: wrap; }

.pm-add-card {
  border: 1.5px dashed var(--border);
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  min-height: 156px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--blue);
  font-weight: 500;
  transition: background .15s, border-color .15s;
}
.pm-add-card:hover { background: var(--blue-soft); border-color: var(--blue); }

/* IBAN Row */
.iban-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.iban-row:first-child { border-top: 0; }
.iban-code { font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; font-weight: 600; color: var(--text); letter-spacing: .03em; }

/* ===================== SUBSCRIPTIONS ===================== */
.sub-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.sub-chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
.sub-chip.active { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }

.sub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.sub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sub-card-head { display: flex; align-items: flex-start; gap: 12px; }
.sub-card-price { font-size: 16px; font-weight: 600; margin-top: 4px; }
.sub-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border-soft); }

/* ===================== SETTINGS (Exact Google Payments Center!) ===================== */
.settings-group-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 26px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  border-top: 1px solid var(--border-soft);
}
.settings-row:first-child { border-top: 0; }
.sr-body { flex: 1; min-width: 0; }
.sr-label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.sr-val { font-size: 14.5px; color: var(--text); margin-top: 4px; font-weight: 500; }
.sr-desc { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.55; }
.pid-highlight {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Google Privacy Toggle Rows */
.privacy-block {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  border-top: 1px solid var(--border-soft);
}
.privacy-block:first-child { border-top: 0; }
.privacy-ico {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 2px;
}
.privacy-content { flex: 1; min-width: 0; }
.privacy-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
}
.privacy-item + .privacy-item { border-top: 1px solid var(--border-soft); margin-top: 8px; padding-top: 16px; }
.privacy-state { font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.privacy-state.on { color: var(--blue); }
.privacy-state.off { color: var(--muted); }

/* Switch Toggle */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; margin-top: 2px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  inset: 0;
  background: #bdc1c6;
  border-radius: 999px;
  transition: .2s;
  cursor: pointer;
}
[data-theme="dark"] .slider { background: #5f6368; }
.slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.switch input:checked + .slider { background: var(--blue); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* ===================== RIGHT DRAWER (Screenshot 3!) ===================== */
.drawer-scrim, .modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .42);
  z-index: 140;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.drawer-scrim.open, .modal-scrim.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 100vw);
  background: var(--surface);
  z-index: 150;
  box-shadow: -8px 0 32px rgba(0, 0, 0, .2);
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  height: 60px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.drawer-head h2 { margin: 0; font-size: 18px; font-weight: 500; }
.drawer-body { flex: 1; overflow-y: auto; padding: 0; }

/* Alert item inside drawer (exact Screenshot 3 layout!) */
.alert-drawer-item {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-soft);
}
.alert-drawer-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
}
.alert-drawer-title svg { width: 18px; height: 18px; color: var(--red); margin-top: 2px; }
.alert-drawer-title.warn svg { color: var(--amber); }
.alert-drawer-body {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 16px 28px;
  line-height: 1.55;
}
.alert-drawer-acts {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Invoice Detail inside Drawer */
.detail-pad { padding: 20px 24px; }
.detail-kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; }
.detail-kv span:first-child { color: var(--muted); }
.detail-kv strong { text-align: right; }

/* ===================== MODAL ===================== */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(.97);
  width: min(540px, calc(100vw - 28px));
  max-height: calc(100vh - 48px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  z-index: 160;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
}
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-head {
  padding: 16px 18px 16px 24px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 500; }
.modal-body { padding: 20px 24px 24px; overflow-y: auto; }

/* ===================== FORMS ===================== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-2); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 13.5px; cursor: pointer; }
.check-row input { width: 16px; height: 16px; accent-color: var(--blue); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-soft); }

/* ===================== BANNERS, FOOTER, GUEST, TOAST ===================== */
.banner-bar {
  max-width: 840px;
  margin: 14px auto 0;
  padding: 12px 18px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.banner-bar.danger { background: var(--red-soft); color: var(--red); border: 1px solid rgba(217, 48, 37, .25); }
.banner-bar.info { background: var(--blue-soft); color: var(--blue); border: 1px solid rgba(26, 115, 232, .2); }

.site-footer {
  max-width: 840px;
  margin: 24px auto 40px;
  padding: 20px 20px 0;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
}
.site-footer a, .footer-link-btn {
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  font-size: 12.5px;
}
.site-footer a:hover, .footer-link-btn:hover { color: var(--text); text-decoration: underline; }

.guest-wrap {
  max-width: 620px;
  margin: 36px auto;
  padding: 0 20px;
}
.guest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.guest-hero-art svg { width: 120px; height: 96px; margin-bottom: 14px; }
.guest-card h1 { font-size: 24px; font-weight: 500; margin: 0 0 12px; letter-spacing: -.01em; }
.guest-lead { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 0 0 24px; }
.guest-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.demo-box {
  margin-top: 24px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  border: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.demo-box-text { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--muted); }
.demo-box-text strong { color: var(--text); font-size: 13px; }
.guest-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; text-align: left; }
.gf-item { padding: 12px; border-radius: 10px; background: var(--bg-subtle); border: 1px solid var(--border-soft); display: flex; gap: 9px; align-items: flex-start; }
.gf-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; }
.gf-item strong { display: block; font-size: 12.5px; }
.gf-item small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.guest-ecos { margin-top: 22px; font-size: 12px; color: var(--muted); display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.inline-alert { padding: 12px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 18px; text-align: left; }
.inline-alert-danger { background: var(--red-soft); color: var(--red); }

.empty-state {
  text-align: center;
  padding: 44px 20px;
  color: var(--muted);
}
.empty-state h3 { color: var(--text); font-size: 16px; font-weight: 500; margin: 10px 0 6px; }

.sk-card {
  height: 120px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-hover) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: sk 1.2s infinite;
  margin-bottom: 16px;
}
@keyframes sk { to { background-position: -200% 0; } }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  background: #202124;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: .22s;
  z-index: 220;
  max-width: calc(100vw - 32px);
}
[data-theme="dark"] .toast { background: #e3e3e3; color: #131314; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--red); color: #fff; }

@media (max-width: 780px) {
  .topbar { padding: 0 12px; }
  .brand-word { font-size: 18px; }
  .brand-sub { font-size: 16px; }
  .profile-chip { display: none; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .pm-grid, .sub-grid, .form-grid, .guest-features { grid-template-columns: 1fr; }
  .tabbar-inner { justify-content: flex-start; }
  .settings-row { flex-direction: column; gap: 10px; }
  .alerts-pill span#alerts-pill-text { display: none; }
}
