/* Orgacia Bundle App - Admin Dashboard Styles */

:root {
  --primary-forest: #0D382B;
  --primary-forest-hover: #07251C;
  --gold-accent: #E2B04A;
  --accent-green: #2E7D32;
  --text-dark: #1A202C;
  --text-muted: #5A6A7E;
  --border-subtle: #E2E8F0;
  --bg-canvas: #F8FAFC;
  --bg-card: #FFFFFF;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background: var(--bg-canvas);
  color: var(--text-dark);
  padding: 24px;
}

.admin-wrapper {
  max-width: 1080px;
  margin: 0 auto;
}

/* TOPBAR */
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  background: white;
  padding: 18px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-logo {
  width: 40px;
  height: 40px;
  background: var(--gold-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.admin-brand h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-forest);
}

.admin-badge-free {
  font-size: 12px;
  color: var(--accent-green);
  font-weight: 600;
}

.admin-actions {
  display: flex;
  gap: 10px;
}

.btn-primary {
  background: var(--primary-forest);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn-secondary {
  background: white;
  color: var(--text-dark);
  border: 1px solid var(--border-subtle);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* TABS */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: white;
  color: var(--primary-forest);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  font-weight: 700;
}

/* TAB CONTENT */
.tab-content {
  display: none;
  animation: fadeIn 0.2s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* METRICS */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid var(--border-subtle);
}

.metric-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-forest);
  margin-bottom: 4px;
}

.metric-trend {
  font-size: 11px;
  font-weight: 700;
}

.metric-trend.up { color: var(--accent-green); }
.metric-trend.gold { color: #B45309; }

/* CARDS */
.card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 24px;
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-forest);
}

.card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* FORM ELEMENTS */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.input-field {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
}

.input-field:focus {
  border-color: var(--primary-forest);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.tier-editor-box {
  background: #F8FAFC;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.tier-editor-box.highlight {
  border-color: var(--gold-accent);
  background: #FFFDF8;
}

.tier-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tier-editor-header h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-forest);
}

.badge-gold {
  background: #FEF3C7;
  color: #92400E;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
}

.badge-green {
  background: #DCFCE7;
  color: #166534;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
}

.badge-neutral {
  background: #E2E8F0;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
}

.color-picker {
  width: 42px;
  height: 38px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.callout-success {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #15803D;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.toggle-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: #F8FAFC;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.breakdown-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 13px;
}

.breakdown-label {
  width: 220px;
}

.breakdown-bar-bg {
  flex: 1;
  height: 10px;
  background: #E2E8F0;
  border-radius: 9999px;
  overflow: hidden;
}

.breakdown-bar-fill {
  height: 100%;
  background: var(--primary-forest);
}

.breakdown-bar-fill.gold {
  background: var(--gold-accent);
}

.breakdown-pct {
  width: 40px;
  text-align: right;
  font-weight: 700;
}

/* 2026 Executive Analytics Hub Styles */
.pill-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pill-btn.active {
  background: var(--primary-forest);
  color: white;
  box-shadow: 0 2px 8px rgba(13, 56, 43, 0.2);
}

.graph-view-tabs {
  display: flex;
  gap: 6px;
  background: #F1F5F9;
  padding: 3px;
  border-radius: 8px;
}

.graph-tab-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.graph-tab-btn.active {
  background: white;
  color: var(--primary-forest);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.chart-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  font-weight: 600;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.badge-tier {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-block;
}

.badge-tier-1 { background: #F1F5F9; color: #475569; }
.badge-tier-2 { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.badge-tier-4 { background: #EBF3EF; color: #0D382B; border: 1px solid #D1E5DC; }

.pay-filter-btn {
  padding: 5px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: white;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.pay-filter-btn.active {
  background: #0D382B;
  color: white;
  border-color: #0D382B;
}

.order-attr-badge {
  font-family: monospace;
  font-size: 11px;
  background: #F1F5F9;
  padding: 3px 8px;
  border-radius: 4px;
  color: #334155;
  border: 1px solid #E2E8F0;
}

.badge-prepaid {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.badge-cod {
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FDE68A;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

