/* ==========================================================
   THE ELITE GOATS CRM — Main Stylesheet
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Montserrat:wght@400;500;600;700;800&family=Rajdhani:wght@500;600;700&display=swap');

:root {
  --bg:          #0a0a09;
  --sidebar-bg:  #0e0d08;
  --surface:     #15140f;
  --surface-2:   #1c1b14;
  --border:      rgba(245,243,236,.09);
  --border-s:    rgba(245,243,236,.16);
  --orange:      #f2660c;
  --orange-d:    #c8420a;
  --green:       #3ec97c;
  --red:         #e05252;
  --gold:        #d4af37;
  --blue:        #4a9cf5;
  --paper:       #f5f3ec;
  --paper-dim:   #cfccc2;
  --muted:       #8c897f;
  --sidebar-w:   240px;
  --header-h:    58px;
  --radius:      12px;
  --radius-sm:   8px;
  --f-body:      'Montserrat', sans-serif;
  --f-data:      'Rajdhani', sans-serif;
  --f-display:   'Bebas Neue', sans-serif;
  --shadow:      0 4px 24px rgba(0,0,0,.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--paper);
  font-size: 14.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--paper); }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: inherit; }
h1,h2,h3,h4 { line-height: 1.2; }

/* ── LAYOUT ─────────────────────────────────────────────── */
.crm-wrap {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform .28s ease;
  overflow-y: auto;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo img { height: 22px; }
.sidebar-logo-txt {
  font-family: var(--f-display);
  font-size: 14px;
  letter-spacing: .04em;
  color: var(--paper);
}
.sidebar-logo-txt span { color: var(--orange); }

.sidebar-section { padding: 14px 10px 4px; }
.sidebar-section-label {
  font-family: var(--f-data);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 8px 6px;
}
.sidebar-nav { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--f-data);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
  transition: background .18s, color .18s;
}
.sidebar-nav a i { width: 18px; text-align: center; font-size: 13px; }
.sidebar-nav a:hover { background: rgba(255,255,255,.05); color: var(--paper); }
.sidebar-nav a.active { background: rgba(242,102,12,.12); color: var(--orange); }
.sidebar-nav a.active i { color: var(--orange); }

