/* Admin styles - prototype parity */
* { box-sizing: border-box; }
.admin-shell { display: flex; min-height: 100vh; font-family: system-ui, sans-serif; background: #f5f6f8; }
.admin-loading { padding: 40px; color: #888; }

/* Sidebar */
.admin-sidebar { width: 230px; background: #1a2b4a; color: #fff; display: flex; flex-direction: column; padding: 0; }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-brand-mark { width: 34px; height: 34px; border-radius: 8px; background: #4f7cff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.admin-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.admin-brand-text strong { font-size: 15px; }
.admin-brand-text span { font-size: 12px; opacity: .7; }
.admin-nav { display: flex; flex-direction: column; padding: 12px 8px; gap: 2px; }
.admin-nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; background: none; border: none; color: rgba(255,255,255,.75); font-size: 14px; border-radius: 8px; cursor: pointer; text-align: left; width: 100%; text-decoration: none; }
.admin-nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-nav-item.active { background: #4f7cff; color: #fff; }
.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar { height: 60px; background: #fff; border-bottom: 1px solid #e6e8ec; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.admin-topbar-title { font-weight: 600; font-size: 15px; }
.admin-user { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.admin-user-name { font-weight: 600; font-size: 14px; }
.admin-user-role { font-size: 12px; color: #888; }
.admin-content { padding: 24px; flex: 1; }

/* Typscale */
.admin-page-title { font-size: 22px; font-weight: 700; margin: 0 0 16px; }
.admin-page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.admin-section-title { font-size: 16px; font-weight: 600; margin: 0 0 12px; }

/* Needs attention */
.admin-attention { margin-bottom: 24px; }
.admin-attention-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.admin-nudge { background: #fff; border: 1px solid #e6e8ec; border-left: 3px solid #f5a623; border-radius: 8px; padding: 12px 14px; }
.admin-nudge-title { font-weight: 600; font-size: 14px; }
.admin-nudge-sub { font-size: 13px; color: #888; margin-top: 2px; }

/* Stat cards */
.admin-stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.admin-stat-card { background: #fff; border: 1px solid #e6e8ec; border-radius: 10px; padding: 16px; }
.admin-stat-value { font-size: 28px; font-weight: 700; }
.admin-stat-label { font-size: 13px; color: #888; margin-top: 4px; }

/* Cards & charts */
.admin-card { background: #fff; border: 1px solid #e6e8ec; border-radius: 10px; padding: 18px; }
.admin-card-title { font-size: 15px; font-weight: 600; margin: 0 0 14px; }
.admin-chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.admin-bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; }
.admin-bar-col { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.admin-bar { width: 100%; background: #4f7cff; border-radius: 3px 3px 0 0; min-height: 2px; }
.admin-hbars { display: flex; flex-direction: column; gap: 8px; }
.admin-hbar-row { display: flex; align-items: center; gap: 8px; }
.admin-hbar-label { width: 90px; font-size: 12px; color: #555; }
.admin-hbar-track { flex: 1; background: #eef0f3; border-radius: 4px; height: 10px; }
.admin-hbar-fill { background: #4f7cff; height: 100%; border-radius: 4px; }
.admin-hbar-val { font-size: 12px; color: #555; width: 28px; text-align: right; }
.admin-empty { color: #aaa; padding: 18px; text-align: center; font-size: 14px; }

/* Tables */
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
.admin-table th { text-align: left; font-size: 12px; text-transform: uppercase; color: #999; padding: 10px 12px; border-bottom: 1px solid #eee; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid #f2f2f2; font-size: 14px; }
.admin-badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.admin-badge-live, .admin-badge-published { background: #e3f6ea; color: #1a8a4a; }
.admin-badge-draft { background: #eef0f3; color: #888; }
.admin-badge-pending { background: #fdf1dc; color: #b5791b; }
.admin-badge-scheduled { background: #e4ecff; color: #3a64d8; }
.admin-badge-closed, .admin-badge-paused { background: #fde8e8; color: #c0392b; }
.admin-badge-new { background: #e4ecff; color: #3a64d8; }
.admin-badge-contacted { background: #fdf1dc; color: #b5791b; }
.admin-badge-placed { background: #e3f6ea; color: #1a8a4a; }
.admin-btn { padding: 8px 14px; border-radius: 8px; border: 1px solid #d0d4da; background: #fff; font-size: 14px; cursor: pointer; }
.admin-btn-primary { background: #4f7cff; color: #fff; border-color: #4f7cff; }
.admin-btn-sm { padding: 4px 10px; font-size: 13px; border-radius: 6px; border: 1px solid #d0d4da; background: #fff; cursor: pointer; margin-right: 6px; }
.admin-btn-approve { background: #1a8a4a; color: #fff; border-color: #1a8a4a; }
.admin-filters { display: flex; gap: 8px; margin-bottom: 16px; }
.admin-filter { padding: 6px 14px; border-radius: 20px; border: 1px solid #d0d4da; background: #fff; font-size: 13px; cursor: pointer; }
.admin-filter.active { background: #1a2b4a; color: #fff; border-color: #1a2b4a; }

/* Popular list */
.admin-popular-list { list-style: none; margin: 0; padding: 0; }
.admin-popular-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f2f2f2; font-size: 14px; }
.admin-popular-list li:last-child { border-bottom: none; }
.admin-popular-count { color: #888; font-size: 13px; }

/* Forms */
.admin-field { margin-bottom: 12px; }
.admin-field-label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 4px; }
.admin-input { width: 100%; padding: 8px 10px; border: 1px solid #d0d4da; border-radius: 8px; font-size: 14px; background: #fff; }
.admin-textarea { width: 100%; min-height: 70px; padding: 8px 10px; border: 1px solid #d0d4da; border-radius: 8px; font-size: 14px; font-family: inherit; }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-check { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; margin-right: 14px; cursor: pointer; }

/* Modal */
.admin-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 50; overflow-y: auto; }
.admin-modal { background: #fff; border-radius: 12px; padding: 24px; width: 100%; max-width: 640px; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.admin-modal h2 { margin: 0 0 16px; font-size: 18px; }
.admin-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* Drawer */
.admin-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; justify-content: flex-end; z-index: 50; }
.admin-drawer { background: #fff; width: 100%; max-width: 420px; height: 100%; padding: 24px; overflow-y: auto; box-shadow: -8px 0 30px rgba(0,0,0,.15); }
.admin-drawer h2 { margin: 0 0 12px; font-size: 18px; }
.admin-drawer-meta { color: #666; font-size: 14px; margin-bottom: 16px; line-height: 1.6; }

/* Pipeline */
.admin-pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.admin-pipe-col { background: #eef0f3; border-radius: 10px; padding: 10px; min-height: 120px; }
.admin-pipe-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 14px; margin-bottom: 10px; padding: 0 2px; }
.admin-pipe-count { background: #fff; border-radius: 12px; padding: 1px 8px; font-size: 12px; color: #555; }
.admin-pipe-card { background: #fff; border: 1px solid #e6e8ec; border-radius: 8px; padding: 10px; margin-bottom: 8px; cursor: pointer; }
.admin-pipe-card:hover { border-color: #4f7cff; }
.admin-pipe-name { font-weight: 600; font-size: 14px; }
.admin-pipe-meta { font-size: 12px; color: #888; margin-top: 2px; }

/* Chips */
.admin-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.admin-chip { display: inline-flex; align-items: center; gap: 4px; background: #eef0f3; border-radius: 16px; padding: 3px 6px 3px 10px; font-size: 13px; }
.admin-chip button { border: none; background: none; cursor: pointer; font-size: 15px; line-height: 1; color: #888; }
.admin-chip-add { display: flex; gap: 6px; align-items: center; }
.admin-chip-add .admin-input { max-width: 280px; }
.admin-q-list { margin: 0 0 8px; padding-left: 20px; }
.admin-q-list li { font-size: 14px; margin-bottom: 4px; }
.admin-q-list li button { border: none; background: none; cursor: pointer; color: #888; margin-left: 6px; }

/* Volunteers split */
.admin-split { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
.admin-list { background: #fff; border: 1px solid #e6e8ec; border-radius: 10px; overflow: hidden; max-height: 70vh; overflow-y: auto; }
.admin-list-item { padding: 12px 14px; border-bottom: 1px solid #f2f2f2; cursor: pointer; }
.admin-list-item:hover { background: #f7f8fa; }
.admin-list-item.active { background: #e4ecff; }
.admin-list-name { font-weight: 600; font-size: 14px; }
.admin-list-sub { font-size: 12px; color: #888; }
.admin-detail { background: #fff; border: 1px solid #e6e8ec; border-radius: 10px; padding: 20px; }
.admin-detail-meta { color: #666; font-size: 14px; margin-bottom: 12px; line-height: 1.6; }
.admin-detail-stat { font-weight: 600; margin-bottom: 16px; }
.admin-thread { display: flex; flex-direction: column; gap: 8px; }
.admin-msg { background: #f1f4f9; border-radius: 8px; padding: 10px 12px; font-size: 14px; }

@media (max-width: 880px) {
  .admin-chart-row, .admin-bottom-row { grid-template-columns: 1fr; }
  .admin-pipeline { grid-template-columns: 1fr 1fr; }
  .admin-split { grid-template-columns: 1fr; }
}
