/* ==========================================================================
   Wholesale Offers - Global Administrative Command Console Stylesheet
   wholesaleoffers.com (Host 10.5.0.41)
   ========================================================================== */

:root {
  --bg-darkest: #06090f;
  --bg-main: #0b1120;
  --bg-surface: #111827;
  --bg-surface-elevated: #1e293b;
  --bg-card: rgba(17, 24, 39, 0.9);

  --brand-red: #ef4444;
  --brand-red-light: #f87171;
  --brand-crimson: #e11d48;

  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-cyan: #06b6d4;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-darkest);
  color: var(--text-primary);
  min-height: 100vh;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 300px;
  background: #04060a;
  border-right: 1px solid var(--border-subtle);
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.admin-brand-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  display: block;
}

.admin-brand-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--brand-red-light);
  letter-spacing: 0.08em;
  display: block;
}

.admin-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: #34d399;
  font-weight: 600;
  margin-bottom: 24px;
}

.pulse-green {
  width: 6px;
  height: 6px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-emerald);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.admin-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.admin-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.admin-link.active {
  background: var(--brand-red);
  color: #fff;
}

.nav-pill {
  margin-left: auto;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
}

.admin-sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Main Area */
.admin-main {
  flex: 1;
  padding: 32px 40px;
  overflow-y: auto;
  background: var(--bg-main);
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.topbar-title {
  font-size: 1.8rem;
  line-height: 1.2;
}

.topbar-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sync-status-badge {
  display: flex;
  gap: 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
}

/* KPI Overview Grid */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.admin-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.kpi-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.kpi-value {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.kpi-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Panels */
.admin-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.panel-header h3 {
  font-size: 1.25rem;
}

/* Telemetry Grid */
.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.telemetry-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.telemetry-box strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.telemetry-box p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--brand-red);
}
.progress-fill.green { background: var(--accent-emerald); }
.progress-fill.cyan { background: var(--accent-cyan); }
.progress-fill.amber { background: var(--accent-amber); }

/* Tables */
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: 12px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-table td {
  padding: 16px 12px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Push Form Grid */
.push-form-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
}

.push-form-card, .push-preview-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.phone-mockup {
  margin-top: 16px;
  background: #000;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.push-banner {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  gap: 12px;
}

.push-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.push-banner strong {
  display: block;
  font-size: 0.75rem;
  color: #fff;
}

.push-banner p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 2px 0;
}

.push-banner small {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Buttons */
.btn-admin-primary {
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-crimson) 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-medium);
  color: #fff;
  padding: 8px 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.btn-sm { padding: 6px 12px; font-size: 0.75rem; }
.btn-full-width { width: 100%; margin-top: 14px; }

/* Tabs */
.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }

.badge-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 99px;
  text-transform: uppercase;
}
.badge-tag.brand-red { background: rgba(239, 68, 68, 0.2); color: var(--brand-red-light); }
.badge-tag.green { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-tag.category { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }

.text-green { color: var(--accent-emerald); }
.text-amber { color: var(--accent-amber); }
.text-cyan { color: var(--accent-cyan); }
.text-red { color: var(--brand-red-light); }

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}
