/* ─────────────────────────────────────────────
   Tour Budget CMS — Base / Shared Styles
───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}

/* ── Typography ── */
.mono  { font-family: 'DM Mono', monospace; font-size: 11px; }
.muted { color: var(--muted); }
.positive { color: var(--rag-green); }
.negative { color: var(--rag-red); }
.neutral  { color: var(--accent); }
.num { text-align: right; font-family: 'DM Mono', monospace; }

/* ── Buttons ── */
.btn {
  background: var(--accent); color: #000; border: none;
  padding: 8px 18px; font-family: 'DM Mono', monospace;
  font-size: 11px; font-weight: 500; letter-spacing: 1px;
  text-transform: uppercase; cursor: pointer; transition: background 0.15s;
}
.btn:hover { background: var(--accent2); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline {
  background: none; border: 1px solid var(--border); color: var(--muted);
  padding: 7px 14px; font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  cursor: pointer; transition: all 0.15s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm {
  background: none; border: 1px solid var(--border); color: var(--muted);
  padding: 5px 10px; font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 0.5px; cursor: pointer; transition: all 0.15s;
}
.btn-sm:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger {
  background: none; border: 1px solid var(--border); color: var(--danger);
  padding: 5px 10px; font-family: 'DM Mono', monospace;
  font-size: 10px; cursor: pointer; transition: all 0.15s;
}
.btn-danger:hover { border-color: var(--danger); }

/* ── Header — page-specific, defined in each page's CSS ── */

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table-wrap { border: 1px solid var(--border); overflow-x: auto; margin-bottom: 16px; }
thead tr { background: var(--surface2); }
th {
  padding: 7px 10px; text-align: left; font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 1px; color: var(--muted);
  text-transform: uppercase; border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: 8px 10px; border-bottom: 1px solid rgba(42,42,42,0.5); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(128,128,128,0.04); }

/* ── Forms ── */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
  font-size: 11px; font-family: 'DM Mono', monospace; color: var(--muted);
  letter-spacing: 0.5px; text-transform: uppercase;
}
.field input, .field select, .field textarea {
  background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  padding: 8px 12px; font-family: 'DM Mono', monospace; font-size: 12px;
  width: 100%; outline: none; transition: border-color 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field select option { background: var(--surface2); }
.field input[type=number] { -moz-appearance: textfield; }
.field input[type=number]::-webkit-inner-spin-button,
.field input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="date"] { color-scheme: dark; }

/* ── Modals ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.75); z-index: 200;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  padding: 28px; width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
}
.modal-title {
  font-family: 'Bebas Neue', sans-serif; font-size: 20px;
  letter-spacing: 2px; color: var(--accent); margin-bottom: 20px;
}
.modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }

/* ── Alerts ── */
.alert {
  padding: 10px 14px; font-family: 'DM Mono', monospace;
  font-size: 11px; margin-bottom: 16px; display: none;
}
.alert-error   { background: rgba(224,82,82,0.1); border: 1px solid var(--danger); color: var(--danger); }
.alert-success { background: rgba(82,199,138,0.1); border: 1px solid var(--success); color: var(--success); }

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; }

/* ── Theme toggle button ── */
.theme-toggle {
  background: none; border: 1px solid var(--border); color: var(--muted);
  width: 32px; height: 32px; cursor: pointer; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ── RAG dots ── */
.rag-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.rag-green { background: var(--rag-green); }
.rag-amber { background: var(--rag-amber); }
.rag-red   { background: var(--rag-red); }

/* ── Progress bars ── */
.progress-bar-wrap {
  background: var(--surface2); border: 1px solid var(--border);
  height: 8px; border-radius: 2px; overflow: hidden; margin-top: 4px;
}
.progress-bar-fill { height: 100%; transition: width 0.3s; }

/* ── Nav ── */
nav {
  border-right: 1px solid var(--border); padding: 16px 0;
  position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto;
}
nav .nav-section {
  font-size: 10px; font-family: 'DM Mono', monospace; letter-spacing: 2px;
  color: var(--muted); padding: 12px 20px 4px; text-transform: uppercase; opacity: 0.5;
}
nav a {
  display: block; padding: 7px 20px; color: var(--muted); text-decoration: none;
  font-size: 11px; font-family: 'DM Mono', monospace; letter-spacing: 0.5px;
  transition: all 0.1s; border-left: 2px solid transparent; cursor: pointer;
}
nav a:hover, nav a.active {
  color: var(--accent); border-left-color: var(--accent);
  background: rgba(232,197,71,0.05);
}
