/* PushPro – App Stylesheet
   Aesthetic: Dark industrial / precision instrument
   Fonts: Syne (display) + DM Mono (data)
*/

/* ── Reset & Variables ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #090910;
  --surface:    #0f0f18;
  --surface2:   #15151f;
  --surface3:   #1c1c28;
  --border:     #242433;
  --border2:    #2e2e42;
  --amber:      #f5a623;
  --amber-dim:  #c4851c;
  --amber-glow: rgba(245,166,35,.12);
  --green:      #3ecf8e;
  --red:        #ff6b6b;
  --blue:       #4f9cf9;
  --purple:     #a78bfa;
  --text:       #e8e8f0;
  --text2:      #9494aa;
  --text3:      #5a5a72;
  --font-sans:  'Syne', system-ui, sans-serif;
  --font-mono:  'DM Mono', 'SF Mono', monospace;
  --radius:     8px;
  --radius-lg:  14px;
  --shadow:     0 4px 24px rgba(0,0,0,.4);
  --transition: .18s cubic-bezier(.4,0,.2,1);
}

html { font-size: 14px; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; }

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

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: 220px;
  min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}
.sidebar__brand {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: -.5px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar__nav { padding: 12px 0; flex: 1; }
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color var(--transition), background var(--transition);
  border-left: 2px solid transparent;
}
.sidebar__link:hover { color: var(--text); background: var(--surface2); }
.sidebar__link--active { color: var(--amber); background: var(--amber-glow); border-left-color: var(--amber); }
.sidebar__icon { font-size: 15px; width: 20px; text-align: center; }
.sidebar__footer { padding: 16px 20px; border-top: 1px solid var(--border); }
.sidebar__user { display: flex; align-items: center; gap: 10px; }
.sidebar__avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--amber); color: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.sidebar__email { font-size: 11px; color: var(--text2); font-family: var(--font-mono); }
.sidebar__logout { font-size: 11px; color: var(--text3); text-decoration: none; }
.sidebar__logout:hover { color: var(--red); }

/* ── Main content ─────────────────────────────────────────────────────────── */
.main { flex: 1; margin-left: 220px; padding: 32px; min-height: 100vh; max-width: 1400px; }

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header { margin-bottom: 28px; }
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -.5px; color: var(--text); }
.page-title span { color: var(--amber); }
.page-sub { font-size: 13px; color: var(--text2); margin-top: 4px; }

/* ── Stats grid ─────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition);
}
.stat-card:hover { border-color: var(--border2); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--amber); opacity: .6; }
.stat-card--green::before { background: var(--green); }
.stat-card--blue::before  { background: var(--blue); }
.stat-card--red::before   { background: var(--red); }
.stat-card--purple::before{ background: var(--purple); }
.stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text3); margin-bottom: 8px; }
.stat-value { font-family: var(--font-mono); font-size: 28px; font-weight: 500; color: var(--text); line-height: 1; }
.stat-sub   { font-size: 11px; color: var(--text3); margin-top: 6px; }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.card-title { font-size: 14px; font-weight: 700; letter-spacing: .5px; color: var(--text); }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  padding: 8px 12px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td { padding: 11px 12px; border-bottom: 1px solid var(--border); color: var(--text2); vertical-align: middle; }
tr:hover td { background: var(--surface2); }
tr:last-child td { border-bottom: none; }
.td-mono { font-family: var(--font-mono); font-size: 12px; }
.td-bold { color: var(--text); font-weight: 600; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; font-family: var(--font-mono); }
.badge--green  { background: rgba(62,207,142,.12); color: var(--green); }
.badge--amber  { background: rgba(245,166,35,.12);  color: var(--amber); }
.badge--red    { background: rgba(255,107,107,.12); color: var(--red); }
.badge--blue   { background: rgba(79,156,249,.12);  color: var(--blue); }
.badge--gray   { background: var(--surface3); color: var(--text3); }
.badge--dot::before { content: '●'; font-size: 8px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary  { background: var(--amber); color: var(--bg); }
.btn--primary:hover { background: var(--amber-dim); }
.btn--outline  { background: transparent; border-color: var(--border2); color: var(--text2); }
.btn--outline:hover { border-color: var(--amber); color: var(--amber); }
.btn--danger   { background: transparent; border-color: rgba(255,107,107,.3); color: var(--red); }
.btn--danger:hover { background: rgba(255,107,107,.1); }
.btn--sm { padding: 6px 12px; font-size: 12px; }
.btn--icon { padding: 7px; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-grid { display: grid; gap: 16px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); font-weight: 600; }
.form-label em { text-transform: none; letter-spacing: 0; font-weight: 400; font-style: normal; color: var(--text3); }
.form-control {
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}
.form-control:focus { border-color: var(--amber); }
.form-control--mono { font-family: var(--font-mono); font-size: 12px; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: var(--text3); }

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13px; margin-bottom: 20px; border: 1px solid transparent; }
.alert--success { background: rgba(62,207,142,.08); border-color: rgba(62,207,142,.25); color: var(--green); }
.alert--error   { background: rgba(255,107,107,.08); border-color: rgba(255,107,107,.25); color: var(--red); }
.alert--info    { background: rgba(79,156,249,.08);  border-color: rgba(79,156,249,.25);  color: var(--blue); }
.alert--warning { background: rgba(245,166,35,.08);  border-color: rgba(245,166,35,.25);  color: var(--amber); }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty { text-align: center; padding: 48px 20px; }
.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .3; }
.empty-msg { color: var(--text3); font-size: 13px; }

/* ── Code snippet ─────────────────────────────────────────────────────────── */
.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text2);
  overflow-x: auto;
  white-space: pre;
  position: relative;
  line-height: 1.7;
}
.code-block .hl { color: var(--amber); }

/* ── Chart container ─────────────────────────────────────────────────────── */
.chart-container { position: relative; height: 200px; }

/* ── Progress bar ─────────────────────────────────────────────────────────── */
.progress { background: var(--surface3); border-radius: 20px; height: 6px; overflow: hidden; }
.progress__bar { height: 100%; border-radius: 20px; background: var(--amber); transition: width .5s ease; }
.progress__bar--green { background: var(--green); }

/* ── Pagination ─────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 6px 11px;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text2);
  text-decoration: none;
  transition: all var(--transition);
}
.pagination a:hover { border-color: var(--amber); color: var(--amber); }
.pagination span   { background: var(--amber); color: var(--bg); border-color: var(--amber); font-weight: 700; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity var(--transition); }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal { background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius-lg); padding: 28px; width: 100%; max-width: 500px; transform: translateY(12px); transition: transform var(--transition); }
.modal-overlay.active .modal { transform: translateY(0); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 20px; padding: 0; line-height: 1; }
.modal-close:hover { color: var(--red); }

/* ── Login page ─────────────────────────────────────────────────────────── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; }
.login-logo { font-size: 26px; font-weight: 800; color: var(--amber); letter-spacing: -1px; margin-bottom: 6px; }
.login-sub  { font-size: 13px; color: var(--text3); margin-bottom: 28px; }

/* ── Flex utils ─────────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-mono { font-family: var(--font-mono); font-size: 12px; }
.text-dim  { color: var(--text3); font-size: 12px; }
.text-amber { color: var(--amber); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
}

/* ── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }
