/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --cat-entertainment: #E24B4A; --cat-entertainment-bg: #FCEBEB; --cat-entertainment-text: #791F1F;
  --cat-productivity:  #7F77DD; --cat-productivity-bg:  #EEEDFE; --cat-productivity-text:  #3C3489;
  --cat-design:        #D4537E; --cat-design-bg:        #FBEAF0; --cat-design-text:        #72243E;
  --cat-cloud:         #378ADD; --cat-cloud-bg:         #E6F1FB; --cat-cloud-text:         #0C447C;
  --cat-ai:            #1D9E75; --cat-ai-bg:            #E1F5EE; --cat-ai-text:            #085041;
  --cat-finance:       #BA7517; --cat-finance-bg:       #FAEEDA; --cat-finance-text:       #633806;
  --cat-other:         #888780; --cat-other-bg:         #F1EFE8; --cat-other-text:         #444441;
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px; --radius-xl: 18px;
  --nav-h: 56px;
}
html { font-size: 15px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f4f0;
  color: #1a1a18;
  min-height: 100vh;
  line-height: 1.5;
}
.hidden { display: none !important; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea {
  font-family: inherit;
  font-size: 13px;
  border: 0.5px solid #d0cfc6;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: #fff;
  color: #1a1a18;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: #7F77DD; box-shadow: 0 0 0 3px rgba(127,119,221,0.12); }

/* ── AUTH SCREEN ── */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f4f0;
}
.auth-card {
  background: #fff;
  border: 0.5px solid #e0dfd6;
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  text-align: center;
  max-width: 360px;
  width: 90%;
}
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}
.logo-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7F77DD, #D4537E);
  display: inline-block;
}
/* Bell icon dalam nav brand */
.nav-brand-bell {
  font-size: 17px;
  background: linear-gradient(135deg, #7F77DD, #D4537E);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.logo-text { font-size: 22px; font-weight: 600; color: #1a1a18; }
.auth-tagline { font-size: 14px; color: #6b6a64; margin-bottom: 32px; line-height: 1.6; }
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 20px;
  border: 0.5px solid #d0cfc6;
  border-radius: var(--radius-md);
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a18;
  transition: background 0.15s, border-color 0.15s;
}
.btn-google:hover { background: #f5f4f0; border-color: #b0afaa; }
.auth-note { font-size: 11px; color: #9b9a94; margin-top: 20px; line-height: 1.7; }

/* ── TOP NAV ── */
.topnav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: #fff;
  border-bottom: 0.5px solid #e0dfd6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}
.nav-left { display: flex; align-items: center; gap: 24px; }
.nav-brand { display: flex; align-items: center; gap: 7px; }
.nav-links { display: flex; }
.nav-link {
  font-size: 13px;
  padding: 0 12px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  color: #6b6a64;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
}
.nav-link:hover { color: #1a1a18; }
.nav-link.active { color: #1a1a18; border-bottom-color: #1a1a18; font-weight: 500; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.btn-add {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  background: #1a1a18;
  color: #fff;
  border: none;
  transition: opacity 0.15s;
}
.btn-add:hover { opacity: 0.85; }
.nav-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #EEEDFE;
  color: #3C3489;
  font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ── PAGE LAYOUT ── */
.page-container { max-width: 1100px; margin: 0 auto; padding: 24px 24px 48px; }
.page { display: flex; flex-direction: column; gap: 20px; }
.page.active { display: flex; }

/* ── METRIC CARDS ── */
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric-card {
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  position: relative; overflow: hidden;
}
.metric-label { font-size: 11px; font-weight: 500; opacity: 0.7; margin-bottom: 6px; }
.metric-value { font-size: 24px; font-weight: 600; line-height: 1; }
.metric-sub { font-size: 11px; margin-top: 5px; opacity: 0.6; }
.metric-icon { position: absolute; right: -4px; bottom: -6px; font-size: 52px; opacity: 0.1; }
.mc-blue  { background: var(--cat-cloud-bg);         color: var(--cat-cloud-text); }
.mc-purple{ background: var(--cat-productivity-bg);  color: var(--cat-productivity-text); }
.mc-teal  { background: var(--cat-ai-bg);            color: var(--cat-ai-text); }
.mc-coral { background: var(--cat-entertainment-bg); color: var(--cat-entertainment-text); }
.mc-warn  { background: #fef7e0; color: #7a5c00; }
[data-theme="dark"] .mc-warn { background: #2e2510; color: #f8b400; }

/* ── PANELS ── */
.panel {
  background: #fff;
  border: 0.5px solid #e0dfd6;
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}
.panel-title {
  font-size: 12px; font-weight: 500;
  color: #6b6a64;
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.panel-link { font-size: 11px; font-weight: 400; color: #9b9a94; cursor: pointer; }
.panel-link:hover { color: #1a1a18; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ── SUBSCRIPTION ITEMS ── */
.sub-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 0.5px solid #f0efe8;
  cursor: pointer;
}
.sub-item:last-child { border-bottom: none; padding-bottom: 0; }
.sub-item:first-child { padding-top: 0; }
.sub-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}
.sub-icon img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.sub-info { flex: 1; min-width: 0; }
.sub-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-meta { font-size: 11px; color: #9b9a94; margin-top: 2px; }
.sub-right { text-align: right; flex-shrink: 0; }
.sub-price { font-size: 13px; font-weight: 500; }
.sub-cycle-label { font-size: 10px; color: #9b9a94; }

/* FULL LIST ITEMS */
.sub-card {
  background: #fff;
  border: 0.5px solid #e0dfd6;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  transition: border-color 0.15s;
  margin-bottom: 8px;
}
.sub-card:hover { border-color: #b0afaa; }
.sub-card-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}
.sub-card-icon img { width: 100%; height: 100%; object-fit: contain; }
.sub-card-info { flex: 1; min-width: 0; }
.sub-card-name { font-size: 14px; font-weight: 500; }
.sub-card-meta { font-size: 11px; color: #6b6a64; margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sub-card-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.sub-card-right { text-align: right; flex-shrink: 0; }
.sub-card-price { font-size: 15px; font-weight: 600; }
.sub-card-cycle { font-size: 10px; color: #9b9a94; margin-top: 1px; }

/* EXPAND ACCOUNTS */
.accounts-expand {
  background: #f8f7f2;
  border: 0.5px solid #e0dfd6;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: -4px 0 10px 56px;
}
.accounts-expand-title { font-size: 10px; font-weight: 600; color: #9b9a94; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.account-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 0;
  border-bottom: 0.5px solid #e8e7e0;
  font-size: 12px;
}
.account-row:last-child { border-bottom: none; }
.account-email { color: #1a1a18; }
.account-date { font-size: 10px; color: #9b9a94; margin-top: 1px; }
.account-amount { font-weight: 500; }

/* ── BADGES ── */
.badge {
  display: inline-block;
  font-size: 9px; font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-active  { background: var(--cat-ai-bg);            color: var(--cat-ai-text); }
.badge-trial   { background: var(--cat-cloud-bg);         color: var(--cat-cloud-text); }
.badge-paused  { background: var(--cat-other-bg);         color: var(--cat-other-text); }
.badge-warn    { background: var(--cat-entertainment-bg); color: var(--cat-entertainment-text); }
.badge-cancelled { background: #fee2e2; color: #991b1b; }

/* ── CATEGORY PILLS ── */
.cat-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
}
.cat-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.tag { font-size: 10px; padding: 2px 7px; border-radius: 20px; background: #f0efe8; color: #6b6a64; border: 0.5px solid #e0dfd6; }

/* ── SECTION DIVIDER ── */
.section-divider-label {
  font-size: 10px; font-weight: 600;
  color: #9b9a94;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 8px 0 10px;
  display: flex; align-items: center; gap: 8px;
}
.section-divider-label::after { content: ''; flex: 1; height: 0.5px; background: #e0dfd6; }

/* ── FILTER CHIPS ── */
.filter-strip { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  font-size: 11px; font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  border: 0.5px solid #d0cfc6;
  background: #fff;
  color: #6b6a64;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.chip:hover { border-color: #9b9a94; color: #1a1a18; }
.chip.active { background: #1a1a18; color: #fff; border-color: #1a1a18; }

/* ── TREND BARS ── */
.trend-wrap { display: flex; align-items: flex-end; gap: 6px; height: 72px; }
.trend-bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.trend-bar { width: 100%; border-radius: 4px 4px 0 0; min-height: 4px; transition: height 0.3s; }
.trend-bar-lbl { font-size: 9px; color: #9b9a94; }

/* ── UPCOMING RENEWALS ── */
.upcoming-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  cursor: pointer;
}
.upcoming-item:last-child { margin-bottom: 0; }
.upcoming-name { font-size: 12px; font-weight: 500; }
.upcoming-date { font-size: 10px; opacity: 0.7; margin-top: 1px; }
.upcoming-amount { font-size: 12px; font-weight: 600; }

/* ── ANALYTICS BARS ── */
.analytics-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.analytics-bar-row:last-child { margin-bottom: 0; }
.analytics-bar-label { font-size: 11px; color: #6b6a64; width: 110px; flex-shrink: 0; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.analytics-bar-track { flex: 1; height: 9px; background: #f0efe8; border-radius: 5px; overflow: hidden; }
.analytics-bar-fill { height: 100%; border-radius: 5px; transition: width 0.5s; }
.analytics-bar-val { font-size: 11px; font-weight: 500; width: 55px; text-align: right; flex-shrink: 0; }

/* ── DONUT ── */
.donut-wrap { display: flex; align-items: center; gap: 16px; }
.donut-legend { display: flex; flex-direction: column; gap: 7px; }
.donut-legend-row { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #6b6a64; }
.donut-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: #fff;
  border-radius: var(--radius-xl);
  border: 0.5px solid #e0dfd6;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 15px; font-weight: 600; }
.modal-close { width: 28px; height: 28px; border-radius: 50%; border: 0.5px solid #e0dfd6; background: #f5f4f0; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; color: #6b6a64; }
.modal-close:hover { background: #e8e7e0; }
.form-group { margin-bottom: 12px; }
.form-label { font-size: 11px; font-weight: 500; color: #6b6a64; display: block; margin-bottom: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.form-divider { height: 0.5px; background: #e8e7e0; margin: 14px 0; }
.form-section-label { font-size: 11px; font-weight: 600; color: #6b6a64; margin-bottom: 8px; }
.accounts-form-box { background: #f8f7f2; border: 0.5px solid #e0dfd6; border-radius: var(--radius-md); padding: 10px 12px; }
.account-form-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.account-form-row:last-of-type { margin-bottom: 0; }
.account-form-row input { flex: 1; }
.btn-remove-acc { width: 24px; height: 24px; border-radius: 50%; border: none; background: #fee2e2; color: #991b1b; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.btn-add-acc { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #9b9a94; background: none; border: none; padding: 6px 0 0; cursor: pointer; }
.btn-add-acc:hover { color: #1a1a18; }
.modal-actions { display: flex; gap: 8px; margin-top: 20px; }
.btn-primary { flex: 1; padding: 10px; font-size: 13px; font-weight: 500; border: none; border-radius: var(--radius-md); background: #1a1a18; color: #fff; transition: opacity 0.15s; }
.btn-primary:hover { opacity: 0.85; }
.btn-ghost { flex: 1; padding: 10px; font-size: 13px; font-weight: 500; border: 0.5px solid #d0cfc6; border-radius: var(--radius-md); background: transparent; color: #1a1a18; transition: background 0.15s; }
.btn-ghost:hover { background: #f5f4f0; }
.btn-danger { flex: 1; padding: 10px; font-size: 13px; font-weight: 500; border: none; border-radius: var(--radius-md); background: #fee2e2; color: #991b1b; transition: opacity 0.15s; }
.btn-danger:hover { opacity: 0.8; }

/* ── TOAST ── */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px; font-weight: 500;
  background: #1a1a18; color: #fff;
  animation: slideIn 0.2s ease;
  max-width: 300px;
}
.toast.success { background: var(--cat-ai-bg); color: var(--cat-ai-text); border: 0.5px solid #5DCAA5; }
.toast.error { background: var(--cat-entertainment-bg); color: var(--cat-entertainment-text); border: 0.5px solid #E24B4A; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ── SETTINGS ── */
.settings-section { background: #fff; border: 0.5px solid #e0dfd6; border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }
.settings-title { font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 0.5px solid #f0efe8; }
.settings-row:last-child { border-bottom: none; }
.settings-row-label { font-size: 13px; }
.settings-row-sub { font-size: 11px; color: #9b9a94; margin-top: 2px; }
.btn-settings-action { font-size: 12px; padding: 6px 14px; border: 0.5px solid #d0cfc6; border-radius: var(--radius-sm); background: #fff; color: #1a1a18; cursor: pointer; }
.btn-settings-action:hover { background: #f5f4f0; }
.btn-settings-danger { font-size: 12px; padding: 6px 14px; border: 0.5px solid #fca5a5; border-radius: var(--radius-sm); background: #fee2e2; color: #991b1b; cursor: pointer; }

/* Reminder day chips */
.settings-row-column { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 0; }
.settings-row-top { display: flex; align-items: flex-start; justify-content: space-between; }
.reminder-status-badge { font-size: 11px; color: #1D9E75; font-weight: 500; white-space: nowrap; padding-top: 2px; }
.reminder-chips-wrap { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.reminder-chip {
  font-size: 12px; font-weight: 500;
  padding: 5px 13px;
  border-radius: 20px;
  border: 0.5px solid #d0cfc6;
  background: #fff;
  color: #6b6a64;
  cursor: pointer;
  transition: all 0.15s;
}
.reminder-chip:hover { border-color: #9b9a94; color: #1a1a18; }
.reminder-chip.active { background: #1a1a18; color: #fff; border-color: #1a1a18; }
.reminder-chips-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.reminder-selected-label { font-size: 11px; color: #9b9a94; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 48px 24px; color: #9b9a94; }
.empty-state-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
.empty-state-title { font-size: 14px; font-weight: 500; color: #6b6a64; margin-bottom: 6px; }
.empty-state-sub { font-size: 12px; }

/* ── SHARE MODAL ── */
.share-link-box { display: flex; gap: 8px; margin-top: 8px; }
.share-link-box input { flex: 1; font-size: 12px; background: #f8f7f2; }
.btn-copy { padding: 8px 14px; font-size: 12px; border: 0.5px solid #d0cfc6; border-radius: var(--radius-sm); background: #fff; cursor: pointer; white-space: nowrap; }
.btn-copy:hover { background: #f5f4f0; }

/* ── LOADING ── */
.loading-state { display: flex; align-items: center; justify-content: center; padding: 48px; color: #9b9a94; font-size: 13px; gap: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 18px; height: 18px; border: 2px solid #e0dfd6; border-top-color: #7F77DD; border-radius: 50%; animation: spin 0.7s linear infinite; }


/* Settings reminder row — standalone, not inheriting settings-row flex */
.settings-reminder-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 0.5px solid #f0efe8;
}
.settings-reminder-row:last-child { border-bottom: none; }
/* ── RESPONSIVE ── */


/* ── SUBSCRIPTIONS FILTER ── */
.subs-filter-wrap { display: flex; flex-direction: column; gap: 8px; }
.subs-sort-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.sort-label { font-size: 11px; color: #9b9a94; }
.sort-select {
  font-size: 12px; padding: 5px 10px;
  border: 0.5px solid #d0cfc6;
  border-radius: 20px;
  background: #fff;
  color: #1a1a18;
  cursor: pointer;
  width: auto;
}
.chip-tag { color: #7F77DD; border-color: #EEEDFE; background: #FAFAFE; }
.chip-tag.active { background: #7F77DD; color: #fff; border-color: #7F77DD; }

/* ── SUBSCRIPTION CARD STATES ── */
.sub-card-paused { opacity: 0.65; }
.paused-tag {
  font-size: 9px; font-weight: 600;
  padding: 1px 6px;
  border-radius: 20px;
  background: #f0efe8;
  color: #888780;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
  margin-left: 4px;
}
.sub-card-fx { font-size: 10px; color: #9b9a94; margin-top: 1px; }
.fx-badge {
  font-size: 9px; font-weight: 600;
  padding: 1px 6px;
  border-radius: 20px;
  background: #FAEEDA;
  color: #633806;
}
.fx-equiv { font-size: 10px; color: #9b9a94; }

/* ── SUBSCRIPTION CARD ACTIONS ── */
.sub-card-actions { display: flex; gap: 4px; margin-top: 6px; justify-content: flex-end; }
.btn-action {
  font-size: 11px; padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  border: 0.5px solid #d0cfc6;
  background: #fff;
  color: #1a1a18;
  transition: opacity 0.15s;
}
.btn-action:hover { opacity: 0.75; }
.btn-action-pause { border-color: #e0dfd6; background: #f5f4f0; color: #6b6a64; }
.btn-action-resume { border-color: #5DCAA5; background: #E1F5EE; color: #085041; }
.btn-action-delete { border-color: #fca5a5; background: #fee2e2; color: #991b1b; }

/* ── ANALYTICS HIGHLIGHTS ── */
.analytics-highlight-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.analytics-highlight-card {
  border-radius: var(--radius-lg);
  border: 0.5px solid #e0dfd6;
  padding: 16px 18px;
  background: #fff;
}
.analytics-highlight-label { font-size: 11px; font-weight: 500; opacity: 0.7; margin-bottom: 6px; }
.analytics-highlight-value { font-size: 22px; font-weight: 600; line-height: 1.1; margin-bottom: 4px; }
.analytics-highlight-sub { font-size: 11px; opacity: 0.65; }


/* ── TREND CHART ── */
.trend-chart-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 140px;
  padding: 16px 0 0;
}
.trend-chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
}
.trend-chart-val {
  font-size: 10px;
  color: #9b9a94;
  white-space: nowrap;
}
.trend-chart-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}
.trend-chart-bar {
  width: 100%;
  border-radius: 5px 5px 0 0;
  background: #EEEDFE;
  min-height: 6px;
  transition: height 0.4s ease;
}
.trend-chart-bar.active { background: #7F77DD; }
.trend-chart-label {
  font-size: 10px;
  color: #9b9a94;
}
.trend-chart-label.active { font-weight: 600; color: #1a1a18; }

/* ── BOTTOM NAV (mobile) ── */
.bottomnav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: #fff;
  border-top: 0.5px solid #e0dfd6;
  z-index: 100;
  padding: 0 2px;
  padding-bottom: env(safe-area-inset-bottom);
  align-items: center;
  justify-content: space-between;
  gap: 0;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  min-width: 0;
  height: 100%;
  color: #9b9a94;
  cursor: pointer;
  transition: color 0.15s;
  text-decoration: none;
  padding: 0 2px;
}
.bottom-nav-item svg {
  width: 20px; height: 20px;
  flex-shrink: 0;
}
.bottom-nav-item span {
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.bottom-nav-item.active { color: #1a1a18; }
.bottom-nav-item:hover { color: #1a1a18; }

/* Add button in bottom nav */
.bottom-nav-add {
  flex: 0 0 48px;
  width: 48px; height: 48px;
  background: #1a1a18;
  color: #fff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  flex-direction: row;
  flex-shrink: 0;
}
.bottom-nav-add span { display: none; }
.bottom-nav-add svg { width: 20px; height: 20px; }



/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  /* Layout */
  .page-container { padding: 16px 16px 80px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .two-col, .three-col { grid-template-columns: 1fr; }
  .analytics-highlight-row { grid-template-columns: 1fr 1fr; }
  .trend-chart-wrap { height: 100px; }

  /* Top nav */
  .nav-links { display: none; }
  .nav-right .btn-add { display: none; }

  /* Bottom nav — show */
  .bottomnav { display: flex !important; }

  /* Modal — slide up from bottom */
  .modal-overlay { align-items: flex-end !important; padding: 0 !important; }
  .modal {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
    max-height: 92vh !important;
    max-width: 100% !important;
  }

  /* Settings reminder chips */
  .settings-row-column { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; }
  .settings-row-top { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .reminder-chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
  .reminder-chip { font-size: 13px; padding: 7px 16px; }
  .reminder-chips-footer { flex-direction: column !important; align-items: flex-start !important; gap: 10px !important; }
  .reminder-chips-footer .btn-settings-action { align-self: flex-end; padding: 8px 20px; }
  .reminder-selected-label { font-size: 12px; line-height: 1.5; }
}

/* ── DASHBOARD TABS ── */
/* dash-tab-content gap */
#dash-tab-content { display: flex; flex-direction: column; gap: 20px; }

.dash-tabs {
  display: flex;
  gap: 4px;
  background: #f0efe8;
  border-radius: var(--radius-lg);
  padding: 4px;
  margin-bottom: 4px;
  width: fit-content;
}
.dash-tab {
  font-size: 13px; font-weight: 500;
  padding: 7px 20px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: #9b9a94;
  cursor: pointer;
  transition: all 0.15s;
}
.dash-tab:hover { color: #1a1a18; }
.dash-tab.active {
  background: #fff;
  color: #1a1a18;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
[data-theme="dark"] .dash-tabs { background: #222220; }
[data-theme="dark"] .dash-tab.active { background: #1a1a18; color: #f0efe8; }
[data-theme="dark"] .dash-tab { color: #6b6a64; }

/* ── FORECAST MONTH ── */
.forecast-month-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 0.5px solid #f0efe8;
}
.forecast-month-row:last-child { border-bottom: none; }
.forecast-month-current { background: #FAFAFE; border-radius: var(--radius-sm); padding: 10px 8px; margin: 0 -8px; }
.forecast-month-label { font-size: 11px; font-weight: 600; color: #9b9a94; padding-top: 2px; }
.forecast-month-subs { display: flex; flex-direction: column; gap: 4px; }
.forecast-sub-item { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #1a1a18; }
.forecast-sub-amt { font-weight: 500; color: #1a1a18; }
.forecast-month-empty { font-size: 11px; color: #b0afaa; }
.forecast-month-total { font-size: 12px; font-weight: 600; color: #7F77DD; white-space: nowrap; padding-top: 2px; }
[data-theme="dark"] .forecast-month-row { border-color: #2e2e2b; }
[data-theme="dark"] .forecast-month-current { background: #1e1d2e; }

/* ── SETTINGS 2-COL ── */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.settings-grid-full { grid-column: 1 / -1; }
@media (max-width: 768px) {
  .settings-grid { grid-template-columns: 1fr; }
  .dash-tabs { width: 100%; }
  .dash-tab { flex: 1; text-align: center; padding: 7px 12px; }
}

/* ══════════════════════════════════════
   LANGGAN — COMPLETE FEATURE CSS
══════════════════════════════════════ */

/* ── DARK MODE ── */
[data-theme="dark"] {
  --bg: #0f0f0e; --surface: #1a1a18; --surface2: #222220;
  --border: #2e2e2b; --border-strong: #3a3a37;
  --ink: #f0efe8; --ink-sec: #9b9a94; --muted: #6b6a64;
}
[data-theme="dark"] body { background: #0f0f0e; color: #f0efe8; }
[data-theme="dark"] .topnav,
[data-theme="dark"] .bottomnav { background: #1a1a18; border-color: #2e2e2b; }
[data-theme="dark"] .panel,
[data-theme="dark"] .settings-section,
[data-theme="dark"] .sub-card,
[data-theme="dark"] .modal,
[data-theme="dark"] .accounts-expand { background: #1a1a18; border-color: #2e2e2b; }
[data-theme="dark"] .metric-card { filter: brightness(0.7); }
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea { background: #222220; border-color: #3a3a37; color: #f0efe8; }
[data-theme="dark"] .chip { background: #1a1a18; border-color: #3a3a37; color: #9b9a94; }
[data-theme="dark"] .chip.active { background: #f0efe8; color: #1a1a18; border-color: #f0efe8; }
[data-theme="dark"] .nav-link { color: #6b6a64; }
[data-theme="dark"] .nav-link.active { color: #f0efe8; border-bottom-color: #f0efe8; }
[data-theme="dark"] .bottom-nav-item { color: #6b6a64; }
[data-theme="dark"] .bottom-nav-item.active { color: #f0efe8; }
[data-theme="dark"] .settings-row { border-color: #2e2e2b; }
[data-theme="dark"] .settings-row-label { color: #f0efe8; }
[data-theme="dark"] .btn-settings-action { background: #222220; border-color: #3a3a37; color: #f0efe8; }
[data-theme="dark"] .upcoming-item { background: #222220 !important; }
[data-theme="dark"] .sub-item { border-color: #2e2e2b; }
[data-theme="dark"] .page-container { background: #0f0f0e; }
[data-theme="dark"] .auth-card { background: #1a1a18; border-color: #2e2e2b; }
[data-theme="dark"] .sort-select,
[data-theme="dark"] .search-input { background: #1a1a18; border-color: #3a3a37; color: #f0efe8; }
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,0.7); }
[data-theme="dark"] .quick-edit-wrap { background: #222220; border-color: #3a3a37; }
[data-theme="dark"] .quick-edit-input { color: #f0efe8; }
[data-theme="dark"] .sub-card-overdue { background: #1f1515; border-color: #7f2020 !important; }
[data-theme="dark"] .forecast-month-current { background: #1e1d2e; }
[data-theme="dark"] .budget-track { background: #2e2e2b; }
[data-theme="dark"] .reseller-card { background: #1a1a18; border-color: #2e2e2b; }

/* ── TOGGLE SWITCH ── */
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: #d0cfc6;
  border-radius: 22px; cursor: pointer; transition: 0.2s;
}
.toggle-slider::before {
  content: ""; position: absolute;
  width: 16px; height: 16px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: #1a1a18; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }
[data-theme="dark"] .toggle-switch input:checked + .toggle-slider { background: #7F77DD; }

/* ── SETTINGS GRID ── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.settings-grid-full { grid-column: 1 / -1; }
.settings-input-row { display: flex; align-items: center; gap: 6px; }
.settings-input-prefix { font-size: 12px; color: #6b6a64; font-weight: 500; }
.settings-input { width: 90px !important; font-size: 13px; padding: 6px 10px; }

/* ── BUDGET PANEL ── */
.budget-panel { padding: 16px 18px; }
.budget-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.budget-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.budget-sub { font-size: 11px; color: #9b9a94; }
.budget-pct { font-size: 20px; font-weight: 700; color: #1D9E75; }
.budget-pct-warn { color: #BA7517; }
.budget-pct-exceed { color: #E24B4A; }
.budget-track { height: 8px; background: #f0efe8; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.budget-fill { height: 100%; background: #1D9E75; border-radius: 8px; transition: width 0.5s ease; }
.budget-fill-warn { background: #BA7517; }
.budget-fill-exceed { background: #E24B4A; }
.budget-alert { font-size: 11px; font-weight: 500; color: #BA7517; }
.budget-exceed .budget-alert { color: #E24B4A; }

/* ── SEARCH BAR ── */
.subs-search-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.search-wrap { flex: 1; position: relative; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #9b9a94; pointer-events: none; }
.search-input {
  width: 100%; padding: 8px 10px 8px 32px;
  border: 0.5px solid #d0cfc6; border-radius: var(--radius-md);
  font-size: 13px; background: #fff; color: #1a1a18;
  outline: none; transition: border-color 0.15s;
}
.search-input:focus { border-color: #7F77DD; box-shadow: 0 0 0 3px rgba(127,119,221,0.12); }

/* ── QUICK EDIT ── */
.quick-edit-wrap {
  display: flex; align-items: center; gap: 5px; margin-top: 6px;
  background: #f8f7f2; border: 0.5px solid #e0dfd6;
  border-radius: var(--radius-sm); padding: 4px 8px; width: fit-content;
}
.quick-edit-input { width: 72px !important; font-size: 12px !important; padding: 3px 6px !important; border: none !important; background: transparent !important; box-shadow: none !important; }
.quick-edit-cur { font-size: 11px; color: #9b9a94; }
.quick-edit-save { font-size: 11px; padding: 2px 7px; border: 0.5px solid #5DCAA5; border-radius: 4px; background: #E1F5EE; color: #085041; cursor: pointer; }
.quick-edit-save:hover { opacity: 0.8; }

/* ── OVERDUE CARD ── */
.sub-card-overdue { border-color: #fca5a5 !important; background: #fff8f8; }
.overdue-tag { font-size: 9px; font-weight: 600; padding: 1px 6px; border-radius: 20px; background: #fee2e2; color: #991b1b; text-transform: uppercase; letter-spacing: 0.04em; vertical-align: middle; margin-left: 4px; }
.btn-action-renew { border-color: #5DCAA5 !important; background: #E1F5EE !important; color: #085041 !important; }

/* ── SUBSCRIPTIONS FILTER ── */
.subs-filter-wrap { display: flex; flex-direction: column; gap: 8px; }
.subs-sort-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.sort-label { font-size: 11px; color: #9b9a94; }
.sort-select { font-size: 12px; padding: 5px 10px; border: 0.5px solid #d0cfc6; border-radius: 20px; background: #fff; color: #1a1a18; cursor: pointer; width: auto; }
.chip-tag { color: #7F77DD; border-color: #EEEDFE; background: #FAFAFE; }
.chip-tag.active { background: #7F77DD; color: #fff; border-color: #7F77DD; }
.sub-card-paused { opacity: 0.65; }
.paused-tag { font-size: 9px; font-weight: 600; padding: 1px 6px; border-radius: 20px; background: #f0efe8; color: #888780; text-transform: uppercase; letter-spacing: 0.04em; vertical-align: middle; margin-left: 4px; }
.sub-card-fx { font-size: 10px; color: #9b9a94; margin-top: 1px; }
.fx-badge { font-size: 9px; font-weight: 600; padding: 1px 6px; border-radius: 20px; background: #FAEEDA; color: #633806; }
.sub-card-actions { display: flex; gap: 4px; margin-top: 6px; justify-content: flex-end; }
.btn-action { font-size: 11px; padding: 3px 8px; border-radius: 5px; cursor: pointer; border: 0.5px solid #d0cfc6; background: #fff; color: #1a1a18; transition: opacity 0.15s; }
.btn-action:hover { opacity: 0.75; }
.btn-action-pause { border-color: #e0dfd6; background: #f5f4f0; color: #6b6a64; }
.btn-action-resume { border-color: #5DCAA5; background: #E1F5EE; color: #085041; }
.btn-action-delete { border-color: #fca5a5; background: #fee2e2; color: #991b1b; }

/* ── ANALYTICS HIGHLIGHTS ── */
.analytics-highlight-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.analytics-highlight-card { border-radius: var(--radius-lg); border: 0.5px solid #e0dfd6; padding: 16px 18px; background: #fff; }
.analytics-highlight-label { font-size: 11px; font-weight: 500; opacity: 0.7; margin-bottom: 6px; }
.analytics-highlight-value { font-size: 22px; font-weight: 600; line-height: 1.1; margin-bottom: 4px; }
.analytics-highlight-sub { font-size: 11px; opacity: 0.65; }

/* ── TREND CHART ── */
.trend-chart-wrap { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding: 16px 0 0; }
.trend-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.trend-chart-val { font-size: 10px; color: #9b9a94; white-space: nowrap; }
.trend-chart-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.trend-chart-bar { width: 100%; border-radius: 5px 5px 0 0; background: #EEEDFE; min-height: 6px; transition: height 0.4s ease; }
.trend-chart-bar.active { background: #7F77DD; }
.trend-chart-label { font-size: 10px; color: #9b9a94; }
.trend-chart-label.active { font-weight: 600; color: #1a1a18; }

/* ── DASHBOARD TABS ── */
#dash-tab-content { display: flex; flex-direction: column; gap: 20px; }
.dash-tabs { display: flex; gap: 4px; background: #f0efe8; border-radius: var(--radius-lg); padding: 4px; margin-bottom: 4px; width: fit-content; }
.dash-tab { font-size: 13px; font-weight: 500; padding: 7px 20px; border-radius: var(--radius-md); border: none; background: transparent; color: #9b9a94; cursor: pointer; transition: all 0.15s; }
.dash-tab:hover { color: #1a1a18; }
.dash-tab.active { background: #fff; color: #1a1a18; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
[data-theme="dark"] .dash-tabs { background: #222220; }
[data-theme="dark"] .dash-tab.active { background: #1a1a18; color: #f0efe8; }
[data-theme="dark"] .dash-tab { color: #6b6a64; }

/* ── FORECAST ── */
.forecast-month-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: start; gap: 12px; padding: 10px 0; border-bottom: 0.5px solid #f0efe8; }
.forecast-month-row:last-child { border-bottom: none; }
.forecast-month-current { background: #FAFAFE; border-radius: var(--radius-sm); padding: 10px 8px; margin: 0 -8px; }
.forecast-month-label { font-size: 11px; font-weight: 600; color: #9b9a94; padding-top: 2px; }
.forecast-month-subs { display: flex; flex-direction: column; gap: 4px; }
.forecast-sub-item { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #1a1a18; }
.forecast-sub-amt { font-weight: 500; color: #1a1a18; }
.forecast-month-empty { font-size: 11px; color: #b0afaa; }
.forecast-month-total { font-size: 12px; font-weight: 600; color: #7F77DD; white-space: nowrap; padding-top: 2px; }

/* ── SETTINGS REMINDER ── */
.settings-reminder-row { display: flex; flex-direction: column; gap: 12px; padding: 12px 0; border-bottom: 0.5px solid #f0efe8; }
.settings-reminder-row:last-child { border-bottom: none; }
.settings-row-top { display: flex; align-items: flex-start; justify-content: space-between; }
.reminder-status-badge { font-size: 11px; color: #1D9E75; font-weight: 500; white-space: nowrap; padding-top: 2px; }
.reminder-chips-wrap { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.reminder-chip { font-size: 12px; font-weight: 500; padding: 5px 13px; border-radius: 20px; border: 0.5px solid #d0cfc6; background: #fff; color: #6b6a64; cursor: pointer; transition: all 0.15s; }
.reminder-chip:hover { border-color: #9b9a94; color: #1a1a18; }
.reminder-chip.active { background: #1a1a18; color: #fff; border-color: #1a1a18; }
.reminder-chips-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.reminder-selected-label { font-size: 11px; color: #9b9a94; }

/* ── RESPONSIVE ADDITIONS ── */
@media (max-width: 768px) {
  .analytics-highlight-row { grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .dash-tabs { width: 100%; }
  .dash-tab { flex: 1; text-align: center; padding: 7px 12px; }
  .reminder-chips-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .reminder-chips-footer .btn-settings-action { align-self: flex-end; }
}

/* ══════════════════════════════════════
   AVATAR DROPDOWN
══════════════════════════════════════ */
.nav-avatar-wrap { position: relative; }

/* ── REFRESH BUTTON ── */
.btn-nav-refresh {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: none; border: none; cursor: pointer;
  color: #6b6a64; border-radius: var(--radius-sm);
  font-size: 13px;
  transition: color 0.15s, background 0.15s;
}
.btn-nav-refresh:hover { color: #1a1a18; background: #f0efe8; }
.btn-nav-refresh.spinning i { animation: spin 0.6s linear; display: inline-block; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
[data-theme="dark"] .btn-nav-refresh { color: #9b9a94; }
[data-theme="dark"] .btn-nav-refresh:hover { color: #f0efe8; background: #2a2a28; }

/* ══════════════════════════════════════
   MORE BOTTOM SHEET
══════════════════════════════════════ */
.more-sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 150;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.more-sheet-overlay.visible { opacity: 1; pointer-events: all; }

.more-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  border-top: 0.5px solid #e0dfd6;
  z-index: 151;
  padding: 0 0 env(safe-area-inset-bottom);
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}
.more-sheet.open { transform: translateY(0); }

.more-sheet-handle {
  width: 36px; height: 4px;
  background: #e0dfd6; border-radius: 2px;
  margin: 10px auto 4px;
}

.more-sheet-items {
  padding: 8px 0 12px;
}

.more-sheet-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  color: #1a1a18; text-decoration: none;
  cursor: pointer;
  transition: background 0.12s;
}
.more-sheet-item:active { background: #f5f4f0; }

.more-sheet-icon {
  width: 36px; height: 36px;
  background: #f5f4f0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #1a1a18; flex-shrink: 0;
}

.more-sheet-label {
  flex: 1;
  font-size: 15px; font-weight: 500;
  color: #1a1a18;
}

.more-sheet-chevron { color: #c0bfb8; flex-shrink: 0; }

[data-theme="dark"] .more-sheet { background: #1a1a18; border-color: #2e2e2b; }
[data-theme="dark"] .more-sheet-handle { background: #3a3a37; }
[data-theme="dark"] .more-sheet-item:active { background: #222220; }
[data-theme="dark"] .more-sheet-icon { background: #2a2a28; color: #f0efe8; }
[data-theme="dark"] .more-sheet-label { color: #f0efe8; }
[data-theme="dark"] .more-sheet-chevron { color: #4a4a47; }
.avatar-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 0.5px solid #e0dfd6;
  border-radius: var(--radius-lg); box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  min-width: 200px; z-index: 200; overflow: hidden;
}
.avatar-dropdown-header { padding: 14px 16px; }
.avatar-dropdown-name { font-size: 13px; font-weight: 600; color: #1a1a18; margin-bottom: 2px; }
.avatar-dropdown-email { font-size: 11px; color: #9b9a94; }
.avatar-dropdown-divider { height: 0.5px; background: #e0dfd6; }
.avatar-dropdown-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 16px;
  font-size: 13px; color: #1a1a18;
  background: none; border: none; cursor: pointer; text-align: left;
  transition: background 0.15s;
}
.avatar-dropdown-item:hover { background: #f5f4f0; }
.avatar-dropdown-signout { color: #E24B4A; }
.avatar-dropdown-signout:hover { background: #fee2e2; }
[data-theme="dark"] .avatar-dropdown { background: #1a1a18; border-color: #2e2e2b; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
[data-theme="dark"] .avatar-dropdown-item { color: #f0efe8; }
[data-theme="dark"] .avatar-dropdown-item:hover { background: #222220; }

/* ── SPENDING INSIGHTS ── */
.insights-strip { display: flex; flex-direction: column; gap: 8px; }
.insight-chip {
  display: flex; align-items: flex-start; gap: 10px;
  background: #f8f7f2; border: 0.5px solid #e8e7e0;
  border-radius: var(--radius-md); padding: 10px 14px;
  font-size: 12px; color: #6b6a64; line-height: 1.5;
}
.insight-chip strong { color: #1a1a18; }
.insight-warn { background: #FFFBF5; border-color: #FAEEDA; }
.insight-warn strong { color: #633806; }
.insight-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.insight-text { flex: 1; }
[data-theme="dark"] .insight-chip { background: #222220; border-color: #2e2e2b; }
[data-theme="dark"] .insight-chip strong { color: #f0efe8; }
[data-theme="dark"] .insight-warn { background: #1a1500; border-color: #4a3500; }

/* ── ONBOARDING ── */
.onboarding-modal { text-align: center; max-width: 420px; }
.onboarding-progress { height: 4px; background: #f0efe8; border-radius: 4px; margin-bottom: 28px; overflow: hidden; }
.onboarding-bar { height: 100%; background: linear-gradient(90deg, #7F77DD, #D4537E); border-radius: 4px; transition: width 0.3s ease; }
.onboarding-icon { font-size: 48px; margin-bottom: 16px; }
.onboarding-title { font-size: 20px; font-weight: 700; color: #1a1a18; margin-bottom: 8px; }
.onboarding-sub { font-size: 13px; color: #6b6a64; margin-bottom: 12px; line-height: 1.6; }
.onboarding-sub-hint { font-size: 12px; color: #9b9a94; background: #f5f4f0; padding: 8px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; }
.onboarding-features { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 24px; text-align: left; }
.onboarding-feature { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #1a1a18; padding: 8px 14px; background: #f8f7f2; border-radius: var(--radius-sm); }
.onboarding-budget-row { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 16px 0 24px; }
.onboarding-budget-prefix { font-size: 18px; font-weight: 600; color: #1a1a18; }
.onboarding-budget-input { font-size: 24px; font-weight: 700; width: 140px; text-align: center; padding: 10px 16px; border: 2px solid #7F77DD; border-radius: var(--radius-md); color: #1a1a18; }
.ob-skip-link { display: block; margin-top: 12px; background: none; border: none; font-size: 12px; color: #9b9a94; cursor: pointer; text-decoration: underline; }

/* ── REVENUE CALENDAR ── */
.revenue-cal-header { margin-bottom: 16px; }
.revenue-cal-row {
  display: grid; grid-template-columns: 52px 1fr auto;
  gap: 14px; padding: 12px 0;
  border-bottom: 0.5px solid #f0efe8; align-items: start;
}
.revenue-cal-row:last-child { border-bottom: none; }
.revenue-cal-current { background: #FAFAFE; border-radius: var(--radius-md); padding: 12px 10px; margin: 0 -10px; }
.revenue-cal-month { text-align: center; }
.revenue-cal-month-label { font-size: 12px; font-weight: 700; color: #1a1a18; }
.revenue-cal-month-year { font-size: 10px; color: #9b9a94; }
.revenue-cal-content { display: flex; flex-direction: column; gap: 6px; }
.revenue-cal-item { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.revenue-cal-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.revenue-cal-name { font-size: 12px; font-weight: 500; color: #1a1a18; }
.revenue-cal-service { font-size: 10px; color: #9b9a94; }
.revenue-cal-amount { font-size: 11px; font-weight: 600; color: #1D9E75; margin-left: auto; }
.revenue-cal-cost { color: #E24B4A !important; }
.revenue-cal-date { font-size: 10px; color: #9b9a94; }
.revenue-cal-empty { font-size: 11px; color: #b0afaa; }
.revenue-cal-total { text-align: right; flex-shrink: 0; }
.revenue-cal-total-rev { font-size: 12px; font-weight: 600; color: #1D9E75; }
.revenue-cal-total-cost { font-size: 12px; font-weight: 600; color: #E24B4A; }
[data-theme="dark"] .revenue-cal-row { border-color: #2e2e2b; }
[data-theme="dark"] .revenue-cal-current { background: #1e1d2e; }
[data-theme="dark"] .revenue-cal-name { color: #f0efe8; }

/* ── WA BUTTON IN SLOT ── */
.btn-wa-slot { color: #1D9E75 !important; border-color: #5DCAA5 !important; background: #E1F5EE !important; }

@media (max-width: 768px) {
  .revenue-cal-row { grid-template-columns: 44px 1fr; }
  .revenue-cal-total { grid-column: 2; }
  .insights-strip { gap: 6px; }
}

/* ── DARK MODE ADDITIONAL FIXES ── */
[data-theme="dark"] .nav-brand .logo-text { color: #f0efe8; }
[data-theme="dark"] .logo-dot { background: linear-gradient(135deg, #7F77DD, #D4537E); }
[data-theme="dark"] .nav-brand-bell {
  background: linear-gradient(135deg, #9b94f0, #e87aad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="dark"] .panel-title { color: #f0efe8; }
[data-theme="dark"] .sub-name,
[data-theme="dark"] .sub-card-name,
[data-theme="dark"] .sub-card-price,
[data-theme="dark"] .upcoming-name,
[data-theme="dark"] .upcoming-amount { color: #f0efe8; }
[data-theme="dark"] .sub-meta,
[data-theme="dark"] .sub-card-meta,
[data-theme="dark"] .sub-card-cycle,
[data-theme="dark"] .upcoming-date,
[data-theme="dark"] .sub-price { color: #6b6a64; }
[data-theme="dark"] .section-divider-label { color: #6b6a64; border-color: #2e2e2b; }
[data-theme="dark"] .analytics-bar-track { background: #2e2e2b; }
[data-theme="dark"] .analytics-bar-label,
[data-theme="dark"] .analytics-bar-val { color: #9b9a94; }
[data-theme="dark"] .donut-legend-row { color: #9b9a94; }
[data-theme="dark"] table td,
[data-theme="dark"] table th { color: #9b9a94; border-color: #2e2e2b !important; }
[data-theme="dark"] .settings-row-sub { color: #6b6a64; }
[data-theme="dark"] .settings-title { color: #9b9a94; }
[data-theme="dark"] .badge { border: 0.5px solid #3a3a37; }
[data-theme="dark"] .insight-chip { background: #222220; border-color: #2e2e2b; color: #9b9a94; }
[data-theme="dark"] .insight-chip strong { color: #f0efe8; }
[data-theme="dark"] .forecast-card { background: #222220; }
[data-theme="dark"] .forecast-card-mid { background: #1e1d2e; }
[data-theme="dark"] .forecast-value { color: #f0efe8; }
[data-theme="dark"] .dash-tab { color: #6b6a64; }
[data-theme="dark"] .reseller-card-title { color: #f0efe8; }
[data-theme="dark"] .reseller-stat-value { color: #f0efe8; }
[data-theme="dark"] .slot-name { color: #f0efe8; }
[data-theme="dark"] .slot-empty-label { color: #6b6a64; }
[data-theme="dark"] .metric-label { color: rgba(255,255,255,0.6); }
[data-theme="dark"] .metric-sub { color: rgba(255,255,255,0.5); }
[data-theme="dark"] .metric-value { color: inherit; }
[data-theme="dark"] .btn-action { background: #222220; border-color: #3a3a37; color: #9b9a94; }
[data-theme="dark"] .accounts-expand { background: #222220; border-color: #2e2e2b; }
[data-theme="dark"] .account-email { color: #9b9a94; }
[data-theme="dark"] .form-label { color: #9b9a94; }
[data-theme="dark"] .modal-title { color: #f0efe8; }
[data-theme="dark"] .modal-header { border-color: #2e2e2b; }
[data-theme="dark"] .modal-actions { border-color: #2e2e2b; }
[data-theme="dark"] .panel-link { color: #7F77DD; }
[data-theme="dark"] .filter-strip { border-color: #2e2e2b; }
[data-theme="dark"] .reseller-card-meta { color: #6b6a64; }

/* ══════════════════════════════════════
   RENEWAL OVERRIDE + RENEW MODAL
══════════════════════════════════════ */

/* Override badge in subscription card */
.next-renewal-badge {
  font-size: 10px; font-weight: 500;
  color: #3C3489; background: #EEEDFE;
  border-radius: 20px; padding: 2px 9px;
  display: inline-block; margin-top: 4px;
}
[data-theme="dark"] .next-renewal-badge { background: #1e1d2e; color: #9b98e8; }

/* Override section in edit form */
.form-divider-section {
  border-top: 0.5px solid #e8e7e0;
  padding-top: 14px; margin-top: 4px;
}
.form-section-label {
  font-size: 11px; font-weight: 600;
  color: #6b6a64; text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.form-section-hint {
  font-size: 10px; font-weight: 400;
  color: #9b9a94; text-transform: none;
  letter-spacing: 0;
}
.next-renewal-active {
  font-size: 11px; color: #3C3489;
  background: #EEEDFE; border-radius: var(--radius-sm);
  padding: 6px 10px; margin-top: 8px;
}
[data-theme="dark"] .form-divider-section { border-color: #2e2e2b; }
[data-theme="dark"] .next-renewal-active { background: #1e1d2e; color: #9b98e8; }

/* Renew modal */
.renew-modal { max-width: 420px; }
.renew-override-banner {
  background: #EEEDFE; border: 0.5px solid #7F77DD;
  border-radius: var(--radius-md); padding: 10px 14px;
  font-size: 12px; color: #3C3489; margin-bottom: 14px;
}
.renew-override-detail {
  font-size: 11px; margin-top: 4px; color: #6b6a64;
}
.renew-override-detail strong { color: #3C3489; }
.renew-current-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; margin-bottom: 12px;
  border-bottom: 0.5px solid #f0efe8;
}
.renew-label { font-size: 11px; color: #9b9a94; width: 70px; flex-shrink: 0; }
.renew-value { font-size: 13px; font-weight: 600; color: #1a1a18; }
[data-theme="dark"] .renew-override-banner { background: #1e1d2e; border-color: #7F77DD; color: #9b98e8; }
[data-theme="dark"] .renew-current-row { border-color: #2e2e2b; }
[data-theme="dark"] .renew-value { color: #f0efe8; }

/* ── DOMAIN / HOSTING ── */
.hosting-domain-pill {
  font-size: 10px; font-weight: 500;
  color: #085041; background: #E1F5EE;
  padding: 1px 7px; border-radius: 20px;
}
[data-theme="dark"] .hosting-domain-pill { background: #0d1f17; color: #5DCAA5; }

/* ══════════════════════════════════════
   BATCH A — NEW FEATURES
══════════════════════════════════════ */

/* ── DASHBOARD OVERVIEW LAYOUT ── */
.dash-overview-top {
  display: flex; justify-content: flex-end;
  margin-bottom: 12px;
}
.dash-currency-toggle {
  display: flex; gap: 2px;
  background: #f0efe8; border-radius: 20px;
  padding: 3px;
}
.currency-toggle-btn {
  font-size: 11px; font-weight: 500;
  padding: 4px 12px; border-radius: 20px;
  border: none; background: transparent;
  color: #9b9a94; cursor: pointer; transition: all 0.15s;
}
.currency-toggle-btn.active {
  background: #fff; color: #1a1a18;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
[data-theme="dark"] .dash-currency-toggle { background: #222220; }
[data-theme="dark"] .currency-toggle-btn.active { background: #1a1a18; color: #f0efe8; }

.overview-grid {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 16px;
  align-items: start;
}
.overview-main { display: flex; flex-direction: column; gap: 16px; }
.overview-sidebar { display: flex; flex-direction: column; gap: 14px; }

@media (max-width: 900px) {
  .overview-grid { grid-template-columns: 1fr; }
  .overview-sidebar { order: -1; }
}

/* ── HEALTH SCORE ── */
.health-score-wrap {
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
}
.health-gauge { display: flex; justify-content: center; }
.health-factors { width: 100%; display: flex; flex-direction: column; gap: 5px; }
.health-factor {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; padding: 5px 8px;
  border-radius: var(--radius-sm);
}
.health-factor-great  { background: #E1F5EE; color: #085041; }
.health-factor-good   { background: #E1F5EE; color: #085041; }
.health-factor-medium { background: #FAEEDA; color: #633806; }
.health-factor-high   { background: #FCEBEB; color: #791F1F; }
.health-factor-low    { background: #f5f4f0; color: #6b6a64; }
.health-factor-icon   { font-size: 13px; flex-shrink: 0; }
.health-factor-label  { line-height: 1.3; }
[data-theme="dark"] .health-factor-great  { background: #0d1f17; color: #5DCAA5; }
[data-theme="dark"] .health-factor-medium { background: #1a1500; color: #BA7517; }
[data-theme="dark"] .health-factor-high   { background: #1f0d0d; color: #E24B4A; }
[data-theme="dark"] .health-factor-low    { background: #222220; color: #9b9a94; }

/* ── DUPLICATE DETECTOR ── */
.duplicates-banner {
  background: #FFFBF5; border: 0.5px solid #FAEEDA;
  border-radius: var(--radius-lg); padding: 12px 16px;
  margin-bottom: 4px;
}
.duplicates-banner-title {
  font-size: 12px; font-weight: 600;
  color: #633806; margin-bottom: 8px;
}
.duplicate-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: #6b6a64; padding: 4px 0;
  border-top: 0.5px solid #f0efe8;
}
.duplicate-icon { font-size: 13px; flex-shrink: 0; margin-top: 1px; }
.duplicate-msg  { line-height: 1.4; }
[data-theme="dark"] .duplicates-banner { background: #1a1500; border-color: #4a3500; }
[data-theme="dark"] .duplicates-banner-title { color: #BA7517; }
[data-theme="dark"] .duplicate-item { border-color: #2e2e2b; color: #9b9a94; }

/* ── COST PER USE ── */
.sub-card-cpu {
  font-size: 10px; color: #1D9E75;
  font-weight: 500; margin-top: 2px;
}
.usage-freq-row {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.usage-freq-input  { width: 70px !important; }
.usage-freq-select { width: auto !important; }
.usage-freq-sep    { font-size: 12px; color: #6b6a64; white-space: nowrap; }
.cost-per-use-preview {
  font-size: 11px; color: #9b9a94;
  margin-top: 5px; font-style: italic;
}
.form-label-hint {
  font-size: 10px; font-weight: 400;
  color: #9b9a94; font-style: italic;
}

/* ══════════════════════════════════════
   BATCH B — NEW FEATURE STYLES
══════════════════════════════════════ */

/* B1 — Invoice button */
.btn-action-invoice {
  background: #EEEDFE;
  color: #3C3489;
  border-color: #c8c6f8;
}
.btn-action-invoice:hover { background: #dddcfd; }

/* Invoice modal summary chips already inline-styled */

/* B2 — CSV Import */
.btn-csv-import {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #d4d3cc;
  border-radius: 8px;
  background: #f8f7f2;
  color: #1a1a18;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}
.btn-csv-import:hover { background: #EEEDFE; border-color: #7F77DD; color: #3C3489; }

/* ── Subs tools row (below search) ── */
.subs-tools-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.subs-tool-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid #d4d3cc;
  border-radius: 8px;
  background: #f8f7f2;
  color: #6b6a64;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.subs-tool-btn:hover { background: #EEEDFE; border-color: #7F77DD; color: #3C3489; }
.subs-tool-btn svg { flex-shrink: 0; }

@media (max-width: 768px) {
  .subs-tools-row { gap: 5px; }
  .subs-tool-btn { padding: 6px 8px; font-size: 10px; }
  .subs-tool-btn span { display: none; } /* Icon-only on mobile */
  .subs-tool-btn { padding: 7px 9px; }  /* Slightly bigger tap area */
}

.csv-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #d4d3cc;
  border-radius: 12px;
  padding: 32px 20px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}
.csv-upload-zone:hover { border-color: #7F77DD; background: #EEEDFE20; }

.csv-candidate-row:last-child label { border-bottom: none !important; }
.csv-check { accent-color: #7F77DD; }

/* B3 — Mobile swipe actions */
.sub-card {
  position: relative;
  overflow: hidden;
}
.swipe-action-left,
.swipe-action-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  font-size: 12px;
  font-weight: 600;
  border-radius: 10px;
  gap: 6px;
}
.swipe-action-left {
  left: 0;
  background: linear-gradient(90deg, #EEEDFE 0%, transparent 100%);
  color: #3C3489;
  padding-left: 16px;
  justify-content: flex-start;
}
.swipe-action-right {
  right: 0;
  background: linear-gradient(270deg, #FCEBEB 0%, transparent 100%);
  color: #791F1F;
  padding-right: 16px;
  justify-content: flex-end;
}
.swipe-action-left svg, .swipe-action-right svg { flex-shrink: 0; }

/* Only show swipe hints on mobile */
@media (min-width: 769px) {
  .swipe-action-left,
  .swipe-action-right { display: none; }
}

/* B4 — Alternatives in expand panel */
/* Styles are inline within buildExpand, no extra classes needed */

/* Dark mode for new elements */
[data-theme="dark"] .btn-csv-import {
  background: #1a1a18;
  border-color: #3a3a37;
  color: #f0efe8;
}
[data-theme="dark"] .btn-csv-import:hover {
  background: #2a2a28;
  border-color: #7F77DD;
  color: #a5a2f6;
}
[data-theme="dark"] .csv-upload-zone {
  border-color: #3a3a37;
  background: #1a1a18;
  color: #f0efe8;
}
[data-theme="dark"] .csv-upload-zone:hover {
  border-color: #7F77DD;
  background: #22213a;
}
[data-theme="dark"] .swipe-action-left {
  background: linear-gradient(90deg, #2a2a40 0%, transparent 100%);
  color: #a5a2f6;
}
[data-theme="dark"] .swipe-action-right {
  background: linear-gradient(270deg, #3a1f1f 0%, transparent 100%);
  color: #fca5a5;
}
[data-theme="dark"] .btn-action-invoice {
  background: #22213a;
  color: #a5a2f6;
  border-color: #3d3c60;
}

/* @media print — Invoice PDF clean output */
@media print {
  #modal-overlay { position: static !important; background: none !important; }
  #modal-container { position: static !important; }
  .modal-header, .modal-actions, #btn-print-invoice, #inv-slot-filter,
  .topnav, .bottomnav, .dash-tabs, .subs-filter-wrap { display: none !important; }
}

/* ══════════════════════════════════════
   BATCH C — NEW FEATURE STYLES
══════════════════════════════════════ */

/* C1 — Audit Mode */
.audit-modal { max-width: 460px; width: 96vw; }

.audit-progress-wrap {
  height: 4px;
  background: #f0efe8;
  border-radius: 2px;
  margin-bottom: 6px;
  overflow: hidden;
}
.audit-progress-bar {
  height: 100%;
  background: #7F77DD;
  border-radius: 2px;
  transition: width 0.3s ease;
}
.audit-progress-label {
  font-size: 11px;
  color: #9b9a94;
  text-align: right;
  margin-bottom: 16px;
}
.audit-card {
  border: 1.5px solid #e8e7e0;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
}
.audit-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}
.audit-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.audit-card-name { font-size: 16px; font-weight: 600; color: #1a1a18; }
.audit-card-cat  { font-size: 11px; font-weight: 500; margin-top: 2px; }
.audit-card-body { padding: 14px 16px; }
.audit-stat-row  { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 10px; margin-bottom: 10px; }
.audit-stat { text-align: center; background: #f8f7f2; border-radius: 8px; padding: 10px 8px; }
.audit-stat-label { font-size: 10px; color: #9b9a94; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.audit-stat-val   { font-size: 15px; font-weight: 700; color: #1a1a18; margin-top: 3px; }
.audit-stat-warn  { color: #E24B4A !important; }
.audit-notes { font-size: 11px; color: #6b6a64; margin-top: 6px; }
.audit-tags  { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.audit-question {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a18;
  text-align: center;
  margin-bottom: 14px;
}
.audit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.audit-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: 12px;
  border: 1.5px solid;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.audit-btn:hover    { transform: translateY(-2px); }
.audit-btn:active   { transform: scale(0.97); }
.audit-cancel { background: #FCEBEB; border-color: #fca5a5; color: #991b1b; }
.audit-pause  { background: #FAEEDA; border-color: #fcd34d; color: #633806; }
.audit-keep   { background: #E1F5EE; border-color: #6ee7b7; color: #085041; }
.audit-skip {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: #9b9a94;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.audit-skip:hover { color: #1a1a18; }

/* Audit Report */
.audit-report-summary {
  background: #f8f7f2;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}
.audit-report-saving-label { font-size: 11px; color: #9b9a94; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.audit-report-saving-val   { font-size: 28px; font-weight: 700; color: #1D9E75; margin: 6px 0 2px; }
.audit-report-saving-sub   { font-size: 11px; color: #6b6a64; }
.audit-report-review {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 0.5px solid #e8e7e0;
  text-align: center;
}
.audit-report-review-label { font-size: 11px; color: #9b9a94; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.audit-report-review-val   { font-size: 20px; font-weight: 700; color: #BA7517; margin: 4px 0 2px; }
.audit-report-review-sub   { font-size: 11px; color: #BA7517; }
.audit-report-chips { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.audit-chip { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.audit-chip-keep   { background: #E1F5EE; color: #085041; }
.audit-chip-pause  { background: #FAEEDA; color: #633806; }
.audit-chip-cancel { background: #FCEBEB; color: #991b1b; }
.audit-report-list { margin-bottom: 16px; }
.audit-report-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 0.5px solid #f0efe8;
}
.audit-report-item-icon  { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.audit-report-item-name  { font-size: 13px; font-weight: 500; }
.audit-report-item-amt   { font-size: 11px; color: #9b9a94; margin-top: 1px; }
.audit-report-item-action { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 6px; margin-left: auto; flex-shrink: 0; }

/* C2 — Renewal Calendar */
.cal-summary-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.cal-summary-card { position: relative; overflow: hidden; }

.cal-month-panel { margin-bottom: 14px; }
.cal-month-title { font-size: 14px; font-weight: 600; color: #1a1a18; margin-bottom: 12px; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-day-header {
  font-size: 10px;
  font-weight: 600;
  color: #9b9a94;
  text-align: center;
  padding: 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 12px;
  color: #6b6a64;
  cursor: default;
  position: relative;
  transition: background 0.1s;
}
.cal-day-empty { background: transparent; }
.cal-day-today { background: #EEEDFE; color: #3C3489; font-weight: 700; }
.cal-day-has-renewal {
  background: #E1F5EE;
  color: #085041;
  font-weight: 600;
  cursor: pointer;
}
.cal-day-has-renewal:hover { background: #1D9E75; color: #fff; }
.cal-day-num { font-size: 12px; line-height: 1; }
.cal-day-dot {
  width: 4px;
  height: 4px;
  background: #1D9E75;
  border-radius: 50%;
  margin-top: 2px;
}
.cal-day-has-renewal:hover .cal-day-dot { background: #fff; }

.cal-detail-panel {
  margin-bottom: 14px;
  border-color: #1D9E75 !important;
}
.cal-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.cal-detail-date  { font-size: 13px; font-weight: 600; color: #1a1a18; }
.cal-detail-total { font-size: 15px; font-weight: 700; color: #1D9E75; }
.cal-detail-item  { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 0.5px solid #f0efe8; }
.cal-detail-icon  { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.cal-detail-name  { font-size: 13px; font-weight: 500; }
.cal-detail-cat   { font-size: 11px; color: #9b9a94; margin-top: 1px; }
.cal-detail-amt   { font-size: 14px; font-weight: 600; color: #1a1a18; margin-left: auto; }

/* C4 — Smart tag suggestions */
.tag-suggest-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.tag-suggest-label { font-size: 11px; color: #9b9a94; flex-shrink: 0; }
.tag-suggest-chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #EEEDFE;
  color: #3C3489;
  border: 1px solid #c8c6f8;
  cursor: pointer;
  transition: background 0.15s;
}
.tag-suggest-chip:hover { background: #7F77DD; color: #fff; border-color: #7F77DD; }

/* C5 — Sub groups */
.group-section { margin-bottom: 8px; }
.group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 4px 6px;
  border-bottom: 1.5px solid #e8e7e0;
  margin-bottom: 6px;
}
.group-tag-label { font-size: 12px; font-weight: 600; color: #7F77DD; }
.group-tag-count { font-size: 11px; color: #9b9a94; }
.group-tag-total { font-size: 12px; font-weight: 600; color: #1a1a18; margin-left: auto; }

/* C6 — Countdown widget */
.countdown-widget { padding: 16px; }
.countdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 0.5px solid #f0efe8;
}
.countdown-item:last-child { border-bottom: none; }
.countdown-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.countdown-info { flex: 1; min-width: 0; }
.countdown-name { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.countdown-amt  { font-size: 11px; color: #9b9a94; }
.countdown-days { text-align: center; flex-shrink: 0; min-width: 36px; }
.countdown-days-num   { font-size: 18px; font-weight: 700; color: #7F77DD; line-height: 1; }
.countdown-days-label { font-size: 9px; color: #9b9a94; text-transform: uppercase; letter-spacing: 0.05em; }
.countdown-urgent .countdown-days-num { color: #E24B4A; }
.countdown-soon   .countdown-days-num { color: #BA7517; }

/* C8 — Annual review */
.annual-header { text-align: center; padding: 8px 0 20px; }
.annual-year {
  font-size: 48px;
  font-weight: 800;
  color: #7F77DD;
  line-height: 1;
  letter-spacing: -0.04em;
}
.annual-subtitle { font-size: 13px; color: #9b9a94; margin-top: 6px; }

.annual-top-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 0.5px solid #f0efe8;
}
.annual-top-rank   { font-size: 12px; color: #d0cfc6; min-width: 18px; font-weight: 600; }
.annual-top-icon   { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.annual-top-info   { flex: 1; min-width: 0; }
.annual-top-name   { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.annual-top-cat    { font-size: 11px; color: #9b9a94; margin-top: 1px; }
.annual-top-cost   { text-align: right; flex-shrink: 0; }
.annual-top-yearly { font-size: 13px; font-weight: 600; color: #1a1a18; }
.annual-top-monthly{ font-size: 10px; color: #9b9a94; }

.annual-activity-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 0.5px solid #f0efe8;
  font-size: 13px;
}
.annual-activity-icon  { font-size: 14px; flex-shrink: 0; }
.annual-activity-label { color: #6b6a64; flex: 1; }
.annual-activity-val   { font-weight: 600; color: #1a1a18; }

.annual-summary-box {
  background: linear-gradient(135deg, #EEEDFE 0%, #E1F5EE 100%);
  border-color: #c8c6f8;
  margin-top: 4px;
}
.annual-summary-title { font-size: 13px; font-weight: 600; color: #3C3489; margin-bottom: 8px; }
.annual-summary-text  { font-size: 13px; color: #1a1a18; line-height: 1.6; }

/* Dark mode for Batch C */
[data-theme="dark"] .audit-card         { border-color: #2e2e2b; }
[data-theme="dark"] .audit-card-header  { background: #222220 !important; }
[data-theme="dark"] .audit-stat         { background: #222220; }
[data-theme="dark"] .audit-stat-val     { color: #f0efe8; }
[data-theme="dark"] .audit-card-name    { color: #f0efe8; }
[data-theme="dark"] .audit-cancel { background: #3a1f1f; border-color: #7f2020; color: #fca5a5; }
[data-theme="dark"] .audit-pause  { background: #3a2e1a; border-color: #9b6e1a; color: #fcd34d; }
[data-theme="dark"] .audit-keep   { background: #1a2e25; border-color: #1D9E75; color: #6ee7b7; }
[data-theme="dark"] .audit-report-summary { background: #222220; }
[data-theme="dark"] .audit-report-saving-val { color: #5DCAA5; }

[data-theme="dark"] .cal-day         { color: #9b9a94; }
[data-theme="dark"] .cal-day-today   { background: #22213a; color: #a5a2f6; }
[data-theme="dark"] .cal-day-has-renewal { background: #1a2e25; color: #5DCAA5; }
[data-theme="dark"] .cal-day-has-renewal:hover { background: #1D9E75; color: #fff; }
[data-theme="dark"] .cal-detail-panel { border-color: #1D9E75 !important; }

[data-theme="dark"] .tag-suggest-chip { background: #22213a; color: #a5a2f6; border-color: #3d3c60; }
[data-theme="dark"] .tag-suggest-chip:hover { background: #7F77DD; color: #fff; }

[data-theme="dark"] .countdown-item { border-color: #2e2e2b; }
[data-theme="dark"] .countdown-name { color: #f0efe8; }

[data-theme="dark"] .annual-summary-box { background: linear-gradient(135deg, #22213a 0%, #1a2e25 100%); border-color: #3d3c60; }
[data-theme="dark"] .annual-summary-title { color: #a5a2f6; }
[data-theme="dark"] .annual-summary-text  { color: #f0efe8; }
[data-theme="dark"] .annual-activity-label { color: #9b9a94; }
[data-theme="dark"] .annual-activity-val   { color: #f0efe8; }
[data-theme="dark"] .group-header { border-color: #2e2e2b; }
[data-theme="dark"] .group-tag-total { color: #f0efe8; }

/* C5 — Group view button active state (handled inline via JS)
   Base style inherits from .btn-csv-import */
.btn-group-view { transition: background 0.2s, color 0.2s, border-color 0.2s; }

/* ══════════════════════════════════════
   PWA + DARK AUTO + NAV BADGE
══════════════════════════════════════ */

/* Nav badge — bottom nav renewal alert dot */
.nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #E24B4A;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1.5px solid #f5f4f0;
  pointer-events: none;
  animation: badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badge-pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Nav dot — top nav (desktop) */
.nav-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #E24B4A;
  border-radius: 50%;
  margin-left: 5px;
  vertical-align: middle;
  animation: badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark mode badge — border follows background */
[data-theme="dark"] .nav-badge { border-color: #0f0f0e; }

/* ── Dark mode auto indicator in settings ── */
#dark-mode-sub { transition: color 0.2s; }

/* ══════════════════════════════════════
   BRAND ICON SYSTEM (Font Awesome)
══════════════════════════════════════ */

/* Icon container — same size as initials box */
.sub-card-icon .sub-brand-icon,
.sub-icon .sub-brand-icon,
.audit-card-icon .sub-brand-icon,
.cal-detail-icon .sub-brand-icon,
.countdown-icon .sub-brand-icon,
.annual-top-icon .sub-brand-icon,
.audit-report-item-icon .sub-brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 18px !important;
  line-height: 1;
}

/* Smaller icon for compact contexts */
.cal-detail-icon .sub-brand-icon,
.countdown-icon .sub-brand-icon,
.annual-top-icon .sub-brand-icon,
.audit-report-item-icon .sub-brand-icon {
  font-size: 15px !important;
}

/* Initials fallback — same style as before */
.sub-initials {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* Dark mode — icon color lightened slightly for contrast */
[data-theme="dark"] .sub-brand-icon {
  filter: brightness(1.15);
}

/* Ensure icon containers are flex-centered */
.sub-card-icon,
.sub-icon,
.audit-card-icon,
.cal-detail-icon,
.countdown-icon,
.annual-top-icon,
.audit-report-item-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ══════════════════════════════════════
   GOOGLE FAVICON API ICONS
══════════════════════════════════════ */
.sub-favicon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  /* Smooth load */
  opacity: 0;
  animation: favicon-fade 0.3s ease 0.1s forwards;
}

@keyframes favicon-fade {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* Smaller size for compact icon containers */
.cal-detail-icon .sub-favicon-img,
.countdown-icon .sub-favicon-img,
.annual-top-icon .sub-favicon-img,
.audit-report-item-icon .sub-favicon-img,
.sub-icon .sub-favicon-img {
  width: 22px;
  height: 22px;
}

/* Dark mode — slight brightness boost for small icons */
[data-theme="dark"] .sub-favicon-img {
  filter: brightness(1.1);
}

/* ══════════════════════════════════════
   RICH TEXT NOTES + BULK ACTIONS + WA
══════════════════════════════════════ */

/* ── Notes textarea ── */
.notes-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid #d4d3cc;
  border-radius: 8px;
  font-size: 12px;
  font-family: inherit;
  color: #1a1a18;
  background: #fff;
  resize: vertical;
  line-height: 1.6;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.notes-textarea:focus { outline: none; border-color: #7F77DD; }
.wa-preview-textarea  { min-height: 160px; }

/* Rendered markdown notes */
.notes-rendered {
  font-size: 12px;
  color: #1a1a18;
  line-height: 1.7;
}
.notes-rendered strong { font-weight: 600; color: #1a1a18; }
.notes-rendered em     { font-style: italic; color: #6b6a64; }
.notes-rendered ul     { margin: 4px 0; padding-left: 16px; }
.notes-rendered li     { margin: 2px 0; }
.notes-rendered a      { color: #7F77DD; text-decoration: none; }
.notes-rendered a:hover{ text-decoration: underline; }
.notes-rendered code   { background: #f0efe8; padding: 1px 5px; border-radius: 4px; font-size: 10px; font-family: monospace; }
.notes-rendered br     { display: block; margin: 2px 0; content: ""; }

/* ── Bulk action toolbar ── */
.bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #1a1a18;
  border-radius: 12px;
  margin-bottom: 10px;
  gap: 10px;
  flex-wrap: wrap;
  animation: badge-pop 0.2s ease;
}
.bulk-toolbar-left  { display: flex; align-items: center; gap: 10px; }
.bulk-toolbar-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bulk-count { font-size: 12px; font-weight: 600; color: #f0efe8; }
.bulk-checkbox { width: 15px; height: 15px; accent-color: #7F77DD; cursor: pointer; }

.bulk-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.bulk-btn:hover            { opacity: 0.85; }
.bulk-btn-pause  { background: #FAEEDA; color: #633806; }
.bulk-btn-cancel { background: #EEEDFE; color: #3C3489; }
.bulk-btn-tag    { background: #E1F5EE; color: #085041; }
.bulk-btn-wa     { background: #dcfce7; color: #15803d; }
.bulk-btn-delete { background: #FCEBEB; color: #991b1b; }
.bulk-btn-close  { background: #2e2e2b; color: #9b9a94; padding: 5px 8px; }

/* Selected card state */
.sub-card.bulk-selected {
  border-color: #7F77DD !important;
  background: #EEEDFE20;
}
.sub-card.bulk-selectable { cursor: pointer; }
.sub-bulk-checkbox {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 16px;
  height: 16px;
  accent-color: #7F77DD;
  z-index: 2;
  cursor: pointer;
}

/* WA button in card actions */
.btn-action-wa {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
  padding: 3px 7px;
}
.btn-action-wa:hover { background: #25D366; color: #fff; border-color: #25D366; }
.btn-action-wa .fa-whatsapp { font-size: 12px; }

/* Dark mode */
[data-theme="dark"] .notes-textarea {
  background: #222220;
  border-color: #3a3a37;
  color: #f0efe8;
}
[data-theme="dark"] .notes-textarea:focus { border-color: #7F77DD; }
[data-theme="dark"] .notes-rendered { color: #f0efe8; }
[data-theme="dark"] .notes-rendered code { background: #2e2e2b; }
[data-theme="dark"] .bulk-toolbar { background: #f0efe8; }
[data-theme="dark"] .bulk-count   { color: #1a1a18; }
[data-theme="dark"] .bulk-btn-close { background: #d0cfc8; color: #1a1a18; }
[data-theme="dark"] .sub-card.bulk-selected { background: #22213a; }

/* ══════════════════════════════════════
   ATTENTION WIDGET + EXPIRED BANNER +
   LAST REVIEWED + GRAVEYARD +
   MARKET PRICE BADGE + PRICE MANAGER
══════════════════════════════════════ */

/* ── Attention widget ── */
.attention-widget {
  background: #fff;
  border: 1.5px solid #e8e7e0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.attention-widget-title {
  font-size: 10px;
  font-weight: 700;
  color: #9b9a94;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.attention-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 5px;
  cursor: pointer;
  transition: opacity 0.15s;
  font-size: 12px;
  font-weight: 500;
}
.attention-item:last-child { margin-bottom: 0; }
.attention-item:hover { opacity: 0.8; }
.attention-item-icon { flex-shrink: 0; font-size: 14px; }
.attention-item-text { flex: 1; }
.attention-high   { background: #FCEBEB; color: #791F1F; border: 1px solid #fca5a5; }
.attention-medium { background: #FAEEDA; color: #633806; border: 1px solid #fcd34d; }
.attention-low    { background: #EEEDFE; color: #3C3489; border: 1px solid #c8c6f8; }

/* ── Expired banner ── */
.expired-banner {
  background: #FAEEDA;
  border-bottom: 1.5px solid #fcd34d;
  padding: 10px 20px;
  position: sticky;
  top: 56px;
  z-index: 90;
  animation: badge-pop 0.3s ease;
}
.expired-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.expired-banner-icon  { font-size: 16px; flex-shrink: 0; }
.expired-banner-text  { flex: 1; font-size: 12px; font-weight: 500; color: #633806; }
.expired-banner-actions { display: flex; align-items: center; gap: 6px; }
.expired-banner-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  background: #BA7517;
  color: #fff;
  border: none;
  cursor: pointer;
}
.expired-banner-close {
  background: none;
  border: none;
  font-size: 13px;
  color: #BA7517;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

/* ── Last reviewed chip ── */
.last-reviewed-chip {
  font-size: 10px;
  color: #b0afaa;
  opacity: 0.8;
}

/* ── Market price badge ── */
.market-price-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  margin-top: 8px;
  gap: 8px;
}
.market-price-good { background: #E1F5EE; color: #085041; border: 1px solid #6ee7b7; }
.market-price-ok   { background: #f8f7f2; color: #6b6a64; border: 1px solid #e0dfd6; }
.market-price-high { background: #FCEBEB; color: #791F1F; border: 1px solid #fca5a5; }
.market-price-info { background: #EEEDFE; color: #3C3489; border: 1px solid #c8c6f8; }
.market-price-link {
  font-size: 10px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  opacity: 0.7;
  white-space: nowrap;
  flex-shrink: 0;
}
.market-price-link:hover { opacity: 1; text-decoration: underline; }

/* ── Graveyard modal ── */
.graveyard-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.graveyard-stat {
  background: #f8f7f2;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.graveyard-stat-savings { background: #E1F5EE; }
.graveyard-stat-val   { font-size: 20px; font-weight: 700; color: #1a1a18; }
.graveyard-stat-label { font-size: 10px; color: #9b9a94; margin-top: 3px; }
.graveyard-section-label {
  font-size: 10px;
  font-weight: 700;
  color: #9b9a94;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 0 4px;
  border-bottom: 0.5px solid #e8e7e0;
  margin-bottom: 4px;
}
.graveyard-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 0.5px solid #f0efe8;
}
.graveyard-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  opacity: 0.7;
}
.graveyard-item-info  { flex: 1; min-width: 0; }
.graveyard-item-name  { font-size: 13px; font-weight: 500; color: #6b6a64; }
.graveyard-item-meta  { font-size: 11px; color: #b0afaa; margin-top: 1px; }
.graveyard-item-actions { display: flex; gap: 5px; flex-shrink: 0; }

/* ── Price Manager page ── */
.price-manager-row {
  display: grid;
  grid-template-columns: 1fr 100px 1fr 70px auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 0.5px solid #f0efe8;
  font-size: 12px;
}
.price-manager-row:last-child { border-bottom: none; }
.price-manager-name   { font-weight: 500; color: #1a1a18; }
.price-manager-range  { font-weight: 600; color: #1a1a18; }
.price-manager-plan   { color: #9b9a94; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price-manager-date   { font-size: 10px; color: #b0afaa; }
.price-manager-actions { display: flex; align-items: center; gap: 5px; }
.price-manager-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: #f0efe8;
  color: #6b6a64;
  text-decoration: none;
  transition: background 0.15s;
}
.price-manager-link:hover { background: #EEEDFE; color: #7F77DD; }
.btn-graveyard { transition: background 0.2s, color 0.2s, border-color 0.2s; }

@media (max-width: 600px) {
  .price-manager-row { grid-template-columns: 1fr auto; }
  .price-manager-range, .price-manager-plan, .price-manager-date { display: none; }
  .graveyard-summary { grid-template-columns: 1fr 1fr; }
  .graveyard-stat-savings { grid-column: span 2; }
}

/* Dark mode */
[data-theme="dark"] .attention-widget       { background: #1a1a18; border-color: #2e2e2b; }
[data-theme="dark"] .attention-high         { background: #3a1f1f; color: #fca5a5; border-color: #7f2020; }
[data-theme="dark"] .attention-medium       { background: #3a2e1a; color: #fcd34d; border-color: #9b6e1a; }
[data-theme="dark"] .attention-low          { background: #22213a; color: #a5a2f6; border-color: #3d3c60; }
[data-theme="dark"] .expired-banner         { background: #3a2e1a; border-color: #9b6e1a; }
[data-theme="dark"] .expired-banner-text    { color: #fcd34d; }
[data-theme="dark"] .expired-banner-close   { color: #fcd34d; }
[data-theme="dark"] .market-price-good      { background: #1a2e25; border-color: #1D9E75; color: #6ee7b7; }
[data-theme="dark"] .market-price-ok        { background: #222220; border-color: #3a3a37; color: #9b9a94; }
[data-theme="dark"] .market-price-high      { background: #3a1f1f; border-color: #7f2020; color: #fca5a5; }
[data-theme="dark"] .market-price-info      { background: #22213a; border-color: #3d3c60; color: #a5a2f6; }
[data-theme="dark"] .graveyard-stat         { background: #222220; }
[data-theme="dark"] .graveyard-stat-savings { background: #1a2e25; }
[data-theme="dark"] .graveyard-stat-val     { color: #f0efe8; }
[data-theme="dark"] .graveyard-item-name    { color: #9b9a94; }
[data-theme="dark"] .price-manager-name     { color: #f0efe8; }
[data-theme="dark"] .price-manager-range    { color: #f0efe8; }
[data-theme="dark"] .price-manager-link     { background: #222220; color: #9b9a94; }

/* ══════════════════════════════════════
   SUBSCRIPTION FORM — REDESIGNED
══════════════════════════════════════ */

/* Modal wider for sub form */
.modal-sub-form { max-width: 540px; width: 96vw; }

/* Billing row — inline purchase + renewal */
.form-billing-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.form-billing-label {
  font-size: 12px;
  color: #6b6a64;
  font-weight: 500;
  white-space: nowrap;
  padding-bottom: 10px;
}
.form-billing-inputs {
  display: flex;
  gap: 6px;
  align-items: center;
}
.form-billing-every {
  width: 60px;
}
.form-billing-unit {
  min-width: 90px;
}
.form-billing-arrow {
  font-size: 16px;
  color: #9b9a94;
  padding-bottom: 8px;
  flex-shrink: 0;
}

/* Accounts section toggle */
.form-accounts-toggle {
  margin: 10px 0 0;
}
.btn-accounts-expand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #6b6a64;
  background: none;
  border: 1px dashed #d4d3cc;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  width: 100%;
  transition: border-color 0.15s, color 0.15s;
}
.btn-accounts-expand:hover { border-color: #7F77DD; color: #7F77DD; }
#accounts-toggle-icon { transition: transform 0.2s ease; flex-shrink: 0; }
.accounts-count-badge {
  margin-left: auto;
  background: #7F77DD;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}
.accounts-section-hint {
  font-size: 11px;
  color: #9b9a94;
  margin: 8px 0 6px;
  padding: 0 2px;
}

/* Usage frequency — collapsible details */
.form-details-collapse {
  margin-bottom: 14px;
}
.form-details-summary {
  font-size: 12px;
  font-weight: 500;
  color: #6b6a64;
  cursor: pointer;
  padding: 8px 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 0.5px solid #e8e7e0;
  user-select: none;
}
.form-details-summary::-webkit-details-marker { display: none; }
.form-details-summary::before {
  content: "▶";
  font-size: 9px;
  color: #9b9a94;
  transition: transform 0.2s;
}
details[open] .form-details-summary::before { transform: rotate(90deg); }

/* Dark mode */
[data-theme="dark"] .btn-accounts-expand {
  border-color: #3a3a37;
  color: #9b9a94;
}
[data-theme="dark"] .btn-accounts-expand:hover {
  border-color: #7F77DD;
  color: #a5a2f6;
}
[data-theme="dark"] .form-details-summary {
  border-color: #2e2e2b;
  color: #9b9a94;
}
[data-theme="dark"] .form-billing-arrow { color: #6b6a64; }

@media (max-width: 500px) {
  .form-billing-row { gap: 6px; }
  .form-billing-arrow { display: none; }
}
