/* ============================================
   Vava Super Admin Pages
   Shared styles for v-dashboard, v-tenants,
   v-tenant-detail, v-settings, v-defaults
   ============================================ */

/* === Admin Body === */
.vava-body { background: #e9e9e9 !important; }

/* === Logo Sizing === */
.vava-logo-full { height: 27px; margin: 0 12px; }
.vava-logo-mark { height: 24px; margin: 0 12px; display: none; }
.vava-logo-full--lg { height: 32px; margin: 0 auto; }
.vava-logo-mark--lg { height: 28px; margin: 0 auto; display: none; }

/* === Table Column Widths === */
.vava-th--w80 { width: 80px; }
.vava-th--w90 { width: 90px; }
.vava-th--w100 { width: 100px; }

/* === Vava Admin Sidebar — Gold/Amber Theme === */
.vava-sidebar { background: #1a1a1a; }
.vava-sidebar .sidebar-logo { background: #fff; border-bottom-color: rgba(0,0,0,0.08); }
.vava-sidebar .nav-item.active { background: #111111; }
.vava-sidebar .nav-item.active::before { background: #fbbf24; }
.vava-sidebar .nav-item:hover { background: #111111; }
.vava-sidebar .nav-item .nav-dot { background: #fbbf24; }
.vava-sidebar ~ .sidebar-bottom-nav,
.vava-sidebar .sidebar-bottom-nav { border-top-color: rgba(255,255,255,0.15); }
.vava-topbar-toggle { background: #1a1a1a; }
.vava-topbar-toggle:hover { background: #111111; }
.vava-topbar .topbar-user .avatar-sm { background: #1a1a1a; }

/* === Defaults-page Sidebar — Slate/Cyan Theme === */
.vava-sidebar--defaults { background: #1e293b; }
.vava-sidebar--defaults .sidebar-logo { background: #1e293b; border-bottom-color: rgba(255,255,255,0.08); }
.vava-sidebar--defaults .nav-item.active { background: #334155; }
.vava-sidebar--defaults .nav-item.active::before { background: #06b6d4; }
.vava-sidebar--defaults .nav-item:hover { background: rgba(255,255,255,0.08); }
.vava-sidebar--defaults .nav-item .nav-dot { background: #06b6d4; }
.vava-sidebar--defaults .sidebar-bottom-nav { border-top-color: rgba(255,255,255,0.08); }
.vava-sidebar--defaults .sidebar-collapse-btn { background: #1e293b; }
.vava-sidebar--defaults .sidebar-collapse-btn:hover { background: #334155; border-color: #06b6d4; }
.vava-topbar-toggle--defaults { background: #1e293b; }
.vava-topbar-toggle--defaults:hover { background: #334155; }
.vava-topbar--defaults .topbar-user .avatar-sm { background: #06b6d4; }

/* === Activity Filter Pills === */
.activity-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.activity-pill {
  display: inline-flex; align-items: center; padding: 7px 16px;
  font-size: 0.8125rem; font-weight: 500; color: #334155;
  background: #fff; border: 1px solid #94a3b8; border-radius: 4px;
  cursor: pointer; transition: all 0.15s; user-select: none;
}
.activity-pill:hover { border-color: #64748b; }
.activity-pill.active { background: #1b6fad; border-color: #1b6fad; color: #fff; font-weight: 600; }
.activity-pill--sm { padding: 5px 12px; }

/* === Radio Pills === */
.radio-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pill { display: none; }
.radio-pill + label {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #334155;
  background: #fff;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}
.radio-pill:checked + label {
  background: #eff6ff;
  border-color: #0364B1;
  color: #0364B1;
  font-weight: 600;
}
.radio-pill + label:hover { border-color: #64748b; }

/* === Toggle Switch === */
.toggle-switch { position: relative; display: inline-block; width: 38px; height: 22px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background: #cbd5e1; transition: 0.2s; border-radius: 4px;
}
.toggle-slider:before {
  position: absolute; content: ""; height: 18px; width: 18px;
  left: 2px; bottom: 2px; background: #fff; transition: 0.2s; border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.toggle-switch input:checked + .toggle-slider { background: #22c55e; }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(16px); }

/* === Inline Toggle (panel forms) === */
.panel-toggle {
  position: relative; display: inline-block; width: 44px; height: 24px; cursor: pointer;
}
.panel-toggle__track {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 12px; transition: background 0.2s;
}
.panel-toggle__input { opacity: 0; width: 0; height: 0; position: absolute; }
.panel-toggle__track--on { background: #22c55e; }
.panel-toggle__track--off { background: #cbd5e1; }
.panel-toggle__knob {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  background: #fff; border-radius: 50%; transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.panel-toggle__knob--on { transform: translateX(20px); }

/* === Preset Radio Cards === */
.preset-radio-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border: 1px solid #94a3b8;
  background: #fff; border-radius: 4px; cursor: pointer;
  transition: all 0.15s;
}
.preset-radio-card:hover { border-color: #64748b; }
.preset-radio-card.selected {
  border: 2px solid #fbbf24; background: #fffbeb;
}
.preset-radio-card--sm { padding: 10px 14px; }
.preset-radio-card .check-icon {
  display: none; width: 20px; height: 20px; background: #1a5bb5;
  border-radius: 50%; align-items: center; justify-content: center; flex-shrink: 0;
}
.preset-radio-card.selected .check-icon { display: flex; }
.preset-radio-card .empty-circle {
  width: 20px; height: 20px; border: 2px solid #cbd5e1;
  border-radius: 50%; flex-shrink: 0;
}
.preset-radio-card.selected .empty-circle { display: none; }

/* === Expandable Sections === */
.expandable-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px; background: #f8fafc;
  border: 1px solid #e2e8f0; border-radius: 4px;
  cursor: pointer; font-size: 0.875rem; font-weight: 600;
  color: #334155; user-select: none;
}
.expandable-header:hover { background: #f1f5f9; }
.expandable-header .chevron { transition: transform 0.2s; }
.expandable-header.open .chevron { transform: rotate(90deg); }
.expandable-body {
  display: none; padding: 16px;
  border: 1px solid #e2e8f0; border-top: none;
  border-radius: 0 0 4px 4px;
}
.expandable-body.open { display: block; }

/* === Password Wrapper === */
.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 42px; }
.password-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: #94a3b8;
  padding: 2px; display: flex; align-items: center;
}
.password-toggle:hover { color: #64748b; }

/* === Status Indicator === */
.status-indicator {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8125rem; font-weight: 500; padding: 6px 12px; border-radius: 4px;
}
.status-indicator.success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.status-indicator.idle { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }

/* === Locale Grid & Cards === */
.locale-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.locale-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 4px;
  padding: 12px 14px; position: relative;
}
.locale-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.locale-card-title {
  font-size: 0.875rem; font-weight: 700; color: #0f172a;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.locale-row {
  display: flex; gap: 10px; padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
}
.locale-row:last-child { border-bottom: none; }
.locale-row-label { font-size: 0.75rem; color: #64748b; flex: 1; text-align: right; }
.locale-row-value { font-size: 0.75rem; font-weight: 600; color: #0f172a; flex: 1; text-align: left; }
.locale-footer { margin-top: 14px; font-size: 0.8125rem; color: #94a3b8; }
.locale-menu { position: absolute; top: 16px; right: 16px; }
.default-badge {
  display: inline-flex; align-items: center; padding: 2px 8px;
  font-size: 0.75rem; font-weight: 600; background: #f0fdf4;
  color: #16a34a; border: 1px solid #bbf7d0; border-radius: 4px;
}

@media (max-width: 960px) {
  .locale-grid { grid-template-columns: repeat(2, 1fr); }
}

/* === Slide-over Panel === */
.slide-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 480px;
  background: #fff; box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  z-index: 1001; overflow-y: auto;
}
.slide-panel--no-scroll { overflow: hidden; }
.slide-panel__header {
  padding: 16px 20px; border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.slide-panel__title { font-size: 1rem; margin: 0; font-weight: 600; }
.slide-panel__close {
  background: none; border: none; cursor: pointer; padding: 4px; color: #94a3b8;
}
.slide-panel__body { padding: 20px; }
.slide-panel__body--flex {
  padding: 20px; display: flex; flex-direction: column; flex: 1; overflow: hidden;
}
.slide-panel__flex { display: flex; flex-direction: column; height: 100%; }
.slide-panel__footer {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 24px;
}
.slide-panel__footer--compact { margin-top: 12px; flex-shrink: 0; }

/* === Panel Overlay === */
.panel-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3); z-index: 1000;
}

/* === Shared Layout Helpers === */
.vava-cursor-pointer { cursor: pointer; }
.vava-flex-col { display: flex; flex-direction: column; }
.vava-flex-col--gap-14 { gap: 14px; }
.vava-flex-col--gap-10 { gap: 10px; }
.vava-flex-col--gap-8 { gap: 8px; }
.vava-flex-col--gap-4 { gap: 4px; }
.vava-flex-between { display: flex; justify-content: space-between; }
.vava-flex-between--center { display: flex; justify-content: space-between; align-items: center; }
.vava-flex-center { display: flex; align-items: center; }
.vava-flex-center--gap-4 { gap: 4px; }
.vava-flex-center--gap-6 { gap: 6px; }
.vava-flex-center--gap-8 { gap: 8px; }
.vava-flex-center--gap-10 { gap: 10px; }
.vava-flex-center--gap-12 { gap: 12px; }
.vava-flex-center--gap-16 { gap: 16px; }
.vava-flex-center--wrap { flex-wrap: wrap; }
.vava-flex-end { display: flex; justify-content: flex-end; }

/* === Table Header Styling (Vava themed) === */
.vava-th {
  background: #e6eef9; color: #2a60ac; font-weight: 700;
}
.vava-th--center { text-align: center; }
.vava-th--empty { width: 36px; }

/* === Inline Add Button (in table headers / admin chips) === */
.vava-add-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; background: #0364B1; border-radius: 5px;
  border: none; cursor: pointer; flex-shrink: 0;
}

/* === Status Dot === */
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.status-dot--green { background: #22c55e; }
.status-dot--yellow { background: #eab308; }
.status-dot--red { background: #ef4444; }
.status-dot--amber { background: #f59e0b; }
.status-dot--gray { background: #9ca3af; }

/* === Status Inline (dot + text) === */
.status-inline {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem;
}
.status-inline--muted { color: #9ca3af; }

/* === Legend Dot === */
.legend-item {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.75rem; color: #64748b;
}

/* === User Count Display === */
.user-count-used { font-size: 0.8125rem; color: #64748b; }
.user-count-total { font-size: 0.9375rem; font-weight: 700; }
.user-count-total--over { color: #92400e; }

/* === Admin Chip (location admin tags) === */
.admin-chip {
  display: inline-flex; align-items: center; padding: 2px 8px;
  font-size: 0.75rem; font-weight: 500; background: #f1f5f9;
  color: #334155; border: 1px solid #cbd5e1; border-radius: 4px;
}

/* === Location Row === */
.location-name { font-weight: 600; font-size: 0.875rem; color: #0f172a; }
.location-address { font-size: 0.75rem; color: #94a3b8; margin-top: 2px; }

/* === Visibility Toggle Hint === */
.visibility-hint { font-size: 0.7rem; color: #94a3b8; line-height: 1.2; }

/* === KPI Card Variants === */
.stat-value--sm { font-size: 1.4rem; }

/* === Two-column Grid === */
.vava-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vava-grid-2--align-start { align-items: start; }

/* === Dropdown Item Colors === */
.dropdown-item--warning { color: #b45309; }
.dropdown-item--danger { color: #ef4444; }

/* === Link Styling === */
.vava-link { color: #0364B1; text-decoration: none; }
.vava-link--nowrap { white-space: nowrap; }

/* === Over-limit Badge === */
.over-badge {
  display: inline-flex; align-items: center; padding: 3px 10px;
  font-size: 0.75rem; font-weight: 600; background: #fef3c7;
  color: #92400e; border: 1px solid #fbbf24; border-radius: 4px;
}

/* === Avatar Large (Contact Card) === */
.avatar-lg {
  width: 56px; height: 56px; border-radius: 50%; background: #0364B1;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 18px; flex-shrink: 0;
}

/* === Section Separator === */
.vava-hr { border: none; border-top: 1px solid #e2e8f0; margin: 20px 0; }

/* === Section Subhead (panel forms) === */
.section-subhead {
  font-size: 0.8125rem; font-weight: 600; color: #334155;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.section-subhead--mt { margin: 20px 0 12px; }
.section-subhead--plain { margin: 0 0 12px; }

/* === Section Hint (italic descriptions) === */
.section-hint {
  font-size: 0.8125rem; color: #64748b; margin: 0 0 16px; font-style: italic;
}

/* === Expandable Header Subtitle === */
.expandable-subtitle {
  font-weight: 400; font-size: 0.8125rem; color: #94a3b8; margin-left: 4px;
}

/* === Pill Divider (vertical line between pill groups) === */
.pill-divider { width: 1px; background: #cbd5e1; margin: 4px 4px; }

/* === DNS Info Block === */
.dns-info-block {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: #f1f5f9; border-radius: 4px;
}

/* === DNS Propagation Success === */
.dns-success-block {
  padding: 12px 16px; background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 4px; display: flex; align-items: center; gap: 10px;
}
.dns-success-text { color: #166534; }

/* === Locale Config Radio Card (panel form) === */
.locale-radio { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 4px; cursor: pointer; }
.locale-radio--selected { border: 2px solid #fbbf24; background: #f0fdfa; }
.locale-radio--default { border: 1px solid #94a3b8; background: #fff; }
.locale-radio__title { font-weight: 600; font-size: 0.875rem; color: #0f172a; }
.locale-radio__desc { font-size: 0.75rem; color: #94a3b8; }

/* === Preset Card Inner Text === */
.preset-title { font-weight: 600; font-size: 0.8125rem; color: #0f172a; }
.preset-desc { font-size: 0.7rem; color: #64748b; }

/* === Billing Rate Section === */
.billing-input-group { display: flex; align-items: stretch; gap: 0; }
.billing-currency-prefix {
  display: inline-flex; align-items: center; padding: 6px 8px;
  background: #f1f5f9; border: 1px solid #94a3b8; border-right: none;
  border-radius: 4px 0 0 4px; font-size: 0.8125rem; color: #64748b;
}
.billing-rate-input {
  border-radius: 0 4px 4px 0; width: 60px; padding: 6px 8px; font-size: 0.8125rem;
}

/* === Subdomain Input Group === */
.subdomain-input { border-radius: 4px 0 0 4px; border-right: none; }
.subdomain-suffix {
  background: #f1f5f9; border: 1px solid #64748b; padding: 10px 12px;
  font-size: 0.875rem; color: #64748b; white-space: nowrap;
  border-radius: 0 4px 4px 0;
}

/* === Email Template Variable Badge === */
.var-badge {
  cursor: pointer; font-family: monospace; font-size: 0.75rem;
  border: 1px solid #cbd5e1;
}

/* === Email Editor Toolbar === */
.email-toolbar {
  display: flex; gap: 2px; padding: 6px 8px;
  background: #f8fafc; border-bottom: 1px solid #e2e8f0; flex-shrink: 0;
}
.email-toolbar__btn {
  width: 28px; height: 28px; border: none; background: transparent;
  border-radius: 4px; cursor: pointer; font-size: 0.875rem; color: #334155;
}
.email-toolbar__btn--bold { font-weight: 700; }
.email-toolbar__btn--italic { font-style: italic; }
.email-toolbar__btn--underline { text-decoration: underline; }
.email-toolbar__divider { width: 1px; background: #e2e8f0; margin: 4px 4px; }

/* === Email Editor Area === */
.email-editor-wrap {
  border: 1px solid #94a3b8; border-radius: 4px; overflow: hidden;
  display: flex; flex-direction: column; flex: 1;
}
.email-editor-content {
  flex: 1; padding: 14px; font-size: 0.875rem; line-height: 1.6;
  color: #0f172a; outline: none; background: #fff;
}

/* === Defaults Page Card Body (centered) === */
.defaults-placeholder {
  text-align: center; padding: 48px 24px;
}
.defaults-placeholder__icon { margin-bottom: 16px; }
.defaults-placeholder__title {
  margin: 0 0 8px; font-size: 1.1rem; font-weight: 700; color: #0f172a;
}
.defaults-placeholder__text {
  margin: 0 0 20px; font-size: 0.875rem; color: #64748b;
}

/* === Dashboard-specific === */
.stats-grid--dashboard { grid-template-columns: 1fr 1fr 1fr 1.4fr; }
.stats-grid--detail { grid-template-columns: repeat(5, 1fr); }

/* === Table Tenant Row border-left status === */
.tenant-row--active { border-left: 3px solid #22c55e; }
.tenant-row--trial { border-left: 3px solid #f59e0b; }

/* === Billing Usage Table === */
.billing-usage-cost { text-align: center; font-weight: 600; color: #92400e; }
.billing-toggle-cell { text-align: center; }
.billing-toggle-cell .toggle-switch { margin: 0 auto; }

/* === Locale Heading Block === */
.locale-heading { margin-bottom: 24px; }
.locale-heading__title { margin: 0; font-size: 1.1rem; font-weight: 700; color: #0f172a; }
.locale-heading__desc { margin: 4px 0 0; font-size: 0.8125rem; color: #64748b; }

/* === Form Label Small === */
.form-label--sm { font-size: 0.75rem; }
.form-label--mb { margin-bottom: 8px; }

/* === Flex Utilities === */
.vava-flex-1 { flex: 1; }
.vava-flex-1--min-400 { flex: 1; min-width: 400px; }
.vava-gap-14 { gap: 14px; }
.vava-mt-16 { margin-top: 16px; }
.vava-mt-20 { margin-top: 20px; }
.vava-mt-40 { margin-top: 40px; }
.vava-mb-16 { margin-bottom: 16px; }
.vava-mb-8 { margin-bottom: 8px; }
.vava-max-w-250 { max-width: 250px; }
.vava-max-w-full { max-width: 100%; }
.vava-w-120 { width: 120px; }
.vava-text-center { text-align: center; }
.vava-text-right { text-align: right; }
.vava-overflow-hidden { overflow: hidden; }
.vava-w-full { width: 100%; }

/* === Heading Row (breadcrumb area) with flex === */
.page-header-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.page-header-row h2 { margin: 0; }

/* === Login-as-Client Button === */
.btn--login-as { background: #1a5bb5; color: #fff; }

/* === Table Count Muted === */
.th-count { font-weight: 400; color: #94a3b8; }
.th-sub { font-weight: 500; font-size: 0.75rem; color: #64748b; }

/* === Email Templates Description === */
.email-templates-desc { font-size: 0.8125rem; color: #64748b; margin-bottom: 16px; }

/* === Filter Pills Container (inside card) === */
.filter-pills-wrap { padding: 14px 16px 14px; }

/* === Accent for radio inputs === */
.vava-accent { accent-color: #1a5bb5; }

/* === Card shrink === */
.card--shrink { flex-shrink: 0; }

/* === Toggle hint text === */
.toggle-hint { font-size: 0.8125rem; color: #64748b; }
.toggle-hint--sm { font-size: 0.875rem; font-weight: 500; color: #334155; }

/* === Flex gap/wrap layouts used in settings billing === */
.vava-flex-wrap { display: flex; gap: 16px; align-items: start; flex-wrap: wrap; }
.vava-flex-gap-6 { display: flex; gap: 6px; }
.vava-flex-gap-8 { display: flex; gap: 8px; }

/* === Min height helper for email editor === */
.vava-flex-col--min-0 { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* === Misc === */
.vava-strong-muted { color: #94a3b8; }
.vava-btn-sm-save { font-size: 0.75rem; padding: 5px 20px; }

/* === Change Link === */
.change-link { font-size: 0.75rem; color: #0364B1; font-weight: 500; }

/* === SVG vertical alignment === */
.vava-icon-middle { vertical-align: middle; }

/* === Flex align-items variants === */
.vava-align-start { align-items: flex-start; }
.vava-align-end { align-items: flex-end; }

/* === Margin auto push === */
.vava-ml-auto { margin-left: auto; }

/* === Contact name size === */
.contact-name { font-size: 1rem; }

/* === Billing card body compact === */
.card-body--compact { padding: 14px 16px; }

/* === Panel header no-shrink === */
.vava-flex-shrink-0 { flex-shrink: 0; }

/* === Email editor welcome heading === */
.email-editor-content h2 { margin: 0 0 12px; }

/* === Margin helpers === */
.vava-mt-4 { margin-top: 4px; }
.vava-mt-12 { margin-top: 12px; }
.vava-mb-0 { margin-bottom: 0; }
.vava-mb-6 { margin-bottom: 6px; }
.vava-mb-12 { margin-bottom: 12px; }
.vava-mb-20 { margin-bottom: 20px; }
