/* ============================================================
   RCS Onboarding v5 — admin.css
   Professional Admin Theme: Dark Sidebar + Light Content
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Sidebar */
  --sb-bg:         #1e293b;
  --sb-border:     #334155;
  --sb-text:       #cbd5e1;
  --sb-text-muted: #64748b;
  --sb-hover:      #334155;
  --sb-active-bg:  #2563eb;
  --sb-active-text:#ffffff;
  --sb-width:      240px;
  /* Content */
  --bg:            #f8f9fb;
  --surface:       #ffffff;
  --border:        #e2e8f0;
  --primary:       #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --text:          #1e293b;
  --text-secondary:#64748b;
  --text-muted:    #94a3b8;
  --success:       #16a34a;
  --success-light: #f0fdf4;
  --warning:       #d97706;
  --warning-light: #fffbeb;
  --danger:        #dc2626;
  --danger-light:  #fef2f2;
  --accent:        #7c3aed;
  --accent-light:  #f5f3ff;
  --radius:        8px;
  --radius-lg:     12px;
  --shadow:        0 1px 3px rgba(0,0,0,.08);
  --shadow-md:     0 4px 6px -1px rgba(0,0,0,.08);
  --shadow-lg:     0 10px 25px -3px rgba(0,0,0,.12);
  --font:          'Inter', 'Segoe UI', system-ui, sans-serif;
  --topbar-h:      60px;
  --transition:    150ms ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; overflow-x: hidden; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ============================================================
   Admin Layout
   ============================================================ */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.admin-sidebar {
  width: var(--sb-width);
  background: var(--sb-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 200;
  transition: transform 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--sb-border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  object-fit: contain;
  background: var(--primary);
}

.sidebar-logo-placeholder {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-site-name {
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-subtitle {
  font-size: 10px;
  color: var(--sb-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--sb-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--sb-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border-radius: 0;
  position: relative;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--sb-hover);
  color: #f1f5f9;
  text-decoration: none;
}

.nav-item.active {
  background: var(--sb-active-bg);
  color: var(--sb-active-text);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #93c5fd;
  border-radius: 0 2px 2px 0;
}

.nav-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--sb-border);
  flex-shrink: 0;
}

.sidebar-footer .admin-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.admin-name { font-size: 13px; font-weight: 600; color: #f1f5f9; }
.admin-role { font-size: 11px; color: var(--sb-text-muted); }

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: rgba(220,38,38,.15);
  border: 1px solid rgba(220,38,38,.3);
  border-radius: var(--radius);
  color: #fca5a5;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  text-decoration: none;
  justify-content: center;
}

.btn-logout:hover {
  background: rgba(220,38,38,.3);
  color: #fff;
  text-decoration: none;
}

/* ---- Main Content ---- */
.admin-main {
  margin-left: var(--sb-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- Top Bar ---- */
.admin-topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text);
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-admin {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---- Content Area ---- */
.admin-content {
  flex: 1;
  padding: 28px;
}

/* ---- Page Header ---- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.page-header .page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

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

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

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

.stats-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.blue    { background: var(--primary-light); color: var(--primary); }
.stat-icon.orange  { background: var(--warning-light); color: var(--warning); }
.stat-icon.green   { background: var(--success-light); color: var(--success); }
.stat-icon.red     { background: var(--danger-light);  color: var(--danger); }
.stat-icon.purple  { background: var(--accent-light);  color: var(--accent); }
.stat-icon.gray    { background: var(--bg);             color: var(--text-secondary); }

.stat-info { flex: 1; min-width: 0; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.stat-change { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ---- Tables ---- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

.admin-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.admin-table tbody tr:hover { background: #f8f9fb; }
.admin-table tbody tr:last-child { border-bottom: none; }

.admin-table tbody td {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text);
  vertical-align: middle;
}

.admin-table .check-col { width: 40px; }
.admin-table input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; }

/* ---- Status Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-pending         { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
.badge-under_review    { background: var(--primary-light); color: #1e40af; border: 1px solid #bfdbfe; }
.badge-update_requested{ background: var(--accent-light); color: #5b21b6; border: 1px solid #ddd6fe; }
.badge-approved        { background: var(--success-light); color: #166534; border: 1px solid #86efac; }
.badge-rejected        { background: var(--danger-light); color: #991b1b; border: 1px solid #fecaca; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: var(--primary-hover); color: #fff; text-decoration: none; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); text-decoration: none; }
.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; color: #fff; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover  { background: #b91c1c; color: #fff; }
.btn-warning   { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #b45309; color: #fff; }
.btn-ghost     { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-ghost:hover { background: var(--primary-light); }
.btn-sm        { padding: 6px 12px; font-size: 13px; }
.btn-lg        { padding: 12px 28px; font-size: 15px; }
.btn:disabled  { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

.spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; display: none; }
.btn-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Forms ---- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%; padding: 9px 13px; font-size: 14px;
  font-family: var(--font); color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.10); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 90px; line-height: 1.6; }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
.form-help { font-size: 12px; color: var(--text-secondary); margin-top: 5px; line-height: 1.5; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---- Tabs ---- */
.tabs-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition);
  white-space: nowrap;
}

.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- Modals ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(3px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.hidden { display: none; }

.modal-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
}

.modal-card.modal-wide { max-width: 680px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title { font-size: 18px; font-weight: 700; color: var(--text); }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background var(--transition);
}

.modal-close:hover { background: var(--border); }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ---- Alerts / Flash ---- */
.alert {
  padding: 13px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.6;
}

.alert-success { background: var(--success-light); border: 1px solid #86efac; color: #166534; }
.alert-error   { background: var(--danger-light);  border: 1px solid #fecaca; color: #991b1b; }
.alert-warning { background: var(--warning-light); border: 1px solid #fcd34d; color: #92400e; }
.alert-info    { background: var(--primary-light); border: 1px solid #bfdbfe; color: #1e40af; }

.alert .alert-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-size: 16px;
  opacity: 0.6;
  flex-shrink: 0;
}

.alert .alert-dismiss:hover { opacity: 1; }

/* ---- Filter Tabs ---- */
.filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.filter-tab {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: var(--font);
  transition: all var(--transition);
  white-space: nowrap;
}

.filter-tab:hover { background: var(--surface); color: var(--text); }
.filter-tab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }

/* ---- Search Bar ---- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 15px;
}

.search-input-wrap input {
  padding-left: 36px;
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info { font-size: 13px; color: var(--text-secondary); }

.pagination-pages {
  display: flex;
  gap: 4px;
}

.page-link {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  background: var(--surface);
  text-decoration: none;
  transition: all var(--transition);
}

.page-link:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-link.disabled { opacity: 0.4; pointer-events: none; }

/* ---- Pipeline / Kanban ---- */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.pipeline-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
}

.pipeline-col .pipe-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.pipeline-col .pipe-count {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
}

.pipeline-col.pipe-pending       { border-top: 3px solid var(--warning); }
.pipeline-col.pipe-under_review  { border-top: 3px solid var(--primary); }
.pipeline-col.pipe-update_req    { border-top: 3px solid var(--accent); }
.pipeline-col.pipe-approved      { border-top: 3px solid var(--success); }
.pipeline-col.pipe-rejected      { border-top: 3px solid var(--danger); }

/* ---- Activity Feed ---- */
.activity-list { }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child { border-bottom: none; }

.activity-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 16px;
  flex-shrink: 0;
}

.activity-body { flex: 1; min-width: 0; }
.activity-action { font-size: 13px; color: var(--text); line-height: 1.5; }
.activity-action strong { color: var(--primary); }
.activity-time { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ---- Submission Detail ---- */
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.detail-id-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  cursor: copy;
}

.detail-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.detail-section-header {
  background: var(--bg);
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-row {
  display: flex;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.detail-row:last-child { border-bottom: none; }
.detail-row:nth-child(even) { background: #fafafa; }

.detail-key {
  font-weight: 600;
  color: var(--text-secondary);
  width: 240px;
  flex-shrink: 0;
}

.detail-val {
  color: var(--text);
  flex: 1;
  word-break: break-word;
}

.detail-img-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border);
}

.detail-color-swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.detail-swatch {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

/* ---- Email Template Editor ---- */
.template-list { }
.template-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.template-list-item:last-child { border-bottom: none; }
.template-list-item:hover { background: var(--bg); }
.template-list-item.active { background: var(--primary-light); }
.template-slug { font-size: 13px; font-weight: 700; color: var(--text); }
.template-name { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.variable-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.var-badge { background: var(--bg); border: 1px solid var(--border); padding: 3px 8px; border-radius: 4px; font-size: 12px; font-family: monospace; color: var(--primary); }

/* ---- Chart Placeholders ---- */
.chart-wrap { position: relative; width: 100%; }
.chart-canvas { max-width: 100%; }

/* ---- Two Column Layout ---- */
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
}

/* ---- Quick Actions ---- */
.quick-actions { display: flex; flex-direction: column; gap: 8px; }
.quick-action-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
}
.quick-action-link:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); text-decoration: none; }

