/* =========================================================
   BusNstay Admin Portal — visual identity
   Palette: white + yellow lead, blue used for accents and dark
   surfaces (sidebar, login page) — no black anywhere in the UI.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --yellow:        #F5B700;   /* primary brand color */
  --yellow-soft:   #FFF3D1;   /* tinted backgrounds */
  --white:         #FFFFFF;
  --cream:         #FFFBF2;   /* app background */
  --blue:          #2563EB;   /* accent: alerts, "Ready" status, links */
  --blue-dark:     #0B2545;   /* dark surfaces: sidebar, login page */
  --ink:           #241C15;   /* warm dark text color */
  --muted:         #8A7F6B;
  --line:          #EFE6D3;
  --radius:        14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 15px;
}

h1, h2, h3, .brand-name {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

a { color: inherit; }

/* ---------- Shell layout ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 230px;
  background: var(--blue-dark);
  color: var(--yellow-soft);
  display: flex;
  flex-direction: column;
  padding: 28px 18px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--yellow);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
}

.brand-name { color: var(--white); font-size: 16px; }
.brand-name em { color: var(--yellow); font-style: normal; font-weight: 500; }

.sidebar nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.sidebar nav a {
  text-decoration: none;
  color: #C9BFA9;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
}

.sidebar nav a:hover { background: rgba(245,183,0,0.1); color: var(--yellow-soft); }
.sidebar nav a.active { background: var(--yellow); color: var(--ink); font-weight: 600; }

.logout-link {
  text-decoration: none;
  color: #C9BFA9;
  font-size: 13px;
  padding: 10px 14px;
}
.logout-link:hover { color: var(--blue); }

.content { flex: 1; padding: 40px 48px; max-width: 1100px; }

/* ---------- Route-line signature motif ---------- */
.route-strip {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 10px 0 32px;
  overflow-x: auto;
}
.route-strip .stop {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.route-strip .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--yellow); border: 2px solid var(--ink);
}
.route-strip .stop:first-child .dot,
.route-strip .stop:last-child .dot { background: var(--blue); }
.route-strip .seg { width: 46px; height: 2px; background: var(--line); margin: 0 2px; }
.route-strip .label { font-size: 11px; color: var(--muted); margin-left: 6px; white-space: nowrap; }

/* ---------- Cards / tables ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-card .num { font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 700; }
.stat-card .label { font-size: 13px; color: var(--muted); margin-top: 4px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.badge-placed, .badge-confirmed { background: var(--yellow-soft); color: #8A6B00; }
.badge-preparing { background: #FFE9B8; color: #8A5A00; }
.badge-ready { background: #E4EEFE; color: var(--blue); }
.badge-picked_up { background: #E7F5E5; color: #2C7A3D; }
.badge-cancelled, .badge-refunded { background: #F5E5E5; color: #A33; }

/* ---------- Forms ---------- */
.form-row { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
label { font-size: 13px; font-weight: 500; color: var(--muted); }
input, select, textarea {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--white);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--yellow);
  outline-offset: 1px;
  border-color: var(--yellow);
}

.btn {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  border: none;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: #E0AB00; }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-danger { background: var(--blue); color: var(--white); }

/* ---------- Login page ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-dark);
}
.login-card {
  background: var(--white);
  padding: 40px;
  border-radius: 18px;
  width: 340px;
}
.login-card .brand-mark { margin-bottom: 20px; }
.error-msg { background: #FDECEC; color: #A33; padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; }

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.subtle { color: var(--muted); font-size: 13px; }
