/* Campus Express: natural, earthy palette. Edit the variables to re-theme the whole app. */
:root {
  --bg: #f6f3ec;          /* warm off-white page */
  --card: #ffffff;
  --inset: #f4f1e8;       /* soft sand for inner panels */
  --line: #e3ddcf;
  --text: #2b2a25;
  --muted: #6e6a5e;
  --brand: #2f6b43;       /* forest green */
  --brand-dark: #245536;
  --brand-soft: #e4efe6;
  --accent: #b8741a;      /* clay / amber */
  --accent-soft: #f6e8cf;
  --danger: #b3412f;
  --seat-std: #cfe0d3;
  --seat-std-line: #9bbba4;
  --seat-vip: #f0d79c;
  --seat-vip-line: #d1ab4f;
  --seat-off: #d6d2c6;
}

html, body { background: var(--bg); color: var(--text); }
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }

.muted { color: var(--muted); }
.t-strong { color: var(--text); }
.text-brand { color: var(--brand); }
.text-accent { color: var(--accent); }
.line, .border-line { border-color: var(--line); }
.divide-y.line > :not([hidden]) ~ :not([hidden]) { border-color: var(--line); }

/* Cards & panels */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgba(60, 50, 20, .05); }
.inset { background: var(--inset); border: 1px solid var(--line); border-radius: 12px; }
.charge-card { border-color: var(--accent); background: #fffaf0; }
.banner { background: var(--accent-soft); border: 1px solid #e3c68d; border-radius: 12px; padding: .75rem 1rem; }

/* Header */
.app-header { background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo-mark { background: var(--brand); color: #fff; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 900; }
.role-tag { color: var(--brand); }
.nav-wrap { background: var(--inset); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.nav-btn { padding: .4rem .9rem; border-radius: 9px; font-size: .75rem; font-weight: 700; color: var(--muted); transition: all .15s; }
.nav-btn:hover { color: var(--text); }
.nav-btn.active { background: var(--brand); color: #fff; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; color: var(--muted); transition: all .15s; }
.icon-btn:hover { background: var(--inset); color: var(--brand); }
.icon-btn.danger:hover { color: var(--danger); }

/* Forms */
.label { display: block; font-size: .72rem; font-weight: 700; color: var(--muted); margin-bottom: .25rem; }
.input { width: 100%; background: #fff; border: 1px solid #d3ccb9; border-radius: 10px; padding: .65rem .9rem; font-size: .875rem; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
.input-sm { padding: .5rem .7rem; font-size: .75rem; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input::placeholder { color: #a39e8e; }
.check { width: 1rem; height: 1rem; accent-color: var(--brand); }

/* Buttons */
.btn { display: inline-block; font-weight: 700; font-size: .85rem; padding: .7rem 1.1rem; border-radius: 10px; border: 1px solid transparent; transition: all .15s; cursor: pointer; }
.btn-sm { font-size: .75rem; padding: .5rem .8rem; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: #fff; color: var(--text); border-color: #d3ccb9; }
.btn-secondary:hover { background: var(--inset); }
.btn-warn { background: var(--accent); color: #fff; }
.btn-warn:hover { background: #9a5f12; }
.btn-danger { background: #fff; color: var(--danger); border-color: #e3b8b0; }
.btn-danger:hover { background: #fbeeeb; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.link { color: var(--brand); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* Misc */
.pill { display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .8rem; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--brand-soft); color: var(--brand); border: 1px solid #c4dbc9; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.badge { font-size: .7rem; font-weight: 700; padding: .2rem .65rem; border-radius: 999px; background: var(--inset); color: var(--muted); }
.badge-ok { background: var(--brand-soft); color: var(--brand); }
.badge-warn { background: var(--accent-soft); color: var(--accent); }
.badge-bad { background: #f8e0db; color: var(--danger); }
.thead { background: var(--inset); color: var(--muted); text-transform: uppercase; font-weight: 700; }
.stat { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); }
.stat b { color: var(--brand); }
.row-item { display: flex; align-items: center; justify-content: space-between; gap: .5rem; background: var(--inset); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; font-size: .75rem; }

/* Bus & seats */
.bus-shell { background: var(--inset); border: 2px solid var(--line); border-radius: 28px; padding: 1.25rem; }
.bus-front { display: flex; justify-content: space-between; font-size: .72rem; font-weight: 600; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .45rem .8rem; margin-bottom: 1rem; }
.swatch { width: 12px; height: 12px; border-radius: 4px; display: inline-block; border: 1px solid transparent; }
.seat-std { background: var(--seat-std); border-color: var(--seat-std-line); }
.seat-vip { background: var(--seat-vip); border-color: var(--seat-vip-line); }
.seat-sel { background: var(--brand); border-color: var(--brand-dark); color: #fff; }
.seat-off { background: var(--seat-off); border-color: #bfbaac; color: #8b8676; }
.seat { aspect-ratio: 1 / 1; border-radius: 10px; border-width: 2px; border-style: solid; font-size: .75rem; font-weight: 800; display: flex; align-items: center; justify-content: center; transition: transform .1s; color: var(--text); }
.seat:not(:disabled):hover { transform: scale(1.07); }
.seat:disabled { cursor: not-allowed; }
.seat-aisle { aspect-ratio: 1 / 1; }
.seat-driver { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 1rem; }

/* Layout editor cells */
.ecell { aspect-ratio: 1 / 1; border-radius: 10px; border: 2px solid; font-size: .72rem; font-weight: 800; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); }
.ecell-S { background: var(--seat-std); border-color: var(--seat-std-line); }
.ecell-V { background: var(--seat-vip); border-color: var(--seat-vip-line); }
.ecell-A { background: transparent; border-style: dashed; border-color: #cbc5b3; color: #b3ad9b; }
.ecell-D { background: #fff; border-color: var(--line); color: var(--muted); }

/* Modal & toasts */
.modal-backdrop { background: rgba(43, 42, 37, .55); backdrop-filter: blur(3px); }
.toast { pointer-events: auto; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; padding: .7rem 1rem; font-size: .8rem; font-weight: 600; box-shadow: 0 8px 24px rgba(40, 35, 15, .15); transition: opacity .4s, transform .4s; }
.toast-error { border-left-color: var(--danger); }
.toast-warn { border-left-color: var(--accent); }
.toast-success { border-left-color: var(--brand); }
.toast-out { opacity: 0; transform: translateX(20px); }
