/* PetroLink Design System — PetroOps Style */

:root {
  --brand:          #10B981;
  --brand-dark:     #059669;
  --brand-dim:      #064E3B;
  --brand-glow:     rgba(16,185,129,0.14);
  --accent:         #38BDF8;
  --accent-dark:    #0284C7;
  --status-green:   #22C55E;
  --status-red:     #EF4444;
  --status-yellow:  #F59E0B;
  --status-blue:    #38BDF8;
  --status-orange:  #F97316;
  --status-purple:  #A78BFA;
  --font-sans:      'Barlow', sans-serif;
  --font-cond:      'Barlow Condensed', sans-serif;
  --font-mono:      'JetBrains Mono', monospace;
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;
}

:root, [data-theme="light"] {
  --bg-void:    #F4F7F6;
  --bg-deep:    #FFFFFF;
  --bg-panel:   #FFFFFF;
  --bg-raised:  #EEF4F2;
  --border-col: #C8DDD7;
  --muted-col:  #8AADA4;
  --text-primary:   #0C1F1A;
  --text-secondary: #1E3530;
  --text-tertiary:  #4A706A;
  --text-disabled:  #A8C4BF;
  --shadow-panel: 0 2px 12px rgba(16,185,129,0.07);
  --shadow-hover:  0 4px 24px rgba(16,185,129,0.13);
}

[data-theme="dark"] {
  --bg-void:    #0A0F0D;
  --bg-deep:    #101814;
  --bg-panel:   #172018;
  --bg-raised:  #1E2B22;
  --border-col: #273D30;
  --muted-col:  #3A5C4A;
  --text-primary:   #E8F5F0;
  --text-secondary: #B8D4CA;
  --text-tertiary:  #7AA898;
  --text-disabled:  #3A5C4A;
  --shadow-panel: 0 2px 12px rgba(0,0,0,0.5);
  --shadow-hover:  0 4px 24px rgba(0,0,0,0.7);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg-void);
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* ── TOP NAV ── */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; height: 56px; z-index: 1000;
  background: var(--bg-deep); border-bottom: 1px solid var(--border-col);
  display: flex; align-items: center; padding: 0 1.5rem; gap: 1rem;
  box-shadow: var(--shadow-panel);
}
.brand-name {
  font-family: var(--font-cond); font-weight: 700; color: var(--brand);
  letter-spacing: 0.06em; text-transform: uppercase; font-size: 1.1rem;
  text-decoration: none; white-space: nowrap;
}
.brand-name .brand-hex {
  display: inline-block; width: 22px; height: 22px; background: var(--brand);
  clip-path: polygon(50% 0%,90% 25%,90% 75%,50% 100%,10% 75%,10% 25%);
  margin-right: 6px; vertical-align: middle;
}

/* ── SIDEBAR ── */
.sidebar {
  position: fixed; top: 56px; left: 0; width: 220px; bottom: 0;
  background: var(--bg-deep); border-right: 1px solid var(--border-col);
  overflow-y: auto; z-index: 900;
}
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  color: var(--text-tertiary); text-decoration: none;
  font-family: var(--font-cond); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.sidebar-item:hover { color: var(--text-primary); background: var(--bg-raised); }
.sidebar-item.active { color: var(--brand); border-left-color: var(--brand); background: var(--brand-glow); }
.sidebar-item i { font-size: 1rem; flex-shrink: 0; }
.sidebar-section {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted-col);
  padding: 16px 18px 6px; margin-top: 4px;
}

/* ── MAIN CONTENT ── */
.main-content {
  margin-left: 220px; margin-top: 56px; padding: 2rem;
  min-height: calc(100vh - 56px);
}
.page-header { margin-bottom: 1.75rem; }
.page-eyebrow {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.page-eyebrow::before { content: ''; display: inline-block; width: 20px; height: 1px; background: var(--brand); }
.page-title {
  font-family: var(--font-cond); font-size: 2rem; font-weight: 700;
  color: var(--text-primary); line-height: 1.1;
}

/* ── STAT CARD ── */
.stat-card {
  background: var(--bg-panel); border: 1px solid var(--border-col);
  border-radius: var(--radius-md); padding: 1.25rem;
  box-shadow: var(--shadow-panel); transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-hover); }
.stat-value {
  font-family: var(--font-cond); font-size: 2.2rem; font-weight: 700;
  color: var(--text-primary); line-height: 1;
}
.stat-label {
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted-col); margin-top: 4px;
}

/* ── DATA TABLE ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th {
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted-col);
  padding: 0.6rem 1rem; border-bottom: 1px solid var(--border-col);
  text-align: left; background: var(--bg-raised); font-weight: 600;
}
.data-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-col); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg-raised); }

/* ── BADGE STATUS ── */
.badge-status {
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 3px 8px; border-radius: var(--radius-sm); font-weight: 600;
}
.badge-green  { background: rgba(34,197,94,0.12);  color: #22C55E; }
.badge-red    { background: rgba(239,68,68,0.12);   color: #EF4444; }
.badge-yellow { background: rgba(245,158,11,0.12);  color: #F59E0B; }
.badge-blue   { background: rgba(56,189,248,0.12);  color: #38BDF8; }
.badge-orange { background: rgba(249,115,22,0.12);  color: #F97316; }

/* ── BUTTONS ── */
.btn-brand {
  background: var(--brand); color: #0C1F1A;
  font-family: var(--font-cond); font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; font-size: 0.8rem;
  border: none; border-radius: var(--radius-sm); padding: 0.5rem 1.25rem;
  cursor: pointer; transition: background 0.15s; display: inline-flex;
  align-items: center; gap: 6px; text-decoration: none;
}
.btn-brand:hover { background: var(--brand-dark); color: #0C1F1A; }
.btn-ghost {
  background: transparent; color: var(--brand);
  font-family: var(--font-cond); font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; font-size: 0.8rem;
  border: 1px solid var(--brand); border-radius: var(--radius-sm);
  padding: 0.5rem 1.25rem; cursor: pointer; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.btn-ghost:hover { background: var(--brand-glow); }

/* ── FORM CONTROLS ── */
.form-label-mono {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted-col); display: block; margin-bottom: 5px;
}
.form-input {
  width: 100%; background: var(--bg-raised); border: 1px solid var(--border-col);
  border-radius: var(--radius-sm); color: var(--text-primary);
  padding: 0.45rem 0.75rem; font-family: var(--font-sans); font-size: 0.9rem;
  transition: border-color 0.15s;
}
.form-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }

/* ── ALERTS ── */
.alert-success { background: rgba(34,197,94,0.1);  border-left: 3px solid #22C55E; color: #166534; padding: 0.75rem 1rem; border-radius: var(--radius-sm); }
.alert-danger  { background: rgba(239,68,68,0.1);  border-left: 3px solid #EF4444; color: #991B1B; padding: 0.75rem 1rem; border-radius: var(--radius-sm); }
.alert-warning { background: rgba(245,158,11,0.1); border-left: 3px solid #F59E0B; color: #92400E; padding: 0.75rem 1rem; border-radius: var(--radius-sm); }
.alert-info    { background: rgba(56,189,248,0.1); border-left: 3px solid #38BDF8; color: #0C4A6E; padding: 0.75rem 1rem; border-radius: var(--radius-sm); }
