/* SouthLine District EMS — dashboard styling
   Design concept: an EMS dispatch console, not a marketing SaaS page.
   Color communicates state (amber = pending, green = active, red = critical
   actions only). Monospace is reserved for IDs, timestamps and counts. */

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

:root {
  --bg: #14181c;
  --surface: #1c2126;
  --surface-alt: #21272d;
  --border: #6e1522;
  --text: #e8edf1;
  --text-dim: #8b96a3;
  --accent: #c8102e;
  --accent-dim: #7a0c1e;
  --amber: #e8a33d;
  --green: #3fb27f;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --radius: 3px;
  --sidebar-w: 232px;
  --glow: 0 0 0 1px rgba(200,16,46,0.5), 0 0 16px rgba(200,16,46,0.22);
  --glow-strong: 0 0 0 1px rgba(200,16,46,0.7), 0 0 22px rgba(200,16,46,0.4);
  --grad-text: linear-gradient(135deg, #ffffff 0%, #bfe0ff 45%, #5a9bff 100%);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: url('banner.jpg') center / cover no-repeat fixed, var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, .heading, .panel-title, .stat .value, .sidebar .brand .name {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 4px 0;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

a { color: inherit; text-decoration: none; }

.mono { font-family: var(--mono); font-size: 0.92em; }

/* ---------- layout shell ---------- */

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: rgba(20,24,28,0.80);
  backdrop-filter: blur(3px);
  border-right: 1px solid var(--border);
  box-shadow: var(--glow);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar .brand {
  padding: 0 20px 20px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.sidebar .brand .mark {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  margin-right: 8px;
  border-radius: 1px;
  vertical-align: middle;
}

.sidebar .brand .logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 8px;
  box-shadow: var(--glow);
}

.sidebar .brand .name {
  font-size: 16px;
  font-weight: 700;
}

.sidebar .brand .sub {
  color: var(--text-dim);
  font-size: 12.5px;
  margin-top: 4px;
}

.nav {
  flex: 1;
  overflow-y: auto;
}

.nav a {
  display: block;
  padding: 9px 20px;
  color: var(--text-dim);
  font-size: 14px;
  border-left: 2px solid transparent;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-alt);
}

.nav a.active {
  color: var(--text);
  border-left-color: var(--accent);
  background: var(--surface-alt);
  font-weight: 500;
}

.nav .section-label {
  padding: 14px 20px 6px 20px;
  color: var(--text-dim);
  font-size: 11.5px;
  text-transform: none;
}

.sidebar .who {
  border-top: 1px solid var(--border);
  padding: 14px 20px 0 20px;
  margin-top: 12px;
}

.sidebar .who .name {
  font-size: 13.5px;
  font-weight: 500;
}

.sidebar .who .logout {
  color: var(--text-dim);
  font-size: 12.5px;
  margin-top: 4px;
  display: inline-block;
}

.sidebar .who .logout:hover { color: var(--accent); }

.main {
  flex: 1;
  padding: 32px 40px 60px 40px;
  max-width: 1100px;
}

.hero {
  position: relative;
  height: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--glow-strong);
  background: url('banner.jpg') center 30% / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20,24,28,0.92) 0%, rgba(20,24,28,0.55) 45%, rgba(20,24,28,0.25) 100%);
}

.hero .hero-text {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 28px;
}

.hero .hero-text .eyebrow {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 2px;
}

.hero .hero-text h1 {
  font-size: 26px;
  margin: 0;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header p {
  color: var(--text-dim);
  margin: 4px 0 0 0;
  font-size: 14px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--glow);
}

.btn:hover { border-color: var(--accent); box-shadow: var(--glow-strong); }

.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: var(--glow-strong); }
.btn-primary:hover { background: #a80d26; border-color: #a80d26; }

.btn-danger { background: transparent; border-color: var(--accent-dim); color: #ef6b7e; }
.btn-danger:hover { background: var(--accent-dim); color: #fff; }

.btn-success { background: transparent; border-color: #1f6b48; color: var(--green); box-shadow: 0 0 0 1px rgba(63,178,127,0.4), 0 0 14px rgba(63,178,127,0.18); }
.btn-success:hover { background: #1f6b48; color: #fff; }

.btn-sm { padding: 5px 10px; font-size: 12.5px; }

/* ---------- cards / panels ---------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 32px;
}

.stat {
  background: var(--surface);
  padding: 16px 18px;
  box-shadow: var(--glow);
}

.stat .value {
  font-size: 28px;
}

.stat .label {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 2px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: var(--glow);
}

.panel .panel-title {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.panel .panel-body { padding: 18px; }

/* ---------- tables ---------- */

table { width: 100%; border-collapse: collapse; }

th {
  text-align: left;
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

tr:hover td { background: var(--surface-alt); }

/* ---------- badges ---------- */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--mono);
}

.badge-open { background: rgba(232,163,61,0.15); color: var(--amber); }
.badge-claimed { background: rgba(63,178,127,0.15); color: var(--green); }
.badge-closed { background: rgba(139,150,163,0.15); color: var(--text-dim); }
.badge-pending { background: rgba(232,163,61,0.15); color: var(--amber); }
.badge-accepted { background: rgba(63,178,127,0.15); color: var(--green); }
.badge-denied { background: rgba(200,16,46,0.15); color: #ef6b7e; }

/* ---------- forms ---------- */

form.stacked { display: flex; flex-direction: column; gap: 16px; max-width: 520px; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field label { font-size: 13.5px; font-weight: 500; }

.field .hint { color: var(--text-dim); font-size: 12.5px; margin-top: -2px; }

input[type=text], input[type=number], select, textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
  box-shadow: var(--glow);
}

textarea { resize: vertical; min-height: 70px; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--glow-strong);
}

.field-row { display: flex; gap: 16px; }
.field-row .field { flex: 1; }

.inline-form { display: inline; }

/* ---------- misc ---------- */

.empty-state {
  color: var(--text-dim);
  padding: 32px 18px;
  text-align: left;
  font-size: 14px;
}

.flash {
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid var(--border);
}

.flash-success { border-color: #1f6b48; color: var(--green); }
.flash-error { border-color: var(--accent-dim); color: #ef6b7e; }

.divider { height: 1px; background: var(--border); margin: 24px 0; }

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(20,24,28,0.80), rgba(20,24,28,0.96)),
    url('banner.jpg') center 35% / cover no-repeat;
}

.login-card {
  background: rgba(28,33,38,0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 360px;
  text-align: left;
  backdrop-filter: blur(2px);
  box-shadow: var(--glow-strong);
}

.login-card .logo-mark {
  width: 64px;
  height: 64px;
  border-radius: 4px;
  object-fit: cover;
  margin-bottom: 16px;
  display: block;
  box-shadow: var(--glow);
}

.login-card .mark {
  width: 10px; height: 10px; background: var(--accent); display: inline-block; margin-bottom: 14px; border-radius: 1px;
}

.login-card p {
  color: var(--text-dim);
  font-size: 14px;
  margin: 8px 0 24px 0;
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 8px;
  background: var(--border);
}