.sidebar-footer {
  margin-top: auto;
  padding: 14px 10px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  transition: background .2s;
}
.sidebar-user:hover { background: rgba(255,255,255,.05); }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-d));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display);
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.lg { width: 52px; height: 52px; font-size: 20px; }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--paper);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role {
  font-family: var(--f-data);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar-user-role.admin { color: var(--gold); }

/* ── MAIN CONTENT ───────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── TOP HEADER (mobile toggle + page title) ────────────── */
.topbar {
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  background: rgba(10,10,9,.9);
  backdrop-filter: blur(12px);
  z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-title {
  font-family: var(--f-display);
  font-size: 20px;
  letter-spacing: .04em;
  color: var(--paper);
}
.topbar-right { display: flex; align-items: center; gap: 12px; }

.menu-toggle {
  display: none;
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--border-s);
  border-radius: 8px;
  color: var(--paper);
  font-size: 15px;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.sidebar-close {
  display: none;
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--border-s);
  border-radius: 8px;
  color: var(--paper);
  font-size: 15px;
  cursor: pointer;
  align-items: center; justify-content: center;
  margin-left: auto;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 190;
}

/* ── PAGE CONTENT ───────────────────────────────────────── */
.content {
  padding: 28px 28px 60px;
  flex: 1;
}
.page-header {
  margin-bottom: 26px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title {
  font-family: var(--f-display);
  font-size: 28px;
  letter-spacing: .04em;
  color: var(--paper);
}
.page-subtitle {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 4px;
}

/* ── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-head h3 {
  font-family: var(--f-data);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--paper-dim);
}
.card-body { padding: 20px; }

/* ── STAT CARDS ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  transition: border-color .2s, transform .2s;
}
.stat-card:hover { border-color: var(--border-s); transform: translateY(-2px); }
.stat-icon {
  width: 36px; height: 36px;
  background: rgba(242,102,12,.1);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--orange);
  font-size: 14px;
  margin-bottom: 12px;
}
.stat-icon.green  { background: rgba(62,201,124,.1);  color: var(--green); }
.stat-icon.red    { background: rgba(224,82,82,.1);   color: var(--red); }
.stat-icon.gold   { background: rgba(212,175,55,.1);  color: var(--gold); }
.stat-icon.blue   { background: rgba(74,156,245,.1);  color: var(--blue); }
.stat-num {
  font-family: var(--f-display);
  font-size: 26px;
  letter-spacing: .02em;
  color: var(--paper);
  line-height: 1;
}
.stat-num.pos { color: var(--green); }
.stat-num.neg { color: var(--red); }
.stat-label {
  font-family: var(--f-data);
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 5px;
}

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--f-data);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 20px;
}
.badge-green  { background: rgba(62,201,124,.12);  color: var(--green);  border: 1px solid rgba(62,201,124,.25); }
.badge-red    { background: rgba(224,82,82,.12);   color: var(--red);    border: 1px solid rgba(224,82,82,.25); }
.badge-orange { background: rgba(242,102,12,.12);  color: var(--orange); border: 1px solid rgba(242,102,12,.25); }
.badge-gold   { background: rgba(212,175,55,.12);  color: var(--gold);   border: 1px solid rgba(212,175,55,.25); }
.badge-blue   { background: rgba(74,156,245,.12);  color: var(--blue);   border: 1px solid rgba(74,156,245,.25); }
.badge-muted  { background: rgba(255,255,255,.06); color: var(--muted);  border: 1px solid var(--border); }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px;
  font-family: var(--f-data);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-d));
  color: #150d05;
  box-shadow: 0 6px 16px -6px rgba(242,102,12,.5);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgba(242,102,12,.65); color: #150d05; }
.btn-ghost {
  background: transparent;
  border-color: var(--border-s);
  color: var(--paper);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn-danger {
  background: rgba(224,82,82,.1);
  border-color: rgba(224,82,82,.3);
  color: var(--red);
}
.btn-danger:hover { background: rgba(224,82,82,.2); }
.btn-sm { padding: 7px 13px; font-size: 11.5px; }
.btn-xs { padding: 4px 10px; font-size: 10.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-icon {
  width: 34px; height: 34px; padding: 0;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border-s);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .18s;
}
.btn-icon:hover { border-color: var(--orange); color: var(--orange); }

/* ── FORMS ──────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid.cols-1 { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.span-2 { grid-column: 1/-1; }
.form-label {
  font-family: var(--f-data);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.form-label i { color: var(--orange); font-size: 10px; }
.form-control {
  background: var(--surface-2);
  border: 1px solid var(--border-s);
  border-radius: var(--radius-sm);
  color: var(--paper);
  font-size: 14.5px;
  padding: 10px 13px;
  width: 100%;
  outline: none;
  transition: border-color .2s, background .2s;
  -webkit-appearance: none;
}
.form-control:focus { border-color: var(--orange); background: var(--surface); }
.form-control::placeholder { color: var(--muted); }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c897f' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px;
  padding-right: 32px; cursor: pointer;
}
select.form-control option { background: var(--surface-2); }
textarea.form-control { resize: vertical; min-height: 90px; line-height: 1.55; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 2px; }

/* ── CHECKBOXES / TAGS ──────────────────────────────────── */
.tag-group { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-check { display: none; }
.tag-label {
  font-family: var(--f-data);
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 20px;
  border: 1px solid var(--border-s);
  color: var(--muted);
  cursor: pointer; transition: all .18s;
}
.tag-check:checked + .tag-label {
  background: rgba(242,102,12,.12);
  border-color: rgba(242,102,12,.3);
  color: var(--orange);
}

/* ── ALERT / FLASH ──────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.alert-success { background: rgba(62,201,124,.1);  border: 1px solid rgba(62,201,124,.25); color: var(--green); }
.alert-error   { background: rgba(224,82,82,.1);   border: 1px solid rgba(224,82,82,.25);  color: var(--red); }
.alert-info    { background: rgba(74,156,245,.1);  border: 1px solid rgba(74,156,245,.25); color: var(--blue); }
.alert i { flex-shrink: 0; }

/* ── TABLES ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.crm-table {
  width: 100%; border-collapse: collapse;
  font-size: 13.5px;
}
.crm-table th {
  font-family: var(--f-data);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.crm-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--paper-dim);
  vertical-align: middle;
}
.crm-table tr:last-child td { border-bottom: none; }
.crm-table tr:hover td { background: rgba(255,255,255,.02); }
.crm-table .num { font-family: var(--f-data); font-size: 14px; font-weight: 600; }
.crm-table .pos { color: var(--green); }
.crm-table .neg { color: var(--red); }
.crm-table .zero { color: var(--muted); }

/* ── ACTIVITY FEED ──────────────────────────────────────── */
.activity-feed { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(242,102,12,.1);
  color: var(--orange);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
}
.activity-text { flex: 1; }
.activity-action { font-size: 13.5px; color: var(--paper-dim); }
.activity-time { font-family: var(--f-data); font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── MT5 ACCOUNT PANEL ──────────────────────────────────── */
.mt5-account-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.mt5-account-header {
  padding: 18px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.mt5-server { font-family: var(--f-data); font-size: 12px; color: var(--muted); margin-top: 2px; }
.mt5-login  { font-family: var(--f-display); font-size: 22px; color: var(--paper); }
.mt5-balances {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0;
}
.mt5-balance-item {
  padding: 16px 20px;
  border-right: 1px solid var(--border);
}
.mt5-balance-item:last-child { border-right: none; }
.mt5-balance-num { font-family: var(--f-display); font-size: 22px; color: var(--paper); }
.mt5-balance-lbl { font-family: var(--f-data); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

/* ── PLAYBOOK CARDS ─────────────────────────────────────── */
.playbook-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 16px; }
.playbook-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .22s, border-color .22s;
  display: flex; flex-direction: column;
}
.playbook-card:hover { transform: translateY(-3px); border-color: var(--border-s); }
.playbook-card-img {
  aspect-ratio: 16/9;
  background: var(--surface-2);
  overflow: hidden;
  position: relative;
}
.playbook-card-img img { width: 100%; height: 100%; object-fit: cover; }
.playbook-card-img .no-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 28px;
}
.playbook-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.playbook-card-title { font-weight: 700; font-size: 15px; color: var(--paper); }
.playbook-card-desc { font-size: 13px; color: var(--muted); line-height: 1.55; flex: 1; }
.playbook-card-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}

/* ── SCREENSHOTS GALLERY ─────────────────────────────────── */
.shots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 10px; }
.shot-wrap {
  position: relative; border-radius: 8px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
  aspect-ratio: 16/9;
}
.shot-wrap img { width: 100%; height: 100%; object-fit: cover; }
.shot-del {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(10,10,9,.8);
  border: 1px solid var(--red);
  color: var(--red); font-size: 10px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.shot-wrap:hover .shot-del { opacity: 1; }
.shot-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  padding: 12px 8px 6px;
  font-size: 11px; color: var(--paper-dim);
}

/* ── UPLOAD DROP ZONE ────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border-s);
  border-radius: var(--radius-sm);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--orange);
  background: rgba(242,102,12,.04);
}
.drop-zone i { font-size: 24px; color: var(--muted); margin-bottom: 8px; }
.drop-zone p { font-size: 13px; color: var(--muted); }
.drop-zone strong { color: var(--orange); }

/* ── AUTH PAGES ─────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}
.auth-box {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-s);
  border-radius: 18px;
  padding: clamp(26px,5vw,44px);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo img { height: 28px; margin: 0 auto 10px; }
.auth-logo h1 {
  font-family: var(--f-display);
  font-size: 22px;
  letter-spacing: .04em;
  color: var(--paper);
}
.auth-logo p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--muted); margin-top: 18px; }
.auth-switch a { color: var(--orange); font-weight: 600; }
.auth-divider {
  text-align: center; font-size: 12px; color: var(--muted);
  position: relative; margin: 4px 0;
}

/* ── SEARCH + FILTER BAR ─────────────────────────────────── */
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.search-wrap { position: relative; flex: 1; min-width: 200px; }
.search-wrap i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 13px; pointer-events: none;
}
.search-wrap input {
  width: 100%; padding: 9px 12px 9px 36px;
  background: var(--surface-2);
  border: 1px solid var(--border-s);
  border-radius: var(--radius-sm);
  color: var(--paper); font-size: 13.5px;
  outline: none; transition: border-color .2s;
}
.search-wrap input:focus { border-color: var(--orange); }
.search-wrap input::placeholder { color: var(--muted); }