/* ---- Status Breakdown ---- */
.status-breakdown { }
.status-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.status-row:last-child { border-bottom: none; }
.status-row .status-name { display: flex; align-items: center; gap: 8px; color: var(--text); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.status-dot.pending          { background: var(--warning); }
.status-dot.under_review     { background: var(--primary); }
.status-dot.update_requested { background: var(--accent); }
.status-dot.approved         { background: var(--success); }
.status-dot.rejected         { background: var(--danger); }
.status-count { font-weight: 700; color: var(--text); }

/* ---- File Upload in Settings ---- */
.settings-upload-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.settings-upload-preview { width: 80px; height: 80px; border-radius: var(--radius); border: 1px solid var(--border); object-fit: contain; background: var(--bg); }
.settings-upload-info { flex: 1; }
.settings-file-input { }

/* ---- Admin Footer ---- */
.admin-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline-grid { grid-template-columns: repeat(3, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --sb-width: 0px; }

  .admin-sidebar {
    transform: translateX(-240px);
    width: 240px;
  }

  .admin-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .admin-main { margin-left: 0; }

  .btn-menu-toggle { display: flex; }

  .admin-content { padding: 20px 16px; }
  .admin-topbar { padding: 0 16px; }
}

@media (max-width: 640px) {
  .stats-grid   { grid-template-columns: repeat(2, 1fr); }
  .stats-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .pipeline-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row-2 { grid-template-columns: 1fr; }
  .modal-card { padding: 24px 18px; }
  .detail-key { width: 160px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .filter-tabs { overflow-x: auto; flex-wrap: nowrap; }
}

@media (max-width: 440px) {
  .stats-grid   { grid-template-columns: 1fr; }
  .stats-grid-3 { grid-template-columns: 1fr; }
  .pipeline-grid { grid-template-columns: repeat(2, 1fr); }
  .tabs-nav { overflow-x: auto; flex-wrap: nowrap; }
}
