/* ====================================================================
   Pinaka Fleet Ops — shared styles. Matches the Collection Command
   Center design language (dark navy sidebar/login, light main area,
   gradient stat cards, green accent).
   ==================================================================== */
:root {
  --sidebar-bg:      #0B1622;
  --sidebar-active:  #12262E;
  --sidebar-text:    #FFFFFF;
  --sidebar-muted:   #8A98A8;

  --main-bg:         #F1F3F6;
  --card-bg:         #FFFFFF;
  --text-primary:    #0F1B2D;
  --text-muted:      #6B7A8C;
  --border:          #E3E8EF;

  --accent-green:    #4CB57F;
  --accent-green-d:  #3EA06E;

  --stat-blue:    linear-gradient(135deg, #3B82F6, #2563EB);
  --stat-green:   linear-gradient(135deg, #10B981, #059669);
  --stat-orange:  linear-gradient(135deg, #F97316, #EA580C);
  --stat-purple:  linear-gradient(135deg, #8B5CF6, #7C3AED);

  --radius-card:  24px;
  --radius-pill:  16px;
  --radius-btn:   12px;

  --ok:    #10B981;
  --warn:  #F97316;
  --danger:#EF4444;
  --shadow: 0 6px 24px rgba(15, 27, 45, 0.08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--main-bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font-family: inherit; font-size: 16px; }
a { color: inherit; text-decoration: none; }

/* -------- Login (shared) -------- */
.login-wrap {
  min-height: 100vh;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #0B1622 0%, #10323A 100%);
  padding: 24px;
}
.login-card {
  background: var(--card-bg);
  width: 100%; max-width: 380px;
  border-radius: var(--radius-card);
  padding: 36px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  text-align: center;
}
.logo-tile {
  width: 64px; height: 64px; border-radius: 18px;
  background: var(--accent-green);
  color: #06331f; font-weight: 800; font-size: 34px;
  display: grid; place-items: center; margin: 0 auto 18px;
}
.login-card h1 { margin: 0 0 4px; font-size: 24px; font-weight: 800; }
.login-card .subtitle { color: var(--text-muted); margin: 0 0 26px; font-size: 14px; }
.pin-input {
  width: 100%; padding: 16px; text-align: center;
  border: 1.5px solid var(--border); border-radius: var(--radius-btn);
  letter-spacing: 8px; font-size: 22px; font-weight: 700;
  margin-bottom: 16px; outline: none;
}
.pin-input:focus { border-color: var(--accent-green); }
.btn {
  width: 100%; padding: 15px; border: none; cursor: pointer;
  background: var(--accent-green); color: #fff; font-weight: 700; font-size: 16px;
  border-radius: var(--radius-btn); transition: background .15s;
}
.btn:hover { background: var(--accent-green-d); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-outline { background: #fff; color: var(--text-primary); border: 1.5px solid var(--border); }
.btn-danger { background: var(--danger); }
.err-msg { color: var(--danger); font-size: 14px; min-height: 20px; margin-top: 4px; }

/* -------- Stat cards -------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.stat-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius-card); padding: 22px 24px; color: #fff;
  box-shadow: var(--shadow); min-height: 128px;
}
.stat-card .label { text-transform: uppercase; font-size: 12px; letter-spacing: .06em; opacity: .9; font-weight: 600; }
.stat-card .value { font-size: 40px; font-weight: 800; margin-top: 8px; line-height: 1; }
.stat-card .sub { font-size: 13px; opacity: .85; margin-top: 6px; }
.stat-card::after {
  content: ""; position: absolute; right: -30px; bottom: -30px;
  width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
}
.stat-blue { background: var(--stat-blue); }
.stat-green { background: var(--stat-green); }
.stat-orange { background: var(--stat-orange); }
.stat-purple { background: var(--stat-purple); }

/* -------- Cards / tables -------- */
.card { background: var(--card-bg); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 20px; }
.section-title { font-weight: 800; font-size: 18px; margin: 0 0 14px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; color: var(--text-muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
table.data td { padding: 12px; border-bottom: 1px solid var(--border); }
table.data tr:last-child td { border-bottom: none; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.chip.ok { background: #E7F7EF; color: #067a48; }
.chip.warn { background: #FEEFE1; color: #b4531a; }
.chip.danger { background: #FDE7E7; color: #b11c1c; }
.chip.muted { background: #EEF1F5; color: var(--text-muted); }
.chip.info { background: #E7EEFE; color: #1d4ed8; }

/* month selector */
.month-select {
  padding: 10px 14px; border: 1.5px solid var(--border); background: #fff;
  border-radius: var(--radius-btn); font-weight: 600; color: var(--text-primary);
}
.tabs { display: inline-flex; background: #E7EBF1; border-radius: var(--radius-pill); padding: 4px; gap: 4px; }
.tabs button { border: none; background: transparent; padding: 8px 16px; border-radius: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.tabs button.active { background: #fff; color: var(--text-primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

.spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 26px; }
.spark span { width: 4px; background: var(--accent-green); border-radius: 2px; display: inline-block; }
.hidden { display: none !important; }
.muted { color: var(--text-muted); }

/* Inline SVG line-icons: align + inherit colour from text. */
.field-nav .ic, .nav-item .ic { display: inline-flex; align-items: center; justify-content: center; }
.field-header .back { display: inline-flex; align-items: center; justify-content: center; }
.veh-card .icon svg, .field-nav .ic svg, .nav-item .ic svg, .back svg { display: block; }
.veh-card .icon { color: var(--text-primary); }
