:root {
  --orange: #ff5722;
  --orange-dark: #e64a19;
  --bg: #eef1f7;
  --card: #ffffff;
  --text: #1b1f27;
  --muted: #7a828c;
  --border: #e8ebf0;
  --green: #1f9d57;
  --red: #e23744;
  --blue: #2563eb;
  --purple: #7b1fa2;
  --amber: #f57c00;
  --teal: #00897b;
  --radius: 14px;
  --grad-primary: linear-gradient(135deg, #ff7a18 0%, #ff5722 100%);
  --grad-warm: linear-gradient(135deg, #ff6a33 0%, #ffb020 100%);
  --shadow-sm: 0 1px 2px rgba(20,23,28,.05), 0 2px 6px rgba(20,23,28,.05);
  --shadow-md: 0 8px 24px rgba(20,23,28,.10);
  --shadow-glow: 0 14px 34px rgba(255,87,34,.20);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', Roboto, Arial, sans-serif;
  background:
    radial-gradient(900px 500px at 100% -5%, rgba(255,122,24,.10), transparent 60%),
    radial-gradient(700px 500px at -5% 110%, rgba(37,99,235,.08), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }

/* Lively entrance for content blocks */
@keyframes popIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Login (dark, redesigned) ---------- */
.login-wrap {
  min-height: 100vh;
  background-color: #0d0d0f;
}
/* Full-screen split: left branding, right form */
.login-card {
  display: flex;
  width: 100%;
  min-height: 100vh;
  /* One continuous gradient across the whole screen (no black seam). */
  background: linear-gradient(125deg, #3a1d0c 0%, #1c1510 50%, #0c0a08 100%);
  color: #f3f3f3;
}
/* Left branding / thumbnail panel (warm glow over the shared gradient) */
.login-left {
  width: 50%;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  position: relative;
  background: radial-gradient(700px 420px at 20% 0%, rgba(255,122,24,.30), transparent 62%);
  /* To use a real photo: set background to url('login-bg.jpg') + background-size:cover. */
}
.login-left .brand { text-align: left; }
.login-left .brand svg { height: 48px; }
.login-left .brand .brand-name { font-size: 42px; }
.login-left .left-tag { color: #e6d7cd; font-size: 16px; line-height: 1.55; margin-top: 18px; max-width: 300px; }
.login-left .skyline { margin-top: auto; }
.login-left .skyline svg { width: 100%; display: block; opacity: .9; }
/* Right form panel (full height, form vertically centered, compact width) */
.login-right {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px;
  overflow-y: auto;
}
.login-form { width: 100%; max-width: 310px; }
.login-right .login-form .welcome { font-size: 22px; margin-top: 8px; }
.login-right .login-form .welcome-sub { font-size: 13px; margin-bottom: 4px; }
.login-right .login-form label { font-size: 13px; margin: 10px 0 5px; }
.login-right .login-form input { padding: 10px 12px; font-size: 14px; }
.login-right .login-form .input-wrap input { padding-left: 38px; }
.login-right .login-form .grad-btn { padding: 12px; font-size: 15px; margin-top: 14px; }
.login-right .login-form .btn { padding: 9px 12px; font-size: 13px; }
.login-right .login-form .social-btn { height: 44px; }
@media (max-width: 820px) {
  .login-card { flex-direction: column; min-height: 100vh; }
  .login-left { width: 100%; padding: 28px 28px 12px; }
  .login-left .brand .brand-name { font-size: 38px; }
  .login-left .left-tag { display: none; }
  .login-left .skyline { display: none; }
  .login-right { width: 100%; padding: 24px; justify-content: flex-start; }
}

.login-card .brand { text-align: center; }
.login-card .brand svg { height: 44px; }
.login-card .brand-logo { height: 66px; width: 66px; border-radius: 16px; object-fit: cover; display: inline-block; }
.login-card .brand-name {
  color: var(--orange); font-size: 40px; font-weight: 800;
  line-height: 1; margin-top: 6px; font-family: Georgia, 'Segoe UI', serif;
}
.login-card .brand-sub { color: #f3f3f3; font-size: 12px; letter-spacing: 5px; font-weight: 600; margin-top: 4px; }
.login-card .welcome { text-align: center; font-size: 26px; font-weight: 800; margin-top: 20px; color: #fff; }
.login-card .welcome-sub { text-align: center; color: #a8a8a8; font-size: 14px; margin-bottom: 6px; }
.login-card .sub { color: #a8a8a8; font-size: 13px; }

/* Dark inputs/labels — scoped to the card so modals/app stay light */
.login-card label { color: #f3f3f3; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.login-card input {
  background: #2a2a2d; border: 1px solid #3a3a3d; color: #f3f3f3;
  padding: 12px; border-radius: 12px;
}
.login-card input::placeholder { color: #8a8a8a; }
.login-card input:focus { outline: none; border-color: var(--orange); }
.login-card .input-wrap { position: relative; }
.login-card .input-wrap input { padding-left: 40px; }
.login-card .input-wrap .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #9a9a9a; font-size: 15px; }
.login-card .input-wrap .ic-eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #9a9a9a; cursor: pointer; font-size: 15px; }

/* Role chooser: app.js toggles .btn / .btn-ghost, so just dark-skin the ghost */
.login-card .btn-ghost { background: #2a2a2d; color: #ddd; border: 1px solid #3a3a3d; }
.login-card .btn-ghost:hover { background: #34343a; }

.login-card .forgot { text-align: right; margin-top: 8px; }
.login-card .forgot a { color: var(--orange); font-size: 13px; font-weight: 600; text-decoration: none; }

/* Gradient login / register button */
.login-card .grad-btn {
  width: 100%; margin-top: 18px; border: none; cursor: pointer;
  padding: 14px; border-radius: 12px; font-size: 16px; font-weight: 700; color: #fff;
  background: linear-gradient(90deg, #ff7a18, #ffb020);
}
.login-card .grad-btn:hover { filter: brightness(1.05); }
.login-card .grad-btn:disabled { opacity: .6; cursor: not-allowed; }

.login-card .error { color: #ff7a7a; text-align: center; }
.login-card .hint { color: #a8a8a8; }
.login-card .hint a { color: var(--orange); font-weight: 700; text-decoration: none; }

.login-card .or-row { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: #8a8a8a; font-size: 13px; font-weight: 600; }
.login-card .or-row::before, .login-card .or-row::after { content: ""; flex: 1; height: 1px; background: #3a3a3d; }
.login-card .continue { text-align: center; color: #a8a8a8; font-size: 13px; }
.login-card .social-row { display: flex; gap: 12px; margin-top: 12px; }
.login-card .social-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; height: 50px;
  background: #2a2a2d; border: 1px solid #3a3a3d; border-radius: 12px; cursor: pointer;
}
.login-card .social-btn:hover { background: #34343a; }
.login-card .social-btn svg { width: 22px; height: 22px; }

.login-card .skyline { margin-top: 14px; }
.login-card .skyline svg { width: 100%; display: block; }

label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange); border-color: transparent; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(180deg, #ff6a33, var(--orange));
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s ease, transform .05s ease, box-shadow .15s ease;
  box-shadow: 0 2px 6px rgba(230,74,25,.26);
}
.btn:hover { filter: brightness(1.05); box-shadow: 0 4px 12px rgba(230,74,25,.32); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(230,74,25,.3); }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: none; box-shadow: none; }
.btn-block { width: 100%; margin-top: 18px; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 9px; }
.btn-green { background: linear-gradient(180deg, #43a047, var(--green)); box-shadow: 0 2px 6px rgba(46,125,50,.26); }
.btn-green:hover { filter: brightness(1.05); box-shadow: 0 4px 12px rgba(46,125,50,.3); }
.btn-red { background: linear-gradient(180deg, #e53935, var(--red)); box-shadow: 0 2px 6px rgba(198,40,40,.26); }
.btn-red:hover { filter: brightness(1.05); box-shadow: 0 4px 12px rgba(198,40,40,.3); }
.btn-ghost { background: #eef1f4; color: #3a4047; border: 1px solid var(--border); box-shadow: none; }
.btn-ghost:hover { background: #e3e7ec; box-shadow: none; filter: none; }
/* Keyboard-accessible focus rings (professional + a11y) */
.btn:focus-visible, .side-link:focus-visible, .tab:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--orange); outline-offset: 2px;
}
/* Standalone form controls (settings / payouts / settlements) */
.input {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,87,34,.14); }

.error { color: var(--red); font-size: 13px; margin-top: 10px; min-height: 18px; }
.hint { text-align: center; color: var(--muted); font-size: 12px; margin-top: 14px; }

/* ---------- App shell: left sidebar + main ---------- */
.layout { display: flex; min-height: 100vh; }

/* Sidebar uses the same warm login gradient */
.sidebar {
  width: 252px;
  flex-shrink: 0;
  background: linear-gradient(165deg, #3a1d0c 0%, #1c1510 52%, #0c0a08 100%);
  color: #f3f3f3;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 2px 0 18px rgba(0,0,0,.18);
  z-index: 20;
}
.side-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.side-logo { font-size: 26px; }
.side-logo-img { height: 34px; width: 34px; border-radius: 9px; object-fit: cover; }
.side-brandtext {
  display: flex; flex-direction: column; line-height: 1.1;
  font-family: Georgia, 'Segoe UI', serif; font-weight: 800;
  font-size: 23px; color: var(--orange);
}
.side-brandtext small {
  font-style: normal; font-weight: 600; font-size: 9.5px; letter-spacing: 3px;
  color: #b8a99e; margin-top: 3px;
}

/* Vertical nav */
.tabs {
  display: flex; flex-direction: column; gap: 3px;
  padding: 16px 12px; overflow-y: auto; flex: 1;
}
.tab {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 11px;
  background: transparent; border: none; cursor: pointer;
  font-size: 14.5px; font-weight: 600; color: #cdbfb5; text-align: left;
  transition: background .15s ease, color .15s ease, transform .05s ease;
}
.tab .tab-ic { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.tab .tab-lb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab:hover { background: rgba(255,255,255,.06); color: #fff; }
.tab.active {
  color: #fff;
  background: linear-gradient(90deg, #ff7a18, #ffb020);
  box-shadow: 0 6px 16px rgba(255,122,24,.32);
}

/* Sidebar footer (status + user + actions) */
.side-foot { padding: 14px 16px 18px; border-top: 1px solid rgba(255,255,255,.07); }
.side-live { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #b8a99e; margin-bottom: 12px; }
.side-user { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.side-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: #fff; text-transform: uppercase;
  background: linear-gradient(135deg, #ff7a18, #ffb020);
}
.side-name { font-size: 13px; font-weight: 600; color: #f3f3f3; line-height: 1.25; }
.side-link {
  display: block; width: 100%; text-align: left;
  background: rgba(255,255,255,.05); color: #ddd; border: 1px solid rgba(255,255,255,.08);
  padding: 9px 12px; border-radius: 9px; font-size: 13px; font-weight: 600;
  cursor: pointer; margin-top: 7px; transition: background .15s ease;
}
.side-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.side-link.danger:hover { background: rgba(198,40,40,.85); border-color: transparent; }

.live-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.live-dot.on { background: #5cd66e; box-shadow: 0 0 0 3px rgba(92,214,110,.22); }
.live-dot.off { background: #e57373; }
.flash { animation: flash 1s ease; }
@keyframes flash { from { background: #fff7e6; } to { background: var(--card); } }

/* Main column */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }

/* Faint brand watermark behind every screen */
.main::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: .03;
  background-repeat: repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='250'%3E%3Cg transform='rotate(-26 180 125)' fill='%23ff5722'%3E%3Ctext x='180' y='118' text-anchor='middle' font-family='sans-serif' font-size='40' font-weight='800'%3EEatlian%3C/text%3E%3Ctext x='180' y='160' text-anchor='middle' font-size='34'%3E%F0%9F%8D%94%3C/text%3E%3C/g%3E%3C/svg%3E");
}
.main > .mainbar, .main > .content-wrap { position: relative; z-index: 1; }
.mainbar {
  background: rgba(255,255,255,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 16px 28px; display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 10; box-shadow: var(--shadow-sm);
}
.mainbar .spacer { flex: 1; }
.page-title {
  font-size: 22px; font-weight: 800; letter-spacing: -.3px;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--orange);
}
.hamburger { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text); }
.content-wrap { padding: 26px 28px; max-width: 1200px; width: 100%; margin: 0 auto; }

.side-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 15;
}

.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.toolbar:empty { display: none; }   /* no blank panel on tabs without controls */
.toolbar .spacer { flex: 1; }
.toolbar label {
  margin: 0; font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.toolbar select, .toolbar input {
  width: auto; height: 38px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
  font-size: 14px; color: var(--text); transition: border-color .15s ease, box-shadow .15s ease;
}
.toolbar select { min-width: 200px; cursor: pointer; padding-right: 30px;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%237a828c' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.toolbar input[type="date"] { min-width: 150px; }
.toolbar select:hover, .toolbar input:hover { border-color: #cfd5db; }
.toolbar select:focus, .toolbar input:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,87,34,.16);
}

/* Responsive: collapse sidebar into a slide-over on small screens */
@media (max-width: 860px) {
  .sidebar {
    position: fixed; left: 0; top: 0; height: 100vh;
    transform: translateX(-100%); transition: transform .22s ease;
  }
  .layout.side-open .sidebar { transform: translateX(0); }
  .layout.side-open .side-backdrop { display: block; }
  .hamburger { display: inline-block; }
  .content-wrap { padding: 18px; }
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px 18px 22px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  animation: popIn .4s ease both;
  transition: box-shadow .2s ease, transform .2s ease;
}
/* gradient accent bar on the left, rotated by position */
.stat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: var(--grad-primary);
}
/* soft colour glow blooming from the corner */
.stat-card::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px;
  border-radius: 50%; background: rgba(255,87,34,.10); pointer-events: none;
}
.stat-card:nth-child(5n+2)::before { background: linear-gradient(135deg,#3b82f6,#2563eb); }
.stat-card:nth-child(5n+2)::after { background: rgba(37,99,235,.10); }
.stat-card:nth-child(5n+3)::before { background: linear-gradient(135deg,#34d399,#1f9d57); }
.stat-card:nth-child(5n+3)::after { background: rgba(31,157,87,.10); }
.stat-card:nth-child(5n+4)::before { background: linear-gradient(135deg,#a855f7,#7b1fa2); }
.stat-card:nth-child(5n+4)::after { background: rgba(123,31,162,.10); }
.stat-card:nth-child(5n+5)::before { background: linear-gradient(135deg,#2dd4bf,#00897b); }
.stat-card:nth-child(5n+5)::after { background: rgba(0,137,123,.10); }
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .num { position: relative; font-size: 32px; font-weight: 800; color: var(--text); letter-spacing: -.6px; }
.stat-card:nth-child(5n+1) .num { color: var(--orange); }
.stat-card:nth-child(5n+2) .num { color: var(--blue); }
.stat-card:nth-child(5n+3) .num { color: var(--green); }
.stat-card:nth-child(5n+4) .num { color: var(--purple); }
.stat-card:nth-child(5n+5) .num { color: var(--teal); }
.stat-card .lbl { position: relative; font-size: 12px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }

/* ---------- Cards / tables ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  animation: popIn .4s ease both;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: var(--shadow-md); }

/* Report / analytics chart cards */
.chart-card { padding: 18px; margin-bottom: 16px; }
.chart-card:hover { transform: none; }   /* big charts shouldn't bob on hover */
.chart-card h3 {
  display: flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 700; color: var(--text);
  margin: 0 0 14px; padding-bottom: 11px; border-bottom: 1px solid var(--border);
}
.chart-card .chart-sub {
  margin-left: auto; font-weight: 600; font-size: 11.5px; color: var(--muted);
  background: #f4f6f8; border: 1px solid var(--border); padding: 3px 10px; border-radius: 999px;
}
.chart-card svg { display: block; }

/* ---------- Settings ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.settings-card h3 {
  font-size: 15px; font-weight: 700; color: var(--text);
  margin: 0 0 14px; padding-bottom: 11px; border-bottom: 1px solid var(--border);
}
.settings-card:hover { transform: none; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.set-row:last-of-type { border-bottom: none; }
.set-k { color: var(--muted); min-width: 88px; font-size: 13px; }
.set-v { color: var(--text); font-weight: 600; }
.set-about { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin-bottom: 12px; }
.set-sub { margin: 18px 0 10px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.changelog { list-style: none; padding: 0; margin: 0; }
.changelog > li { padding: 10px 0; border-top: 1px solid var(--border); }
.changelog > li:first-child { border-top: none; }
.cl-ver { font-weight: 700; color: var(--orange); font-size: 13.5px; margin-bottom: 4px; }
.cl-date { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 6px; }
.changelog ul { margin: 0; padding-left: 18px; }
.changelog ul li { font-size: 13px; color: #475059; margin: 3px 0; }

/* List header row with a title + right-aligned action (e.g. Export CSV) */
.list-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.list-head .list-title { font-size: 15px; font-weight: 700; color: var(--text); }
.list-head .spacer { flex: 1; }

/* Delivery-partner leaderboard podium */
.leaderboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; align-items: stretch; }
.lead-card {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 18px; text-align: center; box-shadow: var(--shadow-sm); border-top: 4px solid var(--border);
  animation: popIn .45s ease both; transition: transform .2s ease, box-shadow .2s ease;
}
.lead-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.lead-card.lead-1 { border-top-color: #f5b301; background: linear-gradient(180deg, #fff7e0, #fff); box-shadow: 0 14px 34px rgba(245,179,1,.22); }
.lead-card.lead-2 { border-top-color: #9aa3ad; background: linear-gradient(180deg, #f4f6f9, #fff); }
.lead-card.lead-3 { border-top-color: #cd7f32; background: linear-gradient(180deg, #fbf1e7, #fff); }
.lead-card.lead-2 { animation-delay: .06s; }
.lead-card.lead-3 { animation-delay: .12s; }
.lead-medal { font-size: 34px; line-height: 1; }
.lead-name { font-size: 16px; font-weight: 800; color: var(--text); margin-top: 6px; }
.lead-stat { font-size: 13px; color: var(--muted); margin-top: 4px; }
.lead-stat strong { color: var(--orange); }

/* Delivery-partner online/offline chips */
.dp-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.dp-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border);
}
.dp-chip.on { background: #e9f9ef; color: #15803d; border-color: #c4ecd2; }
.dp-chip.off { background: #f3f4f6; color: #8a939d; }
.dp-chip .dp-dot { width: 9px; height: 9px; border-radius: 50%; background: #9aa3ad; }
.dp-chip.on .dp-dot { background: #1f9d57; box-shadow: 0 0 0 3px rgba(31,157,87,.18); }
.dp-chip .dp-meta { font-weight: 500; opacity: .8; }

/* Pickup-time chips (Delivery Staff table) */
.time-chip {
  display: inline-block; margin: 2px 3px 2px 0; padding: 2px 8px;
  background: #fff3e0; color: var(--amber); border: 1px solid #ffe6c2;
  border-radius: 999px; font-size: 11.5px; font-weight: 600;
}
.order-head { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); margin-bottom: 10px; }
.order-head h3 { font-size: 16px; font-weight: 700; }
.order-head .spacer { flex: 1; }
.order-items { margin: 8px 0; color: #444; font-size: 14px; }
.order-meta { font-size: 13px; color: var(--muted); }
.actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  text-transform: capitalize;
  border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.PLACED { background: #e3f0fc; color: var(--blue); border-color: #c9e0fa; }
.badge.CONFIRMED { background: #f3e5f5; color: var(--purple); border-color: #ebd3ef; }
.badge.PREPARING { background: #fff3e0; color: var(--amber); border-color: #ffe6c2; }
.badge.READY_FOR_PICKUP { background: #fff8e1; color: #b58100; border-color: #ffeeb0; }
.badge.OUT_FOR_DELIVERY { background: #e0f2f1; color: var(--teal); border-color: #c4e9e6; }
.badge.DELIVERED { background: #e8f5e9; color: var(--green); border-color: #cfead1; }
.badge.CANCELLED { background: #ffebee; color: var(--red); border-color: #f9d4d7; }

/* ---------- Order card (Orders / Available / My Deliveries) ---------- */
.ocard {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px 16px 22px; margin-bottom: 14px;
  box-shadow: var(--shadow-sm); animation: popIn .4s ease both;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.ocard:hover { box-shadow: var(--shadow-glow); transform: translateY(-3px); border-color: #ffd9c2; }
/* status accent stripe down the left edge */
.ocard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--muted); }
.ocard-PLACED::before { background: linear-gradient(180deg,#3b82f6,#2563eb); }
.ocard-CONFIRMED::before { background: linear-gradient(180deg,#a855f7,#7b1fa2); }
.ocard-PREPARING::before { background: linear-gradient(180deg,#ffb020,#f57c00); }
.ocard-READY_FOR_PICKUP::before { background: linear-gradient(180deg,#ffcf33,#f5b301); }
.ocard-OUT_FOR_DELIVERY::before { background: linear-gradient(180deg,#2dd4bf,#00897b); }
.ocard-DELIVERED::before { background: linear-gradient(180deg,#34d399,#1f9d57); }
.ocard-CANCELLED::before { background: linear-gradient(180deg,#f87171,#e23744); }

.oc-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.oc-id { font-weight: 800; font-size: 15px; color: var(--text); }
.oc-rest { font-weight: 600; font-size: 12px; color: #b04a1e; background: #fff1e8; border: 1px solid #ffe0cc; padding: 2px 9px; border-radius: 999px; }
.oc-time { font-weight: 500; font-size: 12px; color: var(--muted); }
.oc-total { margin-left: auto; font-weight: 800; font-size: 19px; color: var(--orange); letter-spacing: -.3px; }

.oc-items { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.oc-item { background: #fff4ec; border: 1px solid #ffe0cc; color: #5f4030; border-radius: 8px; padding: 4px 10px; font-size: 13px; }
.oc-item b { color: var(--orange); margin-right: 2px; }

.oc-bill { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 12px; font-size: 13px; color: var(--muted);
  background: #fafbfc; border: 1px dashed var(--border); border-radius: 10px; padding: 9px 12px; }
.oc-bill b { color: var(--text); font-weight: 700; }

.oc-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: #475059; margin-bottom: 12px; }
.oc-meta span { display: inline-flex; align-items: center; gap: 5px; }
.oc-cancel { font-size: 13px; color: var(--red); font-weight: 600; margin-bottom: 12px; }
.ocard .actions { margin-top: 0; }

/* Live Board: order cards in a responsive grid */
.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.order-grid .ocard { margin-bottom: 0; }

table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 16px; animation: popIn .4s ease both; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
th {
  background: #f7f8fa;
  color: var(--muted); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
}
tbody tr { transition: background .12s ease; }
tbody tr:nth-child(even) td { background: #fafbfc; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f5f7fb; box-shadow: inset 3px 0 0 var(--orange); }
td strong { font-weight: 700; }

.empty {
  text-align: center; color: var(--muted); padding: 48px 24px;
  background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius);
}
.veg-dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }

/* ---------- Modal ---------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(15,18,22,.45);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal {
  background: #fff; border-radius: 16px; padding: 24px; width: 420px; max-width: 92vw;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(15,18,22,.3);
}
.modal h3 { margin-bottom: 12px; }
.modal .row { display: flex; gap: 12px; }
.modal .row > div { flex: 1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* Small status pills (promotions table) */
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .3px; }
.pill-blue { background: #e6eefc; color: #2952cc; }
.pill-green { background: #e3f6ea; color: #15803d; }
.pill-red { background: #fdecee; color: #c0303c; }

/* ---------- Menu table (consistent columns, wrapping names) ---------- */
.menu-table { table-layout: fixed; }
.menu-table col.c-img { width: 60px; }
.menu-table col.c-veg { width: 30px; }
.menu-table col.c-price { width: 90px; }
.menu-table col.c-avail { width: 130px; }
.menu-table col.c-act { width: 160px; }
.menu-table td { vertical-align: middle; }
.menu-table .m-img { padding-right: 4px; }
.m-thumb { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; }
.m-thumb-empty { background: #f4f6f8; border: 1px solid var(--border); font-size: 18px; }
.menu-table .m-name { white-space: normal; word-break: break-word; }
.menu-table .m-title { font-weight: 600; }
.menu-table .m-price { font-weight: 700; color: var(--orange); }
.menu-table .m-act { white-space: nowrap; text-align: right; }
.menu-table .m-act .btn { margin-left: 6px; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #333; color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 14px; z-index: 100; opacity: 0; transition: opacity .2s;
}
.toast.show { opacity: 1; }

/* ---- Home banners (support) ---- */
.banner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.banner-card { border: 1px solid var(--line, #e6e6e6); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.banner-card img { width: 100%; height: 130px; object-fit: cover; display: block; }
.banner-card .banner-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; font-size: 13px; font-weight: 600; }

/* ---- Unread chat indicators ---- */
.chat-bell { position: relative; background: transparent; border: none; cursor: pointer; font-size: 20px; line-height: 1; padding: 6px; border-radius: 10px; }
.chat-bell:hover { background: rgba(0,0,0,.06); }
.chat-bell-badge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e53935; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; }
/* per-conversation button badge */
.chat-btn { position: relative; }
.chat-btn.has-unread { border-color: #e53935; }
.chat-badge { display: inline-block; min-width: 16px; height: 16px; margin-left: 5px; padding: 0 4px; border-radius: 8px; background: #e53935; color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; vertical-align: middle; }
/* inbox rows */
.inbox-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line, #e6e6e6); border-radius: 10px; background: #fff; cursor: pointer; margin-bottom: 8px; }
.inbox-row:hover { background: #f7f7f8; }
.inbox-row .ir-count { min-width: 22px; height: 22px; border-radius: 11px; background: #e53935; color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; flex: 0 0 auto; }
.inbox-row .ir-main { flex: 1; min-width: 0; }
.inbox-row .ir-title { font-weight: 700; font-size: 13px; }
.inbox-row .ir-sub { font-size: 12px; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-row .ir-time { font-size: 11px; color: #999; flex: 0 0 auto; }