/* ── PAGINATION / EMPTY STATE ────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 52px 20px;
  color: var(--muted);
}
.empty-state i { font-size: 36px; color: var(--border-s); display: block; margin-bottom: 14px; }
.empty-state p { font-family: var(--f-data); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

/* ── DIVIDER ─────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── LOADING SPINNER ─────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border-s);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity .22s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--surface-2);
  border: 1px solid var(--border-s);
  border-radius: 16px;
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(16px); transition: transform .25s;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h3 { font-size: 16px; font-weight: 700; color: var(--paper); }
.modal-body { padding: 20px; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .sidebar-close { display: flex; }
  .main { margin-left: 0; }
  .menu-toggle { display: flex; }
  .content { padding: 18px 16px 80px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.span-2 { grid-column: 1; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .playbook-grid { grid-template-columns: 1fr; }
  .mt5-balances { grid-template-columns: repeat(2, 1fr); }
  .mt5-balance-item { border-right: none; border-bottom: 1px solid var(--border); }
  .mt5-balance-item:last-child { border-bottom: none; }
  .page-header { flex-direction: column; }
  .filter-bar { flex-direction: column; align-items: stretch; }

  /* Bottom navigation on mobile */
  .mobile-nav {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--sidebar-bg);
    border-top: 1px solid var(--border);
    z-index: 150;
  }
  .mobile-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    gap: 3px; padding: 10px 4px;
    font-family: var(--f-data); font-size: 9.5px; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase;
    color: var(--muted); transition: color .2s;
  }
  .mobile-nav a i { font-size: 17px; }
  .mobile-nav a.active { color: var(--orange); }
  .topbar { padding: 0 16px; }
}

@media (min-width: 769px) {
  .mobile-nav { display: none; }
}

/* ── UTIL ────────────────────────────────────────────────── */
.flex    { display: flex; }
.flex-1  { flex: 1; }
.items-c { 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; }
.text-m  { color: var(--muted); }
.text-sm { font-size: 12.5px; }
.bold    { font-weight: 700; }
.w-full  { width: 100%; }
.hidden  { display: none; }
