/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  line-height: 1;
}
ol,
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* color class names will move to different folder later */
:root {
  --white-1: #fafaf7;
}
.bg-main {
  background-color: var(--white-1);
}

/* geist-cyrillic-300-normal */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-display: swap;
  font-weight: 300;
  src: url(/9eb0f5bf3d79bbf4d8ff.woff2) format('woff2'), url(/91084b0433301f388029.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* geist-latin-ext-300-normal */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-display: swap;
  font-weight: 300;
  src: url(/31f6e4cf768c97c02c58.woff2) format('woff2'), url(/fd7fb6da329709f9ce06.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* geist-latin-300-normal */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-display: swap;
  font-weight: 300;
  src: url(/56e82d6e063832224509.woff2) format('woff2'), url(/91d1a7a214688c4fdca5.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* geist-cyrillic-400-normal */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/85041daa1acec19ac818.woff2) format('woff2'), url(/78f9ca7e0c91f29f345a.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* geist-latin-ext-400-normal */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/b5ab33a669dc9400460b.woff2) format('woff2'), url(/a9f7430485f5c5f7e668.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* geist-latin-400-normal */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/03df01fbdbdae86eb95a.woff2) format('woff2'), url(/650a5dceb7c8ca65e694.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* geist-cyrillic-500-normal */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/81116b3dc9dea9c79d7d.woff2) format('woff2'), url(/440a3d28a057c5afad69.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* geist-latin-ext-500-normal */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/23742e830a76aeb4eb63.woff2) format('woff2'), url(/63f19635ceb8a166fe43.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* geist-latin-500-normal */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/7aeee445ecc9fa8785b1.woff2) format('woff2'), url(/ed2ba2627925f8c5045c.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* geist-cyrillic-600-normal */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/a7224bc5318c39bf22f3.woff2) format('woff2'), url(/0ac6f88d5b155fda5511.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* geist-latin-ext-600-normal */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/0e9ce519254c45681a32.woff2) format('woff2'), url(/d3a98ed99f5906790cdc.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* geist-latin-600-normal */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/391a589544bd8ea61129.woff2) format('woff2'), url(/96101e40724d40f26655.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* geist-mono-cyrillic-400-normal */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/38f4f2e85959ca6269a6.woff2) format('woff2'), url(/f14508f30aea40c93cbd.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* geist-mono-latin-ext-400-normal */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/6c8fdd731b1bb16e8c3c.woff2) format('woff2'), url(/ffcaf1dd006cd87f61d5.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* geist-mono-latin-400-normal */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/dfa401cb933892d33f85.woff2) format('woff2'), url(/4c1a1d696150a7a7526f.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* geist-mono-cyrillic-500-normal */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/2616f2e49b8a9252b7d5.woff2) format('woff2'), url(/59ab6f114a320faa84c0.woff) format('woff');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* geist-mono-latin-ext-500-normal */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/a9a397a3fe98a31b9517.woff2) format('woff2'), url(/878df532fc2a81c15dae.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* geist-mono-latin-500-normal */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/99e36af234c5f2c6038a.woff2) format('woff2'), url(/3d624d8e1415f681345c.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* instrument-serif-latin-ext-400-italic */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(/7c98e8b989a7a8eb61a3.woff2) format('woff2'), url(/6e3efbaa575798dc9940.woff) format('woff');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* instrument-serif-latin-400-italic */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(/6804771de1c805a5bc75.woff2) format('woff2'), url(/b4518a2b5ea8dfe1a84b.woff) format('woff');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* =========================
   BASE INPUT
========================= */
.input {
  width: 100%;
  height: 3rem;
  padding: 0.75rem;

  font-size: 1rem;
  font-weight: bold;
  line-height: 1;

  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;

  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

/* Placeholder */
.input::placeholder {
  font-weight: normal;
  color: #9ca3af;
}

/* =========================
   STATES
========================= */

/* Focus */
.input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* Disabled */
.input:disabled {
  background: #f3f4f6;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Error */
.input-error {
  border-color: #ef4444;
}

.input-error:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

/* Success (optional) */
.input-success {
  border-color: #10b981;
}

/* =========================
   SIZES
========================= */
.input-sm {
  height: 32px;
  font-size: 13px;
  padding: 0 10px;
}

.input-lg {
  height: 48px;
  font-size: 16px;
  padding: 0 14px;
}

/* =========================
   MODIFIERS
========================= */

/* Centered text */
.input-center {
  text-align: center;
}

/* OTP style */
.input-otp {
  letter-spacing: 1rem;
  font-size: 1.5rem;
}

/* Full width (usually default, but explicit if needed) */
.input-block {
  width: 100%;
}

/* =========================
   INPUT GROUP
========================= */
.input-group {
  display: flex;
  align-items: center;

  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
}

/* Remove double borders */
.input-group .input {
  border: none;
  box-shadow: none;
}

/* Prefix / Suffix */
.input-prefix,
.input-suffix {
  padding: 0 12px;
  height: 40px;

  display: flex;
  align-items: center;

  background: #f3f4f6;
  color: #374151;
  font-size: 14px;

  white-space: nowrap;
}

.input-prefix {
  border-right: 1px solid #d1d5db;
}

.input-suffix {
  border-left: 1px solid #d1d5db;
}

/* =========================
   LABEL + HELP TEXT
========================= */
.label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #374151;
}

.input-help {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.input-error-text {
  margin-top: 4px;
  font-size: 12px;
  color: #ef4444;
}

.btn {
  display: inline-flex;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.btn-primary {
  text-align: center;
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.btn-ghost {
  border-color: transparent;
}

.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border-color: #f0c8c8;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-center {
  align-items: center;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.btn-sm {
  padding: 4px 9px;
  font-size: 12px;
}

.btn-lg {
  padding: 0.6rem;
}

button:disabled {
  opacity: 0.5;
}

.btn-loader {
  display: flex;
  justify-content: center;
  flex-direction: row;
  align-items: center;
  column-gap: 0.5rem;
}

.btn-img {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn-img:hover {
  background: var(--hover);
  color: var(--ink);
}
.btn-img svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  transition: transform 0.18s;
}

/* =========================
   TEXT COLORS
========================= */

.text-primary {
  color: var(--ink);
}
.text-success {
  color: #10b981;
}
.text-danger {
  color: #ef4444;
}
.text-warning {
  color: #f59e0b;
}

.text-muted {
  color: #6b7280;
}
.text-default {
  color: #111827;
}
.text-light {
  color: #9ca3af;
}
.text-white {
  color: #ffffff;
}

/* =========================
   FONT SIZES
========================= */

.text-xs {
  font-size: 0.75rem;
} /* 12px */
.text-sm {
  font-size: 0.8125rem;
} /* 13px */
.text-md {
  font-size: 0.875rem;
} /* 14px */
.text-lg {
  font-size: 1rem;
} /* 16px */
.text-xl {
  font-size: 1.125rem;
} /* 18px */
.text-2xl {
  font-size: 1.25rem;
} /* 20px */
.text-3xl {
  font-size: 1.5rem;
} /* 24px */

/* =========================
   FONT FAMILY
========================= */

.text-mono {
  font-family: var(--mono);
}

/* =========================
   FONT WEIGHT
========================= */

.fw-normal {
  font-weight: 400;
}
.fw-medium {
  font-weight: 500;
}
.fw-semibold {
  font-weight: 600;
}
.fw-bold {
  font-weight: 700;
}

/* =========================
   ALIGNMENT
========================= */

.text-left {
  text-align: left;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}

/* =========================
   TRANSFORM
========================= */

.text-uppercase {
  text-transform: uppercase;
}
.text-lowercase {
  text-transform: lowercase;
}
.text-capitalize {
  text-transform: capitalize;
}

/* =========================
   TRUNCATION
========================= */

.text-truncate {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Multi-line clamp */
.text-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================
   LINE HEIGHT
========================= */

.lh-tight {
  line-height: 1.2;
}
.lh-normal {
  line-height: 1.5;
}
.lh-relaxed {
  line-height: 1.7;
}

/* =========================
   SPECIAL
========================= */

/* Error text */
.text-error {
  color: #ef4444;
  font-size: 12px;
}

/* Helper text */
.text-helper {
  color: #6b7280;
  font-size: 12px;
}

/* Label */
.text-label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.flex-1 {
  display: flex;
  flex: 1;
}

.min-vh-100 {
  min-height: 100vh;
}

.min-vw-100 {
  min-width: 100vw;
}

.text-center {
  text-align: center;
}

.center {
  align-items: center;
  justify-content: center;
}

.mt-1 {
  margin-top: 1rem;
}

.mb-1 {
  margin-bottom: 1rem;
}

.w-25 {
  width: 25%;
}

.w-30 {
  width: 30%;
}

.w-50 {
  width: 50%;
}

/* ===== Loader Page ===== */

.loader-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

/* ===== Spinner ===== */

.spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--ink);
  border-right-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #e5e7eb;
  border-top-color: var(--ink);
  border-right-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.row {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.jcb {
  justify-content: space-between;
}

.cg-8 {
  column-gap: 0.5rem;
}

.absolute {
  position: absolute;
  inset: 0;
  background: #ffffffaa;
}

/* ================ LOGIN ================ */
.login-page {
  display: flex;
  min-height: 100vh;
  background: #fff;
  overflow: hidden;
}

/* Left brand panel */
.login-left {
  background: #1f8b3a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
  overflow: hidden;
}
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.login-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  gap: 2px;
}
.login-logo-kannada {
  font-size: 44px;
  font-weight: 700;
  color: #fff;
  font-family: sans-serif;
}
.login-logo-bar {
  width: 56px;
  height: 5px;
  background: #f5c300;
  border-radius: 2px;
  margin: 4px 0 6px;
}
.login-logo-word {
  font-size: 38px;
  font-weight: 700;
  color: #fff;
  font-family: var(--sans);
  letter-spacing: -0.03em;
}
.login-app-name {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}
.login-tagline {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

/* Right form panel */
.login-right {
  flex: 1;
  display: flex;
  padding: 48px;
  background: var(--bg);
  flex: 1;
  height: 100vh;
  overflow-y: auto;

  display: flex;
  align-items: center;

  padding: 32px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}
.login-heading {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.login-sub {
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 28px;
  line-height: 1.5;
}
.login-sub strong {
  color: var(--ink-2);
  font-weight: 600;
}

.login-field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.login-phone-row {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
  background: #fff;
  transition: border-color 0.15s;
}
.login-phone-row:focus-within {
  border-color: #1f8b3a;
  box-shadow: 0 0 0 3px rgba(31, 139, 58, 0.12);
}
.login-prefix {
  padding: 0 14px;
  background: var(--surface-2);
  border-right: 1.5px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  font-family: var(--mono);
}
.login-phone-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 13px 14px;
  font-size: 16px;
  font-family: var(--mono);
  color: var(--ink);
  background: transparent;
  letter-spacing: 0.04em;
  font-weight: bold;
}
.login-phone-input::placeholder {
  color: var(--ink-4);
  letter-spacing: 0;
  font-family: var(--sans);
}
.login-phone-input:disabled {
  opacity: 0.6;
}

.login-otp-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.otp-box {
  width: 64px;
  height: 64px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  font-size: 28px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--ink);
  text-align: center;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  caret-color: transparent;
}
.otp-box:focus {
  border-color: #1f8b3a;
  box-shadow: 0 0 0 3px rgba(31, 139, 58, 0.12);
}
.otp-box:disabled {
  opacity: 0.5;
}

.login-btn {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: #1f8b3a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 0.15s,
    opacity 0.15s;
  margin-bottom: 16px;
}
.login-btn:hover:not(:disabled) {
  background: #197532;
}
.login-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.login-btn-arrow {
  font-size: 16px;
}

.login-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

.login-resend {
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
}
.login-resend-btn {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: #1f8b3a;
  cursor: pointer;
  padding: 0;
}
.login-resend-btn:hover {
  text-decoration: underline;
}

.login-error {
  font-size: 13px;
  color: var(--danger);
  margin-bottom: 12px;
  padding: 8px 12px;
  background: var(--danger-50);
  border-radius: 6px;
}

.login-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
  padding: 0;
  margin-bottom: 24px;
}
.login-back:hover {
  color: var(--ink);
}
.login-back svg {
  width: 14px;
  height: 14px;
}

.store-card {
  width: 100%;
  max-width: 420px;
}

.store-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.store-item {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: space-between;

  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease;
}

.store-item:hover {
  border-color: var(--primary);
  background: var(--surface-hover);
  transform: translateY(-5px);
  background-color: var(--ink);
  color: var(--bg);
}

.store-item-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.store-item-name {
  font-size: 15px;
  font-weight: 600;
}

.store-item-id {
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--mono);
}

.store-item-arrow {
  width: 32px;
  height: 32px;
  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--surface-2);
  color: var(--ink-2);

  flex-shrink: 0;
}

.store-item-arrow svg {
  width: 16px;
  height: 16px;

  stroke: currentColor;
  stroke-width: 2;
  fill: none;

  stroke-linecap: round;
  stroke-linejoin: round;
}

.store-empty {
  margin-top: 24px;
  padding: 20px;

  border-radius: 16px;

  background: var(--surface-2);

  color: var(--ink-3);

  text-align: center;

  font-size: 14px;
}

/* ================ DESIGN TOKENS ================ */
:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-2: #fbfbf8;
  --ink: #0a0a08;
  --ink-2: #4a4a47;
  --ink-3: #8f8f8a;
  --ink-4: #c8c8c2;
  --line: #eaeae4;
  --line-strong: #d8d8d2;
  --hover: #f2f2ed;
  --accent: #0f6e56;
  --accent-50: #e8f4ee;
  --warn: #ba7517;
  --warn-50: #faeeda;
  --danger: #a32d2d;
  --danger-50: #fcebeb;
  --purple: #534ab7;
  --purple-50: #eeedfe;
  --blue: #185fa5;
  --blue-50: #e6f1fb;
  --pink-50: #fbeaf0;
  --pink: #993556;
  --sans: "Geist", -apple-system, system-ui, sans-serif;
  --serif: "Instrument Serif", serif;
  --mono: "Geist Mono", monospace;
}

/* ================ BASE ================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

html,
body,
#root {
  min-height: 100vh;
}

#root {
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button {
  cursor: pointer;
}

a {
  cursor: pointer;
  text-decoration: none;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(15, 110, 86, 0.4);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(15, 110, 86, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(15, 110, 86, 0);
  }
}

@keyframes pulse-ring {

  0%,
  100% {
    box-shadow:
      0 0 0 4px rgba(15, 110, 86, 0.2),
      0 4px 10px rgba(0, 0, 0, 0.2);
  }

  50% {
    box-shadow:
      0 0 0 8px rgba(15, 110, 86, 0.1),
      0 4px 10px rgba(0, 0, 0, 0.2);
  }
}

@keyframes sla-row-alert {
  0%,
  100% {
    background: var(--danger-50);
  }

  50% {
    background: #fff;
  }
}

/* ================ SIDEBAR ================ */
.sidebar {
  width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  transition: width 0.18s ease;
}

.sidebar.collapsed .logo-bn-bar,
.sidebar.collapsed .logo-bn-word,
.sidebar.collapsed .logo-bn-kannada {
  font-size: 14px;
}

.sidebar.collapsed {
  width: 56px;
}

.sidebar.collapsed .logo-row,
.sidebar.collapsed .logo-text,
.sidebar.collapsed .logo-text,
.sidebar.collapsed .store-picker-wrap,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .nav-item-label,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .user-meta,
.sidebar.collapsed .user-name {
  display: none;
}

.sidebar.collapsed .sidebar-header {
  padding: 14px 8px;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 10px 0;
  margin: 6px 0;
  min-height: 44px;
}

.sidebar.collapsed .nav-section {
  padding: 10px 6px 4px;
}

.sidebar.collapsed .sidebar-footer {
  padding: 14px 8px;
  justify-content: center;
}

.sidebar.collapsed .collapse-btn,
.sidebar.collapsed .btn-img {
  width: 100%;
}

.sidebar.collapsed .collapse-btn svg {
  transform: rotate(180deg);
}

.logo {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 6px;
  vertical-align: middle;
}

/* BazaarNow logo */
.logo-bn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  gap: 1px;
  overflow: hidden;
}

.logo-bn-kannada {
  font-size: 17px;
  font-weight: 700;
  color: #d52b1e;
  font-family: sans-serif;
  white-space: nowrap;
}

.logo-bn-bar {
  width: 28px;
  height: 3px;
  background: #f5c300;
  border-radius: 1px;
  margin: 1px 0 2px;
  flex-shrink: 0;
}

.logo-bn-word {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
}

.logo-bn-bazaar {
  font-size: 15px;
  font-weight: 700;
  color: #1f8b3a;
  font-family: var(--sans);
  letter-spacing: -0.02em;
}

.logo-bn-now {
  font-size: 15px;
  font-weight: 700;
  color: #1f8b3a;
  font-family: var(--sans);
  letter-spacing: -0.02em;
}

/* collapsed: hide bar + word, shrink kannada */
.sidebar.collapsed .logo-bn-bar {
  display: none;
}

.sidebar.collapsed .logo-bn-word {
  display: none;
}

.sidebar.collapsed .logo-bn-kannada {
  font-size: 16px;
}

.sidebar-header {
  padding: 14px 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.store-picker-wrap {
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.collapse-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  border-radius: 4px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.collapse-btn:hover {
  background: var(--hover);
  color: var(--ink);
}

.collapse-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  transition: transform 0.18s;
}

.logo {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 6px;
  vertical-align: middle;
}

.store-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-size: 12px;
  cursor: pointer;
  background: none;
  width: 100%;
  text-align: left;
}

.store-picker svg {
  width: 12px;
  height: 12px;
  stroke: var(--ink-3);
  fill: none;
  stroke-width: 1.8;
  margin-left: auto;
}

.store-picker .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 2px;
  box-shadow: 0 0 0 0 rgba(15, 110, 86, 0.4);
  animation: pulse 2s infinite;
}

.nav-section {
  padding: 14px 12px 6px;
}

.nav-section-label {
  font-size: 10px;
  color: var(--ink-3);
  padding: 0 8px 6px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 1px;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-item svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  flex-shrink: 0;
}

.nav-item:hover {
  background: var(--hover);
  color: var(--ink);
}

.nav-item.active {
  background: var(--ink);
  color: #fff;
  font-weight: 500;
}

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-family: var(--mono);
  font-weight: 500;
}

.nav-item.active .nav-badge {
  background: rgba(255, 255, 255, 0.2);
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--purple-50);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}

.user-meta {
  min-width: 0;
  flex: 1;
}

.user-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}

.user-role {
  font-size: 11px;
  color: var(--ink-3);
}

/* ================ TOPBAR ================ */
.topbar {
  height: 44px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: var(--surface);
  flex-shrink: 0;
}

.topbar-store-wrap {
  position: relative;
}

.topbar-store-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink);
}

.topbar-store-btn:hover {
  background: var(--hover);
}

.topbar-store-btn svg {
  flex-shrink: 0;
}

.topbar-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  min-width: 210px;
  z-index: 200;
  padding: 4px;
}

.topbar-dd-item {
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

.topbar-dd-item:hover {
  background: var(--hover);
}

.topbar-dd-item.sel {
  color: var(--accent);
  font-weight: 500;
}

.topbar-support-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.topbar-category-wrap {
  position: relative;
  margin-left: 8px;
}

.topbar-support-label + .topbar-category-wrap {
  margin-left: auto;
}

.topbar-category-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: none;
  cursor: pointer;
  color: var(--ink);
}

.topbar-category-btn:hover {
  background: var(--hover);
}

.topbar-category-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.topbar-category-dropdown {
  left: auto;
  right: 0;
  min-width: 180px;
}

.topbar-qr-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink);
  transition:
    background-color 0.12s,
    border-color 0.12s;
}

.topbar-qr-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.topbar-qr-btn:hover {
  background: var(--hover);
  border-color: var(--accent);
  color: var(--accent);
}

/* ================ MAIN ================ */
.main {
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.page {
  padding: 24px 28px;
}

.page-header {
  margin-bottom: 20px;
}

.crumbs {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.crumbs .sep {
  margin: 0 6px;
}

.crumbs a {
  color: var(--ink-3);
}

.crumbs a:hover {
  color: var(--ink-2);
}

.crumbs .current {
  color: var(--ink-2);
}

.title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

h1 {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.subtitle {
  color: var(--ink-3);
  margin-top: 6px;
  font-size: 13px;
  max-width: 600px;
}

/* Date range picker */
.date-range {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
}

.date-range button {
  background: transparent;
  border: none;
  padding: 5px 9px;
  font-size: 12px;
  color: var(--ink-2);
  border-radius: 4px;
}

.date-range button:hover {
  background: var(--hover);
}

.date-range button.active {
  background: var(--ink);
  color: #fff;
}

.date-range .divider {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 4px;
}

.date-picker-input {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  padding: 4px 8px;
  border: none;
  background: transparent;
  border-radius: 4px;
  min-width: 130px;
  text-align: center;
}

.date-picker-input:hover {
  background: var(--hover);
}

.date-picker-input:focus {
  outline: none;
  background: var(--hover);
}

.date-range-nav {
  background: transparent;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.date-range-nav:hover {
  background: var(--hover);
}

.date-range-nav svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

/* ================ AVAILABILITY BUTTON ================ */
.availability-btn {
  position: relative;
  flex-direction: row;
  display: flex;
  align-items: center;
  column-gap: 4px;
}

.avail-pill {
  background: var(--accent);
  align-items: center;
  color: #fff;
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 500;
  padding: 0 6px;
  border-radius: 10px;
  margin-left: 2px;
}

/* ================ STAGE STRIP ================ */
.stage-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}


.stage-label {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stage-label svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.stage-count {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  margin-top: 4px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stage-delay-count {
  color: var(--danger);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: solid;
  font-weight: 900;
}

.stage-count.danger {
  color: var(--danger);
}

.stage-flag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--danger);
  font-style: normal;
  font-weight: 500;
}

.stage-arrow {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-4);
  z-index: 1;
  pointer-events: none;
}

.stage-arrow svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.stage-card:last-child .stage-arrow {
  display: none;
}

/* ================ FILTER BAR ================ */
.filterbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.combo-bar {
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.tabs {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
}

.tabs button {
  background: transparent;
  border: none;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--ink-2);
  border-radius: 5px;
}

.tabs button.active {
  background: var(--ink);
  color: #fff;
}

.tabs button:hover:not(.active) {
  background: var(--hover);
}

.search {
  flex: 1;
  max-width: 320px;
  position: relative;
}

.search input {
  width: 100%;
  padding: 7px 10px 7px 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
}

.search input:focus {
  outline: none;
  border-color: var(--ink-3);
}

.search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  stroke: var(--ink-3);
  fill: none;
  stroke-width: 1.8;
  pointer-events: none;
}

.filterbar-right {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.filtered-banner {
  margin-bottom: 12px;
  padding: 8px 14px;
  background: var(--blue-50);
  border: 1px solid #b5d4f4;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--blue);
}

.filtered-banner strong {
  font-weight: 500;
}

.filtered-banner button {
  background: transparent;
  border: none;
  color: var(--blue);
  text-decoration: underline;
  font-size: 12px;
  margin-left: auto;
  cursor: pointer;
}

/* ================ SUMMARY CHIPS ================ */
.today-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px 6px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s;
}

.summary-chip:hover {
  background: var(--surface-2);
}

.summary-chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.summary-chip.danger {
  color: var(--danger);
}

.summary-chip.danger.active {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.summary-chip.warn {
  color: var(--warn);
}

.summary-chip.warn.active {
  background: var(--warn);
  color: #fff;
  border-color: var(--warn);
}

.summary-chip.warn .chip-count {
  color: var(--warn);
}

.summary-chip.warn.active .chip-count {
  color: #fff;
}

.chip-label {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 500;
}

.summary-chip.active .chip-label {
  color: rgba(255, 255, 255, 0.7);
}

.summary-chip.danger .chip-label {
  color: var(--danger);
  opacity: 0.8;
}

.summary-chip.danger.active .chip-label {
  color: rgba(255, 255, 255, 0.85);
}

.chip-count {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 14px;
}

.summary-chip.danger .chip-count {
  color: var(--danger);
}

.summary-chip.danger.active .chip-count {
  color: #fff;
}

/* ================ TABLE ================ */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

table.dt {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.dt.orders-table {
  min-width: 100%;
  width: max-content;
}

table.dt.orders-table th,
table.dt.orders-table td {
  white-space: nowrap;
}

.orders-refresh-inline {
  align-items: center;
  display: flex;
  gap: 8px;
}

.orders-refresh-inline span {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.orders-refresh-loader {
  height: 33px;
  width: 33px;
}

table.dt thead th {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.issue-stage-header {
  align-items: flex-start;
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.issue-stage-title-row {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  position: relative;
}

.issue-stage-menu-btn {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--ink-3);
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  height: 20px;
  justify-content: center;
  padding: 0 6px;
  width: 20px;
}

.issue-stage-menu-btn:hover {
  background: var(--hover);
  color: var(--ink);
}

.issue-stage-menu-btn span {
  background: currentColor;
  border-radius: 999px;
  height: 3px;
  width: 3px;
}

.issue-stage-menu {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  left: calc(100% + 4px);
  min-width: 180px;
  padding: 4px;
  position: absolute;
  top: 0;
  z-index: 20;
}

.issue-stage-menu button {
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--ink-2);
  font-size: 12px;
  padding: 8px 10px;
  text-align: left;
}

.issue-stage-menu button:hover,
.issue-stage-menu button.active {
  background: var(--hover);
  color: var(--ink);
}

.issue-stage-filter-pill {
  align-items: center;
  background: var(--hover);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  gap: 5px;
  line-height: 1;
  padding: 4px 7px;
  text-transform: none;
}

.issue-stage-filter-pill span {
  font-size: 12px;
  line-height: 1;
}

.delayed-filter-wrap {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  position: relative;
}

.delayed-filter-menu-btn {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  height: 34px;
  max-width: 230px;
  padding: 0 12px;
  position: relative;
  z-index: 1;
}

.delayed-filter-menu-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delayed-filter-menu-btn:hover {
  background: var(--hover);
  color: var(--ink);
}

.delayed-filter-menu-btn svg {
  fill: none;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2;
  width: 13px;
}

.delayed-filter-menu {
  left: calc(100% + 6px);
  top: 0;
}

.delayed-filter-pill {
  align-self: center;
}

table.dt tbody tr {
  border-bottom: 1px solid var(--line);
}

table.dt tbody tr:last-child {
  border-bottom: none;
}

table.dt tbody tr:hover {
  background: var(--surface-2);
}

table.dt td {
  padding: 10px 14px;
  vertical-align: middle;
}

table.dt tr.border-left {
  border-left: 3px solid transparent;
}

table.dt tr.row-flag-danger {
  background: var(--danger-50);
  border-left: 3px solid var(--danger);
}

table.dt tr.row-flag-danger:hover {
  background: #fae3e3;
}

table.dt tr.row-flag-warn {
  background: var(--warn-50);
  border-left: 3px solid var(--warn);
}

table.dt tr.row-flag-warn:hover {
  background: #f5e5c5;
}

table.dt tr.row-flag-verify {
  background: var(--warn-50);
  border-left-color: transparent;
}

table.dt tr.row-flag-verify:hover {
  background: #f5e5c5;
}

table.dt tr.row-sla-breach {
  animation: sla-row-alert 1s ease-in-out 5;
  background: var(--danger-50);
  border-left: 3px solid var(--danger);
}

table.dt tr.row-sla-breach-static {
  animation: none;
}

table.dt tr.row-sla-breach:hover {
  background: #fae3e3;
}

/* table.dt tr.row-flag-verify td:first-child {
  padding-left: 11px;
} */
table.dt tr.row-clickable {
  cursor: pointer;
}

/* Order ID */
.order-id {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}

.sla-alert-list {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
}

.sla-alert-pill {
  align-items: center;
  background: var(--danger-50);
  border: 1px solid #f1c6c6;
  border-radius: 999px;
  color: var(--danger);
  display: inline-flex;
  flex-wrap: wrap;
  font-size: 11px;
  font-weight: 700;
  gap: 5px;
  line-height: 1.2;
  padding: 4px 8px;
  width: fit-content;
}

.sla-alert-duration {
  color: var(--danger);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  opacity: 0.85;
}

/* Batch grouping */
.batch-row td:first-child {
  position: relative;
  padding-left: 14px;
}

.batch-row td:first-child::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--blue);
}

.batch-row.batch-start td:first-child::before {
  top: 50%;
}

.batch-row.batch-end td:first-child::before {
  bottom: 50%;
}

.batch-row.batch-single td:first-child::before {
  top: 12px;
  bottom: 12px;
  border-radius: 2px;
}

.batch-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--blue-50);
  color: var(--blue);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 500;
  margin-left: 6px;
}

.batch-tag svg {
  width: 9px;
  height: 9px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.batch-stop-num {
  font-size: 9px;
  color: var(--blue);
  opacity: 0.65;
  margin-left: 3px;
}

/* Stage pills */
.stage-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
}

.sp-received {
  background: #eef0ff;
  color: #4148c8;
}

.sp-staging {
  background: #fff3d6;
  color: #9a6000;
}

.sp-rider {
  background: var(--blue-50);
  color: var(--blue);
}

.sp-ready {
  background: var(--purple-50);
  color: var(--purple);
}

.sp-out {
  background: var(--warn-50);
  color: var(--warn);
}

.sp-delivered {
  background: var(--accent-50);
  color: var(--accent);
}

.sp-issue {
  background: var(--danger-50);
  color: var(--danger);
}

.sp-returning {
  background: var(--pink-50);
  color: var(--pink);
}

.sp-verify {
  background: var(--warn-50);
  color: var(--warn);
}

/* Status / cell styles */
.status-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-text {
  font-size: 12px;
}

.status-text.ok {
  color: var(--accent);
}

.status-text.risk {
  color: var(--warn);
}

.status-text.delayed {
  color: var(--danger);
}

.status-flag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--danger-50);
  color: var(--danger);
  font-family: var(--mono);
}

.status-flag.warn {
  background: var(--warn-50);
  color: var(--warn);
}

.pay-cell {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.pay-cod {
  color: var(--warn);
}

.pay-prepaid {
  color: var(--ink-2);
}

.time-cell {
  font-family: var(--mono);
  font-size: 12px;
}

.time-cell.delayed {
  color: var(--danger);
  font-weight: 500;
}

.bin-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 500;
}

.bin-r {
  background: var(--danger-50);
  color: var(--danger);
}

.bin-b {
  background: var(--blue-50);
  color: var(--blue);
}

.bin-ret {
  background: var(--pink-50);
  color: var(--pink);
}

.bin-empty {
  color: var(--ink-4);
}

.loc-cell {
  font-size: 12px;
}

.loc-near {
  color: var(--blue);
}

.loc-transit {
  color: var(--warn);
}

.loc-door {
  color: var(--accent);
}

/* Rider mini chip */
.rider-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rider-mini-av {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f0f0eb;
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ================ DRAWER ================ */
.drawer {
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  width: 520px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.25s ease-out;
  z-index: 90;
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.06);
}

.drawer-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.drawer-title {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
}

.drawer-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
}

.drawer-section {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-section:last-child {
  border-bottom: none;
}

.drawer-section-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22a06b;
  box-shadow: 0 0 0 0 rgba(34, 160, 107, 0.5);
  animation: pulse 1.6s infinite;
  display: inline-block;
}

.kv-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  padding: 5px 0;
  font-size: 13px;
}

.kv-row .kv-label {
  color: var(--ink-3);
}

.timeline-item {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  padding: 6px 0;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 5px;
}

.timeline-dot.now {
  background: var(--warn);
  box-shadow: 0 0 0 3px var(--warn-50);
}

.timeline-dot.todo {
  background: var(--ink-4);
}

.timeline-stage {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}

.timeline-sla-alert {
  font-size: 10px;
  padding: 2px 7px;
}

.timeline-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}

.drawer-actions {
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  background: var(--surface-2);
  flex-wrap: wrap;
}

/* Drawer overlay backdrop */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 8, 0.15);
  z-index: 89;
  display: none;
}

.drawer-overlay.open {
  display: block;
}

/* ================ LIVE MAP ================ */
.live-map {
  height: 220px;
  background: linear-gradient(135deg, #e8ede5 0%, #dde5d8 50%, #e8ede5 100%);
  border-radius: 8px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.live-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(0deg,
      transparent 24%,
      rgba(255, 255, 255, 0.5) 25%,
      rgba(255, 255, 255, 0.5) 26%,
      transparent 27%,
      transparent 74%,
      rgba(255, 255, 255, 0.5) 75%,
      rgba(255, 255, 255, 0.5) 76%,
      transparent 77%,
      transparent),
    linear-gradient(90deg,
      transparent 24%,
      rgba(255, 255, 255, 0.5) 25%,
      rgba(255, 255, 255, 0.5) 26%,
      transparent 27%,
      transparent 74%,
      rgba(255, 255, 255, 0.5) 75%,
      rgba(255, 255, 255, 0.5) 76%,
      transparent 77%,
      transparent);
  background-size: 40px 40px;
}

.map-store,
.map-rider,
.map-customer {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.map-store {
  top: 32%;
  left: 28%;
}

.map-store .map-icon {
  width: 26px;
  height: 26px;
  background: var(--ink);
  border-radius: 6px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.map-store .map-icon svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.map-customer {
  top: 65%;
  left: 78%;
}

.map-customer .map-icon {
  width: 26px;
  height: 26px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 6px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.map-customer .map-icon svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.map-rider {
  top: 50%;
  left: 56%;
}

.map-rider .map-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 4px rgba(15, 110, 86, 0.2),
    0 4px 10px rgba(0, 0, 0, 0.2);
  animation: pulse-ring 2s infinite;
}

.map-rider .map-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.map-label {
  background: rgba(255, 255, 255, 0.95);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.map-route {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.map-overlay-info {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-family: var(--mono);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.map-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.map-meta {
  background: var(--surface-2);
  border-radius: 6px;
  padding: 8px 10px;
}

.map-meta-label {
  font-size: 10px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.map-meta-val {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  margin-top: 1px;
}

.map-meta-val.warn {
  color: var(--warn);
}

.map-meta-val.good {
  color: var(--accent);
}

/* Batch stops in drawer */
.batch-stops-list {
  margin-top: 8px;
}

.batch-stop-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: 6px;
  margin-bottom: 4px;
  font-size: 12px;
  cursor: pointer;
}

.batch-stop-row.current {
  background: var(--accent-50);
  border-left: 3px solid var(--accent);
  padding-left: 7px;
}

.batch-stop-num-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 500;
}

.batch-stop-row.done .batch-stop-num-circle {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.batch-stop-row.current .batch-stop-num-circle {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.batch-stop-status {
  font-size: 10px;
  font-family: var(--mono);
  color: var(--ink-3);
  white-space: nowrap;
}

/* ================ AVAILABILITY DRAWER ================ */
.avail-group {
  border-bottom: 1px solid var(--line);
}

.avail-group:last-child {
  border-bottom: none;
}

.avail-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  cursor: pointer;
  user-select: none;
}

.avail-group-head:hover {
  background: var(--surface-2);
}

.avail-group.collapsed .avail-group-body {
  display: none;
}

.avail-group.collapsed .avail-caret {
  transform: rotate(-90deg);
}

.avail-caret {
  transition: transform 0.15s;
}

.avail-group-body {
  padding: 0 24px 10px;
}

.avail-rider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  margin: 0 -10px;
  border-radius: 8px;
  cursor: pointer;
}

.avail-rider:hover {
  background: var(--surface-2);
}

.avail-rider-stats {
  text-align: right;
  flex-shrink: 0;
}

.avail-delivered {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-50);
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
}

.avail-delivered svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}

/* Rider avatar (larger version) */
.rider-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f0f0eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  flex-shrink: 0;
}

/* Shift badge */
.shift-badge {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  font-family: var(--mono);
}

.shift-morning {
  background: var(--accent-50);
  color: var(--accent);
}

.shift-evening {
  background: var(--purple-50);
  color: var(--purple);
}

/* ================ SHEET / MODAL ================ */
/* Always render, control visibility via opacity */
.sheet-overlay {
  position: fixed;
  inset: 0;

  z-index: 100;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;

  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.5),
      rgba(0, 0, 0, 0.6));

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);

  opacity: 0;
  pointer-events: none;

  transition:
    opacity 0.24s ease,
    backdrop-filter 0.24s ease;
}

/* Only top modal is interactive */
.sheet-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  background: var(--surface);
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.sheet.wide {
  max-width: 760px;
}

.sheet-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet-title {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sheet-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sheet-close:hover {
  background: var(--hover);
  color: var(--ink);
}

.sheet-close svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.sheet-body {
  padding: 20px 24px;
  word-break: break-all;
  max-height: 65vh;
  overflow-y: scroll;
}

.sheet-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--surface-2);
}

.delivery-reason-modal {
  max-width: 560px;
}

/* ================ ORDER LOOKUP ================ */
.order-lookup {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 20px 40px;
}

.order-lookup-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.order-lookup-sub {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 6px;
  text-align: center;
}

.order-lookup-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 640px;
  margin-top: 28px;
}

.order-lookup-search-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

.order-lookup-input {
  flex: 1;
  padding: 14px 16px 14px 46px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-family: var(--mono);
}

.order-lookup-input:focus {
  outline: none;
  border-color: var(--ink);
}

.order-lookup-btn {
  padding: 14px 22px;
  font-size: 14px;
}

.order-lookup-status {
  display: flex;
  justify-content: center;
  margin-top: 32px;
  font-size: 13px;
}

.order-lookup-error {
  color: var(--danger);
}

.order-lookup.has-result {
  padding-top: 24px;
}

.order-lookup.has-result .order-lookup-title {
  font-size: 20px;
}

.order-lookup.has-result .order-lookup-sub {
  display: none;
}

.order-lookup-result {
  width: 100%;
  margin-top: 32px;
}

.order-lookup-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.order-lookup-result-title {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
}

.order-lookup-result-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  margin-top: 4px;
}

.order-lookup-result-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.order-lookup-result-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.order-lookup-store {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-50);
}

.order-lookup-store-value {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
  color: var(--accent);
}

.order-lookup-pod-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.order-lookup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  align-items: start;
}

.order-lookup-grid .kv-row {
  grid-template-columns: 140px 1fr;
  column-gap: 16px;
}

.order-lookup-items {
  margin-top: 16px;
}

.order-lookup-inline-loader {
  padding: 6px 0;
}

.order-item-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-item-thumb {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 8px;
  background-color: var(--hover);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--line);
}

.order-item-translated {
  font-size: 12px;
  color: var(--ink-2);
}

.resolve-request-sub {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}

.resolve-request-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 16px;
  margin-bottom: 16px;
}

.resolve-request-details .kv-row {
  grid-template-columns: 130px 1fr;
  column-gap: 20px;
  padding: 6px 0;
}

.delivery-reason-subtitle {
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--mono);
  margin-top: 2px;
}

.delivery-reason-body {
  word-break: normal;
}

.delivery-proof-field {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.delivery-proof-upload {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.delivery-proof-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.delivery-proof-muted {
  color: var(--ink-3);
  font-size: 12px;
  margin-top: 2px;
}

.delivery-proof-submitted {
  background: var(--accent-50);
  border: 1px solid rgba(15, 110, 86, 0.18);
  border-radius: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
}

.delivery-proof-preview {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  margin-top: 10px;
  overflow: hidden;
  padding: 6px;
}

.delivery-proof-preview img {
  border-radius: 6px;
  height: 92px;
  object-fit: cover;
  width: 124px;
}

.delivery-reason-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.delivery-reason-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
}

.delivery-reason-option.selected {
  border-color: var(--ink);
  background: var(--surface-2);
}

.delivery-reason-option input {
  margin: 0;
  flex-shrink: 0;
}

.delivery-reason-option span {
  font-size: 13px;
}

.delivery-reason-empty {
  padding: 10px 13px;
  color: var(--ink-3);
  font-size: 13px;
}

.delivery-reason-footer .btn {
  flex-direction: row;
  align-items: center;
  column-gap: 6px;
}

/* ================ FORM FIELDS ================ */
.field {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.field-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 14px;
  background: var(--surface);
  color: var(--ink);
}

.field-input:focus {
  outline: none;
  border-color: var(--ink);
}

.field-help {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
}

/* ================ TOAST ================ */
.toast-container {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 99999999;
}

.toast {
  transform: translateX(-50%) translateY(120%);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: transform 0.25s;
  z-index: 2000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  margin-bottom: 1rem;
}

.toast svg {
  width: 14px;
  height: 14px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
}

.toast-none {
  color: var(--bg);
  background: var(--ink);
  border-color: var(--bg);
}

.toast-info {
  color: var(--blue);
  background: var(--blue-50);
  border-color: var(--blue);
}

.toast-success {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-50);
}

.toast-error {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-50);
}

.toast-warning {
  color: var(--warn);
  border-color: var(--warn);
  background: var(--warn-50);
}

/* ================ EMPTY STATE ================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
  color: var(--ink-3);
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 13px;
  max-width: 360px;
  line-height: 1.6;
}

/* ================ REASSIGN SHEET ================ */
.reassign-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 6px;
}

.reassign-row:hover {
  background: var(--surface-2);
}

.reassign-row input[type="radio"] {
  margin: 0;
}

.reassign-row.busy {
  opacity: 0.55;
  cursor: not-allowed;
}

.reassign-row.busy:hover {
  background: transparent;
}

.reassign-row:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-50);
}

/* ================ RIDERS LIST ================ */
.rider-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rider-meta {
  min-width: 0;
  flex: 1;
}

.rider-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rider-id {
  font-size: 10px;
  color: var(--ink-3);
  font-family: var(--mono);
  margin-top: 1px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 500;
}

.status-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-active {
  background: var(--accent-50);
  color: var(--accent);
}

.status-late {
  background: var(--warn-50);
  color: var(--warn);
}

.status-absent {
  background: var(--danger-50);
  color: var(--danger);
}

.status-off {
  background: #f0f0eb;
  color: var(--ink-3);
}

/* ================ RIDER DETAIL ================ */
.rider-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.rider-profile-export {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}

.riders-export {
  margin-left: 0;
}

.rider-profile-export .ledger-export {
  margin-left: 0;
}

.riders-top-pagination {
  align-items: center;
  color: var(--ink-3);
  display: flex;
  font-size: 12px;
  gap: 8px;
}

.riders-top-pagination button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  padding: 4px 10px;
}

.riders-top-pagination button:hover:not(:disabled) {
  background: var(--hover);
}

.riders-top-pagination button:disabled {
  cursor: default;
  opacity: 0.4;
}

.riders-top-pagination .page-info {
  white-space: nowrap;
}

.rider-detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--purple-50);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  flex-shrink: 0;
}

.rider-detail-meta {
  flex: 1;
  min-width: 180px;
}

.rider-detail-name {
  font-size: 18px;
  font-weight: 500;
}

.rider-detail-id {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}

.rider-detail-tags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.rd-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #f0f0eb;
  color: var(--ink-2);
}

.rd-tag.accent {
  background: var(--accent-50);
  color: var(--accent);
}

.rd-tag.warn {
  background: var(--warn-50);
  color: var(--warn);
}

.rider-detail-kpis {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.rider-summary-actions {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rider-summary-actions > .btn {
  justify-content: center;
  min-width: 58px;
}

.rider-suspend-btn {
  align-items: center;
  color: var(--danger);
  display: inline-flex;
  font-size: 14px;
  font-weight: 600;
  justify-content: center;
  line-height: 1;
  min-height: 36px;
  padding: 0 16px;
}

.rider-unblock-btn {
  color: var(--ink);
}

.rd-kpi-label {
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rd-kpi-val {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.1;
  margin-top: 2px;
  letter-spacing: -0.02em;
}

.cash-kpi {
  padding: 10px 14px;
  background: var(--warn-50);
  border: 1px solid #f5c84a;
  border-radius: 8px;
  min-width: 180px;
}

.cash-kpi .rd-kpi-val {
  color: var(--warn);
}

.cash-kpi.danger {
  border-color: var(--danger);
  background: var(--danger-50);
}

.cash-kpi.danger .rd-kpi-val {
  color: var(--danger);
}

.cash-kpi-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.rider-cash-settlement-row {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.rider-settle-btn {
  min-height: 30px;
}

.cash-meta {
  font-size: 10px;
  color: var(--ink-3);
  font-family: var(--mono);
  margin-top: 3px;
}

/* Cash settle inline */
.settle-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 10px;
}

.code-inputs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.code-box {
  width: 40px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 22px;
  font-weight: 600;
  font-family: var(--mono);
  text-align: center;
  outline: none;
}

.code-box:focus {
  border-color: var(--ink);
}

.settle-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.settle-success {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.settle-success-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-50);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* ================ SUBTABS ================ */
.subtabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.subtab {
  padding: 9px 14px;
  font-size: 13px;
  color: var(--ink-3);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}

.subtab:hover {
  color: var(--ink-2);
}

.subtab.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 500;
}

/* ================ PANEL ================ */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.panel-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-title {
  font-size: 14px;
  font-weight: 500;
}

.panel-body {
  padding: 14px 16px;
}

.panel-body.flush {
  padding: 0;
}

.panel-body .table-wrap {
  border-radius: 0;
}

/* ================ SHIFT ATTENDANCE ================ */
.shift-attendance-scroll {
  overflow-x: auto;
  width: 100%;
}

.shift-attendance-state {
  color: var(--ink-3);
  font-size: 13px;
  min-height: 96px;
  padding: 36px 20px;
  text-align: center;
}

.shift-attendance-table {
  min-width: 960px;
  table-layout: fixed;
  width: 100% !important;
}

.shift-attendance-table th:nth-child(1) {
  width: 13%;
}

.shift-attendance-table th:nth-child(2) {
  width: 12%;
}

.shift-attendance-table th:nth-child(3),
.shift-attendance-table th:nth-child(4) {
  width: 10%;
}

.shift-attendance-table th:nth-child(5) {
  width: 13%;
}

.shift-attendance-table th:nth-child(6) {
  width: 42%;
}

.shift-attendance-weekday {
  font-weight: 600;
}

.shift-attendance-date {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  margin-left: 7px;
}

.shift-attendance-shift {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-2);
  display: inline-flex;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
}

.shift-attendance-mono {
  font-family: var(--mono);
  font-size: 12px;
}

.shift-attendance-hours {
  font-weight: 600;
}

.shift-attendance-hours.complete {
  color: var(--accent);
}

.shift-attendance-hours.incomplete {
  color: var(--danger);
}

.shift-attendance-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shift-attendance-slot {
  align-items: center;
  border-radius: 4px;
  display: inline-flex;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  gap: 5px;
  padding: 3px 7px;
  white-space: nowrap;
}

.shift-attendance-slot.complete {
  background: var(--accent-50);
  color: var(--accent);
}

.shift-attendance-slot.incomplete {
  background: var(--danger-50);
  color: var(--danger);
}

.shift-attendance-empty {
  color: var(--ink-4);
}

.detail-sections {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 16px;
}

.detail-sections.earnings-detail-sections {
  grid-template-columns: 1fr;
}

@media (max-width: 1100px) {
  .detail-sections {
    grid-template-columns: 1fr;
  }
}

/* ================ LEAVE REQUESTS ================ */
.leave-filterbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.leave-search {
  flex: 0 1 320px;
}

.leave-panel {
  overflow: hidden;
}

.leave-table-wrap {
  overflow-x: auto;
}

.leave-table {
  min-width: 940px;
}

.leave-table th:nth-child(1) {
  width: 220px;
}

.leave-table th:nth-child(2) {
  width: 130px;
}

.leave-table th:nth-child(3) {
  width: 220px;
}

.leave-table th:nth-child(4) {
  width: 130px;
}

.leave-table th:nth-child(5) {
  width: 110px;
}

.leave-table th:nth-child(6) {
  width: 180px;
}

.leave-center {
  text-align: center !important;
}

.leave-rider {
  align-items: center;
  display: flex;
  gap: 9px;
}

.leave-avatar {
  align-items: center;
  background: var(--surface-2);
  border-radius: 50%;
  color: var(--ink-2);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.leave-rider-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.leave-rider-name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.leave-rider-id {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10px;
}

.leave-date-weekday {
  font-weight: 500;
}

.leave-date-value {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  margin-left: 6px;
}

.leave-reason {
  color: var(--ink-2);
}

.leave-requested {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
}

.leave-status {
  border-radius: 10px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
}

.leave-status-pending {
  background: var(--warn-50);
  color: var(--warn);
}

.leave-status-approved {
  background: var(--accent-50);
  color: var(--accent);
}

.leave-status-rejected {
  background: var(--danger-50);
  color: var(--danger);
}

.leave-status-revoked {
  background: var(--hover);
  color: var(--ink-3);
}

.leave-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: center;
}

.leave-no-action {
  color: var(--ink-4);
}

.leave-empty {
  color: var(--ink-3);
  padding: 28px 20px !important;
  text-align: center;
}

.leave-pagination-total {
  margin-left: auto;
}

.leave-confirm-overlay {
  align-items: center;
  background: rgba(10, 10, 8, 0.18);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 300;
}

.leave-confirm-modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16);
  max-width: 360px;
  padding: 20px;
  width: 100%;
}

.leave-confirm-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.leave-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
}

@media (max-width: 760px) {
  .leave-filterbar {
    align-items: stretch;
    flex-direction: column;
  }

  .leave-filterbar .tabs {
    overflow-x: auto;
  }

  .leave-search {
    flex-basis: auto;
    max-width: none;
  }
}

/* ================ WEEK ACTIVITY HEATMAP ================ */
.week-row-hours {
  display: grid;
  grid-template-columns: 110px repeat(18, 1fr) 60px 110px;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.week-row-hours.week-row-hours-no-status {
  grid-template-columns: 110px repeat(18, 1fr) 60px;
}

.week-row-hours:last-child {
  border-bottom: none;
}

.week-row-hours>div {
  border-right: 1px solid var(--line);
  padding: 8px 4px;
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

.week-row-hours>div:last-child {
  border-right: none;
}

.week-row-hours .day-label {
  justify-content: flex-start;
  padding-left: 14px;
  font-family: var(--sans);
  font-weight: 500;
  color: var(--ink);
  font-size: 12px;
  gap: 6px;
}

.week-row-hours .day-sub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  font-weight: 400;
}

.week-row-hours .h-cell.zero {
  color: var(--ink-4);
}

.week-row-hours .h-cell.absent-mandatory {
  color: var(--danger);
  font-weight: 500;
  background: var(--danger-50) !important;
}

.week-row-hours .total-cell {
  font-weight: 500;
  background: var(--surface-2);
  font-size: 12px;
}

.week-row-hours .total-cell.under {
  color: var(--danger);
}

.week-row-hours .total-cell.good {
  color: var(--accent);
}

.week-row-hours .status-cell {
  font-family: var(--sans);
  font-size: 11px;
  background: var(--surface-2);
  padding: 0 10px;
  font-weight: 500;
}

.week-header {
  background: var(--surface-2) !important;
  border-bottom: 2px solid var(--line) !important;
}

.week-header>div {
  font-size: 10px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--mono);
  font-weight: 400;
  min-height: 30px !important;
}

.week-header .day-label {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  font-size: 11px;
  color: var(--ink-3);
}

.week-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.week-nav button {
  min-width: 28px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.week-nav button svg {
  width: 14px;
  height: 14px;
  stroke: var(--ink-2);
  fill: none;
  stroke-width: 2;
}

.week-label {
  font-size: 12px;
  color: var(--ink-2);
  min-width: 9.5rem;
  text-align: center;
}

/* ================ EARNINGS TABLE ================ */
.earn-row {
  display: grid;
  grid-template-columns: 90px 60px 80px 80px 100px 80px;
  padding: 10px 20px;
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  gap: 12px;
}

.earn-row:last-child {
  border-bottom: none;
}

.earn-header {
  background: var(--surface-2);
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.earn-row .earn-date {
  font-family: var(--mono);
  color: var(--ink-3);
  font-size: 11px;
}

.earn-row .earn-num {
  font-family: var(--mono);
  text-align: right;
}

.earn-row .earn-amt {
  font-family: var(--mono);
  font-weight: 500;
  text-align: right;
}

.earn-row.payout-day {
  background: var(--accent-50);
}

.earn-row.clickable {
  cursor: pointer;
}

.earn-row.clickable:hover {
  background: var(--hover);
}

.earn-row.clickable.payout-day:hover {
  background: #d4f0d4;
}

.earn-row.off-day {
  color: var(--ink-4);
}

.earn-row.future-day {
  color: var(--ink-4);
  background: var(--bg);
  cursor: default;
}

.earn-row.future-day * {
  color: var(--ink-4);
}

.earn-row.selected {
  background: var(--accent-50);
}

/* ================ PENALTIES TABLE ================ */
.pen-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.pen-row:last-child {
  border-bottom: none;
}

.pen-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  min-width: 60px;
}

.pen-reason {
  flex: 1;
}

.pen-amount {
  font-family: var(--mono);
  font-weight: 500;
  min-width: 50px;
  text-align: right;
}

.pen-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--mono);
}

.pen-applied {
  background: var(--danger-50);
  color: var(--danger);
}

.pen-disputed {
  background: var(--warn-50);
  color: var(--warn);
}

.pen-waived {
  background: #f0f0eb;
  color: var(--ink-3);
}

/* ================ DATE RANGE PICKER ================ */
.date-range-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.date-range-picker input[type="date"] {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 12px;
  font-family: var(--mono);
  color: var(--ink);
  outline: none;
}

.date-range-picker input[type="date"]:focus {
  border-color: var(--ink-3);
}

.date-range-picker .range-sep {
  font-size: 12px;
  color: var(--ink-3);
}

/* ================ ONBOARDING CHECKLIST ================ */
.check-row {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}

.check-row:last-child {
  border-bottom: none;
}

.check-status {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
}

.check-status svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke-width: 2.5;
  stroke: currentColor;
}

.cs-done {
  background: var(--accent-50);
  color: var(--accent);
}

.cs-doing {
  background: var(--warn-50);
  color: var(--warn);
}

.cs-locked {
  background: #f0f0eb;
  color: var(--ink-4);
}

.check-body {
  flex: 1;
}

.check-title {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.check-meta {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 3px;
  line-height: 1.4;
}

.check-actor {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  background: #f0f0eb;
  color: var(--ink-2);
  font-weight: 500;
}

.check-actor.app {
  background: var(--blue-50);
  color: var(--blue);
}

.check-action {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ================ DOCUMENT VIEWER ================ */
.doc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.doc-thumb {
  background: #f0f0eb;
  border: 1px solid var(--line);
  border-radius: 8px;
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  gap: 6px;
  transition: border-color 0.15s;
}

.doc-thumb:hover {
  border-color: var(--ink-3);
  background: #e8e8e3;
}

.doc-thumb svg {
  width: 28px;
  height: 28px;
  stroke: var(--ink-3);
  fill: none;
  stroke-width: 1.4;
}

.doc-label {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  background: rgba(255, 255, 255, 0.92);
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  color: var(--ink);
}

.doc-label .doc-num {
  font-family: var(--mono);
  color: var(--ink-3);
}

.doc-expand-hint {
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 2px;
}

.doc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.15s ease;
}

.doc-modal {
  background: var(--surface);
  border-radius: 14px;
  width: 420px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.doc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.doc-modal-title {
  font-size: 14px;
  font-weight: 500;
}

.doc-modal-close {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-modal-close svg {
  width: 14px;
  height: 14px;
  stroke: var(--ink-2);
  fill: none;
  stroke-width: 2;
}

.doc-modal-body {
  padding: 20px;
}

/* Dummy document cards */
.dummy-aadhar {
  background: linear-gradient(135deg, #1a3a6b 0%, #2d5a9e 100%);
  border-radius: 10px;
  padding: 8px;
  color: #fff;
  font-size: 11px;
}

.dummy-aadhar .aadhar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
}

.dummy-aadhar .aadhar-logo {
  width: 32px;
  height: 32px;
  background: #ff6b00;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.dummy-aadhar .aadhar-body {
  display: flex;
  gap: 12px;
}

.dummy-aadhar .aadhar-photo {
  width: 60px;
  height: 70px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dummy-aadhar .aadhar-num {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  margin-top: 10px;
  color: #ffd700;
}

.dummy-pan {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 16px;
  font-size: 11px;
}

.dummy-pan .pan-header {
  background: #1a3a6b;
  color: #fff;
  margin: -16px -16px 12px;
  padding: 10px 16px;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dummy-pan .pan-number {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 6px 0;
  color: #1a3a6b;
}

.dummy-photo {
  background: #e8e8e3;
  border-radius: 10px;
  aspect-ratio: 3/4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-3);
}

.dummy-photo svg {
  width: 48px;
  height: 48px;
  stroke: var(--ink-3);
  fill: none;
  stroke-width: 1.2;
}

.dummy-dl {
  background: linear-gradient(135deg, #b5451b 0%, #d4621f 100%);
  border-radius: 10px;
  padding: 16px;
  color: #fff;
  font-size: 11px;
}

.dummy-dl .dl-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.dummy-dl .dl-num {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 6px 0;
}

.dummy-dl .dl-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 4px;
  margin-bottom: 3px;
}

.dummy-dl .dl-label {
  opacity: 0.65;
}

/* ================ ACTIVATION CELEBRATION ================ */
.activate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  animation: fadeIn 0.2s ease;
}

.activate-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  position: relative;
  z-index: 1502;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

.activate-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-50);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.activate-icon svg {
  width: 36px;
  height: 36px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2.5;
}

.activate-headline {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.activate-body {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.65;
  margin-bottom: 28px;
}

.activate-rid {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  background: var(--accent-50);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 4px;
  margin: 4px 0;
  font-weight: 500;
}

.loading-modal-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 36px 32px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  position: relative;
  z-index: 1502;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

.loading-modal-card .loader-page {
  height: auto;
  margin-bottom: 18px;
}

.loading-modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.loading-modal-message {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
}

.confetti-wrap {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1501;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -16px;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  opacity: 0.9;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
  }

  40% {
    transform: translateY(40vh) rotate(360deg) translateX(20px);
  }

  70% {
    transform: translateY(70vh) rotate(600deg) translateX(-15px);
  }

  100% {
    transform: translateY(105vh) rotate(900deg) translateX(10px);
    opacity: 0;
  }
}

@keyframes popIn {
  0% {
    transform: scale(0);
  }

  80% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ================ PREFERENCES PANEL ================ */
.pref-toggle {
  display: flex;
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
}

.pref-btn {
  flex: 1;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--ink-2);
  border: none;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
}

.pref-btn.selected {
  background: var(--ink);
  color: #fff;
}

.pref-toggle-grid {
  flex-wrap: wrap;
}

.pref-toggle-grid .pref-btn {
  flex: 1 1 calc(50% - 2px);
  min-width: 180px;
}

.pref-helper,
.pref-empty {
  color: var(--ink-3);
  font-size: 13px;
  margin-bottom: 8px;
}

.activate-btn-wrap {
  margin-top: 20px;
}

/* ================ PAGINATION ================ */
.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
}

.pagination button {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 12px;
  cursor: pointer;
}

.pagination button:hover:not(:disabled) {
  background: var(--hover);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}

.pagination .page-info {
  margin: 0 4px;
}

/* ================ SETTINGS ================ */
.settings-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  padding-bottom: 0;
}

.settings-tab {
  padding: 8px 16px;
  border: none;
  background: none;
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 400;
}

.settings-tab:hover:not(:disabled) {
  color: var(--ink-2);
}

.settings-tab.active {
  color: var(--ink);
  font-weight: 500;
  border-bottom-color: var(--ink);
}

.settings-tab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.settings-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-page-header {
  margin-bottom: 24px;
}

.settings-sla-panel {
  margin-top: 0;
}

.settings-sla-head {
  align-items: flex-start;
  justify-content: space-between;
}

.settings-sla-sub {
  color: var(--ink-3);
  font-size: 12px;
  margin-top: 2px;
}

.settings-sla-grid {
  display: grid;
  gap: 18px 32px;
  grid-template-columns: 1fr 1fr;
}

.settings-sla-grid .field-input {
  width: 80px;
}

.settings-sla-grid .field-unit-wrap {
  align-items: center;
  display: inline-flex;
  gap: 4px;
}

.settings-user-form {
  align-items: flex-end;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
}

.settings-phone-input {
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  display: flex;
  max-width: 280px;
  overflow: hidden;
}

.settings-phone-input span {
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  color: var(--ink-2);
  flex: none;
  font-size: 13px;
  height: 36px;
  line-height: 36px;
  padding: 0 12px;
}

.settings-phone-input .field-input {
  border: none;
  width: 100%;
}

.settings-role-dropdown {
  max-width: 280px;
  position: relative;
  width: 100%;
}

.settings-role-trigger {
  align-items: center;
  background: var(--surface);
  display: flex;
  height: 38px;
  justify-content: space-between;
  padding: 0 12px 0 14px;
  text-align: left;
  width: 100%;
}

.settings-role-trigger svg {
  flex: none;
  height: 16px;
  margin-left: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 16px;
}

.settings-role-trigger.open svg {
  transform: rotate(180deg);
}

.settings-role-placeholder {
  color: var(--ink-3);
}

.settings-role-menu {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
  gap: 2px;
  left: 0;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  position: absolute;
  top: calc(100% + 6px);
  width: 100%;
  z-index: 20;
}

.settings-role-option {
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
  padding: 8px 10px;
  text-align: left;
}

.settings-role-option:hover,
.settings-role-option.selected {
  background: var(--hover);
}

.settings-role-option.selected {
  color: var(--accent);
  font-weight: 500;
}

.settings-create-user-btn {
  white-space: nowrap;
}

.settings-user-create-panel {
  overflow: visible;
  position: relative;
  z-index: 2;
}

.settings-user-list-panel {
  overflow: visible;
  position: relative;
  z-index: 1;
}

.settings-users-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.settings-user-search {
  width: 260px;
}

.settings-users-table-wrap {
  overflow: visible;
}

.settings-users-table {
  min-width: 1040px;
}

.settings-table-role-dropdown {
  max-width: 220px;
}

.settings-assigned-stores-text {
  color: var(--ink-2);
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-assigned-stores-hover {
  display: inline-flex;
  position: relative;
}

.settings-assigned-stores-popover {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  bottom: calc(100% + 8px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
  color: var(--ink-2);
  display: none;
  flex-direction: column;
  font-family: var(--mono);
  font-size: 11px;
  gap: 6px;
  left: 0;
  max-height: 180px;
  min-width: 220px;
  overflow-y: auto;
  padding: 10px 12px;
  position: absolute;
  white-space: nowrap;
  z-index: 30;
}

.settings-assigned-stores-hover:hover .settings-assigned-stores-popover {
  display: flex;
}

.settings-update-stores-cell {
  white-space: nowrap;
  width: 1%;
}

.settings-update-stores-cell .btn {
  white-space: nowrap;
}

.settings-store-action-stack {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-store-action-stack .btn {
  justify-content: center;
  min-width: 128px;
  text-align: center;
}

.settings-remove-store-row-btn:not(:disabled) {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

.settings-remove-store-row-btn:not(:disabled):hover {
  background: #000;
  border-color: #000;
}

.settings-row-save-cell {
  white-space: nowrap;
  width: 1%;
}

.settings-row-save-cell .btn {
  white-space: nowrap;
}

.settings-store-modal-overlay {
  align-items: center;
  background: rgba(10, 10, 8, 0.22);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 720;
}

.settings-store-modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  max-height: min(640px, calc(100vh - 48px));
  overflow: hidden;
  width: min(520px, calc(100vw - 48px));
}

.settings-status-modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  width: min(420px, calc(100vw - 48px));
}

.settings-store-modal-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 16px 18px;
}

.settings-store-modal-title {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.settings-store-modal-sub {
  color: var(--ink-3);
  font-size: 12px;
  margin-top: 2px;
}

.settings-store-modal-close {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--ink-3);
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.settings-store-modal-close:hover {
  background: var(--hover);
  color: var(--ink);
}

.settings-store-modal-close svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
  width: 18px;
}

.settings-store-modal-list {
  max-height: min(420px, calc(100vh - 220px));
  overflow-y: auto;
  padding: 8px 12px;
}

.settings-store-option {
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  padding: 10px 8px;
}

.settings-store-option:hover {
  background: var(--surface-2);
}

.settings-store-option input {
  flex: none;
}

.settings-store-option-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.settings-store-option-name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.settings-store-option-id {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  margin-top: 2px;
}

.settings-store-modal-empty {
  color: var(--ink-3);
  padding: 28px 12px;
  text-align: center;
}

.settings-status-modal-body {
  color: var(--ink-2);
  font-size: 14px;
  padding: 18px;
}

.settings-store-modal-actions {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 14px 18px;
}

.settings-users-empty {
  color: var(--ink-3);
  padding: 28px 12px;
  text-align: center;
}

.settings-users-pagination {
  margin-top: 14px;
}

@media (max-width: 860px) {
  .settings-user-form {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .settings-user-search,
  .settings-phone-input,
  .settings-role-dropdown {
    max-width: none;
    width: 100%;
  }

  .settings-users-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }
}

.upload-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.upload-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}

.upload-card-title {
  font-size: 14px;
  font-weight: 500;
}

.upload-card-desc {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
}

.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: 8px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: var(--surface);
  transition:
    border-color 0.15s,
    background 0.15s;
  text-align: center;
}

.dropzone:hover,
.dropzone.drag {
  border-color: var(--accent);
  background: var(--accent-50);
}

.dropzone-label {
  font-size: 13px;
  color: var(--ink-2);
}

.dropzone-label span {
  color: var(--accent);
  font-weight: 500;
}

.dropzone-hint {
  font-size: 11px;
  color: var(--ink-4);
  font-family: var(--mono);
}

.upload-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-3);
}

.upload-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--accent-50);
  border: 1px solid var(--accent);
  border-radius: 8px;
}

.upload-success-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.upload-success-icon svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.5;
}

.upload-preview {
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.upload-preview .dt {
  border-radius: 0;
}

.upload-preview .pagination {
  border-top: 1px solid var(--line);
}

.upload-template-btn {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 5px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================ SETTLE MODAL ================ */
.settle-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.settle-modal {
  background: var(--surface);
  border-radius: 14px;
  padding: 28px 28px 24px;
  width: 360px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.record-deposit-modal {
  max-width: 460px;
  width: 100%;
}

.settle-modal-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.settle-modal-rider {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 20px;
}

.settle-modal-amount-label {
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  margin-bottom: 4px;
}

.settle-modal-amount {
  font-size: 32px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--danger);
  margin-bottom: 20px;
}

.settle-modal-hint {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 12px;
}

.settle-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 24px;
}

.settle-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.settle-modal-sub {
  margin-top: 4px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
}

.rider-suspend-modal {
  width: 400px;
}

.rider-suspend-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.rider-suspend-group-label {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-top: 18px;
  text-transform: uppercase;
}

.rider-suspend-option {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  padding: 11px 12px;
}

.rider-suspend-option:hover {
  background: var(--hover);
}

.rider-suspend-option input {
  accent-color: var(--accent);
}

.rider-suspend-option span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.attachment-modal {
  width: min(560px, calc(100vw - 48px));
}

.attachment-close {
  position: static;
  flex: 0 0 auto;
  font-size: 18px;
}

.attachment-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  aspect-ratio: 16 / 9;
  min-height: 240px;
  max-height: 56vh;
  overflow: hidden;
}

.attachment-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.attachment-meta {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--surface);
}

.attachment-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.attachment-meta-label {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.attachment-meta-val {
  color: var(--ink-1);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  word-break: break-word;
}

.attachment-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.attachment-actions .btn {
  flex: 1;
}

.attachment-download {
  justify-content: center;
  text-align: center;
}

.record-deposit-field {
  margin-top: 10px;
  margin-bottom: 0;
}

.record-deposit-field:first-of-type {
  margin-top: 6px;
}

.required-mark {
  color: var(--danger);
}

.record-deposit-optional {
  color: var(--ink-4);
  font-weight: 400;
}

.dep-file-pick {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  padding: 9px 12px;
}

.dep-file-pick:hover {
  background: var(--hover);
}

.dep-file-pick input {
  display: none;
}

.dep-file-pick span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--ink-3);
  font-size: 13px;
}

.dep-file-pick svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.record-deposit-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.record-deposit-actions .btn:first-child {
  flex: 1;
}

.record-deposit-submit {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ================ KYC REJECTED ================ */
.cs-rejected {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--danger-50);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
}

.kyc-rejected-banner {
  background: var(--danger-50);
  border: 1px solid var(--danger);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--danger);
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =========================
   APP LAYOUT
========================= */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* =========================
   MAIN AREA
========================= */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;

  min-width: 0;
  /* prevents overflow bugs */
  height: 100vh;
}

.sqr-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: #020403;
  display: flex;
  justify-content: center;
  padding: 48px 24px;
  overflow: auto;
}

.sqr-card {
  background: transparent;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  position: relative;
  box-shadow: none;
  min-width: 0;
  width: min(780px, calc(100vw - 48px));
}

.sqr-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sqr-close svg {
  width: 24px;
  height: 24px;
}

.sqr-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.sqr-store {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.36);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sqr-instruction {
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.sqr-qr-wrap {
  width: min(720px, calc(100vw - 96px), calc(100vh - 210px));
  height: min(720px, calc(100vw - 96px), calc(100vh - 210px));
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: 6px solid rgba(255, 255, 255, 0.13);
  box-shadow: none;
}

.sqr-qr-wrap img {
  display: block;
  border-radius: 10px;
}

.sqr-qr-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.sqr-skeleton {
  width: 400px;
  height: 400px;
  border-radius: 10px;
  background: linear-gradient(90deg, #e8e8e8 25%, #d0d0d0 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

.sqr-refresh {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sqr-refresh-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sqr-refresh-label {
  font-size: 12px;
  color: var(--ink-3);
}

.sqr-refresh-time {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--ink-2);
}

.sqr-refresh-time.low {
  color: var(--warn);
}

.sqr-bar-track {
  height: 4px;
  border-radius: 99px;
  background: var(--bg);
  overflow: hidden;
  width: 100%;
}

.sqr-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition:
    width 0.9s linear,
    background 0.3s;
}

/* ================ PROFILE TAB ================ */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  padding: 20px 0 0;
}

.profile-section-wide {
  grid-column: 1 / -1;
}

.profile-suspend-actions {
  display: flex;
  justify-content: flex-start;
}

.change-store-select {
  max-width: 360px;
}

/* ================ DROPDOWN ================ */
.dropdown {
  position: relative;
}

.dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.dropdown-btn:hover:not(:disabled) {
  background: var(--hover);
}

.dropdown-btn:disabled {
  cursor: not-allowed;
  color: var(--ink-3);
  background: var(--surface-2);
}

.dropdown-btn-placeholder {
  color: var(--ink-3);
}

.dropdown-arrow {
  width: 12px;
  height: 12px;
  stroke: var(--ink-3);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.dropdown-menu {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 4px;
  z-index: 500;
  max-height: 144px;
  overflow-y: auto;
}

.dropdown-item {
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 18px;
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--hover);
}

.dropdown-item.sel {
  color: var(--accent);
  font-weight: 500;
}

.dropdown-item-empty {
  color: var(--ink-3);
  cursor: default;
}

.dropdown-item-empty:hover {
  background: none;
}

.change-store-card .pref-toggle-grid {
  gap: 8px;
}

.change-store-card .pref-toggle-grid .pref-btn {
  flex: 1 1 calc(50% - 4px);
}

.change-store-actions {
  display: flex;
  justify-content: flex-start;
}

.doc-status-badge {
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.doc-status-missing {
  background: var(--surface-2);
  color: var(--ink-3);
}

.doc-status-verified {
  background: var(--accent-50);
  color: var(--accent);
}

.doc-status-pending {
  background: #fff3d8;
  color: #b86b12;
}

.doc-status-rejected {
  background: var(--danger-50);
  color: var(--danger);
}

.kyc-documents-body {
  padding: 10px 14px;
}

.kyc-doc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.doc-card {
  appearance: none;
  width: 100%;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.doc-card:disabled {
  cursor: default;
}

.doc-card-missing {
  border-style: dashed;
  background: #fbfbf8;
}

.doc-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent-50);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-card-missing .doc-card-icon {
  background: var(--surface-2);
  color: var(--ink-4);
}

.doc-card-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.doc-card-body {
  min-width: 0;
}

.doc-card-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 1px;
}

.doc-card-file {
  margin-top: 5px;
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-card-empty {
  color: var(--ink-4);
  font-style: italic;
}

.doc-card-size {
  color: var(--ink-4);
  margin-left: 6px;
}

.doc-card-date {
  margin-top: 5px;
  font-size: 11px;
  color: var(--ink-4);
  white-space: nowrap;
}

.insurance-card-body {
  padding: 8px 0;
}

.insurance-card-copy {
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.insurance-upload-btn {
  align-items: center;
  gap: 8px;
}

.insurance-upload-input {
  display: none;
}

.insurance-card-actions {
  padding-top: 8px;
}

.insurance-document-card {
  margin-bottom: 8px;
  max-width: 420px;
}

.profile-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.profile-row:last-child {
  border-bottom: none;
}

.profile-row-label {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  min-width: 130px;
  flex-shrink: 0;
  padding-top: 1px;
}

.profile-row-val {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
}

.profile-bank-proof {
  width: 100%;
  display: block;
  text-align: left;
  padding: 12px 14px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.profile-bank-proof:hover {
  border-color: var(--ink-4);
}

.profile-bank-proof-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.profile-bank-proof-file {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-2);
  font-family: var(--mono);
}

.profile-bank-proof-file svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.profile-bank-verified-meta {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.4;
}

.profile-bank-rejected-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--danger);
  line-height: 1.4;
}

.profile-bank-actions {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #f3cc7a;
  border-radius: 8px;
  background: #fff5df;
}

.profile-bank-actions-copy {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.45;
  margin-bottom: 8px;
}

.profile-bank-actions-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.profile-bank-actions-row .btn svg {
  width: 13px;
  height: 13px;
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #8f2525;
  border-color: #8f2525;
}

/* ================ PAYOUT CARD ================ */
.payout-card {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.payout-card-meta {
  padding: 16px 20px;
  border-right: 1px solid var(--line);
  min-width: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.payout-meta-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payout-meta-label {
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.payout-meta-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.payout-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}

.payout-status-pill.paid {
  background: var(--accent-50);
  color: var(--accent);
}

.payout-status-pill.pending {
  background: var(--warn-50);
  color: var(--warn);
}

.payout-status-pill.failed {
  background: var(--danger-50);
  color: var(--danger);
}

.payout-card-amounts {
  flex: 1;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
}

.payout-amt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.payout-amt-row.net {
  margin-top: 2px;
}

.payout-amt-label {
  font-size: 13px;
  color: var(--ink-2);
  min-width: 0;
}

.payout-amt-label.net {
  font-weight: 600;
  color: var(--ink);
}

.payout-amt-val {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  font-family: var(--mono);
  flex-shrink: 0;
  white-space: nowrap;
  text-align: right;
}

.payout-amt-val.net {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

.payout-amt-row.net .payout-amt-label {
  font-weight: 600;
  color: var(--ink);
}

.payout-amt-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

.weekly-incentive-card {
  border-bottom: 1px solid var(--line);
}

.weekly-incentive-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 18px 24px;
}

.weekly-incentive-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.weekly-incentive-sub {
  color: var(--ink-3);
  font-size: 14px;
  margin-top: 8px;
}

.weekly-incentive-nav {
  margin-left: auto;
}

.weekly-incentive-nav button {
  background: transparent;
  border: none;
  min-height: 26px;
  min-width: 26px;
  padding: 2px 6px;
}

.weekly-incentive-nav button svg {
  height: 16px;
  width: 16px;
}

.weekly-incentive-amount {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.weekly-incentive-state {
  color: var(--ink-3);
  font-size: 14px;
  min-height: 72px;
  padding: 24px;
}

.weekly-incentive-stats {
  display: flex;
  gap: 56px;
  padding: 20px 24px 16px;
}

.weekly-incentive-stats div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.weekly-incentive-stats span {
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.weekly-incentive-stats strong {
  color: var(--ink);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.weekly-incentive-stats div:last-child strong {
  color: var(--ink-3);
}

.weekly-incentive-stats strong em {
  color: var(--ink-3);
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
}

.weekly-incentive-days {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(7, 58px);
  padding: 24px 24px 10px;
}

.weekly-incentive-day {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 44px;
}

.weekly-incentive-day-name {
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 600;
}

.weekly-incentive-day-name.mandatory {
  color: var(--warn);
}

.weekly-incentive-day-date {
  color: var(--ink-4);
  font-size: 12px;
}

.weekly-incentive-day-mark {
  align-items: center;
  background: var(--surface-2);
  border: 2px solid transparent;
  border-radius: 8px;
  color: var(--ink-4);
  display: flex;
  font-size: 20px;
  font-weight: 500;
  height: 36px;
  justify-content: center;
  line-height: 1;
  width: 36px;
}

.weekly-incentive-day.earned .weekly-incentive-day-mark {
  background: var(--accent);
  color: white;
}

.weekly-incentive-day.absent .weekly-incentive-day-mark {
  background: #fdecea;
  color: var(--danger);
}

.weekly-incentive-day.current .weekly-incentive-day-mark {
  background: var(--accent-50);
  border-color: var(--accent);
  color: var(--accent);
}

.weekly-incentive-day.on-leave .weekly-incentive-day-mark {
  background: #eef0f3;
}

.weekly-incentive-day.future .weekly-incentive-day-mark {
  background: #fbfbf8;
}

.weekly-incentive-day strong {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}

.weekly-incentive-legends {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 16px 24px 20px;
}

.weekly-incentive-legends span {
  align-items: center;
  color: var(--ink-3);
  display: inline-flex;
  font-size: 13px;
  gap: 6px;
}

.weekly-incentive-legends i {
  border-radius: 4px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.weekly-incentive-legends i.earned {
  background: var(--accent);
}

.weekly-incentive-legends i.current {
  background: #a8d5be;
}

.weekly-incentive-legends i.absent {
  background: #fdecea;
}

.weekly-incentive-legends i.on-leave {
  background: #eef0f3;
}

.weekly-incentive-legends i.mandatory {
  background: #e07b20;
  border-radius: 999px;
  height: 8px;
  width: 8px;
}

/* Future / off days in earnings */
.future-day {
  color: var(--ink-4) !important;
  background: var(--bg) !important;
  cursor: default !important;
}

.future-day * {
  color: var(--ink-4) !important;
}

.reports-cat-section {
  margin-top: 24px;
}

.reports-cat-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.reports-cat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.reports-cat-desc {
  font-size: 13px;
  color: var(--ink-3);
}

.reports-hub {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.report-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.report-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-50);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.report-card-icon svg,
.report-card-arrow {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.report-card-content {
  flex: 1;
  min-width: 0;
}

.report-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.report-card-sub {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
}

.report-card-arrow {
  width: 18px;
  height: 18px;
  color: var(--ink-3);
  flex-shrink: 0;
  margin-top: 2px;
}

@media (max-width: 900px) {
  .reports-hub {
    grid-template-columns: 1fr;
  }
}

/* ================ RIDER LEDGER ================ */
.ledger-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.ledger-back svg,
.ledger-export svg,
.kpi-help svg,
.ledger-row-toggle {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ledger-back svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.ledger-title-head {
  margin-bottom: 14px;
}

.report-subtabs {
  display: flex;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.report-subtab {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 15px;
  font-weight: 600;
  padding: 0 0 12px;
  border-bottom: 2px solid transparent;
}

.report-subtab.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.ledger-root {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ledger-filter-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ledger-date-arrow {
  padding: 0 4px;
  color: var(--ink-4);
  font-size: 12px;
  user-select: none;
}

.ledger-rider-select {
  width: 240px;
  height: 40px;
}

.ledger-rider-picker-btn {
  align-items: center;
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  justify-content: space-between;
  padding: 0 12px;
  text-align: left;
}

.ledger-rider-picker-btn svg {
  flex: 0 0 auto;
  height: 16px;
  margin-left: 8px;
  stroke: var(--ink-3);
  stroke-width: 2;
  fill: none;
  width: 16px;
}

.ledger-rider-picker-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-rider-modal-overlay {
  align-items: center;
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 700;
}

.ledger-rider-modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  max-height: min(680px, calc(100vh - 48px));
  overflow: hidden;
  width: min(560px, calc(100vw - 48px));
}

.ledger-rider-modal-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px 20px;
}

.ledger-rider-modal-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.ledger-rider-modal-sub {
  color: var(--ink-3);
  font-size: 12px;
  margin-top: 2px;
}

.ledger-rider-modal-close {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--ink-3);
  display: inline-flex;
  font-size: 22px;
  height: 32px;
  justify-content: center;
  line-height: 1;
  width: 32px;
}

.ledger-rider-modal-close:hover {
  background: var(--hover);
  color: var(--ink);
}

.ledger-rider-modal-search {
  margin: 14px 20px 10px;
  position: relative;
}

.ledger-rider-modal-search input {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  height: 42px;
  outline: none;
  padding: 0 12px 0 36px;
  width: 100%;
}

.ledger-rider-modal-search input:focus {
  border-color: var(--ink-3);
}

.ledger-rider-modal-search svg {
  fill: none;
  height: 16px;
  left: 12px;
  pointer-events: none;
  position: absolute;
  stroke: var(--ink-3);
  stroke-width: 1.8;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
}

.ledger-rider-modal-list {
  max-height: min(480px, calc(100vh - 210px));
  overflow-y: auto;
  padding: 6px 12px 14px;
}

.ledger-rider-option {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

.ledger-rider-option:hover {
  background: var(--surface-2);
}

.ledger-rider-option.selected {
  background: var(--accent-50);
}

.ledger-rider-option-avatar {
  align-items: center;
  background: var(--purple-50);
  border-radius: 999px;
  color: var(--purple);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.ledger-rider-option-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.ledger-rider-option-name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-rider-option-meta {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-rider-option-selected {
  color: var(--accent);
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
}

.ledger-rider-modal-empty {
  color: var(--ink-3);
  font-size: 13px;
  padding: 28px 12px;
  text-align: center;
}

.ledger-export {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.ledger-export svg {
  width: 12px;
  height: 12px;
  stroke-width: 2;
}

.ledger-kpi-split {
  display: flex;
  align-items: stretch;
  gap: 18px;
}

.ledger-kpi-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 280px;
}

.ledger-kpi-grouphead {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ledger-kpi-scope {
  margin-left: 8px;
  color: var(--ink-4);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.ledger-kpi-bar {
  flex: 1;
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.ledger-kpi {
  flex: 1;
  padding: 9px 22px;
}

.ledger-kpi-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ledger-kpi-val {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
  color: var(--ink);
  font-family: var(--mono);
}

.ledger-kpi-sub {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 13px;
}

.ledger-kpi-divider {
  width: 1px;
  background: var(--line);
  margin: 8px 0;
}

.kpi-help {
  position: relative;
  display: inline-flex;
  color: var(--ink-4);
  outline: none;
}

.kpi-help svg {
  width: 11px;
  height: 11px;
  stroke-width: 1.8;
}

.kpi-help-tip {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 260px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ink);
  color: var(--surface);
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 10;
}

.kpi-help:hover .kpi-help-tip,
.kpi-help:focus .kpi-help-tip {
  opacity: 1;
}

.ledger-recon-strip {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 14px 18px;
  font-family: var(--mono);
  color: var(--ink-2);
}

.recon-formula strong {
  color: var(--ink);
}

.recon-eq {
  color: var(--accent);
  font-weight: 700;
}

.recon-op {
  color: var(--ink-3);
}

.ledger-panel {
  overflow: hidden;
}

.ledger-panel .panel-head {
  padding: 12px 16px;
}

.ledger-panel-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-3);
}

.ledger-panel .table-wrap {
  border: 0;
  border-radius: 0;
}

.ledger-panel .table-scroll {
  border-radius: 0;
  max-height: 58vh;
  overflow: auto;
}

.ledger-panel .dt thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.ledger-panel .dt td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.ledger-panel .dt,
.ledger-table {
  min-width: 1120px;
}

.ledger-panel .dt th,
.ledger-table th {
  white-space: nowrap;
}

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

.ledger-table th,
.ledger-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
}

.ledger-table th {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ledger-table th:first-child {
  width: 36px;
}

.ledger-table th:nth-child(2) {
  width: 110px;
}

.ledger-table th:last-child {
  width: 90px;
}

.ledger-amount-cell {
  text-align: right;
}

.ledger-date-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
}

.ledger-action-cell {
  text-align: right;
}

.ledger-row-today {
  box-shadow: inset 3px 0 0 var(--accent);
}

.ledger-row-today td {
  border-bottom-color: var(--line-strong);
}

.ledger-row-expanded {
  background: var(--accent-50);
}

.ledger-row-toggle {
  width: 12px;
  height: 12px;
  color: var(--ink-4);
  stroke-width: 2;
  transition: transform 0.15s ease;
}

.ledger-row-toggle.open {
  transform: rotate(90deg);
}

.ledger-total-label {
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.ledger-today-pill,
.ledger-today-tag {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.ledger-rider-name {
  font-size: 13px;
  font-weight: 600;
}

.ledger-rider-id {
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-3);
  font-family: var(--mono);
}

.ledger-pos {
  color: var(--accent);
  font-weight: 700;
  font-family: var(--mono);
}

.ledger-neg {
  color: var(--danger);
  font-family: var(--mono);
}

.ledger-purple {
  color: var(--purple);
  font-family: var(--mono);
}

.ledger-empty {
  color: var(--ink-4);
  font-family: var(--mono);
}

.ledger-closing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-family: var(--mono);
  font-weight: 800;
}

.ledger-closing.closing-zero {
  border-color: #a9dccb;
  background: var(--accent-50);
  color: var(--accent);
  font-weight: 800;
}

.ledger-closing.closing-today,
.ledger-closing.closing-zero.closing-today {
  border-color: #a9dccb;
  background: var(--accent-50);
  color: var(--accent);
}

.ledger-day-close-row td {
  padding: 0 !important;
  border-bottom: 2px solid var(--line-strong);
  background: var(--bg);
}

.ledger-day-close {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 34px;
  padding: 6px 14px;
}

.ldtot {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1.2;
}

.ldtot-cod {
  background: var(--accent-50);
  color: var(--accent);
}

.ldtot-upi {
  background: #f0eeff;
  color: var(--purple);
}

.ldtot-cash {
  background: #fff0f0;
  color: var(--danger);
}

.ledger-month-total {
  border-top: 2px solid var(--line-strong) !important;
  background: var(--bg) !important;
}

.ledger-month-total td {
  background: var(--bg);
  padding-top: 16px !important;
  padding-bottom: 16px !important;
  font-weight: 700;
}

.ledger-panel .table-expanded-row td {
  padding: 0;
  background: var(--surface);
}

.ledger-detail-inner {
  padding: 22px 52px 24px;
  border-bottom: 2px solid var(--line-strong);
  background: var(--surface);
}

.ledger-detail-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.ledger-detail-table th:nth-child(1),
.ledger-detail-table td:nth-child(1) {
  width: 12%;
}

.ledger-detail-table th:nth-child(2),
.ledger-detail-table td:nth-child(2) {
  width: 24%;
}

.ledger-detail-table th:nth-child(3),
.ledger-detail-table td:nth-child(3) {
  width: 28%;
}

.ledger-detail-table th:nth-child(4),
.ledger-detail-table td:nth-child(4) {
  width: 18%;
}

.ledger-detail-table th:nth-child(5),
.ledger-detail-table td:nth-child(5) {
  width: 18%;
}

.ledger-detail-table th {
  padding: 0 0 10px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ledger-detail-table td {
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
}

.ledger-detail-table tbody tr:last-child td {
  border-bottom: 0;
}

.ledger-detail-time {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
}

.ledger-detail-ref {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
}

.ledger-detail-amount {
  text-align: right;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.ledger-detail-balance {
  text-align: right;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 12px;
}

.tx-type-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}

.tx-cod {
  background: var(--accent-50);
  color: var(--accent);
}

.tx-settle-cash {
  background: var(--danger-50);
  color: var(--danger);
}

.tx-settle-upi {
  background: #f0eeff;
  color: var(--purple);
}

.tx-payout {
  background: var(--purple-50);
  color: var(--purple);
}

.tx-reversal {
  background: var(--blue-50);
  color: var(--blue);
}

.table-expanded-row td {
  background: var(--surface-2);
  border-top: 0;
}

.ledger-expanded {
  padding: 12px 16px;
  color: var(--ink-3);
  font-size: 13px;
}

.journal-event-select {
  width: 150px;
  height: 40px;
}

.journal-export {
  margin-left: 0;
}

.journal-record {
  margin-left: auto;
}

.journal-record-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -10px;
}

.journal-kpi-bar {
  width: 100%;
}

.journal-table {
  min-width: 1240px;
}

.journal-table th,
.journal-table td {
  vertical-align: middle;
}

.journal-table th:last-child {
  width: 32px;
}

.journal-table th:nth-last-child(2) {
  width: 160px;
}

.journal-row-deposit_out td {
  background: #fff8f8;
}

.journal-when {
  white-space: nowrap;
  font-size: 12px;
  color: var(--ink-2);
}

.journal-ref-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.journal-ref-sub {
  margin-top: 2px;
  color: var(--ink-4);
  font-family: var(--mono);
  font-size: 11px;
}

.journal-upi {
  color: var(--blue);
  font-family: var(--mono);
  font-weight: 700;
}

.journal-bank-direct {
  color: var(--ink-4);
  font-size: 11px;
  font-style: italic;
}

.journal-status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  padding: 5px 10px;
  white-space: nowrap;
}

.journal-status-pending {
  background: var(--warn-50);
  color: var(--warn);
}

.journal-store-cash-cell {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  justify-content: flex-end;
  width: 100%;
}

.journal-actions {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  white-space: nowrap;
}

.journal-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.journal-badge-cash_in {
  background: var(--accent-50);
  color: var(--accent);
}

.journal-badge-upi_in {
  background: #f0eeff;
  color: var(--purple);
}

.journal-badge-deposit_out {
  background: var(--danger-50);
  color: var(--danger);
}

.journal-boundary-row td {
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 12px;
  font-style: italic;
}

.journal-boundary-balance {
  text-align: right;
  color: var(--ink-2) !important;
  font-family: var(--mono);
  font-size: 13px !important;
  font-style: normal !important;
  font-weight: 800;
}

.journal-boundary-balance.is-closing {
  color: var(--ink) !important;
}

.journal-boundary-closing td {
  border-top: 1px solid var(--line-strong);
}

.journal-attachment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  padding: 2px 4px;
}

.journal-attachment:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.journal-attachment svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shift-main-tabs {
  margin-bottom: 16px;
}

.shift-rider-tabs {
  margin: 18px 0 14px;
}

.subtab-count {
  align-items: center;
  background: var(--hover);
  border-radius: 999px;
  color: var(--ink-3);
  display: inline-flex;
  font-size: 11px;
  font-weight: 600;
  height: 20px;
  justify-content: center;
  margin-left: 7px;
  min-width: 20px;
  padding: 0 6px;
}

.subtab.active .subtab-count {
  background: var(--accent);
  color: #fff;
}

.shift-today-date {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  margin-left: 8px;
}

.shift-today-now {
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 13px;
}

.demand-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.demand-title {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
}

.demand-sub {
  color: var(--ink-3);
  font-size: 14px;
  margin: 0;
}

.demand-template-btn {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  white-space: nowrap;
}

.demand-template-btn svg {
  height: 16px;
  width: 16px;
}

.demand-dropzone {
  align-items: center;
  background: var(--surface);
  border: 2px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
  min-height: 170px;
  padding: 26px 16px;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
  width: 100%;
}

.demand-dropzone:hover {
  background: var(--accent-50);
  border-color: var(--accent);
}

.demand-dropzone.drag {
  background: var(--accent-50);
  border-color: var(--accent);
}

.demand-dropzone-icon {
  align-items: center;
  background: var(--accent-50);
  border-radius: 999px;
  color: var(--accent);
  display: inline-flex;
  font-size: 28px;
  font-weight: 700;
  height: 52px;
  justify-content: center;
  line-height: 1;
  width: 52px;
}

.demand-dropzone-title {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.demand-dropzone-sub {
  color: var(--ink-3);
  font-size: 14px;
}

.demand-file-input {
  display: none;
}

.demand-history {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.demand-history-head {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  padding: 18px 20px;
}

.demand-history-table-wrap {
  overflow-x: auto;
}

.demand-history-table {
  min-width: 720px;
  width: 100%;
}

.demand-history-table td {
  color: var(--ink);
}

.demand-history-action {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.demand-history-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.demand-history-download svg {
  width: 14px;
  height: 14px;
}

.demand-history-empty {
  color: var(--ink-3);
  font-size: 13px;
  padding: 18px 20px;
  text-align: center;
}

.demand-history-meta {
  color: var(--ink-4);
  font-size: 11px;
  margin-top: 3px;
}

.demand-history-error {
  color: var(--danger);
  font-size: 11px;
  margin-top: 3px;
}

.demand-file-name {
  font-family: var(--mono);
  font-size: 12px;
}

.wdd-strip {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px 16px;
}

.wdd-title {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.ed-section-meta {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
}

.shift-save-template {
  margin-left: auto;
}

.mandatory-days-template-card {
  align-items: flex-start;
  flex-direction: column;
  gap: 12px;
}

.mandatory-days-template-copy {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ed-callout {
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 13px;
  margin-bottom: 16px;
  padding: 13px 16px;
}

.ed-callout-info {
  background: var(--blue-50);
}

.wdd-state-tag {
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
  text-transform: uppercase;
}

.wdd-state-future {
  background: var(--blue-50);
  color: var(--blue);
}

.wdd-state-past {
  background: var(--hover);
  color: var(--ink-4);
}

.ed-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 14px 0;
  padding: 14px 16px;
}

.ed-section-head {
  align-items: center;
  display: flex;
  gap: 12px;
}

.ed-section-label {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ed-empty-hint {
  color: var(--ink-4);
  font-size: 13px;
  margin: 10px 0 0;
}

.ed-toggle-label {
  align-items: flex-start;
  cursor: pointer;
  display: flex;
  gap: 10px;
}

.ed-toggle-label input {
  margin-top: 2px;
}

.ed-toggle-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.ed-toggle-sub {
  color: var(--ink-4);
  font-size: 12px;
  margin-top: 2px;
}

.cfg-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cfg-shift {
  background: var(--surface);
  border-radius: 10px;
  padding: 18px 16px 20px;
}

.cfg-shift-collapsed {
  padding: 10px 16px;
}

.cfg-shift-head {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.cfg-shift-collapsed .cfg-shift-head {
  align-items: center;
  margin-bottom: 0;
}

.cfg-shift-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.cfg-shift-title {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 16px;
  font-weight: 700;
  gap: 6px;
  margin: 0;
}

.cfg-collapse-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--ink-3);
  display: inline-flex;
  height: 22px;
  justify-content: center;
  margin-left: -4px;
  padding: 0;
  width: 22px;
}

.cfg-collapse-toggle:hover {
  background: var(--hover);
  color: var(--ink);
}

.cfg-collapse-toggle svg {
  fill: none;
  height: 14px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  transform: rotate(90deg);
  transition: transform 0.14s ease;
  width: 14px;
}

.cfg-collapse-toggle.collapsed svg {
  transform: rotate(0deg);
}

.cfg-shift-window {
  align-items: center;
  display: flex;
  gap: 8px;
}

.cfg-window-fixed {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.cfg-shift-window input,
.slot-editor-row input {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  height: 34px;
  padding: 0 10px;
}

.slot-sep {
  color: var(--ink-3);
  font-size: 12px;
}

.ed-section-count {
  color: var(--ink-3);
  font-size: 12px;
  white-space: nowrap;
}

.cfg-rules {
  margin-bottom: 16px;
}

.cfg-mandatory-day-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cfg-mandatory-day-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink-2);
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  height: 34px;
  justify-content: center;
  min-width: 82px;
  padding: 0 12px;
  transition:
    background-color 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}

.cfg-mandatory-day-card:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cfg-mandatory-day-card.selected {
  background: #0b4f3f;
  border-color: #0b4f3f;
  color: #fff;
}

.cfg-mandatory-day-card.selected:hover {
  color: #fff;
}

.ed-row {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.ed-label {
  color: var(--ink-2);
  font-size: 13px;
}

.currency-input {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  display: inline-flex;
  height: 34px;
  overflow: hidden;
}

.currency-input-sym {
  color: var(--ink-3);
  font-size: 12px;
  padding-left: 10px;
}

.currency-input input {
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  height: 100%;
  outline: none;
  padding: 0 10px 0 5px;
  width: 60px;
}

.cfg-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 8px;
}

.cfg-block {
  margin-top: 15px;
}

.cfg-block-label {
  color: var(--ink-4);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.slots-editor {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slot-editor-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slot-editor-row .currency-input input {
  width: 56px;
}

.btn-add-slot {
  background: var(--accent-50);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger-text {
  color: var(--danger);
}

.ed-empty {
  color: var(--ink-4);
  font-size: 13px;
  font-style: italic;
}

.rider-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rider-row {
  align-items: center;
  background: var(--surface-2);
  border-radius: 7px;
  display: flex;
  gap: 12px;
  padding: 10px 12px;
}

.rider-row-initials,
.rider-chip-initials {
  align-items: center;
  background: var(--purple-50);
  border-radius: 999px;
  color: var(--purple);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.rider-row-name-wrap {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.rider-row-name {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 14px;
  font-weight: 600;
  gap: 8px;
}

.rider-row-meta {
  color: var(--ink-4);
  font-family: var(--mono);
  font-size: 11px;
  margin-top: 2px;
}

.rider-move-select {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 12px;
  height: 32px;
  padding: 0 8px;
}

.btn-mark-off {
  color: var(--ink-3);
  min-width: 32px;
}

.btn-mark-leave {
  background: var(--warn-50);
  border-color: #efcf93;
  color: var(--warn);
  min-width: 96px;
}

.btn-mark-leave:hover:not(:disabled) {
  background: #f5e5c5;
}

.btn-mark-leave:disabled {
  cursor: default;
  opacity: 0.65;
}

.rider-leave-pill {
  background: var(--warn-50);
  border-radius: 999px;
  color: var(--warn);
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
  white-space: nowrap;
}

.rider-add {
  margin-top: 10px;
}

.rider-add summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style-position: inside;
}

.rider-add-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.rider-add-chip {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  gap: 8px;
  padding: 6px 12px 6px 7px;
}

.rider-add-chip:hover {
  border-color: var(--accent);
}

.hcov-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.hcov-head {
  border-bottom: 1px solid var(--line);
  padding: 13px 16px;
  flex-direction: row;
}

.hcov-title {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hcov-sub {
  color: var(--ink-4);
  font-size: 12px;
  margin-left: 8px;
}

.hcov-grid-wrap {
  display: grid;
  gap: 6px;
  grid-template-columns: 72px minmax(1000px, 1fr);
  overflow-x: auto;
  padding: 14px 16px 18px;
}

.hcov-row {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(18, minmax(48px, 1fr));
}

.hcov-row-label {
  align-items: center;
  color: var(--ink-2);
  display: flex;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hcov-label-time {
  min-height: 32px;
}

.hcov-row-time {
  align-items: end;
  min-height: 32px;
}

.hcov-col-time {
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
}

.hcov-ampm {
  color: var(--ink-3);
  font-size: 9px;
  font-weight: 500;
  margin-top: 2px;
}

.hcov-work-cell,
.hcov-need-cell,
.hcov-demand-cell {
  align-items: center;
  border-radius: 6px;
  display: flex;
  height: 42px;
  justify-content: center;
  min-width: 48px;
  position: relative;
}

.hcov-work-cell {
  color: #fff;
  overflow: hidden;
}

.hcov-ok {
  background: var(--accent);
}

.hcov-warn {
  background: #e07b20;
}

.hcov-danger {
  background: #d14747;
}

.hcov-work-future {
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.hcov-now {
  box-shadow: 0 0 0 5px var(--accent-50);
}

.hcov-now-pulse {
  animation: shift-now-pulse 1.4s ease-out infinite;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  inset: 0;
  position: absolute;
}

.hcov-work-num,
.hcov-need-num {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 800;
  position: relative;
}

.hcov-need-cell {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  height: 32px;
}

.hcov-demand-cell {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  height: 40px;
}

.hcov-demand-num {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 800;
}

.hcov-need-num.is-warn {
  color: var(--warn);
}

.hcov-need-num.is-danger {
  color: var(--danger);
}

.hcov-need-under {
  color: var(--danger);
}

.lrt-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.calendar-past-riders {
  margin-top: 16px;
}

.lrt-head {
  border-bottom: 1px solid var(--line);
  padding: 13px 16px;
}

.lrt-title {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lrt-table-wrap {
  overflow-x: auto;
}

.lrt-table {
  min-width: 760px;
}

.lrt-table th {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  text-align: left;
  text-transform: uppercase;
}

.lrt-table td {
  border-top: 1px solid var(--line);
  padding: 12px 16px;
}

.lrt-pagination {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  padding: 12px 16px;
}

.lrt-pagination button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  padding: 6px 10px;
}

.lrt-pagination button:disabled {
  color: var(--ink-4);
  cursor: default;
  opacity: 0.45;
}

.lrt-page-info,
.lrt-pagination-total {
  color: var(--ink-3);
  font-size: 13px;
}

.lrt-pagination-total {
  margin-left: auto;
}

.lrt-rider-cell {
  align-items: center;
  display: flex;
  gap: 10px;
}

.lrt-avatar {
  align-items: center;
  background: var(--purple-50);
  border-radius: 999px;
  color: var(--purple);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.lrt-name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.lrt-shift-tag {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.lrt-mono {
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 13px;
}

.lrt-status-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  padding: 5px 10px;
  white-space: nowrap;
}

.lrt-status-dot {
  border-radius: 999px;
  height: 7px;
  width: 7px;
}

.lrt-status-returning {
  background: var(--pink-50);
  color: var(--pink);
}

.lrt-status-returning .lrt-status-dot {
  background: var(--pink);
}

.lrt-status-available,
.lrt-status-awaiting {
  background: var(--accent-50);
  color: var(--accent);
}

.lrt-status-available .lrt-status-dot,
.lrt-status-awaiting .lrt-status-dot {
  background: var(--accent);
}

.lrt-status-at-store,
.lrt-status-picking {
  background: var(--purple-50);
  color: var(--purple);
}

.lrt-status-at-store .lrt-status-dot,
.lrt-status-picking .lrt-status-dot {
  background: #9b72cf;
}

.lrt-status-assigned,
.lrt-status-out {
  background: var(--warn-50);
  color: var(--warn);
}

.lrt-status-assigned .lrt-status-dot,
.lrt-status-out .lrt-status-dot {
  background: #e07b20;
}

.lrt-status-on-road {
  background: var(--blue-50);
  color: var(--blue);
}

.lrt-status-on-road .lrt-status-dot {
  background: #4494f0;
}

.lrt-status-blocked {
  background: var(--danger-50);
  color: var(--danger);
}

.lrt-status-blocked .lrt-status-dot {
  background: var(--danger);
}

.lrt-status-offline {
  background: var(--hover);
  color: var(--ink-3);
}

.lrt-status-offline .lrt-status-dot {
  background: var(--ink-4);
}

@keyframes shift-now-pulse {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }

  70% {
    opacity: 0;
    transform: scale(1.12);
  }

  100% {
    opacity: 0;
    transform: scale(1.12);
  }
}

@media (max-width: 1100px) {

  .ledger-filter-row,
  .ledger-kpi-split {
    align-items: stretch;
    flex-direction: column;
  }

  .ledger-export {
    margin-left: 0;
    width: fit-content;
  }

  .journal-record {
    margin-left: 0;
  }

  .journal-record-row {
    justify-content: flex-start;
    margin-top: 0;
  }

  .ledger-rider-select {
    width: 100%;
  }

  .journal-event-select {
    width: 100%;
  }
}
/* ================ SHIFT CALENDAR ================ */
.cal-panel {
  margin-top: 26px;
}

.cal-nav {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.cal-nav .btn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  padding: 4px;
}

.cal-nav .btn:hover,
.cal-nav .btn:focus-visible {
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.cal-nav-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  min-width: 120px;
  text-align: center;
}

.cal-grid {
  display: grid;
  gap: 8px 12px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.cal-dow {
  color: var(--ink-4);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0 18px 4px;
  text-transform: uppercase;
}

.cal-cell {
  appearance: none;
  aspect-ratio: 2 / 1;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  padding: 8px;
  box-shadow: none;
  text-align: left;
  width: 100%;
}

.cal-cell:not(.cal-cell-blank):hover,
.cal-cell:not(.cal-cell-blank):focus-visible {
  background: var(--surface-2);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.cal-cell-blank {
  background: transparent;
  border-color: transparent;
  cursor: default;
  pointer-events: none;
  visibility: hidden;
}

.cal-cell-blank:hover {
  background: transparent;
}

.cal-cell-head {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
  width: 100%;
}

.cal-date {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  margin: 0;
  padding: 0;
}

.cal-cell-foot {
  color: var(--ink-4);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  padding: 0;
}

.cal-today {
  background: #0f7b5f;
  border-color: #0f7b5f;
}

.cal-cell.cal-today:hover,
.cal-cell.cal-today:focus-visible,
.cal-cell.cal-today:active {
  background: #0f7b5f;
  border-color: #0f7b5f;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.cal-today .cal-date,
.cal-today .cal-cell-foot {
  color: #fff;
}

.cal-today-badge {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  margin: 0;
  padding: 2px 6px;
}

.cal-empty {
  color: var(--ink-3);
  font-size: 13px;
  margin-bottom: 14px;
  padding: 0;
}

@media (max-width: 1100px) {
  .cal-panel {
    overflow-x: auto;
  }

  .cal-grid {
    min-width: 920px;
  }

  .cal-cell {
    aspect-ratio: 2 / 1;
    padding: 8px;
  }
}

/* A product tile showing its catalogue image instead of initials */
.item-tile-img {
  padding: 0;
  overflow: hidden;
  border: 1px solid #e6e7ea;
  box-sizing: border-box;
  background: #ffffff;
  font: inherit;
  cursor: zoom-in;
}

.item-tile-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ================ SIDEBAR ================ */
.wms-nav {
  width: 256px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fcfcfd;
  border-right: 1px solid #e6e7ea;
  color: #3c4047;
  z-index: 5;
  transition: width 0.15s ease, margin-right 0.15s ease;
}

/* Brand */
/* The toggle sits first at the same spot (centred in the 72px collapsed bar) in every state */
.navbrand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 16px 21px;
}

.navlogo {
  display: block;
  flex-shrink: 0;
}

.navtog {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #62666d;
  cursor: pointer;
}

.navtog:hover {
  background: #f0f1f3;
  color: #0f1011;
}

/* Nav list */
.navlist {
  flex-grow: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.navlink,
.navgroup {
  flex-shrink: 0;
}

.navlink {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #3c4047;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.1px;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.navlink:hover {
  background: #f0f1f3;
}

.navlink.active {
  color: #0f1011;
  font-weight: 600;
}

/* Group headers stay bold only; the page links get the tint */
a.navlink.active {
  background: rgba(94, 106, 210, 0.1);
}

a.navlink.active .navicon {
  color: #5e6ad2;
}

.navlink-nested {
  position: relative;
  height: 34px;
  font-size: 13.5px;
  font-weight: 400;
}

/* Tree dot sitting on the .navsub guide line */
.navlink-nested::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #c4c6cb;
  transform: translateY(-50%);
}

.navlink-nested.active {
  background: rgba(94, 106, 210, 0.1);
}

.navlink-nested.active .navicon {
  color: #5e6ad2;
}

.navlink-nested.active::before {
  background: #5e6ad2;
}

.navicon {
  display: inline-flex;
  color: #62666d;
}

.navlabel {
  overflow: hidden;
  text-overflow: ellipsis;
}

.navbadge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  background: #d93b3b;
  border-radius: 999px;
  padding: 1px 7px;
}

.navchev {
  margin-left: auto;
  display: inline-flex;
  color: #62666d;
  transform: rotate(-90deg);
  transition: transform 0.15s;
}

.navchev.open {
  transform: rotate(0deg);
}

.navsub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 19px;
  padding: 2px 0 4px 14px;
  border-left: 1px solid #e6e7ea;
}

/* Footer */
.navfoot {
  flex-shrink: 0;
  padding: 8px 16px;
  border-top: 1px solid #e6e7ea;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fcfcfd;
}

.navsetup {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 10px 6px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #62666d;
  text-align: left;
  cursor: pointer;
}

.navsetup:hover {
  background: #f0f1f3;
}

/* User */
.navuser {
  flex-shrink: 0;
  padding: 10px 16px 18px;
  border-top: 1px solid #e6e7ea;
  background: #fcfcfd;
}

.navuser-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #f7f8f8;
  color: #0f1011;
  text-decoration: none;
}

a.navuser-card:hover {
  background: #f0f1f3;
}

a.navuser-card.active {
  background: rgba(94, 106, 210, 0.1);
}

.navuser-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #62666d;
}

a.navuser-card.active .navuser-icon {
  color: #5e6ad2;
}

.navuser-label {
  flex-grow: 1;
  font-size: 13.5px;
  font-weight: 600;
}

/* Not a link yet (settings isn't integrated) */
.navuser-card.static {
  cursor: default;
}

.navavatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #3c4047;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.navuser-meta {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.navuser-name {
  font-size: 13.5px;
  font-weight: 600;
}

.navuser-role {
  font-size: 11.5px;
  color: #62666d;
}

.navuser-chev {
  display: inline-flex;
  color: #62666d;
}

/* Collapsed */
.wms-nav.collapsed {
  width: 72px;
}

.wms-nav.collapsed .navbrand {
  padding-right: 0;
}

/* Collapsed, opened by hovering the expand icon: full width over the page, nothing reflows */
.wms-nav.navpeek {
  margin-right: -184px;
  z-index: 20;
  box-shadow: 8px 0 24px rgba(15, 16, 17, 0.08);
}

.wms-nav.collapsed .navlist,
.wms-nav.collapsed .navfoot,
.wms-nav.collapsed .navuser {
  padding-left: 12px;
  padding-right: 12px;
}

.wms-nav.collapsed .navlink {
  position: relative;
  justify-content: center;
  padding: 0;
}

.wms-nav.collapsed .navsub {
  margin-left: 0;
  padding: 0;
  border-left: none;
}

.wms-nav.collapsed .navlink-nested::before {
  display: none;
}

.wms-nav.collapsed .navlogo,
.wms-nav.collapsed .navlabel,
.wms-nav.collapsed .navchev,
.wms-nav.collapsed .navfoot,
.wms-nav.collapsed .navuser-meta,
.wms-nav.collapsed .navuser-label,
.wms-nav.collapsed .navuser-chev {
  display: none;
}

.wms-nav.collapsed .navbadge {
  position: absolute;
  top: 2px;
  right: 4px;
  margin: 0;
  padding: 0 5px;
  font-size: 10px;
}

.wms-nav.collapsed .navuser-card {
  justify-content: center;
  padding: 4px;
}

/* Collapsed: a short code under each icon (CON, DSD, GRN…) so the narrow nav reads at a glance */
.navabbr {
  display: none;
}

.wms-nav.collapsed .navlink:has(.navabbr) {
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  height: auto;
  min-height: 42px;
  padding: 6px 0;
}

.wms-nav.collapsed .navabbr {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #8a8f98;
}

.wms-nav.collapsed .navlink.active .navabbr {
  color: #5e6ad2;
}

/* Collapsed: group headers give way to a divider; their links are always listed */
.wms-nav.collapsed .navgroup > .navlink {
  display: none;
}

.wms-nav.collapsed .navgroup {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid #e6e7ea;
}

/* ================ TOPBAR ================ */
.wms-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 28px;
  background: #ffffff;
  border-bottom: 1px solid #e6e7ea;
  flex-shrink: 0;
}

/* Store chip */
.hchip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 12.5px;
  background: #ffffff;
  color: #0f1011;
  white-space: nowrap;
}

.hchip b {
  font-weight: 600;
}

.hchip-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #1f8a3e;
  display: inline-block;
}

.hchip.all-stores {
  background: #f7f8f8;
  cursor: default;
}

.hchip.all-stores .hchip-dot {
  background: #4c56c4;
}

/* The store chip: one warehouse per environment, nothing to switch */
.wms-topbar > .hchip {
  flex-shrink: 0;
  cursor: default;
}

/* Search box: shared with the Live orders table */
.hsearch {
  flex-grow: 1;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  padding: 7px 12px;
  background: #f7f8f8;
  font-size: 12.5px;
  color: #62666d;
  cursor: text;
}

.hsearch:focus-within {
  border-color: #c9ccd1;
  background: #ffffff;
}

.hsearch input {
  flex-grow: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  color: #0f1011;
  padding: 0;
}

.hsearch input::placeholder {
  color: #62666d;
}

.hsearch input::-webkit-search-cancel-button {
  display: none;
}

.hsearch kbd {
  font-family: inherit;
  font-size: 11px;
  border: 1px solid #e6e7ea;
  border-radius: 5px;
  padding: 0 5px;
  background: #ffffff;
}

/* Live orders / Exceptions / Tasks buttons */
.tbset {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tbbtn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  box-sizing: border-box;
  padding: 0 11px;
  border: 1px solid #e6e7ea;
  border-radius: 9px;
  background: #ffffff;
  color: #0f1011;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.tbbtn:hover {
  background: #f7f8f8;
}

/* Live orders always; Exceptions while there's a new one not yet seen */
.tbbtn.tbblink {
  animation: tbblink 1.2s ease-in-out infinite;
}

@keyframes tbblink {
  50% {
    border-color: #eb5757;
    background: rgba(235, 87, 87, 0.08);
  }
}

/* The page the button opens is the one on screen */
.tbbtn.active {
  border-color: #c5c9f0;
  background: rgba(94, 106, 210, 0.06);
  color: #4c56c4;
}

.tbbtn.active .tbbtn-icon,
.tbbtn.active .tbbtn-tasks b {
  color: #4c56c4;
}

.tbbtn-icon {
  display: inline-flex;
  color: #62666d;
}

.tbcount {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}

.tbcount-warn {
  background: rgba(235, 87, 87, 0.12);
  color: #c52828;
}

.tbcount-alert {
  background: #d93b3b;
  color: #ffffff;
}

.tbbtn-sep {
  width: 1px;
  height: 16px;
  background: #e6e7ea;
}

.tbbtn-tasks {
  font-weight: 500;
}

.tbbtn-tasks b {
  font-weight: 700;
}

.tbbtn-label {
  color: #62666d;
}

/* Who's working: on a task now / started a shift today. Opens Users */
.tbpeople {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  box-sizing: border-box;
  padding: 0 12px;
  border-radius: 9px;
  background: #f3f4f5;
  color: #3c4047;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.tbpeople {
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
}

.tbpeople:hover {
  background: #e9eaec;
}

/* Users is the page on screen */
.tbpeople.active {
  border-color: #c5c9f0;
  background: rgba(94, 106, 210, 0.06);
  color: #4c56c4;
}

.tbpeople.active .tbbtn-icon,
.tbpeople.active b {
  color: #4c56c4;
}

.tbpeople b {
  font-weight: 700;
  color: #0f1011;
}

.tbpeople-total {
  color: #62666d;
}

/* ================ TASK MANAGEMENT ================ */

.tm-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(39, 166, 68, 0.1);
  color: #1f8a3e;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.tm-open {
  font-size: 12.5px;
  color: #62666d;
  white-space: nowrap;
}

.tm-open b {
  font-weight: 600;
  color: #0f1011;
}

/* Summary: three state cards, then who is on shift */
.tm-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  margin-bottom: 14px;
  align-items: stretch;
}

.tm-cards {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tm-card,
.tm-people {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 12px;
  background: #ffffff;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
}

.tm-card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: #0f1011;
}

.tm-card-title h2 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.tm-card-title .tm-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.tm-icon.warn {
  background: rgba(242, 153, 74, 0.16);
  color: #a45a0c;
}

.tm-icon.active {
  background: rgba(94, 106, 210, 0.12);
  color: #4c56c4;
}

.tm-icon.muted {
  background: #eef0f2;
  color: #3c4047;
}

.tm-icon.ok {
  background: rgba(39, 166, 68, 0.12);
  color: #1f8a3e;
}

.tm-card-foot {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-width: 0;
}

.tm-card-main {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: -4px 0 -4px -6px;
  padding: 4px 6px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.tm-card-main:hover {
  background: #f7f8f8;
}

.tm-big {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -1.2px;
  line-height: 1;
  color: #0f1011;
}

.tm-card-unit {
  font-size: 12.5px;
  color: #62666d;
  white-space: nowrap;
}

/* "⏱ 3 Delayed" */
.tm-delayed {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(235, 87, 87, 0.45);
  border-radius: 9px;
  background: rgba(235, 87, 87, 0.06);
  color: #c52828;
  font-family: inherit;
  cursor: pointer;
}

.tm-delayed:hover {
  background: rgba(235, 87, 87, 0.1);
}

/* Nothing delayed: grey and not clickable */
.tm-delayed.none {
  border-color: #e6e7ea;
  background: #f7f8f8;
  color: #8a8f98;
  cursor: default;
}

.tm-delayed-count {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.tm-delayed-label {
  font-size: 12.5px;
  font-weight: 600;
}

.tm-people-total {
  margin-left: auto;
  font-size: 16px;
  font-weight: 700;
  color: #0f1011;
}

.tm-people-tiles {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.tm-people-tile {
  min-width: 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f7f8f8;
}

.tm-people-value {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1.1;
  color: #0f1011;
}

.tm-people-value.adhoc {
  color: #6d28d9;
}

.tm-people-value.free {
  color: #8a8f98;
}

.tm-people-label {
  margin-top: 2px;
  font-size: 11.5px;
  color: #62666d;
  white-space: nowrap;
}

/* Task lists: one section per state */
.tm-section {
  margin-bottom: 14px;
  background: #ffffff;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  /* No overflow clip: the Reassign menu opens past the last row */
  scroll-margin-top: 16px;
}

.tm-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 34px;
  padding: 14px 20px;
  flex-wrap: wrap;
}

.tm-section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.tm-section-title h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.tm-section-count {
  font-size: 12.5px;
  color: #62666d;
}

.tm-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 112px minmax(0, 1fr) 132px 124px;
  gap: 16px;
  align-items: center;
}

.tm-head {
  padding: 9px 20px;
  background: #f7f8f8;
  border-top: 1px solid #e6e7ea;
  border-bottom: 1px solid #e6e7ea;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #62666d;
}

.tm-row {
  min-height: 55px;
  box-sizing: border-box;
  padding: 11px 20px;
  border-top: 1px solid #f0f1f3;
}

.tm-head + .tm-row {
  border-top: none;
}

.tm-row.late {
  background: rgba(235, 87, 87, 0.03);
}

/* Delayed rows after their Delayed pill is clicked: light red, blinking for 5s (5 × 1s) */
.tm-row.blink {
  animation: tm-row-blink 1s ease-in-out 5;
}

@keyframes tm-row-blink {
  0%,
  100% {
    background: rgba(235, 87, 87, 0.16);
  }
  50% {
    background: rgba(235, 87, 87, 0.03);
  }
}

/* First row of a new task type */
.tm-row.group {
  box-shadow: inset 0 1px 0 #d8d9dd;
}

/* No menus open out of this list, so it clips to its corners */
.tm-section.clip {
  overflow: clip;
}

.tm-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
  height: 34px;
  box-sizing: border-box;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  background: #ffffff;
  color: #8a8f98;
  cursor: text;
  flex-shrink: 0;
}

.tm-search.narrow {
  width: 260px;
}

.tm-search:focus-within {
  border-color: #c9ccd1;
}

.tm-search input {
  flex: 1 1 0%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  color: #0f1011;
}

.tm-search input::placeholder {
  color: #8a8f98;
}

.tm-search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #eef0f2;
  color: #62666d;
  cursor: pointer;
}

/* On time / Delayed */
.tm-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(39, 166, 68, 0.12);
  color: #1f8a3e;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.tm-status.late {
  background: rgba(235, 87, 87, 0.12);
  color: #c52828;
}

.tm-status.paused {
  background: rgba(109, 40, 217, 0.1);
  color: #6d28d9;
}

.tm-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.tm-row:last-child {
  border-radius: 0 0 12px 12px;
}

.tm-type-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tm-type {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.tm-type.red {
  background: rgba(235, 87, 87, 0.1);
  color: #c52828;
}

.tm-type.orange {
  background: rgba(242, 153, 74, 0.16);
  color: #a45a0c;
}

.tm-type.slate {
  background: rgba(71, 85, 105, 0.1);
  color: #475569;
}

.tm-type.teal {
  background: rgba(14, 116, 144, 0.12);
  color: #0e7490;
}

.tm-type.indigo {
  background: rgba(94, 106, 210, 0.12);
  color: #4c56c4;
}

.tm-type.purple {
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
}

/* Raised by a short pick */
.tm-origin {
  flex-shrink: 0;
  padding: 0 6px;
  border: 1px solid rgba(242, 153, 74, 0.6);
  border-radius: 5px;
  color: #a45a0c;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.tm-id {
  display: block;
  width: fit-content;
  max-width: 100%;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: #4c56c4;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-id:hover {
  text-decoration: underline;
}

.tm-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 92px;
  box-sizing: border-box;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(39, 166, 68, 0.12);
  color: #1f8a3e;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.tm-timer.near {
  background: rgba(242, 153, 74, 0.18);
  color: #a45a0c;
}

.tm-timer.late {
  background: #d93b3b;
  color: #ffffff;
}

/* Interrupted: frozen until the task is restarted */
.tm-timer.paused {
  background: rgba(109, 40, 217, 0.1);
  color: #6d28d9;
}

.tm-person {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  color: #0f1011;
  font-size: 13.5px;
  font-weight: 600;
}

.tm-person svg {
  flex-shrink: 0;
  color: #8a8f98;
}

/* Nobody on it yet */
.tm-person.none {
  color: #8a8f98;
  font-weight: 400;
}

.tm-person-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-action {
  display: flex;
  justify-content: flex-end;
}

/* The shared assign button, at this table's size */
.tm-action .btn-arrive {
  height: 32px;
  font-size: 13px;
}

/* Reassign / Cancel, and the dialog it opens above the row */
.tm-row {
  position: relative;
}

.tm-reassign-toggle {
  height: 32px;
  padding: 0 14px;
  border: 1px solid #5e6ad2;
  border-radius: 8px;
  background: #5e6ad2;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.tm-reassign-toggle.open {
  border-color: #e6e7ea;
  background: #ffffff;
  color: #0f1011;
}

/* ---- Not assigned: details, created, Prioritise ---- */

.tm-grid.unassigned {
  grid-template-columns: minmax(170px, 0.9fr) 180px minmax(0, 1.4fr) 112px 110px 140px;
}

/* The kind chip, with "Prioritised" under it */
.tm-type-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.tm-details {
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: #0f1011;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* A document id, e.g. a putaway's GRN number */
.tm-details.mono {
  font-family: var(--mono);
}

.tm-created {
  font-size: 13px;
  color: #3c4047;
  white-space: nowrap;
}

.tm-prioritise {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid #5e6ad2;
  border-radius: 8px;
  background: #5e6ad2;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.tm-prioritise:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* "↑ PRIORITY" above the kind chip */
.tm-priority-label {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #4c56c4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Where Prioritise was: a state, not a button (there's no un-bump) */
.tm-prioritised {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  box-sizing: border-box;
  padding: 0 14px;
  border: 1px solid rgba(94, 106, 210, 0.5);
  border-radius: 8px;
  background: #ffffff;
  color: #4c56c4;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* Prioritised: tinted, with an accent rail down the left */
.tm-row.prioritised {
  background: rgba(94, 106, 210, 0.043);
  box-shadow: inset 3px 0 0 #5e6ad2;
}

.tm-row.prioritised.group {
  box-shadow:
    inset 3px 0 0 #5e6ad2,
    inset 0 1px 0 #d8d9dd;
}

.tm-row.clickable.prioritised:hover {
  background: rgba(94, 106, 210, 0.09);
}

.tm-dialog {
  position: absolute;
  bottom: 62px;
  right: 20px;
  z-index: 31;
  width: 380px;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 16, 17, 0.18);
}

/* Auto-assign confirm: opens down over the row */
.tm-dialog.down {
  top: -6px;
  bottom: auto;
}

.tm-dialog-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.tm-dialog-title {
  font-size: 13.5px;
  font-weight: 600;
}

.tm-dialog-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #62666d;
  cursor: pointer;
}

.tm-dialog-icon-btn:hover {
  background: #f3f4f5;
}

.tm-dialog-close {
  margin-left: auto;
}

.tm-dialog-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px 0 4px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #3c4047;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.tm-dialog-back:hover {
  background: #f3f4f5;
}

.tm-dialog-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a8f98;
}

.tm-goes-to {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(94, 106, 210, 0.45);
  border-radius: 10px;
  background: rgba(94, 106, 210, 0.05);
}

.tm-goes-to .tm-option-icon.auto {
  background: rgba(94, 106, 210, 0.14);
}

.tm-goes-to-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0f1011;
}

.tm-goes-to .tm-option-sub {
  margin-top: 2px;
}

.tm-dialog-note {
  margin-top: 6px;
  font-size: 12px;
  color: #62666d;
}

.tm-dialog-question {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #0f1011;
}

.tm-dialog-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.tm-dialog-btn {
  flex: 1 1 0%;
  height: 36px;
  border: none;
  border-radius: 9px;
  background: #5e6ad2;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.tm-dialog-btn:hover {
  background: #4c56c4;
}

.tm-dialog-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tm-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e6e7ea;
  border-radius: 10px;
  background: #ffffff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.tm-option:hover:not(:disabled) {
  border-color: #c9ccd1;
  background: #fbfbfc;
}

.tm-option:disabled {
  opacity: 0.5;
  cursor: default;
}

.tm-option > svg {
  color: #8a8f98;
}

.tm-option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f3f4f5;
  color: #3c4047;
}

.tm-option-icon.auto {
  background: rgba(94, 106, 210, 0.12);
  color: #4c56c4;
}

.tm-option-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #0f1011;
}

.tm-option-sub {
  display: block;
  font-size: 12px;
  color: #62666d;
}

.tm-grow {
  flex: 1 1 0%;
}

/* "Search a name" above the people list */
.tm-dialog-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  margin-bottom: 6px;
  padding: 0 10px;
  border-radius: 8px;
  background: #f3f4f5;
  color: #8a8f98;
}

.tm-dialog-search input {
  flex: 1 1 0%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: #0f1011;
}

.tm-dialog-people {
  max-height: 300px;
  margin: 0 -4px;
  overflow-y: auto;
}

/* A person to pick: name, the task they're on, and how long they've been on it */
.tm-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.tm-pick:hover:not(:disabled) {
  background: #f3f4f5;
}

.tm-pick:disabled {
  opacity: 0.5;
  cursor: default;
}

.tm-pick-name {
  flex: 1 1 0%;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #0f1011;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-type.sm {
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 11px;
}

.tm-type.free {
  background: rgba(39, 166, 68, 0.12);
  color: #1f8a3e;
}

.tm-pick-time {
  width: 64px;
  text-align: right;
  font-size: 12.5px;
  font-weight: 600;
  color: #1f8a3e;
  white-space: nowrap;
}

.tm-pick-time.late {
  color: #c52828;
}

.tm-dialog-empty {
  padding: 10px;
  font-size: 12.5px;
  color: #8a8f98;
}

.tm-empty {
  padding: 18px 20px;
  border-top: 1px solid #f0f1f3;
  font-size: 13px;
  color: #8a8f98;
}

/* Column headers stay in view while the page scrolls */
.tm-head {
  position: sticky;
  top: 0;
  z-index: 3;
}

/* Any row opens the task's drawer */
.tm-row.clickable {
  cursor: pointer;
}

.tm-row.clickable:hover {
  background: #f7f8f8;
}

.tm-row.clickable.late:hover {
  background: rgba(235, 87, 87, 0.06);
}

.tm-row.clickable:focus-visible {
  outline: 2px solid #5e6ad2;
  outline-offset: -2px;
}

/* ================ TASK DRAWER ================ */
.order-drawer.task-drawer {
  width: min(66vw, 960px);
  min-width: 560px;
  max-width: 100vw;
}

.td-head {
  flex-shrink: 0;
  padding: 18px 22px 16px;
  border-bottom: 1px solid #e6e7ea;
}

.td-chips {
  display: flex;
  align-items: center;
  gap: 8px;
}

.td-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.td-pill.late {
  background: rgba(235, 87, 87, 0.12);
  color: #c52828;
}

.td-pill.ok {
  background: rgba(39, 166, 68, 0.12);
  color: #15753a;
}

.td-pill.paused {
  background: rgba(109, 40, 217, 0.1);
  color: #6d28d9;
}

.td-pill.idle {
  background: #f0f1f3;
  color: #3c4047;
}

.td-close {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  background: #ffffff;
  color: #3c4047;
  cursor: pointer;
}

.td-close:hover {
  background: #f7f8f8;
}

.td-id {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 600;
  color: #0f1011;
}

.td-subject {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 500;
  color: #3c4047;
}

.td-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 22px 28px;
}

.td-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

.td-banner.late {
  background: rgba(235, 87, 87, 0.08);
  color: #c52828;
}

.td-banner.paused {
  background: rgba(109, 40, 217, 0.08);
  color: #6d28d9;
}

.td-label {
  margin: 0 0 8px 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3c4047;
}

/* Sections after the facts grid (totes, timeline) sit a little further down */
.td-facts ~ .td-label {
  margin-top: 20px;
}

/* Tables: the grid template comes from the component */
.td-table {
  margin-bottom: 14px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  overflow: hidden;
}

.td-facts + .td-label + .td-table {
  margin-bottom: 0;
}

.td-grid {
  display: grid;
  gap: 8px;
  align-items: center;
  padding: 9px 14px;
}

.td-thead {
  padding: 8px 14px;
  background: #f7f8f8;
  border-bottom: 1px solid #e6e7ea;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #3c4047;
}

.td-row + .td-row {
  border-top: 1px solid #f0f1f3;
}

.td-cell-wrap {
  min-width: 0;
}

.td-line {
  font-size: 12.5px;
  font-weight: 600;
  color: #0f1011;
  overflow-wrap: anywhere;
}

.td-line.mono {
  font-family: var(--mono);
}

.td-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.td-sub {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #62666d;
}

.td-cell {
  font-size: 12.5px;
  font-weight: 500;
  color: #0f1011;
  overflow-wrap: anywhere;
}

.td-cell.strong {
  font-weight: 600;
}

.td-cell.muted {
  color: #62666d;
}

.td-cell.good {
  color: #15753a;
}

.td-cell.bad {
  font-weight: 600;
  color: #c52828;
}

/* Progress */
.td-card {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
}

.td-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.td-stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #3c4047;
}

.td-stat-value {
  margin-top: 2px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.6px;
  color: #0f1011;
}

.td-stat-value.good {
  color: #15753a;
}

.td-stat-value.bad {
  color: #b91c1c;
}

.td-bar {
  display: flex;
  gap: 2px;
  height: 6px;
  margin-top: 12px;
  border-radius: 3px;
  overflow: hidden;
  background: #eceef1;
}

.td-bar .good {
  background: #27a644;
}

.td-bar .bad {
  background: #eb5757;
}

/* Who, how long, SLA (and the short pick behind it) */
.td-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  overflow: hidden;
}

.td-fact {
  padding: 11px 14px;
  border-right: 1px solid #f0f1f3;
  border-bottom: 1px solid #f0f1f3;
  margin: 0 -1px -1px 0;
}

.td-fact-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #62666d;
}

.td-fact-value {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 600;
  color: #0f1011;
  overflow-wrap: anywhere;
}

/* Timeline */
.td-timeline {
  padding: 4px 4px 0;
}

.td-event {
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
}

.td-event-time {
  width: 64px;
  flex-shrink: 0;
  font-size: 12.5px;
  color: #62666d;
}

.td-event-text {
  font-size: 13.5px;
  color: #0f1011;
}

/* Loading, gone or failed */
.td-state {
  padding: 24px 4px;
  font-size: 13.5px;
  color: #62666d;
}

/* ---- GRN side panel (GRN, its putaways, one putaway) ---- */

/* "← All putaways": back to the view this one was opened from */
.td-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: -4px 0 10px -2px;
  padding: 2px;
  border: none;
  background: none;
  color: #4c56c4;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.td-back:hover {
  text-decoration: underline;
}

.td-pill.active {
  background: rgba(94, 106, 210, 0.12);
  color: #4c56c4;
}

.td-fact-value.mono {
  font-family: var(--mono);
}

/* Nothing to count yet, e.g. "Counts arrive when the GRN is submitted" */
.td-note {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7f8f8;
  font-size: 13px;
  color: #62666d;
}

/* "Putaway · 17 putaways · 14 done ›": opens the putaway list */
.td-linkrow {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #ffffff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.td-linkrow:hover,
.td-rowbtn:hover {
  background: #f7f8f8;
}

.td-linkrow svg {
  margin-left: auto;
  color: #666a72;
}

.td-linkrow-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f1011;
}

.td-facts + .td-putaways {
  margin-top: 14px;
}

.td-putaway-grid {
  grid-template-columns: minmax(0, 1.2fr) 160px minmax(0, 1fr) 110px 20px;
  gap: 12px;
}

/* A putaway row opens that putaway */
.td-rowbtn {
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-top: 1px solid #f0f1f3;
  background: #ffffff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.td-thead + .td-rowbtn {
  border-top: none;
}

.td-rowbtn svg {
  color: #666a72;
}

.td-line.muted {
  color: #62666d;
}

.td-right {
  text-align: right;
}

/* ================ RETURNS ================ */

.rt-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 14px;
  margin-bottom: 14px;
}

/* The avg time strip sits at the bottom of its card */
.rt-cards .kpi-card-body {
  flex: 1 1 auto;
}

.rt-cards .kpi-group:has(.kpi-strip) {
  margin-top: auto;
}

.rt-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  background: #ffffff;
  color: #3c4047;
  cursor: pointer;
}

.rt-icon-btn:hover:not(:disabled) {
  background: #f7f8f8;
}

.rt-icon-btn:disabled {
  color: #b0b4bb;
  cursor: default;
}

/* Returns list */
.rt-table {
  background: #ffffff;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  overflow: clip;
}

.rt-table-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  flex-wrap: wrap;
}

.rt-table-head h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

/* The summary tile filtering the list */
.rt-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(94, 106, 210, 0.45);
  border-radius: 999px;
  background: rgba(94, 106, 210, 0.06);
  color: #4c56c4;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.rt-table-tools {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.rt-table-tools .tm-search {
  margin-left: 0;
}

.rt-avg {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(39, 166, 68, 0.35);
  border-radius: 8px;
  background: rgba(39, 166, 68, 0.08);
  font-size: 12px;
  color: #3c4047;
  white-space: nowrap;
}

.rt-avg b {
  font-size: 13.5px;
  font-weight: 600;
  color: #1f8a3e;
}

.rt-grid {
  display: grid;
  grid-template-columns:
    150px minmax(72px, 0.5fr) minmax(64px, 0.4fr) 80px
    minmax(282px, 2.4fr) minmax(282px, 2.4fr);
  gap: 20px;
}

.rt-header {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 9px 24px;
  background: #f7f8f8;
  border-top: 1px solid #e6e7ea;
  border-bottom: 1px solid #e6e7ea;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #62666d;
}

.rt-header .rt-stage {
  align-items: center;
}

.rt-header .rt-stage-sep {
  background: #e6e7ea;
}

.rt-row {
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid #f0f1f3;
  font-size: 12.5px;
}

.rt-header + .rt-row {
  border-top: none;
}

.rt-return {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

.rt-order {
  display: block;
  width: fit-content;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: #4c56c4;
}

.rt-customer {
  display: block;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rt-strong {
  display: block;
  font-weight: 600;
}

.rt-sub {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  color: #62666d;
}

/* GRN / putaway: time | label, bar, links */
.rt-stage {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rt-stage-time {
  flex: 0 0 96px;
  min-width: 0;
}

.rt-stage-sep {
  align-self: stretch;
  width: 1px;
  background: #eff0f2;
}

.rt-stage-body {
  flex: 1 1 0%;
  min-width: 0;
}

.rt-stage-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.rt-stage-label {
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rt-stage-label.good {
  color: #1f8a3e;
}

.rt-stage-label.warn {
  color: #a45a0c;
}

.rt-stage-label.bad {
  color: #c52828;
}

.rt-stage-label.muted {
  color: #8a8f98;
}

.rt-stage-label.strong {
  color: #0f1011;
}

.rt-assign {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  background: #5e6ad2;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.rt-assign:hover {
  background: #4c56c4;
}

.rt-bar {
  display: flex;
  gap: 1px;
  width: 100%;
  height: 5px;
  margin-top: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: #eff0f2;
}

.rt-bar .good {
  background: #27a644;
}

.rt-bar .bad {
  background: #d93b3b;
}

.rt-stage-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 6px;
}

.rt-link {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: #4c56c4;
  text-decoration: none;
  white-space: nowrap;
}

.rt-link:hover {
  text-decoration: underline;
}

/* The shared issue pill, inline with the GRN link */
.rt-issue {
  margin-top: 0;
  text-decoration: none;
}

.rt-none {
  color: #8a8f98;
}

/* GRN / putaway time */
.rt-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(39, 166, 68, 0.12);
  color: #1f8a3e;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.rt-time.near {
  background: rgba(242, 153, 74, 0.18);
  color: #a45a0c;
}

.rt-time.late {
  background: rgba(235, 87, 87, 0.12);
  color: #c52828;
}

/* Still running: solid once it needs attention */
.rt-time.running.near {
  background: #c2700c;
  color: #ffffff;
}

.rt-time.running.late {
  background: #c52828;
  color: #ffffff;
}

.rt-empty {
  padding: 18px 24px;
  border-top: 1px solid #f0f1f3;
  font-size: 13px;
  color: #8a8f98;
}

.rt-actions {
  gap: 10px;
}

/* ================ PAGE ================ */
.num {
  font-variant-numeric: tabular-nums;
}

.wms-page {
  padding: 18px 32px 80px;
  max-width: 1440px;
}

.wms-page-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 4px 0 16px;
}

.wms-page-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 25px;
  letter-spacing: -0.6px;
  color: #0f1011;
}

.wms-page-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(94, 106, 210, 0.1);
  color: #4c56c4;
}

.wms-page-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}

/* Refresh icon spins while the APIs reload */
.btn-ghost.spinning svg {
  animation: refresh-spin 0.8s linear infinite;
}

@keyframes refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================ DATE SWITCHER ================ */
.dswitch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: #eff0f2;
}

.dseg {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border: none;
  border-radius: 7px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #62666d;
  cursor: pointer;
  white-space: nowrap;
}

.dseg:hover:not(:disabled) {
  color: #0f1011;
}

.dseg.active,
.dpick.active {
  background: #ffffff;
  box-shadow:
    0 0 0 1px #e6e7ea,
    0 1px 2px rgba(15, 16, 17, 0.06);
}

.dseg.active {
  font-weight: 600;
  color: #0f1011;
}

.dseg-icon {
  justify-content: center;
  width: 28px;
  padding: 0;
  color: #3c4047;
}

.dseg-icon:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.dpick {
  display: inline-flex;
  align-items: center;
  height: 30px;
  border-radius: 7px;
}

.dpick-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 500;
  color: #62666d;
  white-space: nowrap;
  cursor: pointer;
}

.dpick.active .dpick-label {
  font-weight: 600;
  color: #0f1011;
}

/* Native date input sits invisibly over the label */
.dpick-label input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: none;
  padding: 0;
  cursor: pointer;
}

.dpick-label input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* ================ KPI CARDS ================ */
.kpi-row {
  display: grid;
  grid-template-columns:
    minmax(0, 1.14fr) minmax(0, 1.06fr) minmax(0, 1.06fr)
    minmax(0, 0.68fr);
  gap: 14px;
  margin-bottom: 14px;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kpi-card-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 4px;
}

.kpi-card-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: #0f1011;
}

.kpi-live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(39, 166, 68, 0.1);
  font-size: 11.5px;
  font-weight: 600;
  color: #1f8a3e;
  white-space: nowrap;
}

.livedot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  display: inline-block;
}

.livedot.livegreen {
  background: #27a644;
}

.livedot.livewarn {
  background: #f2994a;
}

.livedot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: livepulse 1.8s ease-out infinite;
}

@keyframes livepulse {
  from {
    transform: scale(1);
    opacity: 0.6;
  }
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}

.kpi-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px 2px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a8f98;
}

.kpi-group:first-child .kpi-group-label {
  padding-top: 0;
}

.kpi-group-rule {
  flex: 1 1 0%;
  height: 1px;
  background: #f0f1f3;
}

.kpi-grid {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

/* Tile */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2px;
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #ffffff;
  font-family: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.tile.static {
  cursor: default;
}

/* Grey tiles, e.g. the returns GRN / putaway cards */
.kpi-grid.filled .tile:not(.hot) {
  background: #f4f5f6;
}

.kpi-grid.filled .tile:not(.static):not(.hot):hover {
  background: #eceef0;
}

.kpi-grid.filled .tile.selected:not(.hot) {
  background: rgba(94, 106, 210, 0.06);
}

/* Live orders' stage-card tiles don't react to hover */
.tile:not(.static):not(.stage-tile):not(.stage-row-tile):hover {
  background: #f7f8f8;
}

.tile.hot {
  border-color: #f2c4c4;
  background: #fdf5f5;
}

.tile.hot:not(.stage-tile):not(.stage-row-tile):hover {
  background: #fbeaea;
}

.tile.selected {
  border-color: #5e6ad2;
  background: rgba(94, 106, 210, 0.06);
}

.tile.hot.selected {
  border-color: #c52828;
  background: #fbeaea;
}

.tile:focus-visible {
  outline: 2px solid #5e6ad2;
  outline-offset: 1px;
}

/* Divider after a tile */
.tile.tsep::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  right: -3px;
  width: 1px;
  background: #e6e7ea;
}

.tile-arrow {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  color: #c52828;
}

.tile-value-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 6px;
}

.tile-value {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.8px;
  line-height: 1.1;
  color: #0f1011;
}

.tile-value.size-md {
  font-size: 22px;
}

.tile-value.size-sm {
  font-size: 20px;
}

.tile-value.tone-muted {
  color: #8a8f98;
}

.tile-value.tone-success {
  color: #1f8a3e;
}

.tile-value.tone-danger {
  color: #c52828;
}

.tile-delta {
  font-size: 12px;
  font-weight: 600;
}

.tile-delta.tone-success {
  color: #1f8a3e;
}

.tile-delta.tone-danger {
  color: #d93b3b;
}

.tile-delta.tone-muted {
  color: #62666d;
}

.tile-sub.tone-danger {
  font-weight: 600;
  color: #c52828;
}

.tile-label,
.tile-sub {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-label {
  font-size: 12.5px;
  font-weight: 500;
  color: #3c4047;
}

.tile-sub {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 18px;
  line-height: 18px;
  font-size: 11.5px;
  font-weight: 400;
  color: #62666d;
}

.tile.hot .tile-label,
.tile.hot .tile-sub {
  font-weight: 600;
  color: #c52828;
}

/* One-line metric with a comparison, e.g. average GRN time vs yesterday */
.kpi-strip {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #f3f4f5;
  white-space: nowrap;
  overflow: hidden;
}

.kpi-strip-value {
  font-size: 13.5px;
  font-weight: 600;
}

.kpi-strip-value.tone-success {
  color: #1f8a3e;
}

.kpi-strip-value.tone-warn {
  color: #a45a0c;
}

.kpi-strip-value.tone-danger {
  color: #c52828;
}

.kpi-strip-value.tone-muted {
  color: #8a8f98;
}

.kpi-strip-delta {
  font-size: 11.5px;
  font-weight: 600;
}

.kpi-strip-delta.tone-danger {
  color: #c52828;
}

.kpi-strip-delta.tone-success {
  color: #1f8a3e;
}

.kpi-strip-compare {
  margin-left: auto;
  font-size: 12px;
  color: #62666d;
}

.kpi-strip-compare-value {
  font-size: 12.5px;
  font-weight: 600;
  color: #3c4047;
}

/* ASNs page: centred like Inventory lookup's landing */
.asn-sub {
  margin: -6px 0 26px;
  text-align: center;
  font-size: 14px;
  color: #62666d;
}

.asn-create {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 24px;
  border: 1.5px dashed #c9ccd1;
  border-radius: 14px;
  background: #ffffff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.12s ease,
    background 0.12s ease;
}

.asn-create:hover,
.asn-create.over {
  border-color: #5e6ad2;
  background: rgba(94, 106, 210, 0.04);
}

.asn-create-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(94, 106, 210, 0.1);
  color: #4c56c4;
}

.asn-create-text {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.asn-create-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f1011;
}

.asn-create-sub {
  font-size: 13.5px;
  color: #62666d;
}

.asn-create-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 9px;
  background: #5e6ad2;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.asn-create:hover .asn-create-cta {
  background: #4c56c4;
}

/* ================ WMS CARD ================ */
.wms-card {
  background: #ffffff;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  overflow: hidden;
}

.wms-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
}

.wms-card-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: #0f1011;
}

.wms-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(94, 106, 210, 0.1);
  color: #4c56c4;
}

.wms-card-meta {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: #62666d;
}

.wms-card-metrics {
  margin-left: auto;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

/* "Avg GRN time 3h 31m" — red over the limit, green within */
.metric-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  white-space: nowrap;
}

.metric-chip-label {
  font-size: 12px;
  color: #3c4047;
}

.metric-chip-value {
  font-size: 13.5px;
  font-weight: 600;
}

.metric-chip.danger {
  border-color: rgba(235, 87, 87, 0.4);
  background: rgba(235, 87, 87, 0.07);
}

.metric-chip.danger .metric-chip-value {
  color: #c52828;
}

.metric-chip.success {
  border-color: rgba(39, 166, 68, 0.35);
  background: rgba(39, 166, 68, 0.08);
}

.metric-chip.success .metric-chip-value {
  color: #1f8a3e;
}

.metric-chip.info {
  border-color: rgba(94, 106, 210, 0.35);
  background: rgba(94, 106, 210, 0.08);
}

.metric-chip.info .metric-chip-value {
  color: #4c56c4;
}

/* Title + pills row inside the table — scrolls with it */
table.dt.wms-table thead tr.table-top-row th {
  padding: 14px 13px 12px;
  background: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: #0f1011;
}

table.dt.wms-table thead tr.table-top-row th.col-first {
  padding-left: 24px;
  background: #ffffff;
}

table.dt.wms-table thead tr.table-top-row th::before {
  display: none;
}

table.dt.wms-table thead tr.table-top-row .wms-card-title {
  font-size: 14.5px;
}

.wms-card-meta b {
  font-size: 17px;
  font-weight: 600;
  color: #0f1011;
}

/* Table sits flush inside the card */
.wms-card .table-wrap {
  border: none;
  border-radius: 0;
}

/* ================ WMS TABLE ================ */
table.dt.wms-table {
  min-width: 100%;
  width: max-content;
  font-size: 13px;
}

table.dt.wms-table thead th {
  position: relative;
  background: #f7f8f8;
  border-top: 1px solid #e6e7ea;
  border-bottom: 1px solid #e6e7ea;
  padding: 11px 16px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #62666d;
}

table.dt.wms-table td {
  position: relative;
  padding: 16px 13px;
  border-bottom: 1px solid #f0f1f3;
  vertical-align: middle;
  white-space: nowrap;
  font-size: 12.5px;
  color: #0f1011;
}

table.dt.wms-table thead th {
  padding: 9px 13px;
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

table.dt.wms-table tr > :last-child {
  padding-right: 24px;
}

table.dt.wms-table tbody tr:last-child td {
  border-bottom: none;
}

table.dt.wms-table tbody tr:hover {
  background: #fafafb;
}

/* STN column stays put while the table scrolls sideways */
table.dt.wms-table .col-first {
  position: sticky;
  left: 0;
  z-index: 2;
  padding-left: 24px;
  background: #ffffff;
}

table.dt.wms-table thead .col-first {
  background: #f7f8f8;
}

table.dt.wms-table tbody tr:hover .col-first {
  background: #fafafb;
}

table.dt.wms-table tbody tr.srow {
  cursor: pointer;
}

table.dt.wms-table tbody tr.srow.open,
table.dt.wms-table tbody tr.srow.open .col-first {
  background: #ffffff;
}

table.dt.wms-table tbody tr.srow.open td {
  border-bottom: none;
}

/* Column minimum widths */
table.dt.wms-table .col-dispatched { min-width: 104px; }
table.dt.wms-table .col-arrival { min-width: 144px; }
table.dt.wms-table .col-expected { min-width: 176px; }
table.dt.wms-table .col-stage { min-width: 320px; }
table.dt.wms-table .col-dock { min-width: 96px; }
table.dt.wms-table .col-invoice { min-width: 104px; }
table.dt.wms-table .col-raised { min-width: 96px; }
table.dt.wms-table .col-units { min-width: 96px; }
table.dt.wms-table .col-issues { min-width: 140px; }
table.dt.wms-table .col-chev { width: 20px; }

.th-split {
  display: inline-flex;
  align-items: center;
  gap: 26px;
}

.th-split.with-rule {
  gap: 12px;
}

.th-split-rule {
  width: 1px;
  align-self: stretch;
  background: #e6e7ea;
}

/* Lets the expanded panel size itself to the visible table width */
.wms-card .table-scroll {
  container-type: inline-size;
}

/* Short vertical divider before a column */
table.dt.wms-table .col-sep::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: #e6e7ea;
}

table.dt.wms-table thead .col-sep::before {
  top: 9px;
  bottom: 9px;
}

/* Sortable header */
.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  cursor: pointer;
}

.th-sort:hover {
  color: #0f1011;
}

.th-sort {
  gap: 4px;
}

.th-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  font-size: 9px;
  color: #c4c6cb;
  transition: transform 0.15s;
}

.th-caret.asc,
.th-caret.desc {
  background: #e6e7ea;
}

.th-caret.asc,
.th-caret.desc {
  color: #0f1011;
}

.th-caret.asc {
  transform: rotate(180deg);
}

.table-loader {
  display: flex;
  justify-content: center;
  padding: 12px;
}

/* ================ CELLS ================ */
.cell-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.cell-stack.tight {
  gap: 2px;
}

.cell-empty,
.muted {
  color: #8a8f98;
}

.cell-strong {
  display: block;
  font-weight: 600;
  white-space: nowrap;
}

.cell-sub {
  font-size: 11px;
  color: #62666d;
}

.tone-success { color: #1f8a3e; }
.tone-danger { color: #c52828; }

/* STN + category */
.cell-stn {
  display: flex;
  align-items: center;
  gap: 26px;
}

.cell-stn-id {
  width: 190px;
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 9px;
}

/* Deliveries: ASN + invoice */
.cell-asn {
  width: 150px;
  min-width: 0;
}

.cell-vendor {
  display: block;
  max-width: 100%;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-chip.sm {
  margin-top: 5px;
  padding: 1px 7px;
  font-size: 11px;
}

.cell-pending {
  color: #62666d;
}

.cell-loss {
  display: block;
  white-space: nowrap;
}

.cell-loss-value b {
  font-weight: 600;
  color: #c52828;
}

.cell-loss-value span {
  font-weight: 500;
  color: #62666d;
}

.cell-loss .cell-sub {
  display: block;
  margin-top: 3px;
}

.cell-stn-text {
  min-width: 0;
}

/* Source node badge: MH / CC */
.source-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  border: 1px solid;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.source-badge.source-hub {
  border-color: rgba(94, 106, 210, 0.45);
  background: rgba(94, 106, 210, 0.08);
  color: #4c56c4;
}

.source-badge.source-cc {
  border-color: rgba(242, 153, 74, 0.55);
  background: rgba(242, 153, 74, 0.1);
  color: #a45a0c;
}

.source-badge.source-vendor {
  border-color: #d8d9dd;
  background: #f7f8f8;
  color: #3c4047;
}

.cell-stn-cat {
  width: 130px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.cell-id-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cell-id {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: #0f1011;
  white-space: nowrap;
}

.cell-id.muted {
  color: #8a8f98;
}

.cell-id-sub {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 11px;
  color: #62666d;
}

.copyb {
  display: inline-flex;
  align-items: center;
  padding: 2px 4px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: #8a8f98;
  cursor: pointer;
}

/* Deliveries: copy button only on row hover */
.deliveries-table .copyb {
  opacity: 0;
}

.deliveries-table tr:hover .copyb,
.deliveries-table .copyb:focus-visible {
  opacity: 1;
}

.copyb:hover {
  background: #eff0f2;
  color: #0f1011;
}

.cat-chip,
.source-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
}

.cat-chip {
  gap: 5px;
  padding: 2px 9px;
  font-size: 11.5px;
}

.cat-chip.cat-dry {
  background: #eff0f2;
  color: #3c4047;
}

.cat-chip.cat-fresh {
  background: rgba(14, 116, 144, 0.1);
  color: #0e7490;
}

.source-chip {
  gap: 4px;
  margin-top: 5px;
  padding: 1px 7px;
  font-size: 11px;
}

.source-chip.source-hub {
  background: rgba(94, 106, 210, 0.1);
  color: #4c56c4;
}

.source-chip.source-cc {
  background: rgba(242, 153, 74, 0.14);
  color: #a45a0c;
}

.source-chip.source-vendor {
  background: #eff0f2;
  color: #3c4047;
}

/* Vehicle number plate */
.plate {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border: 1.5px solid #0f1011;
  border-radius: 4px;
  background: #ffd60a;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0f1011;
  white-space: nowrap;
}

.btn-arrive {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 14px;
  border: none;
  border-radius: 8px;
  background: #5e6ad2;
  box-shadow: 0 1px 2px rgba(15, 16, 17, 0.16);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  cursor: pointer;
}

.btn-arrive:hover {
  background: #4c56c4;
}

a.btn-arrive {
  text-decoration: none;
}

.btn-arrive.danger {
  background: #c52828;
}

.btn-arrive.danger:hover {
  background: #a82020;
}

.btn-arrive.lg {
  height: 36px;
  padding: 0 15px;
  gap: 7px;
  font-size: 13px;
}

/* Expected: containers | SKUs + units */
.cell-expected {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 8px;
}

.cell-containers {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #62666d;
}

.cell-containers .num {
  font-size: 15px;
  font-weight: 600;
  color: #0f1011;
}

.cell-expected-rule,
.cell-stage-rule {
  align-self: stretch;
  width: 1px;
  background: #eff0f2;
}

/* GRN / putaway: timer | progress */
.cell-stage {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 28px;
}

.cell-stage-timer {
  flex: 0 0 96px;
  min-width: 0;
}

.stage-timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* Running: solid — green within the limit, red once breached */
.stage-timer.running {
  background: #1f8a3e;
  color: #ffffff;
}

.stage-timer.running.breached {
  background: #c52828;
}

.stage-timer.running.close {
  background: #c2700c;
}

/* Finished: soft chip with a clock */
.stage-timer.done {
  background: rgba(39, 166, 68, 0.12);
  color: #1f8a3e;
}

.stage-timer.done.close {
  background: rgba(242, 153, 74, 0.18);
  color: #a45a0c;
}

.stage-timer.lg {
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.stage-timer.fixed {
  justify-content: center;
  width: 84px;
  padding-left: 6px;
  padding-right: 6px;
}

.stage-timer.done.breached {
  background: rgba(235, 87, 87, 0.12);
  color: #c52828;
}

.tickdot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  animation: tick 1s steps(2, start) infinite;
}

@keyframes tick {
  to {
    visibility: hidden;
  }
}


.stage-progress {
  flex: 1 1 0%;
  min-width: 0;
}

.stage-progress-text {
  display: block;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-progress-text.tone-muted {
  color: #8a8f98;
}

.stage-progress-text.tone-warn,
.tone-warn {
  color: #a45a0c;
}

/* "1 exception open →" */
.issuepill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 1px 8px;
  border: none;
  border-radius: 999px;
  background: rgba(235, 87, 87, 0.12);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: #c52828;
  white-space: nowrap;
  cursor: pointer;
}

.issuepill:hover {
  background: rgba(235, 87, 87, 0.2);
}

.issuepill-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  animation: excblink 1.4s ease-in-out infinite;
}

@keyframes excblink {
  50% {
    opacity: 0.25;
  }
}

.stage-bar {
  display: flex;
  gap: 1px;
  width: 100%;
  height: 5px;
  margin-top: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: #eff0f2;
}

.stage-bar span {
  height: 100%;
}

.stage-bar .tone-active { background: #5e6ad2; }
.stage-bar .tone-success { background: #27a644; }
.stage-bar .tone-danger { background: #d93b3b; }
.stage-bar .tone-active-soft { background: rgba(94, 106, 210, 0.35); }
.stage-bar .tone-danger-soft { background: rgba(235, 87, 87, 0.35); }


.row-chev {
  display: inline-flex;
  justify-content: flex-end;
  width: 100%;
  color: #62666d;
  transition: transform 0.15s;
}

.row-chev.open {
  transform: rotate(180deg);
}

/* ================ EXPANDED ROW ================ */
table.dt.wms-table tr.table-expanded-row td {
  padding: 0;
  background: #f7f8f8;
  border-bottom: 1px solid #f0f1f3;
  white-space: normal;
  cursor: default;
}

.steps-panel {
  position: sticky;
  left: 0;
  width: 100cqw;
  padding: 4px 24px 20px;
  background: #f7f8f8;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

/* Step card */
.stepc {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #ffffff;
}

.stepc.link:hover {
  box-shadow: 0 2px 8px rgba(15, 16, 17, 0.06);
}

.stepc-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.stepc-bar {
  height: 4px;
  border-radius: 999px;
  background: #e6e7ea;
}

.stepc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.stepc-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #62666d;
}

.stepc-status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #eff0f2;
  color: #8a8f98;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.stepc-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
}

.stepc-title {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: #0f1011;
}

.stepc-desc {
  margin-top: 3px;
  font-size: 12px;
  color: #62666d;
}

.stepc-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f7f8f8;
  color: #0f1011;
}

.stepc-alert.tone-danger {
  background: rgba(235, 87, 87, 0.06);
  color: #c52828;
}

.stepc-alert.tone-warn {
  color: #a45a0c;
}

.stepc-alert-text {
  font-size: 11.5px;
  font-weight: 500;
  color: #3c4047;
}

.stepc-alert-value {
  margin-left: auto;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.stepc-details {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #f0f1f3;
}

.stepc-detail {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 12px;
}

.stepc-detail-label {
  color: #62666d;
  white-space: nowrap;
}

.stepc-detail-value {
  margin-left: auto;
  text-align: right;
  font-weight: 600;
  color: #0f1011;
}

.stepc-detail-link {
  position: relative;
  z-index: 2;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: #c52828;
  white-space: nowrap;
}

.stepc-detail-link:hover {
  text-decoration: underline;
}

.stepc-detail-value.tone-success { color: #1f8a3e; }
.stepc-detail-value.tone-danger { color: #c52828; }

.stepc-spacer {
  flex: 1 1 0%;
}

.stepc-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.stepc-actions .btn-arrive:not(.lg) {
  height: 34px;
  font-size: 12.5px;
}

.stepc-link {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #4c56c4;
}

.stepc.link:hover .stepc-link svg {
  transform: translateX(2px);
}

.stepc-link svg {
  transition: transform 0.15s;
}

/* Step tones */
.stepc.tone-idle .stepc-title { color: #8a8f98; }

.stepc.tone-ask { border-color: #e0a15a; }
.stepc.tone-ask .stepc-bar { background: #f2994a; }
.stepc.tone-ask .stepc-status {
  background: rgba(242, 153, 74, 0.16);
  color: #a45a0c;
}

.stepc.tone-active .stepc-bar { background: #5e6ad2; }
.stepc.tone-active .stepc-status {
  background: rgba(94, 106, 210, 0.12);
  color: #4c56c4;
}

.stepc.tone-done .stepc-bar { background: #27a644; }

/* Running within its limit */
.stepc.tone-live .stepc-bar { background: #f2994a; }
.stepc.tone-live .stepc-status {
  background: rgba(242, 153, 74, 0.16);
  color: #a45a0c;
}

/* The step waiting on the store manager */
.stepc.highlight {
  border-color: #f0c9a0;
  box-shadow: 0 0 0 3px rgba(242, 153, 74, 0.12);
}
.stepc.tone-done .stepc-status {
  background: rgba(39, 166, 68, 0.12);
  color: #1f8a3e;
}

.stepc.tone-danger { border-color: rgba(235, 87, 87, 0.4); }
.stepc.tone-danger .stepc-bar { background: #d93b3b; }
.stepc.tone-danger .stepc-status {
  background: rgba(235, 87, 87, 0.12);
  color: #c52828;
}

/* Assign receiver / putter */
.assign {
  position: relative;
}

/* Inline variant: the list spans the whole card, under the footer */
.assign.inline {
  display: contents;
}

.assign-menu {
  padding: 4px;
  border-radius: 10px;
  background: #ffffff;
}

.assign-menu.menu {
  position: absolute;
  z-index: 30;
  min-width: 320px;
  box-shadow:
    0 0 0 1px #e6e7ea,
    0 12px 32px rgba(15, 16, 17, 0.14);
}

.assign-menu.menu.above { bottom: calc(100% + 6px); }
.assign-menu.menu.below { top: calc(100% + 6px); }
.assign-menu.menu.align-left { left: 0; }
.assign-menu.menu.align-right { right: 0; }

.assign-menu.inline {
  flex-basis: 100%;
  margin-top: 2px;
  border: 1px solid #e6e7ea;
}

.assign-menu-label {
  padding: 6px 10px 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a8f98;
}

.assign-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  color: #0f1011;
  text-align: left;
  cursor: pointer;
}

.assign-menu-item:hover {
  background: #f7f8f8;
}

.assign-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #eff0f2;
  color: #3c4047;
  font-size: 10.5px;
  font-weight: 700;
}

.assign-name {
  font-weight: 600;
  white-space: nowrap;
}

.assign-status {
  margin-left: auto;
  font-size: 11.5px;
  color: #62666d;
  white-space: nowrap;
}

.assign-status.available {
  color: #1f8a3e;
}

/* Column headers stay in view while the page scrolls (shifted by useStickyHead) */
table.dt thead tr.table-head-row {
  position: relative;
  z-index: 3;
  transform: translateY(var(--head-shift, 0px));
}

table.dt thead tr.table-head-row.stuck th {
  box-shadow: inset 0 -1px 0 #e6e7ea;
}

table.dt thead tr.table-head-row.stuck {
  box-shadow: 0 2px 4px rgba(15, 16, 17, 0.05);
}

/* ================ MODAL ================ */
/* Lighter backdrop than admin-web, to match the WMS design */
.sheet-overlay {
  background: rgba(15, 16, 17, 0.32);
}

.wms-modal {
  width: 620px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 14px;
  box-shadow:
    0 0 0 1px #e6e7ea,
    0 24px 64px rgba(15, 16, 17, 0.22);
  color: #0f1011;
  cursor: default;
}

.wms-modal-head {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #e6e7ea;
}

.wms-modal-heading {
  flex: 1 1 0%;
  min-width: 0;
}

.wms-modal-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #62666d;
}

.wms-modal-title {
  margin-top: 3px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.wms-modal-sub {
  margin-top: 4px;
  font-size: 12.5px;
  color: #62666d;
}

.wms-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  background: #ffffff;
  color: #3c4047;
  cursor: pointer;
}

.wms-modal-close:hover {
  background: #f7f8f8;
}

.wms-modal-body {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wms-modal-empty {
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: #62666d;
}

/* Issue card */
.issue-card {
  border: 1px solid rgba(235, 87, 87, 0.35);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(235, 87, 87, 0.03);
}

.issue-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.issue-id {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 5px;
  background: #eff0f2;
  color: #0f1011;
}

.issue-kind {
  font-size: 11.5px;
  font-weight: 600;
  color: #62666d;
}

.issue-status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(235, 87, 87, 0.12);
  color: #c52828;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.issue-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
}

.issue-title {
  margin-top: 9px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.issue-details {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #3c4047;
}

.issue-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.issue-owner {
  font-size: 12px;
  color: #62666d;
  white-space: nowrap;
}

.issue-owner b {
  font-weight: 600;
  color: #0f1011;
}

.issue-foot {
  flex-wrap: wrap;
}

.issue-owner {
  margin-right: auto;
}

/* Children join the footer row so an inline assign list can wrap under it */
.issue-actions {
  display: contents;
}

.issue-actions .btn-arrive,
.issue-actions .btn-outline {
  height: 32px;
  padding: 0 13px;
  gap: 6px;
  font-size: 12.5px;
}

/* Handed to someone, waiting in their queue — blue */
.issue-card.status-queued {
  border-color: rgba(94, 106, 210, 0.35);
  background: rgba(94, 106, 210, 0.03);
}

.issue-card.status-queued .issue-status {
  background: rgba(94, 106, 210, 0.12);
  color: #4c56c4;
}

/* Closed — neutral card, green pill */
.issue-card.status-resolved {
  border-color: #e6e7ea;
  background: #ffffff;
}

.issue-card.status-resolved .issue-status {
  background: rgba(31, 138, 62, 0.12);
  color: #1f8a3e;
}

/* Being handled — neutral card, orange pill */
.issue-card.status-progress {
  border-color: #e6e7ea;
  background: #ffffff;
}

.issue-card.status-progress .issue-status {
  background: rgba(242, 153, 74, 0.16);
  color: #a45a0c;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid #d8d9dd;
  border-radius: 8px;
  background: #ffffff;
  font-family: inherit;
  font-weight: 600;
  color: #0f1011;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.btn-outline:hover {
  background: #f7f8f8;
}

/* Photo viewer */
.pmodal {
  width: min(760px, calc(100vw - 48px));
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(15, 16, 17, 0.35);
  overflow: hidden;
  color: #0f1011;
  cursor: default;
}

.pmodal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 14px 20px;
  border-bottom: 1px solid #e6e7ea;
}

.pmodal-heading {
  flex: 1 1 0%;
  min-width: 0;
}

.pmodal-title {
  font-size: 15px;
  font-weight: 600;
}

.pmodal-sub {
  margin-top: 2px;
  font-size: 12.5px;
  color: #62666d;
}

.pmodal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  background: #ffffff;
  color: #3c4047;
  cursor: pointer;
}

.pmodal-close:hover {
  background: #f7f8f8;
}

.pmodal-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  max-height: calc(100vh - 180px);
  background: #ece7df;
  color: #8a7f6e;
}

.pmodal-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ================ PUTAWAY LOSS DRAWER ================ */
.order-drawer.putaway-loss-drawer {
  width: 1040px;
  max-width: calc(100vw - 48px);
}

.pl-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e6e7ea;
}

.pl-head-main {
  flex: 1 1 0%;
  min-width: 0;
}

.pl-title {
  margin-top: 3px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.pl-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pl-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  background: #ffffff;
  color: #3c4047;
  cursor: pointer;
}

.pl-icon-btn.lg {
  width: 36px;
  height: 36px;
}

.pl-icon-btn:hover:not(:disabled) {
  background: #f7f8f8;
}

.pl-icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Summary cards */
.pl-cards {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 24px;
}

.pl-card {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7f8f8;
}

.pl-card-label {
  font-size: 11.5px;
  color: #62666d;
}

.pl-card-value {
  margin-top: 3px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #c52828;
}

.pl-card-sub {
  margin-top: 1px;
  min-height: 1em;
  font-size: 11.5px;
  color: #62666d;
}

/* Items table */
.pl-scroll {
  flex: 1 1 0%;
  min-height: 0;
  overflow: auto;
  border-top: 1px solid #e6e7ea;
}

.pl-table {
  min-width: 1000px;
}

.pl-grid {
  display: grid;
  /* Exception IDs like EXC-MAN-2610-000002 need ~160px on one line */
  grid-template-columns: minmax(170px, 1.5fr) 140px 170px 104px 64px 68px 80px 164px;
  gap: 10px;
}

.pl-header {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 24px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #62666d;
  background: #f7f8f8;
  border-bottom: 1px solid #e6e7ea;
}

.pl-header .right {
  text-align: right;
}

.pl-row {
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid #f0f1f3;
  font-size: 12.5px;
}

.pl-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pl-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.pl-stack {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pl-stack.start {
  align-items: flex-start;
  gap: 3px;
}

.pl-strong {
  font-weight: 600;
  /* The full name, wrapping as it needs */
  overflow-wrap: anywhere;
}

.pl-mono {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pl-mono-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: #62666d;
}

.pl-sub {
  font-size: 11px;
  color: #62666d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-putter {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pl-putter svg {
  flex-shrink: 0;
  color: #8a8f98;
}

.pl-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-units {
  text-align: right;
  font-size: 15px;
  font-weight: 600;
  color: #c52828;
}

.pl-units.none {
  color: #c4c6cb;
}

.pl-value {
  text-align: right;
  font-size: 13.5px;
  font-weight: 600;
  color: #c52828;
}

.pl-exception {
  padding: 0;
  border: none;
  background: none;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: #4c56c4;
  white-space: nowrap;
  cursor: pointer;
}

.pl-exception:hover {
  text-decoration: underline;
}

.pl-empty {
  padding: 24px;
  font-size: 12.5px;
  color: #62666d;
}

/* Photo viewer: several pictures, a strip to switch between them */
.pmodal:has(.pmodal-strip) {
  width: min(820px, calc(100vw - 48px));
}

.pmodal-photo .pmodal-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #ffffff;
  font-size: 64px;
  font-weight: 700;
  letter-spacing: 1px;
}

.pmodal-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e6e7ea;
  overflow-x: auto;
}

.pmodal-thumb {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.pmodal-thumb-img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 48px;
  border-radius: 8px;
  background: #e1e8ec;
  color: #8a7f6e;
  overflow: hidden;
}

.pmodal-thumb-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pmodal-thumb-img .pmodal-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.pmodal-thumb[aria-pressed="true"] .pmodal-thumb-img {
  box-shadow:
    0 0 0 2px #ffffff,
    0 0 0 4px #5e6ad2;
}

.pmodal-thumb-label {
  font-size: 11px;
  font-weight: 500;
  color: #62666d;
  white-space: nowrap;
}

.pmodal-thumb[aria-pressed="true"] .pmodal-thumb-label {
  font-weight: 600;
  color: #0f1011;
}

/* ================ CANCEL ORDER ================ */
.cxm {
  width: 480px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 16, 17, 0.28);
}

.cxm-head {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 14px;
}

.cxm-head-text {
  flex: 1 1 0%;
  min-width: 0;
}

.cxm-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: #0f1011;
}

.cxm-sub {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.45;
  color: #3c4047;
}

.cxm-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  background: #ffffff;
  color: #3c4047;
  cursor: pointer;
}

.cxm-close:hover,
.cxm-keep:hover {
  background: #f7f8f8;
}

.cxm-body {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 20px 16px;
  border-top: 1px solid #f0f1f3;
}

.cxm-label {
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #3c4047;
}

.cxm-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.cxm-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #e6e7ea;
  border-radius: 10px;
  background: #ffffff;
  color: #0f1011;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.cxm-option:hover:not(.on) {
  background: #f7f8f8;
}

.cxm-option.on {
  border-color: #c52828;
  background: rgba(235, 87, 87, 0.06);
}

.cxm-radio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border: 1.5px solid #b9bdc4;
  border-radius: 999px;
}

.cxm-radio span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: transparent;
}

.cxm-option.on .cxm-radio {
  border-color: #c52828;
}

.cxm-option.on .cxm-radio span {
  background: #c52828;
}

.cxm-option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cxm-foot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid #e6e7ea;
}

.cxm-hint {
  flex: 1 1 0%;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #666a72;
}

.cxm-keep {
  height: 36px;
  padding: 0 14px;
  border: 1px solid #e6e7ea;
  border-radius: 9px;
  background: #ffffff;
  color: #3c4047;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.cxm-cancel {
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 9px;
  background: #c52828;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.cxm-cancel:hover:not(:disabled) {
  background: #a91f1f;
}

.cxm-cancel:disabled {
  background: #e6e7ea;
  color: #666a72;
  cursor: not-allowed;
}

/* ================ CREATE ASN ================ */
.asnm {
  width: 640px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 16, 17, 0.28);
}

.asnm-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #e6e7ea;
}

.asnm-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: #0f1011;
}

.asnm-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  background: #ffffff;
  color: #3c4047;
  cursor: pointer;
}

.asnm-body {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
}

.asnm-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.asnm-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #eff0f2;
  color: #62666d;
  font-size: 12px;
  font-weight: 600;
}

.asnm-step-main {
  flex: 1 1 0%;
  min-width: 0;
}

.asnm-step-title {
  margin: 2px 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #0f1011;
}

.asnm-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 84px;
  border: 1.5px dashed #c9ccd1;
  border-radius: 10px;
  background: #f9f9fa;
  font-size: 13.5px;
  color: #62666d;
}

.asnm-drop.over {
  border-color: #5e6ad2;
  background: rgba(94, 106, 210, 0.06);
}

.asnm-browse {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  color: #4c56c4;
  cursor: pointer;
}

.asnm-browse:hover {
  text-decoration: underline;
}

.asnm-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e6e7ea;
  border-radius: 10px;
  background: #ffffff;
}

.asnm-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(39, 166, 68, 0.12);
  color: #15753a;
  font-size: 10.5px;
  font-weight: 700;
}

.asnm-file-text {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.asnm-file-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f1011;
  overflow-wrap: anywhere;
}

.asnm-file-size {
  font-size: 12px;
  color: #62666d;
}

.asnm-file-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #e6e7ea;
  border-radius: 7px;
  background: #ffffff;
  color: #3c4047;
  cursor: pointer;
}

.asnm-error {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(235, 87, 87, 0.08);
  color: #b91c1c;
  font-size: 12.5px;
  font-weight: 500;
}

.asnm-foot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid #e6e7ea;
}

.asnm-hint {
  flex: 1 1 0%;
  min-width: 0;
  font-size: 12.5px;
  color: #62666d;
}

.asnm-cancel {
  height: 38px;
  padding: 0 16px;
  border: 1px solid #e6e7ea;
  border-radius: 9px;
  background: #ffffff;
  color: #3c4047;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.asnm-close:hover:not(:disabled),
.asnm-cancel:hover:not(:disabled),
.asnm-file-remove:hover:not(:disabled) {
  background: #f7f8f8;
}

.asnm-create {
  height: 38px;
  padding: 0 18px;
  border: none;
  border-radius: 9px;
  background: #5e6ad2;
  color: #ffffff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.asnm-create:hover:not(:disabled) {
  background: #4c56c4;
}

.asnm-create:disabled {
  background: #b9bdf0;
  cursor: not-allowed;
}

.asnm button:disabled {
  cursor: not-allowed;
}

/* ================ OUTGOING ================ */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(39, 166, 68, 0.1);
  color: #1f8a3e;
  font-size: 12px;
  font-weight: 600;
}

.page-buttons {
  gap: 8px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  background: #ffffff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #3c4047;
  cursor: pointer;
}

.btn-ghost:hover {
  background: #f7f8f8;
}

.ghost-icon {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin: 0 6px 0 4px;
  border: 1px solid #e6e7ea;
  border-radius: 7px;
  background: #ffffff;
  color: #3c4047;
  cursor: pointer;
}

/* Overview strip: "Today's view", a grey band across the page under the top bar */
.overview-strip {
  display: flex;
  align-items: stretch;
  padding: 14px 32px;
  border-bottom: 1px solid #e6e7ea;
  background: #f3f4f5;
}

.overview-intro {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding-right: 18px;
}

.overview-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(94, 106, 210, 0.12);
  color: #4c56c4;
}

.overview-intro-text {
  display: flex;
  flex-direction: column;
}

.overview-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.overview-sub {
  margin-top: 1px;
  font-size: 12px;
  color: #62666d;
  white-space: nowrap;
}

.overview-metric {
  flex: 1 1 0%;
  min-width: 0;
  padding: 0 12px;
  border-left: 1px solid #d8d9dd;
}

.overview-value-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.overview-value {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.2;
  color: #0f1011;
}

.overview-value.tone-dark-danger { color: #9b1c1c; }
.overview-value.tone-danger { color: #b91c1c; }
.overview-value.tone-warn { color: #975209; }

.overview-delta {
  font-size: 12px;
  font-weight: 600;
}

.overview-delta.tone-success { color: #15753a; }
.overview-delta.tone-danger { color: #b91c1c; }
.overview-delta.tone-muted { color: #62666d; }

/* Order → rider pickup: each step's average over a line of the points it runs between */
.overview-steps {
  flex: 0 0 400px;
  padding: 0 2px 0 14px;
  border-left: 1px solid #d8d9dd;
}

.overview-steps-values {
  display: grid;
}

.overview-step-value {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1.2;
  color: #62666d;
}

.overview-step-value.good { color: #15753a; }
.overview-step-value.warn { color: #975209; }
.overview-step-value.bad { color: #b91c1c; }

.overview-steps-line {
  position: relative;
  height: 22px;
  margin-top: 1px;
}

.overview-steps-rule {
  position: absolute;
  left: 3px;
  right: 3px;
  top: 3px;
  height: 1.5px;
  background: #c9cdf2;
}

.overview-step-point {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transform: translateX(-50%);
}

.overview-step-point.first {
  align-items: flex-start;
  transform: none;
}

.overview-step-point.last {
  align-items: flex-end;
  transform: translateX(-100%);
}

.overview-step-dot {
  width: 7px;
  height: 7px;
  box-sizing: border-box;
  border: 1.5px solid #5e6ad2;
  border-radius: 999px;
  background: #ffffff;
}

.overview-step-label {
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.2;
  color: #3c4047;
  white-space: nowrap;
}

.overview-label {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: #3c4047;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stage cards */
.stage-row {
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(0, 0.82fr) minmax(0, 0.63fr);
  gap: 14px;
  margin-bottom: 14px;
  align-items: stretch;
}

.stage-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #ffffff;
}

.stage-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 2px;
}

.stage-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(94, 106, 210, 0.1);
  color: #4c56c4;
}

.stage-card-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.people-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #d8d9dd;
  border-radius: 8px;
  background: #f7f8f8;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: #3c4047;
  white-space: nowrap;
  cursor: pointer;
}

.people-btn b {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f1011;
}

.people-btn-icon {
  display: inline-flex;
  color: #4c56c4;
}

.people-btn svg:last-child {
  color: #8a8f98;
}

.stage-card-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 34px;
  padding: 0 2px;
}

.stage-card-number {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -1.2px;
  line-height: 1;
  color: #0f1011;
}

.stage-card-count-label {
  font-size: 12.5px;
  color: #62666d;
  white-space: nowrap;
}

.stage-card-tiles {
  flex: 1 1 0%;
  display: grid;
  padding-top: 12px;
  border-top: 1px solid #f0f1f3;
}

/* One step: heading, pain tile, its average; a divider between steps */
.stage-card-tile-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 0 10px;
  border-left: 1px solid #d8d9dd;
}

.stage-card-tile-col:first-child {
  padding-left: 0;
  border-left: none;
}

.stage-card-tile-col:last-child {
  padding-right: 0;
}

.stage-card-tile-heading {
  padding: 0 2px 2px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.1px;
  line-height: 1.3;
  color: #0f1011;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile.stage-tile {
  flex: 1 1 0%;
  justify-content: center;
  gap: 1px;
  padding: 6px 10px;
}

.stage-tile-value {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.8px;
  line-height: 1.1;
  color: #0f1011;
}

.stage-tile-label {
  max-width: 100%;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  color: #3c4047;
}

/* No pain orders: a plain grey zero, nothing to tap */
.tile.stage-tile.quiet {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.tile.stage-tile.quiet .stage-tile-value {
  color: #8a8f98;
}

.tile.hot .stage-tile-label {
  font-weight: 600;
  color: #b91c1c;
}

/* "Waiting over 1m" */
.stage-tile-sub {
  max-width: 100%;
  font-size: 12px;
  font-weight: 500;
  color: #8a8f98;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile.hot .stage-tile-sub {
  color: #b91c1c;
}

/* List rows: "Staged 23" · "Pending putaway 2" */
.stage-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px solid #f0f1f3;
}

.tile.stage-row-tile {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: #f7f8f8;
}

/* Picking's pain tiles: list filters, so they react too */
button.tile.stage-tile.filter {
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.tile.stage-tile.filter:hover:not(.selected) {
  background: #f7f8f8;
}

.tile.stage-tile.hot.filter:hover:not(.selected) {
  background: #fbeaea;
}

.tile.stage-tile.filter.selected {
  border-color: #5e6ad2;
  background: rgba(94, 106, 210, 0.1);
}

/* Delivery's Staged / Out for delivery: list filters, so they do react */
.tile.stage-row-tile.filter:hover {
  background: #eff0f2;
}

.tile.stage-row-tile.filter.selected {
  border-color: #5e6ad2;
  background: rgba(94, 106, 210, 0.1);
}

.tile.stage-row-tile.hot {
  border-color: rgba(235, 87, 87, 0.45);
  background: rgba(235, 87, 87, 0.06);
}

.stage-row-label {
  min-width: 0;
  font-size: 12.5px;
  color: #3c4047;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile.hot .stage-row-label {
  font-weight: 600;
  color: #c52828;
}

.stage-row-value {
  margin-left: auto;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: #0f1011;
}

.stage-row-value.tone-danger {
  color: #c52828;
}

.stage-row-value.tone-muted {
  color: #8a8f98;
}

/* Riders: the people button across the card */
.people-btn.wide {
  margin-left: 0;
  width: 100%;
  height: 34px;
  padding: 0 7px;
}

.people-btn.wide svg:last-child {
  margin-left: auto;
}

/* Read-only rows, e.g. returns: "Pending GRN 1", divided by hairlines */
.stage-rows.plain {
  gap: 0;
}

.stage-plain-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border: none;
  border-bottom: 1px solid #f0f1f3;
  background: transparent;
  font-family: inherit;
  text-align: left;
}


.stage-plain-row:last-child {
  border-bottom: none;
}

.stage-plain-row.hot .stage-row-label {
  font-weight: 600;
  color: #b91c1c;
}

/* "Speed vs SLA": each step's last-hour average on a green / orange / red bar */
.speed-card {
  margin-bottom: 14px;
  padding: 14px 16px 16px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #ffffff;
}

.speed-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 2px;
}

.speed-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.speed-legend {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 600;
  color: #3c4047;
}

.speed-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.speed-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.speed-legend .good,
.speed-bar .good { background: #15753a; }
.speed-legend .warn,
.speed-bar .warn { background: #b45309; }
.speed-legend .bad,
.speed-bar .bad { background: #b91c1c; }

.speed-grid {
  display: grid;
  margin-top: 12px;
}

.speed-cell {
  min-width: 0;
  padding: 4px 16px 2px;
  border-left: 1px solid #e6e7ea;
}

.speed-cell:first-child {
  border-left: none;
}

.speed-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f1011;
}

/* The average as a filled pill in its colour */
.speed-value {
  margin-top: 8px;
}

.speed-value > span {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: #ffffff;
}

.speed-value.tone-good > span { background: #15753a; }
.speed-value.tone-warn > span { background: #b45309; }
.speed-value.tone-danger > span { background: #b91c1c; }
.speed-value.tone-muted > span { background: #eceef0; color: #8a8f98; }

/* "today": nothing finished the step in the last hour, so the pill shows today's average */
.speed-est {
  margin-left: 8px;
  font-size: 11.5px;
  font-style: normal;
  font-weight: 600;
  color: #8a8f98;
}

.speed-bar {
  position: relative;
  display: flex;
  gap: 2px;
  height: 8px;
  margin-top: 12px;
}

.speed-bar > span:not(.speed-marker) {
  flex-basis: 0;
}

.speed-bar .good {
  border-radius: 4px 0 0 4px;
}

.speed-bar .bad {
  border-radius: 0 4px 4px 0;
}

/* Where the average sits */
.speed-marker {
  position: absolute;
  top: -4px;
  width: 4px;
  height: 16px;
  margin-left: -2px;
  border-radius: 2px;
  background: #0f1011;
  box-shadow: 0 0 0 2px #ffffff;
}

.speed-scale {
  position: relative;
  height: 16px;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #3c4047;
}

.speed-scale > span {
  position: absolute;
  white-space: nowrap;
}

.speed-scale > span.mid {
  transform: translateX(-50%);
}

/* "Go to Returns →" */
.stage-link {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  border-radius: 8px;
  color: #4c56c4;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.stage-link:hover {
  background: rgba(94, 106, 210, 0.06);
}

/* Not-started pain tile pulses until a picker takes it */
.tile.painblink {
  animation: painblink 1.2s ease-in-out infinite;
}

@keyframes painblink {
  50% {
    border-color: #eb5757;
    background: rgba(235, 87, 87, 0.14);
  }
}

/* Live orders */
.live-orders-head {
  gap: 10px;
  padding: 16px 20px 14px;
}

.live-orders-head .wms-card-title {
  font-size: 14.5px;
}

/* All · Picking · Delivery, with their counts */
.lo-tabs {
  display: inline-flex;
  align-items: center;
  height: 32px;
  margin-left: 6px;
  padding: 0 3px;
  border-radius: 8px;
  background: #f3f4f5;
}

.lo-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: #3c4047;
  cursor: pointer;
}

.lo-tab.on {
  background: #ffffff;
  box-shadow:
    0 1px 2px rgba(15, 16, 17, 0.12),
    0 0 0 1px #e6e7ea;
  font-weight: 600;
  color: #0f1011;
}

.lo-tab-count {
  padding: 0 6px;
  border-radius: 999px;
  background: #e6e7ea;
  font-size: 11.5px;
  font-weight: 600;
  color: #3c4047;
}

.lo-tab.on .lo-tab-count {
  background: rgba(94, 106, 210, 0.12);
  color: #4c56c4;
}

/* Picking / delivery time: the arrow sits by the time, not after the whole header */
.col-order-stage .th-sort {
  width: 100%;
}

.col-order-stage .th-sort > .th-caret {
  display: none;
}

.order-stage-time-head {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Active tile filter, over the table */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 10px;
  border-radius: 999px;
  background: rgba(94, 106, 210, 0.12);
  color: #4c56c4;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.filter-chip-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(94, 106, 210, 0.16);
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  color: #4c56c4;
  cursor: pointer;
}

.filter-chip-clear:hover {
  background: rgba(94, 106, 210, 0.28);
}

.hsearch.live-orders-search {
  flex-grow: 0;
  width: 360px;
  height: 38px;
  padding: 0 12px;
  background: #ffffff;
  font-size: 13px;
  transition: border-color 0.12s ease;
}

.hsearch.live-orders-search:hover,
.hsearch.live-orders-search:focus-within {
  border-color: #0f1011;
}

table.dt.live-orders-table td {
  padding-top: 12px;
  padding-bottom: 12px;
}

table.dt.live-orders-table tr > :first-child {
  padding-left: 20px;
}

table.dt.live-orders-table tr > :last-child {
  padding-right: 20px;
}

/* Total time: the column is as wide as its widest timer, and every chip fills it, so all match */
table.dt.live-orders-table .col-total {
  width: 1%;
  white-space: nowrap;
}

table.dt.live-orders-table td.col-total .stage-timer {
  display: flex;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}
table.dt.live-orders-table .col-order { min-width: 82px; }
table.dt.live-orders-table .col-order-stage { min-width: 320px; }
table.dt.live-orders-table .col-bin { width: 56px; }
/* Wide enough for "Cancel order" */
table.dt.live-orders-table .col-batch { width: 96px; white-space: nowrap; }

/* "Cancel order": a red text link, only before picking starts */
.order-cancel {
  padding: 2px 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #b91c1c;
  cursor: pointer;
  white-space: nowrap;
}

.order-cancel:hover:not(:disabled) {
  text-decoration: underline;
}

.order-cancel:disabled {
  color: #8a8f98;
  cursor: default;
}

.order-stage-grid {
  display: grid;
  grid-template-columns: 98px 130px minmax(0, 1fr);
  column-gap: 6px;
  align-items: center;
}

.order-status-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 2px 0;
  min-width: 0;
}

.order-status {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}

/* A chip sitting straight in a stage cell's grid (delivery status) hugs its text, not the column */
.order-stage-grid > .order-status {
  justify-self: start;
}

.order-status span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-status.tone-muted { background: #eff0f2; color: #62666d; }
.order-status.tone-active { background: rgba(94, 106, 210, 0.12); color: #4c56c4; }
.order-status.tone-success { background: rgba(39, 166, 68, 0.12); color: #1f8a3e; }
.order-status.tone-warn { background: rgba(242, 153, 74, 0.16); color: #a45a0c; }
.order-status.tone-danger { background: rgba(235, 87, 87, 0.12); color: #c52828; }

.order-wait {
  padding-left: 9px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: #62666d;
  white-space: nowrap;
}

.order-wait.late { color: #b91c1c; }

.order-status-next {
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
  color: #666a72;
  white-space: nowrap;
}

.order-short {
  padding-left: 9px;
  font-size: 11.5px;
  font-weight: 600;
  color: #a45a0c;
}

.order-person {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.order-person svg {
  flex-shrink: 0;
  color: #8a8f98;
}

.order-person-name {
  min-width: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: #3c4047;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-bin {
  display: inline-flex;
  padding: 4px 10px;
  border: 1px solid #ffffff;
  border-radius: 7px;
  background: #0f1011;
  box-shadow: 0 0 0 1px #0f1011;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #ffffff;
}

/* Rows */
table.dt.live-orders-table tr.order-row.done td {
  background: #f7f8f8;
}

/* Orders on one rider's trip: tinted, joined by an indigo line down the left */
table.dt.live-orders-table tr.order-row.batched td {
  background: #f9f9fe;
  border-bottom-color: #e8eaf8;
}

table.dt.live-orders-table tr.order-row.batched.done td {
  background: #f7f8f8;
}

/* Drawn over the row dividers, so one trip's line runs unbroken from its first order to its last */
table.dt.live-orders-table tr.order-row.batched > td:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: -1px;
  width: 3px;
  background: #8f97e6;
  z-index: 1;
}

/* Batch: a line joining the orders one rider carries */
.batch-line {
  position: absolute;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: #c3c8f2;
}

/* Through the row dividers too, so the connector doesn't break between orders */
.batch-line.first { top: 50%; bottom: -1px; }
.batch-line.middle { top: -1px; bottom: -1px; }
.batch-line.last { top: -1px; bottom: 50%; }

.batch-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #aeb4ec;
  color: #4c56c4;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* The grey gap between orders (a trip counts as one), edged above and below */
table.dt.live-orders-table tr.batch-gap td {
  height: 14px;
  padding: 0;
  border-top: 1px solid #e6e7ea;
  border-bottom: 1px solid #e6e7ea;
  background: #f3f4f5;
}

table.dt.live-orders-table tbody tr.batch-gap:hover td {
  background: #f3f4f5;
}

/*
 * A trip mate outside the filter / search, shown only to keep its trip together: its content
 * fades, but not the trip's line down the left or the batch connector, so the trip stays joined
 */
table.dt.live-orders-table tr.order-row.context td > :not(.batch-line) {
  opacity: 0.5;
}

/* ================ ORDER DRAWER ================ */
.sheet-overlay.sheet-right {
  flex-direction: row;
  justify-content: flex-end;
  align-items: stretch;
  padding: 0;
}

.order-drawer {
  width: 500px;
  max-width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-shadow:
    -1px 0 0 #e6e7ea,
    -24px 0 64px rgba(15, 16, 17, 0.16);
  color: #0f1011;
  cursor: default;
  animation: drawer-in 0.18s ease-out;
}

@keyframes drawer-in {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
}

.od-head {
  flex-shrink: 0;
  padding: 18px 20px 16px;
  border-bottom: 1px solid #e6e7ea;
}

.od-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.od-title-row .wms-modal-close {
  width: 30px;
  height: 30px;
  margin-left: auto;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
}

.od-order {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
}

.ghost-icon.sm {
  width: 28px;
  height: 28px;
  margin: 0;
}

.od-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.od-meta-text {
  font-size: 12.5px;
  color: #62666d;
}

/* Total time: solid, green within the limit, amber near it, red past it */
.od-total-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #1f8a3e;
  color: #ffffff;
}

.od-total-banner.tone-warn { background: #c2700c; }
.od-total-banner.tone-danger { background: #d93b3b; }
.od-total-banner.tone-muted { background: #62666d; }

.od-total-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.od-total-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
}

.od-total-label .tickdot {
  background: #ffffff;
}

.od-total-sub {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.od-total-value {
  margin-left: auto;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.6px;
  white-space: nowrap;
}

.od-copy {
  height: 24px;
  padding: 0 8px;
  border: 1px solid #e6e7ea;
  border-radius: 6px;
  background: #ffffff;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: #3c4047;
  cursor: pointer;
}

.od-copy:hover {
  background: #f7f8f8;
}

.od-body {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.od-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
}

.od-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a8f98;
}

.od-eyebrow.block {
  display: block;
  margin-bottom: 8px;
}

.od-section-count {
  font-size: 12.5px;
  font-weight: 600;
}

.od-bin-wrap {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.od-bin-label {
  font-size: 11.5px;
  color: #62666d;
}

.od-bin {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 5px;
  background: #0f1011;
  box-shadow:
    inset 0 0 0 1px #ffffff,
    0 0 0 1px #0f1011;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.od-progress {
  height: 4px;
  margin: 8px 0 10px;
  border-radius: 999px;
  background: #f0f1f3;
  overflow: hidden;
}

.od-progress div {
  height: 4px;
  border-radius: 999px;
  background: #5e6ad2;
}

.od-progress div.done {
  background: #c4c6cb;
}

.od-picklist {
  border: 1px solid #e6e7ea;
  border-radius: 10px;
  /* Clip, not hidden: the column header sticks while the drawer scrolls */
  overflow: clip;
}

.od-picklist-row {
  display: grid;
  grid-template-columns: 18px 62px minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
  padding: 7px 12px;
  border-top: 1px solid #f0f1f3;
  font-size: 12.5px;
}

.od-picklist-row.head {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 6px 12px;
  border-top: none;
  background: #f7f8f8;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #62666d;
}

.od-picklist-row .qty {
  text-align: right;
}

.od-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border: 1.5px solid #d8d9dd;
  border-radius: 999px;
  color: #ffffff;
}

.od-picklist-row.picked .od-check {
  border-color: transparent;
  background: #27a644;
}

/* Finished orders: the whole picklist goes grey */
.od-picklist.closed .od-picklist-row.picked .od-check {
  background: #b8bcc4;
}

.od-location {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: #62666d;
}

.od-item-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.od-item-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
}

.od-item-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.od-item-sub {
  font-size: 11px;
  color: #62666d;
}

.od-item {
  min-width: 0;
  font-weight: 500;
  /* The full name, wrapping as it needs */
  overflow-wrap: anywhere;
}

.od-qty {
  text-align: right;
  font-weight: 600;
}

.od-picklist.closed .od-item,
.od-picklist.closed .od-qty {
  color: #62666d;
}

/* People */
.od-people {
  border: 1px solid #e6e7ea;
  border-radius: 10px;
  overflow: hidden;
}

.od-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.od-person + .od-person {
  border-top: 1px solid #f0f1f3;
}

.od-person-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #f3f4f5;
  color: #62666d;
}

.od-person-text {
  flex: 1 1 0%;
  min-width: 0;
}

.od-person-name-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.od-person-name {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.od-person-role {
  font-size: 11.5px;
  color: #8a8f98;
}

.od-person-detail {
  margin-top: 1px;
  font-size: 12px;
  color: #62666d;
}

.od-person-phone {
  font-size: 12.5px;
  font-weight: 600;
  color: #3c4047;
  white-space: nowrap;
  user-select: all;
}

.od-people-empty {
  padding: 12px;
  font-size: 12.5px;
  color: #8a8f98;
}

.od-trip {
  padding: 8px 12px 10px 52px;
  border-top: 1px solid #f0f1f3;
  background: #fafafb;
}

.od-trip-title {
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #62666d;
}

.od-trip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 0;
  border: none;
  background: transparent;
  font-family: inherit;
  text-align: left;
  color: #0f1011;
  cursor: pointer;
}

.od-trip-row.this,
.od-trip-row:disabled {
  cursor: default;
  opacity: 1;
  color: #0f1011;
}

.od-trip-row:not(.this):hover .od-trip-order {
  text-decoration: underline;
}

.od-trip-pos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #eff0f2;
  font-size: 10.5px;
  font-weight: 700;
}

.od-trip-order {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}

.od-trip-row.this .od-trip-order {
  font-weight: 600;
}

.od-trip-state {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
}

.od-trip-state.tone-this {
  font-weight: 600;
  color: #4c56c4;
}

.od-trip-state.tone-success { color: #1f8a3e; }
.od-trip-state.tone-danger { color: #c52828; }
.od-trip-state.tone-muted { color: #62666d; }

/* Live orders header: order-to-staging-bin average + search, on the right */
.live-orders-tools {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bin-avg {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 46px;
  padding: 0 8px 0 14px;
  border-radius: 10px;
  color: #ffffff;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(15, 16, 17, 0.12);
}

.bin-avg.tone-success {
  background: #1f8a3e;
}

.bin-avg.tone-warn {
  background: #d06a0c;
}

.bin-avg.tone-danger {
  background: #d93b3b;
}

.bin-avg-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.bin-avg-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bin-avg-sub {
  font-size: 11.5px;
  opacity: 0.88;
}

.bin-avg-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.bin-avg-badge {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 11.5px;
  font-weight: 700;
}

/* A stage card whose numbers can't load, e.g. the delivery feed is down */
.stage-card-notice {
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  background: #f7f8f8;
  font-size: 12.5px;
  line-height: 1.45;
  color: #62666d;
}

/* Picklist line states from the API */
.od-picklist-row.now {
  background: rgba(94, 106, 210, 0.07);
}

.od-picklist-row.now .od-check {
  border-color: #5e6ad2;
}

.od-picklist-row.short .od-check {
  border-color: transparent;
  background: #f2994a;
}

.od-picklist-row.short .od-qty {
  color: #a45a0c;
  font-weight: 600;
}

.od-picklist-row.skipped .od-item,
.od-picklist-row.skipped .od-location {
  color: #8a8f98;
  text-decoration: line-through;
}

/* ================ PICKER / RIDER AVAILABILITY DRAWERS ================ */
.order-drawer.pickers-drawer {
  width: 440px;
}

.pk-drawer-head {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 22px 16px 24px;
  border-bottom: 1px solid #e6e7ea;
}

.pk-grow {
  flex: 1 1 0%;
}

.pk-drawer-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.pk-drawer-sub {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  font-size: 13px;
  color: #62666d;
}

.pk-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #27a644;
}

.pk-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #62666d;
  cursor: pointer;
}

.pk-close:hover {
  background: #f3f4f5;
}

.pk-body {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
}

.pk-section {
  border-bottom: 1px solid #eceef1;
}

.pk-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 22px 14px 24px;
  border: none;
  background: #ffffff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.pk-head:hover {
  background: #fbfbfc;
}

/* The coloured bar beside each heading, and its count */
.pk-bar {
  align-self: stretch;
  width: 3px;
  border-radius: 2px;
}

.pk-bar.grey { background: #8a8f98; }
.pk-bar.amber { background: #c2700c; }
.pk-bar.red { background: #d93b3b; }
.pk-bar.crimson { background: #a3264a; }
.pk-bar.green { background: #27a644; }

.pk-title {
  flex: 1 1 0%;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: #0f1011;
}

.pk-count {
  font-size: 22px;
  font-weight: 600;
}

.pk-count.grey { color: #8a8f98; }
.pk-count.amber { color: #c2700c; }
.pk-count.red { color: #d93b3b; }
.pk-count.crimson { color: #a3264a; }
.pk-count.green { color: #27a644; }

.pk-chev {
  display: inline-flex;
  color: #8a8f98;
  transition: transform 0.15s;
}

.pk-chev.closed {
  transform: rotate(-90deg);
}

.pk-rows {
  padding: 2px 0 8px;
}

.pk-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 22px 10px 24px;
  border: none;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: default;
}

.pk-row.clickable {
  cursor: pointer;
}

.pk-row.clickable:hover {
  background: #f7f8f8;
}

.pk-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #f0f1f3;
  color: #3c4047;
  font-size: 12.5px;
  font-weight: 600;
}

.pk-person {
  flex: 1 1 0%;
  min-width: 0;
}

.pk-name,
.pk-sub {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pk-name {
  font-size: 14.5px;
  font-weight: 600;
  color: #0f1011;
}

.pk-sub {
  margin-top: 2px;
  font-size: 12px;
  color: #62666d;
}

.pk-sub.mono {
  font-family: var(--mono);
}

/* Time: green, amber near the limit, red past it */
.pk-time {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(39, 166, 68, 0.08);
  color: #1f8a3e;
}

.pk-time.near {
  background: rgba(242, 153, 74, 0.1);
  color: #a45a0c;
}

.pk-time.late {
  background: rgba(235, 87, 87, 0.07);
  color: #c52828;
}

/* Free: not on the clock */
.pk-time.idle {
  background: #f0f1f3;
  color: #62666d;
}

/* Time, and under it deliveries today */
.pk-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.pk-done {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  color: #1f8a3e;
}

.pk-empty {
  padding: 8px 24px 6px;
  font-size: 13px;
  color: #8a8f98;
}

/* ================ ORDER LOOKUP ================ */
.ol-head-row {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 8px 0 18px;
}

.ol-head-row.idle {
  margin-top: 12vh;
}

.ol-back {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px 0 9px;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  background: #ffffff;
  color: #0f1011;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ol-back:hover {
  background: #f7f8f8;
}

/* Search */
.ol-search-wrap {
  position: relative;
  max-width: 720px;
  margin: 0 auto 28px;
}

.ol-search-wrap.searching {
  margin-bottom: 22px;
}

.ol-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #c4c6cb;
  border-radius: 10px;
  background: #ffffff;
  color: #62666d;
  cursor: text;
}

.ol-search:focus-within {
  border-color: #5e6ad2;
  box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.15);
}

.ol-search svg {
  flex-shrink: 0;
}

.ol-search input {
  flex: 1 1 0%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: #0f1011;
  font-family: inherit;
}

.ol-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  background: #eff0f2;
  color: #62666d;
  cursor: pointer;
}

.ol-clear:hover {
  background: #e6e7ea;
  color: #0f1011;
}

.ol-hint {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  font-size: 13px;
  color: #8a8f98;
}

.ol-hint.ol-hint-error {
  color: #c52828;
}

/* Results */
.ol-results {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.ol-card {
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #ffffff;
  overflow: clip;
}

.ol-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

.ol-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a8f98;
}

.ol-count {
  margin-left: auto;
  font-size: 12px;
  color: #62666d;
}

.ol-grid {
  display: grid;
  grid-template-columns: 84px 158px minmax(0, 1fr) 64px 120px 92px;
  gap: 10px;
}

.ol-head {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 7px 16px;
  background: #f7f8f8;
  border-top: 1px solid #e6e7ea;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #62666d;
}

.ol-row {
  cursor: pointer;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid #f0f1f3;
  font-size: 12.5px;
  color: #0f1011;
}

.ol-row:hover {
  background: #fafafb;
}

.ol-order-id {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
}

.ol-muted {
  color: #3c4047;
}

.ol-ellipsis {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ol-right {
  text-align: right;
}

.ol-amount {
  text-align: right;
  font-weight: 600;
}

.ol-status {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
}

.ol-status.ok {
  background: rgba(39, 166, 68, 0.12);
  color: #1f8a3e;
}

.ol-status.info {
  background: rgba(94, 106, 210, 0.12);
  color: #4c56c4;
}

.ol-status.warn {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

.ol-status.bad {
  background: rgba(235, 87, 87, 0.12);
  color: #c52828;
}

.ol-empty-row {
  padding: 18px 16px;
  border-top: 1px solid #f0f1f3;
  font-size: 12.5px;
  color: #8a8f98;
  text-align: center;
}

/* Customer */
.ol-customer {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ol-customer-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ol-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 999px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.ol-min {
  min-width: 0;
}

.ol-customer-name {
  font-size: 16px;
  font-weight: 600;
  color: #0f1011;
}

.ol-customer-phone {
  margin-top: 2px;
  font-size: 12px;
  color: #62666d;
}

.ol-address {
  font-size: 12px;
  color: #3c4047;
  line-height: 1.5;
}

.ol-scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ol-score {
  --tone: #1f8a3e;
  --tone-bg: rgba(39, 166, 68, 0.12);
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f8f8;
}

.ol-score.warn {
  --tone: #b45309;
  --tone-bg: rgba(217, 119, 6, 0.12);
}

.ol-score.bad {
  --tone: #c52828;
  --tone-bg: rgba(235, 87, 87, 0.12);
}

.ol-score-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ol-score-title {
  font-size: 11.5px;
  color: #62666d;
}

.ol-score-tag {
  margin-left: auto;
  padding: 0 7px;
  line-height: 18px;
  border-radius: 5px;
  background: var(--tone-bg);
  color: var(--tone);
  font-size: 11px;
  font-weight: 600;
}

.ol-score-body {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.ol-score-value {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: var(--tone);
}

.ol-score-bars {
  flex: 1 1 0%;
  display: flex;
  gap: 3px;
}

.ol-score-bars span {
  flex: 1 1 0%;
  height: 5px;
  border-radius: 999px;
  background: #e6e7ea;
}

.ol-score-bars span.on {
  background: var(--tone);
}

.ol-score-note {
  margin-top: 4px;
  font-size: 11.5px;
  color: #62666d;
  line-height: 1.4;
}

.ol-avatar.sm {
  width: 26px;
  height: 26px;
  font-size: 10.5px;
}

.ol-soft {
  color: #62666d;
}

.ol-good {
  color: #1f8a3e;
}

.ol-strong {
  font-weight: 600;
  color: #0f1011;
}

.ol-count.ol-strong {
  color: #3c4047;
}

.ol-tag {
  margin-left: auto;
  padding: 0 7px;
  line-height: 18px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.ol-tag.ok {
  background: rgba(39, 166, 68, 0.12);
  color: #1f8a3e;
}

.ol-tag.info {
  background: rgba(94, 106, 210, 0.12);
  color: #4c56c4;
}

.ol-tag.bad {
  background: rgba(235, 87, 87, 0.12);
  color: #c52828;
}

.ol-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  background: #ffffff;
  color: #0f1011;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.ol-btn:hover {
  background: #f7f8f8;
}

.ol-btn.sm {
  height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  color: #3c4047;
  font-size: 11.5px;
}

/* Order details */
.ol-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ol-crumb {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #e6e7ea;
  border-radius: 7px;
  background: #ffffff;
  color: #3c4047;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.ol-crumb:hover {
  background: #f7f8f8;
}

.ol-detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ol-detail-id {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 20px;
  font-weight: 600;
}

.ol-status.lg {
  padding: 0 10px;
  line-height: 24px;
  font-size: 12.5px;
}

.ol-placed {
  font-size: 13px;
  color: #62666d;
}

.ol-stats {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ol-stat {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #ffffff;
}

.ol-stat.clickable {
  cursor: pointer;
}

.ol-stat.clickable:hover {
  border-color: #c4c6cb;
}

.ol-stat-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ol-stat-label {
  font-size: 11.5px;
  color: #62666d;
}

.ol-stat-value {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: #0f1011;
}

.ol-stat-value.md {
  font-size: 18px;
  letter-spacing: 0;
}

.ol-stat-value.sm {
  font-size: 16px;
  letter-spacing: 0;
}

.ol-stat-sub {
  margin-top: 2px;
  font-size: 12px;
  color: #62666d;
}

.ol-stat-person {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
}

.ol-stat-person + .ol-stat-sub {
  margin-top: 4px;
}

.ol-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.ol-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.ol-pad {
  padding: 12px 16px;
}

.ol-section-title {
  display: block;
  margin-bottom: 10px;
}

.ol-card-row {
  display: flex;
  align-items: center;
}

.ol-card-row .ol-btn {
  margin-left: auto;
}

/* Items */
.ol-items-grid {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 64px 64px 70px 80px;
  gap: 10px;
}

.ol-item {
  align-items: center;
  padding: 9px 16px;
  border-top: 1px solid #f0f1f3;
  font-size: 13px;
}

.ol-item-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #0e7490;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
}

.ol-item-name {
  display: block;
  font-weight: 600;
  color: #0f1011;
}

/* Short picked: flagged red; nothing picked strikes the name and total out */
.ol-item.short {
  background: rgba(235, 87, 87, 0.04);
  box-shadow: inset 3px 0 0 #eb5757;
}

.ol-short {
  color: #c52828;
}

.ol-item.none .ol-item-name,
.ol-item.none .ol-item-total {
  text-decoration: line-through;
  color: #8a8f98;
}

.ol-item-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #62666d;
}

.ol-totals {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 16px;
  border-top: 1px solid #e6e7ea;
  background: #fafafb;
  font-size: 12.5px;
}

.ol-totals > div {
  display: flex;
  justify-content: space-between;
}

/* Timeline */
.ol-step {
  display: flex;
  gap: 10px;
}

.ol-step-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 10px;
}

.ol-step-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 999px;
  background: #27a644;
}

.ol-step-line {
  flex: 1 1 0%;
  width: 2px;
  min-height: 8px;
  background: #27a644;
}

.ol-step-line.pending {
  background: #e6e7ea;
}

.ol-step-line.last {
  background: transparent;
}

.ol-step.pending .ol-step-dot {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #c4c6cb;
}

.ol-step.pending .ol-step-line {
  background: #e6e7ea;
}

.ol-step.failed .ol-step-dot {
  background: #c52828;
}

.ol-step-body {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 9px;
  font-size: 12.5px;
}

.ol-step-label {
  font-weight: 600;
  color: #0f1011;
  white-space: nowrap;
}

.ol-step.pending .ol-step-label {
  color: #8a8f98;
}

.ol-step-detail {
  min-width: 0;
  color: #62666d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ol-step-delta {
  margin-left: auto;
  flex-shrink: 0;
  color: #8a8f98;
}

.ol-step-time {
  flex-shrink: 0;
  width: 66px;
  text-align: right;
  color: #3c4047;
}

/* Customer (order view) */
.ol-customer.compact {
  padding: 12px 16px;
  gap: 10px;
}

.ol-address.lg {
  font-size: 12.5px;
}

/* People */
.ol-people-title {
  display: block;
  padding: 12px 16px 6px;
}

.ol-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid #f0f1f3;
}

.ol-person-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 999px;
  background: #f3f4f5;
  color: #62666d;
}

.ol-person-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.ol-person-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f1011;
}

.ol-person-role {
  font-size: 11.5px;
  color: #8a8f98;
}

.ol-person-sub {
  margin-top: 1px;
  font-size: 12px;
  color: #62666d;
}

/* Proof */
.ol-proof {
  display: flex;
  gap: 12px;
}

.ol-photo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 104px;
  flex-shrink: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  background: #ece7df;
  color: #8a7f6e;
  cursor: zoom-in;
}

.ol-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ol-photo:hover {
  filter: brightness(0.97);
}

.ol-photo-expand {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(15, 16, 17, 0.55);
  color: #ffffff;
}

.ol-proof-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
}

.ol-proof-title {
  font-size: 14px;
  font-weight: 600;
}

/* Search suggestions */
.ol-suggest {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  z-index: 42;
  padding: 6px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 16, 17, 0.14);
}

.ol-suggest-group {
  padding: 6px 10px 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a8f98;
}

.ol-suggest-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.ol-suggest-option.active {
  background: rgba(94, 106, 210, 0.1);
}

.ol-suggest-option .ol-status {
  margin-left: auto;
}

.ol-suggest-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f1011;
}

.ol-suggest-meta {
  min-width: 0;
  font-size: 12px;
  color: #62666d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ol-suggest-empty {
  padding: 12px 10px;
  font-size: 12.5px;
  color: #8a8f98;
}

.ol-suggest-keys {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  padding: 8px 10px 4px;
  border-top: 1px solid #f0f1f3;
  font-size: 11px;
  color: #8a8f98;
}

/* ---- Order details: stats, header and customer (v2) ---- */
.ol-push {
  margin-left: auto;
}

/* "Ordered from" store — blue */
.ol-stat.from {
  border-color: rgba(94, 106, 210, 0.35);
  background: rgba(94, 106, 210, 0.06);
}

.ol-stat.from .ol-stat-label {
  color: #4c56c4;
  font-weight: 600;
}

.ol-from {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: #4c56c4;
}

.ol-from svg {
  flex-shrink: 0;
}

.ol-from-code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 15px;
  font-weight: 700;
  color: #0f1011;
}

/* Time taken — solid red over the limit, green within it */
.ol-stat.over {
  border-color: #d93b3b;
  background: #d93b3b;
}

.ol-stat.over .ol-stat-label,
.ol-stat.over .ol-stat-sub {
  color: rgba(255, 255, 255, 0.92);
}

.ol-stat.over .ol-stat-sub {
  font-weight: 600;
}

.ol-stat.over .ol-stat-value {
  color: #ffffff;
  font-weight: 700;
}

.ol-stat.within .ol-stat-value {
  color: #1f8a3e;
}

/* Customer: name + phone opens all their orders */
.ol-customer-person {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -4px -6px 0;
  padding: 4px 6px;
  border-radius: 8px;
  cursor: pointer;
}

.ol-customer-person:hover {
  background: #f7f8f8;
}

.ol-avatar.md {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.ol-customer-person-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.ol-customer-person .ol-customer-phone {
  display: block;
  margin-top: 0;
}

.ol-address.with-icon {
  display: flex;
  gap: 8px;
}

.ol-address.with-icon svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: #8a8f98;
}

/* ================ INVENTORY: same search, a darker hint ================ */
.ol-hint.inv-hint {
  color: #666a72;
}

/* ================ SHORT PICKS ================ */
.sp-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  background: #ffffff;
  color: #3c4047;
  cursor: pointer;
}

.sp-icon-btn:hover:not(:disabled) {
  background: #f7f8f8;
}

.sp-icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* "Live · 10:10 AM" beside the title */
.sp-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #62666d;
}

.sp-live-dot {
  width: 6px;
  height: 6px;
  background: #4cc26a;
}

.sp-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Today | Yesterday | ‹ Pick a date › */
.sp-dayseg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: #eff0f2;
}

.sp-dayseg-btn {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 14px;
  border: none;
  border-radius: 7px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #62666d;
  white-space: nowrap;
  cursor: pointer;
}

.sp-dayseg-btn.on,
.sp-dayseg-pick.on {
  background: #ffffff;
  box-shadow:
    0 0 0 1px #e6e7ea,
    0 1px 2px rgba(15, 16, 17, 0.06);
}

.sp-dayseg-btn.on {
  font-weight: 600;
  color: #0f1011;
}

.sp-dayseg-pick {
  display: inline-flex;
  align-items: center;
  height: 28px;
  border-radius: 7px;
}

.sp-dayseg-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #3c4047;
  cursor: pointer;
}

.sp-dayseg-step:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.sp-dayseg-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #62666d;
  white-space: nowrap;
  cursor: pointer;
}

.sp-dayseg-pick.on .sp-dayseg-date {
  font-weight: 600;
  color: #0f1011;
}

.sp-dayseg-date svg {
  flex-shrink: 0;
}

/* Every toggle reacts to the pointer, so it reads as pressable */
.sp-dayseg-btn,
.sp-dayseg-step,
.sp-dayseg-date {
  transition:
    background 0.12s ease,
    color 0.12s ease;
}

.sp-dayseg-btn:not(.on):hover,
.sp-dayseg-date:hover,
.sp-dayseg-date.open,
.sp-dayseg-step:hover:not(:disabled) {
  background: #e2e4e8;
  color: #0f1011;
}

.sp-dayseg-pick.on .sp-dayseg-date:hover,
.sp-dayseg-pick.on .sp-dayseg-step:hover:not(:disabled) {
  background: #f3f4f5;
}

.sp-dayseg-btn:focus-visible,
.sp-dayseg-step:focus-visible,
.sp-dayseg-date:focus-visible {
  outline: 2px solid #5e6ad2;
  outline-offset: 1px;
}

/* The month calendar under "Pick a date" */
.sp-day-pop {
  padding: 16px 16px 12px;
}

.sp-day-pop-hint {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0f1f3;
  font-size: 11.5px;
  color: #666a72;
}

/* Product tiles open the catalogue image */
.sp-item-tile,
.sp-rank-avatar.item {
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: zoom-in;
}

/* Cards */
.sp-cards {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 14px;
  margin-bottom: 16px;
  align-items: stretch;
}

.sp-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #ffffff;
}

.sp-card-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.sp-card-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

/* Day by day: a bar per day, the shown day in purple */
.sp-days {
  flex: 1 1 0%;
  display: grid;
  gap: 4px;
  align-items: end;
  min-height: 120px;
}

.sp-day {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 4px 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.sp-day:hover:not(.on) {
  background: #f7f8f8;
}

.sp-day-value {
  font-size: 12px;
  font-weight: 600;
  color: #62666d;
}

.sp-day-bar {
  width: 18px;
  border-radius: 4px 4px 2px 2px;
  background: #d5d8de;
}

.sp-day-label {
  font-size: 11px;
  font-weight: 500;
  color: #62666d;
  white-space: nowrap;
}

.sp-day.on .sp-day-value,
.sp-day.on .sp-day-label {
  font-weight: 600;
  color: #0f1011;
}

.sp-day.on .sp-day-bar {
  background: #5e6ad2;
}

.sp-card-hint {
  margin-left: auto;
  font-size: 11.5px;
  color: #8a8f98;
}

.sp-empty {
  flex: 1 1 0%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  color: #8a8f98;
}

.sp-empty.pad {
  padding: 24px;
}

/* Summary */
.sp-total {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.sp-total-value {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -1.2px;
  line-height: 1;
}

.sp-total-label {
  font-size: 12.5px;
  color: #62666d;
}

.sp-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #f0f1f3;
}

.sp-stat {
  min-width: 0;
  padding: 4px 6px;
}

.sp-stat-value {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: #0f1011;
  white-space: nowrap;
}

.sp-stat-value.danger {
  color: #c52828;
}

.sp-stat-label {
  font-size: 12px;
  color: #62666d;
}

/* Picker / item rankings */
.sp-ranks {
  flex: 1 1 0%;
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
  gap: 4px;
}

.sp-rank {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 30px;
  gap: 9px;
  align-items: center;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #f4f5f6;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.sp-rank:hover {
  background: #eceef1;
}

.sp-rank.on {
  border-color: rgba(94, 106, 210, 0.45);
  background: rgba(94, 106, 210, 0.08);
}

.sp-rank-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
}

.sp-rank-avatar.picker {
  border-radius: 999px;
}

.sp-rank-avatar.item {
  border-radius: 7px;
  font-size: 10px;
}

.sp-rank-body {
  min-width: 0;
}

.sp-rank-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0f1011;
  /* The full name, wrapping as it needs */
  overflow-wrap: anywhere;
}

.sp-rank-sub {
  display: block;
  margin-top: 1px;
  font-size: 11.5px;
  color: #62666d;
  white-space: nowrap;
}

.sp-rank-bar {
  display: block;
  height: 4px;
  margin-top: 4px;
  border-radius: 999px;
  background: #eff0f2;
  overflow: hidden;
}

.sp-rank-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #c4c6cb;
}

.sp-rank-bar span.top {
  background: #eb5757;
}

.sp-rank-count {
  text-align: right;
  font-size: 16px;
  font-weight: 600;
  color: #0f1011;
}

.sp-rank-count.top {
  color: #c52828;
}

/* List */
.sp-list {
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #ffffff;
  overflow: clip;
}

.sp-list-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
}

.sp-list-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.sp-list-meta {
  font-size: 12.5px;
  color: #62666d;
  white-space: nowrap;
}

.sp-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 8px 0 10px;
  border: 1px solid rgba(94, 106, 210, 0.35);
  border-radius: 999px;
  background: rgba(94, 106, 210, 0.08);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #4c56c4;
  cursor: pointer;
}

.sp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  width: 300px;
  height: 34px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  background: #ffffff;
  color: #8a8f98;
  cursor: text;
}

.sp-search input {
  flex: 1 1 0%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: #0f1011;
}

.sp-scroll {
  overflow-x: auto;
}

.sp-table {
  min-width: 1180px;
}

.sp-grid {
  display: grid;
  grid-template-columns: 64px minmax(180px, 1fr) 220px 96px 64px 64px 64px 140px 128px 112px;
  gap: 10px;
}

.sp-header {
  position: relative;
  z-index: 3;
  transform: translateY(var(--head-shift, 0px));
  padding: 9px 16px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #62666d;
  background: #f7f8f8;
  border-top: 1px solid #e6e7ea;
  border-bottom: 1px solid #e6e7ea;
}

.sp-header .center {
  text-align: center;
}

.sp-row {
  align-items: center;
  padding: 11px 16px;
  border-top: 1px solid #f0f1f3;
  font-size: 12.5px;
}

.sp-row:first-of-type {
  border-top: none;
}

.sp-row .copyb {
  opacity: 0;
}

.sp-row:hover .copyb,
.sp-row .copyb:focus-visible {
  opacity: 1;
}

.sp-time {
  color: #3c4047;
  white-space: nowrap;
}

.sp-min {
  min-width: 0;
}

.sp-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp-item-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

/* The product image, when the API has one, fills the tile */
.sp-item-tile img,
.sp-rank-avatar.item img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  background: #ffffff;
}

.sp-item-tile,
.sp-rank-avatar.item {
  overflow: hidden;
}

.sp-item-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  /* The full name, wrapping as it needs */
  overflow-wrap: anywhere;
}

.sp-mono-sub {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: #62666d;
}

.sp-bin {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  border-radius: 6px;
  background: #eceef1;
  color: #0f1011;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  /* The full bin, breaking at its hyphens when it doesn't fit */
  overflow-wrap: anywhere;
}

.sp-bin svg {
  flex-shrink: 0;
  color: #62666d;
}

.sp-person {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  color: #0f1011;
}

.sp-person svg {
  flex-shrink: 0;
  color: #8a8f98;
}

.sp-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-none {
  font-size: 12px;
  color: #c4c6cb;
}

.sp-num {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #0f1011;
}

.sp-num.soft {
  color: #3c4047;
}

.sp-num.danger {
  color: #c52828;
}

.sp-order {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
}

.sp-mono {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}


.sp-status {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.sp-status.idle {
  background: #f3f4f5;
  color: #3c4047;
}

.sp-status.warn {
  background: rgba(242, 153, 74, 0.16);
  color: #a45a0c;
}

.sp-status.info {
  background: rgba(94, 106, 210, 0.12);
  color: #4c56c4;
}

.sp-status.ok {
  background: rgba(39, 166, 68, 0.12);
  color: #1f8a3e;
}

/* ================ EXCEPTIONS ================ */
.wms-page-icon.danger {
  background: rgba(235, 87, 87, 0.1);
  color: #c52828;
}

/* Segmented control: Open / Closed, and the date range */
.ex-seg {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 3px;
  border-radius: 9px;
  background: #f3f4f5;
}

.ex-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border: none;
  border-radius: 7px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #62666d;
  white-space: nowrap;
  cursor: pointer;
}

.ex-seg-btn.on {
  background: #ffffff;
  box-shadow:
    0 0 0 1px #e6e7ea,
    0 1px 2px rgba(15, 16, 17, 0.06);
  color: #0f1011;
  font-weight: 600;
}

.ex-seg-btn svg:last-child:not(:first-child) {
  opacity: 0.6;
}

.ex-seg-sub {
  font-weight: 500;
  color: #62666d;
}

.ex-seg-count {
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: #62666d;
}

.ex-seg-btn.on .ex-seg-count {
  background: #eff0f2;
}

.ex-seg-btn.on .ex-seg-count.open {
  background: rgba(242, 153, 74, 0.16);
  color: #a45a0c;
}

/* Custom range popover */
.ex-range-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow:
    0 0 0 1px #e6e7ea,
    0 12px 32px rgba(15, 16, 17, 0.14);
}

.ex-range-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #62666d;
}

.ex-range-field input {
  height: 30px;
  padding: 0 8px;
  border: 1px solid #e6e7ea;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12.5px;
  color: #0f1011;
}

.ex-range-apply {
  height: 30px;
  padding: 0 12px;
  border: none;
  border-radius: 7px;
  background: #4c56c4;
  color: #ffffff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.ex-range-apply:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Cards */
.ex-cards {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.05fr);
  gap: 14px;
  margin-bottom: 14px;
  align-items: stretch;
}

.ex-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #ffffff;
}

.ex-card-top {
  display: flex;
  align-items: stretch;
}

.ex-card-main {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0;
}

.ex-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
}

.ex-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(94, 106, 210, 0.1);
  color: #4c56c4;
}

.ex-card-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.ex-card-rule {
  width: 1px;
  margin: 0 12px;
  background: #e6e7ea;
}

.ex-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 2px;
}

.ex-total-value {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -1.2px;
  line-height: 1;
  color: #0f1011;
}

.ex-total-value.danger {
  color: #c52828;
}

.ex-total-label {
  font-size: 12.5px;
  color: #62666d;
  white-space: nowrap;
}

/* Over 24 h box */
.ex-late {
  flex: 0 0 168px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(235, 87, 87, 0.45);
  border-radius: 10px;
  background: rgba(235, 87, 87, 0.06);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.ex-late:hover {
  background: rgba(235, 87, 87, 0.1);
}

.ex-late.on {
  border-color: #c52828;
  box-shadow: 0 0 0 1px #c52828;
}

.ex-late-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: #c52828;
  white-space: nowrap;
}

.ex-late-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(235, 87, 87, 0.12);
}

.ex-late-value {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -1.2px;
  line-height: 1;
  color: #c52828;
}

/* Tiles */
.ex-tiles {
  flex: 1 1 0%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  align-content: start;
  padding-top: 6px;
  border-top: 1px solid #f0f1f3;
}

.ex-tile {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 8px 10px 8px 72px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #f7f8f8;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.ex-tile.plain {
  padding: 7px 10px;
}

.ex-tile:hover {
  background: #eff0f2;
}

.ex-tile.on {
  border-color: rgba(94, 106, 210, 0.5);
  background: rgba(94, 106, 210, 0.08);
}

.ex-tile-icon {
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  border-radius: 10px;
}

.ex-tile-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.6px;
  line-height: 1.15;
  color: #0f1011;
}

.ex-tile-value.sm {
  font-size: 19px;
}

.ex-tile-label {
  max-width: 100%;
  font-size: 12.5px;
  font-weight: 500;
  color: #3c4047;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ex-tile-sub {
  max-width: 100%;
  font-size: 11.5px;
  color: #62666d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Type colours (tile icons and row icons) */
:is(.ex-tile-icon, .ex-type-icon).tone-orange { background: rgba(194, 65, 12, 0.12); color: #c2410c; }
:is(.ex-tile-icon, .ex-type-icon).tone-red { background: rgba(235, 87, 87, 0.12); color: #c52828; }
:is(.ex-tile-icon, .ex-type-icon).tone-amber { background: rgba(202, 138, 4, 0.14); color: #a16207; }
:is(.ex-tile-icon, .ex-type-icon).tone-indigo { background: rgba(94, 106, 210, 0.12); color: #4c56c4; }
:is(.ex-tile-icon, .ex-type-icon).tone-pink { background: rgba(190, 24, 93, 0.1); color: #be185d; }
:is(.ex-tile-icon, .ex-type-icon).tone-teal { background: rgba(14, 116, 144, 0.12); color: #0e7490; }
:is(.ex-tile-icon, .ex-type-icon).tone-violet { background: rgba(124, 58, 237, 0.1); color: #6d28d9; }
:is(.ex-tile-icon, .ex-type-icon).tone-slate { background: rgba(71, 85, 105, 0.12); color: #475569; }

/* List */
.ex-list {
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #ffffff;
  overflow: clip;
}

.ex-list-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
}

.ex-list-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.ex-list-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(94, 106, 210, 0.1);
  color: #4c56c4;
}

.ex-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 8px 0 10px;
  border: 1px solid rgba(94, 106, 210, 0.35);
  border-radius: 999px;
  background: rgba(94, 106, 210, 0.08);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #4c56c4;
  cursor: pointer;
}

.ex-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  width: 300px;
  height: 34px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  background: #ffffff;
  color: #8a8f98;
  cursor: text;
}

.ex-search input {
  flex: 1 1 0%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  color: #0f1011;
}

.ex-scroll {
  overflow-x: auto;
}

.ex-table {
  min-width: 560px;
}

.ex-grid {
  display: grid;
  grid-template-columns:
    104px minmax(210px, 1.5fr) minmax(160px, 1fr) minmax(110px, 0.8fr)
    minmax(120px, 0.8fr) 90px 104px;
  gap: 10px;
}

.ex-grid.closed {
  grid-template-columns:
    104px minmax(210px, 1.5fr) minmax(160px, 1fr) minmax(110px, 0.8fr)
    minmax(120px, 0.8fr) minmax(200px, 1.3fr);
}

.ex-header {
  padding: 9px 16px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #62666d;
  background: #f7f8f8;
  border-top: 1px solid #e6e7ea;
  border-bottom: 1px solid #e6e7ea;
}

.ex-row {
  align-items: center;
  padding: 11px 16px;
  border-top: 1px solid #f0f1f3;
  font-size: 12.5px;
  color: #0f1011;
  cursor: pointer;
}

.ex-row:first-of-type {
  border-top: none;
}

.ex-row:hover {
  background: #fafafb;
}

.ex-row.late {
  background: rgba(235, 87, 87, 0.03);
  box-shadow: inset 3px 0 0 #d93b3b;
}

.ex-row .copyb {
  opacity: 0;
}

.ex-row:hover .copyb,
.ex-row .copyb:focus-visible {
  opacity: 1;
}

.ex-wait {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 96px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.ex-wait.ok {
  background: #1f8a3e;
  color: #ffffff;
}

.ex-wait.late {
  background: #c52828;
  color: #ffffff;
}

/* Closed: tinted, not solid */
.ex-wait.took.ok {
  background: rgba(39, 166, 68, 0.12);
  color: #1f8a3e;
}

.ex-wait.took.late {
  background: rgba(235, 87, 87, 0.12);
  color: #c52828;
}

.ex-wait-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ffffff;
  animation: ex-tick 1.6s ease-in-out infinite;
}

@keyframes ex-tick {
  50% {
    opacity: 0.35;
  }
}

.ex-type {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ex-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.ex-type-icon svg {
  width: 18px;
  height: 18px;
}

.ex-min {
  min-width: 0;
}

.ex-type-label {
  display: block;
  font-weight: 600;
  line-height: 1.3;
}

.ex-id-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

.ex-id {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #62666d;
  white-space: nowrap;
}

.ex-doc {
  min-width: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ex-person {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.ex-person svg {
  flex-shrink: 0;
  color: #8a8f98;
}

.ex-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ex-strong {
  font-weight: 600;
  white-space: nowrap;
}

.ex-action {
  text-align: right;
}

.ex-review {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 104px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.ex-review.late {
  background: #c52828;
  color: #ffffff;
}

.ex-review.open {
  border: 1px solid #d8d9dd;
  background: #ffffff;
  color: #0f1011;
}

.ex-outcome {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ex-chip {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.ex-chip.loss {
  background: rgba(235, 87, 87, 0.1);
  color: #c52828;
}

.ex-chip.task {
  background: rgba(94, 106, 210, 0.1);
  color: #4c56c4;
}

.ex-chip.none {
  background: #f3f4f5;
  color: #62666d;
}

.ex-empty {
  padding: 24px;
  font-size: 12.5px;
  color: #8a8f98;
}

/* ================ EXCEPTION DETAIL (list pane + sheet) ================ */
.exd {
  display: flex;
  align-items: flex-start;
  min-height: 100%;
}

.exd-grow {
  flex: 1 1 0%;
}

/* Left pane — stays put while the sheet scrolls */
.exd-pane {
  position: sticky;
  top: 0;
  flex-shrink: 0;
  width: 300px;
  /* Full height under the top bar */
  height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-right: 1px solid #e6e7ea;
}

.exd-pane-head {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 12px 16px;
  border-bottom: 1px solid #e6e7ea;
}

.exd-pane-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exd-pane-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.ex-seg.sm {
  height: 28px;
  margin-left: auto;
  border-radius: 8px;
}

.ex-seg.sm .ex-seg-btn {
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
}

.exd-seg-count {
  font-size: 11px;
  color: #62666d;
}

.ex-search.full {
  width: auto;
  height: 32px;
  margin-left: 0;
  padding: 0 10px;
}

.exd-pane-list {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.exd-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 14px 11px 16px;
  border-bottom: 1px solid #f0f1f3;
  cursor: pointer;
}

.exd-row:hover {
  background: #fafafb;
}

.exd-row.on {
  background: #f4f5f6;
  box-shadow: inset 3px 0 0 #5e6ad2;
}

.exd-row-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ex-type-icon.sm {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.ex-type-icon.sm svg {
  width: 15px;
  height: 15px;
}

.ex-type-icon.lg {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.exd-row-type {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exd-row-ref {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: #62666d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exd-row-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 35px;
  font-size: 11.5px;
  color: #62666d;
}

.exd-row-value {
  font-weight: 600;
  color: #3c4047;
  white-space: nowrap;
}

/* Took / waiting pill */
.exd-pill {
  flex-shrink: 0;
  display: inline-block;
  width: 64px;
  padding: 2px 6px;
  border-radius: 6px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.exd-pill.ok {
  background: rgba(39, 166, 68, 0.12);
  color: #1f8a3e;
}

.exd-pill.late {
  background: rgba(235, 87, 87, 0.12);
  color: #c52828;
}

.exd-pill.lg {
  width: auto;
  margin-top: 3px;
  padding: 2px 8px;
  border-radius: 7px;
  font-size: 13px;
}

/* Decision bar: one segment per item */
.exd-bar {
  flex: 1 1 0%;
  display: flex;
  gap: 2px;
  min-width: 30px;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: #eff0f2;
}

.exd-bar > span {
  flex: 1 1 0%;
}

.exd-bar.lg {
  gap: 3px;
  max-width: 220px;
  height: 6px;
  margin-left: auto;
  overflow: visible;
  background: none;
}

.exd-bar.lg > span {
  border-radius: 999px;
}

.exd-bar .found {
  background: #5e6ad2;
}

.exd-bar .missing {
  background: #d93b3b;
}

.exd-bar .pending {
  background: #d8d9dd;
}

/* Decided, but the list doesn't say which way */
.exd-bar .decided {
  background: #8a8f98;
}

/* Sheet */
.exd-sheet {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 28px 28px;
}

.exd-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.exd-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 1px solid #d8d9dd;
  border-radius: 8px;
  background: #ffffff;
  color: #3c4047;
  cursor: pointer;
}

.exd-back:hover {
  background: #f7f8f8;
}

.exd-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.exd-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.exd-status {
  padding: 0 9px;
  line-height: 21px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.exd-status.closed {
  background: rgba(39, 166, 68, 0.12);
  color: #1f8a3e;
}

.exd-status.open {
  background: rgba(242, 153, 74, 0.16);
  color: #a45a0c;
}

.exd-status.late {
  background: rgba(235, 87, 87, 0.12);
  color: #c52828;
}

.exd-id-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

/* Facts: the documents (with copy) on top, raised by / waiting / loss underneath */
.exd-facts {
  flex-shrink: 0;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  overflow: hidden;
}

.exd-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  padding: 12px 16px;
}

.exd-ref-value {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 3px;
}

.exd-ref-id {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.exd-ref-value .exd-fact-link {
  margin-top: 0;
}

.exd-facts-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #f0f1f3;
}

.exd-fact {
  min-width: 0;
  padding: 11px 16px;
  border-right: 1px solid #f0f1f3;
}

.exd-fact-name {
  margin-top: 4px;
  font-size: 13.5px;
}

.exd-fact:last-child {
  border-right: none;
}

.exd-fact.loss {
  background: rgba(235, 87, 87, 0.05);
}

.exd-fact-label {
  font-size: 11px;
  color: #62666d;
}

.exd-fact.loss .exd-fact-label {
  color: #c52828;
}

.exd-fact-value {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exd-fact-value.mono {
  font-family: var(--mono);
  font-size: 12px;
}

.exd-loss {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
  min-width: 0;
}

.exd-loss > .num:first-child {
  font-size: 15px;
  font-weight: 600;
  color: #c52828;
  white-space: nowrap;
}

.exd-loss-units {
  font-size: 11.5px;
  color: #62666d;
  white-space: nowrap;
}

/* Items: a heading, then one card per line */
.exd-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exd-items-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.exd-items-title {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.exd-items-state {
  font-size: 12.5px;
  font-weight: 600;
  color: #0f1011;
  white-space: nowrap;
}

.exd-lcard {
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

/* Matched by the list search: orange border, and the product part tinted orange, blinking
   together for about 5 seconds (6 × 0.8s); after that only the border stays */
.exd-lcard.hit {
  border: 2px solid #f2994a;
  animation: exd-hit-border 0.8s ease-in-out 6;
}

.exd-lcard.hit .exd-lcard-top {
  animation: exd-hit-fill 0.8s ease-in-out 6;
}

@keyframes exd-hit-border {
  50% {
    border-color: #e6e7ea;
  }
}

@keyframes exd-hit-fill {
  0%,
  100% {
    background: rgba(242, 153, 74, 0.25);
  }
  50% {
    background: #ffffff;
  }
}

.exd-lcard-top {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 14px 16px;
}

.exd-lcard .exd-item-tile {
  width: 72px;
  height: 72px;
  border: 1px solid #e6e7ea;
  border-radius: 10px;
  box-sizing: border-box;
  font-size: 20px;
  letter-spacing: 0.5px;
}

.exd-lcard .exd-item-tile.tote svg {
  width: 26px;
  height: 26px;
}

.exd-lcard-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.exd-lcard-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.exd-lcard-hit {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  line-height: 19px;
  border-radius: 5px;
  background: rgba(242, 153, 74, 0.18);
  color: #a45a0c;
  font-size: 11px;
  font-weight: 600;
}

.exd-lcard-meta {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #62666d;
}

.exd-lcard-code {
  font-family: var(--mono);
  font-size: 12px;
  color: #3c4047;
}

.exd-lcard-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 16px 14px;
  border-top: 1px solid #f0f1f3;
  background: #fbfbfc;
}

/* "2 units" */
.exd-lcard-qty {
  flex-shrink: 0;
  min-width: 72px;
  padding-right: 16px;
  border-right: 1px solid #e6e7ea;
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.exd-lcard-qty-value {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1.1;
  color: #0f1011;
}

.exd-lcard-qty-unit {
  font-size: 13px;
  font-weight: 500;
  color: #62666d;
}

.exd-lcard-sides {
  display: flex;
  gap: 14px;
}

.exd-lcard-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.exd-lcard-side-label {
  align-self: flex-start;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #3c4047;
  white-space: nowrap;
}

.exd-lcard-side-label span {
  margin-left: 6px;
  font-weight: 400;
  color: #8a8f98;
}

/* Read-only: the decided quantity instead of a stepper */
.exd-lcard-static {
  align-self: flex-start;
  font-size: 18px;
  font-weight: 600;
}

.exd-lcard-static.found {
  color: #4c56c4;
}

.exd-lcard-static.missing {
  color: #c52828;
}

.exd-lcard-static.zero {
  color: #8a8f98;
}

/* "All damaged" / "All not damaged" under each stepper */
.exd-allb {
  margin-top: 5px;
  padding: 2px 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.exd-allb.good {
  color: #1f8a3e;
}

.exd-allb.bad {
  color: #c52828;
}

.exd-allb[aria-pressed="true"] {
  text-decoration: none;
}

.exd-allb:disabled {
  opacity: 0.4;
  cursor: default;
}

.exd-lcard-note {
  flex: 1 1 0%;
  min-width: 0;
  font-size: 12.5px;
  color: #8a8f98;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exd-lcard-done {
  flex-shrink: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border-radius: 9px;
  background: rgba(39, 166, 68, 0.12);
  color: #1f8a3e;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* Totes: Found / Lost buttons sit in the bar */
.exd-lcard-bar .exd-tote-choice {
  width: 280px;
}

.exd-items-state.pending {
  color: #a45a0c;
}

.exd-items-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 84px 360px;
  gap: 16px;
}

.exd-items-header {
  align-items: end;
  padding: 8px 16px;
  background: #f7f8f8;
  border-bottom: 1px solid #eff0f2;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #62666d;
}

.exd-items-header .right {
  text-align: right;
}

.exd-decisions {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.exd-decisions small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: #8a8f98;
}

.exd-item {
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid #f0f1f3;
}

.exd-item.found {
  box-shadow: inset 3px 0 0 #5e6ad2;
}

.exd-item.missing {
  box-shadow: inset 3px 0 0 #d93b3b;
}

.exd-item-name {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.exd-item-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
}

.exd-item-title {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exd-item-sub {
  margin-top: 2px;
  font-size: 11.5px;
  color: #62666d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exd-item-units {
  text-align: right;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.exd-decisions > .num {
  font-size: 16px;
  font-weight: 600;
}

.exd-decisions .found {
  color: #4c56c4;
}

.exd-decisions .missing {
  color: #c52828;
}

.exd-decisions .zero {
  color: #8a8f98;
}

/* Outcome + tasks */
.exd-section-label {
  margin-bottom: 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a8f98;
}

.exd-outcome {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #e6e7ea;
  border-radius: 12px;
}

.exd-outcome-cell {
  padding: 10px 14px;
  border-right: 1px solid #f0f1f3;
}

.exd-outcome-cell:last-child {
  border-right: none;
}

.exd-outcome-value {
  margin-top: 3px;
  font-size: 16px;
  font-weight: 600;
}

.exd-outcome-value.good {
  color: #1f8a3e;
}

.exd-outcome-sub {
  margin-top: 1px;
  font-size: 11px;
  color: #62666d;
}

.exd-tasks-wrap {
  max-width: calc(50% - 9px);
}

.exd-tasks {
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  overflow: hidden;
}

.exd-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid #f0f1f3;
}

.exd-task:first-child {
  border-top: none;
}

.exd-task-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exd-task-kind {
  font-size: 12px;
  color: #3c4047;
}

.exd-task-sub {
  margin-top: 2px;
  font-size: 11.5px;
  color: #62666d;
  /* Names the item in full */
  overflow-wrap: anywhere;
}

.exd-task-status {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.exd-task-status.open {
  background: rgba(242, 153, 74, 0.16);
  color: #a45a0c;
}

.exd-task-status.done {
  background: rgba(39, 166, 68, 0.12);
  color: #1f8a3e;
}

/* ================ DETAIL: API extras ================ */

.exd-fact-sub {
  margin-top: 2px;
  font-size: 11px;
  color: #8a8f98;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Parent exception of a write-off / claim */
.exd-fact-link {
  margin-top: 3px;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: #4c56c4;
  cursor: pointer;
}

.exd-fact-link:hover {
  text-decoration: underline;
}

/* Two lines in one table cell, e.g. source over document */
.ex-stack {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

/* Each line stays inside the cell and ends in "…" (the full value is in the title) */
.ex-stack > * {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Exception tasks header: tabs on the left, range then search on the right */
.ex-push {
  margin-left: auto;
}

.ex-push ~ .ex-search {
  margin-left: 0;
}

/* ================ REVIEW (open exceptions) ================ */

/* Open timers: solid, with a live dot */
.exd-pill.live.ok {
  background: #1f8a3e;
  color: #ffffff;
}

.exd-pill.live.late {
  background: #c52828;
  color: #ffffff;
}

.exd-pill.lg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.exd-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ffffff;
  animation: exd-dot-pulse 1.6s ease-in-out infinite;
}

@keyframes exd-dot-pulse {
  50% {
    opacity: 0.35;
  }
}

.exd-loss > .num.none:first-child {
  color: #1f8a3e;
}

/* The sheet fills the screen so the submit bar can stick to its bottom */
.exd-sheet.review {
  min-height: calc(100vh - 56px);
  padding-bottom: 0;
}

.exd-bar .chosen {
  background: #5e6ad2;
}

.exd-items-state.todo {
  color: #0f1011;
}

.exd-item.todo {
  background: #ffffff;
  box-shadow: inset 3px 0 0 #f2994a;
}

.exd-item.chosen {
  background: #ffffff;
  box-shadow: inset 3px 0 0 #5e6ad2;
}

/* Found / Missing stepper */
.exd-stepper {
  display: inline-flex;
  align-items: center;
  height: 40px;
  box-sizing: border-box;
  border: 1.5px solid #b9bdc4;
  border-radius: 9px;
  background: #ffffff;
  overflow: hidden;
}

.exd-stepper button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 100%;
  border: none;
  background: transparent;
  color: #3c4047;
  cursor: pointer;
}

.exd-stepper button:hover:not(:disabled) {
  background: #f7f8f8;
}

.exd-stepper button:disabled {
  opacity: 0.35;
  cursor: default;
}

.exd-stepper input {
  width: 56px;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  text-align: center;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #0f1011;
}

.exd-stepper:focus-within {
  border-color: #5e6ad2;
}

/* The side the user set */
.exd-stepper.active {
  border-color: #5e6ad2;
  background: rgba(94, 106, 210, 0.05);
}

.exd-stepper.active input {
  color: #4c56c4;
}

/* Filled in from the other side */
.exd-stepper.derived {
  border-color: #e6e7ea;
}

.exd-stepper.derived input,
.exd-stepper.derived button {
  color: #b0b4bb;
}

.exd-stepper.disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Sticky submit bar */
.exd-submit {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: auto -28px 0;
  padding: 14px 28px;
  border-top: 1px solid #e6e7ea;
  background: #ffffff;
  box-shadow: 0 -6px 16px rgba(15, 16, 17, 0.05);
}

.exd-submit-title {
  font-size: 13px;
  font-weight: 600;
}

.exd-submit-sub {
  margin-top: 2px;
  font-size: 12px;
  color: #62666d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exd-submit-btn {
  height: 34px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: #5e6ad2;
  color: #ffffff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.exd-submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Card filter chip under the pane's search */
.exd-pane-filter {
  align-self: flex-start;
}

/* ================ CONFIRM AND CLOSE ================ */

.exd-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 16, 17, 0.32);
}

.exd-confirm {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 91;
  transform: translate(-50%, -50%);
  width: min(520px, 100vw - 32px);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 22px 24px 20px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(15, 16, 17, 0.3);
}

.exd-confirm-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.exd-confirm-sub {
  margin-top: 3px;
  font-size: 12.5px;
  color: #62666d;
}

.exd-confirm-label {
  margin-top: 16px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a8f98;
}

.exd-confirm-box {
  margin-top: 8px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  overflow: hidden;
}

.exd-confirm-outcome {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-top: 1px solid #f0f1f3;
}

.exd-confirm-outcome:first-child {
  border-top: none;
}

.exd-confirm-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 999px;
}

.exd-confirm-dot.bad {
  background: #d93b3b;
}

.exd-confirm-dot.good {
  background: #5e6ad2;
}

.exd-confirm-outcome-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f1011;
}

.exd-confirm-outcome-sub {
  margin-top: 2px;
  font-size: 12px;
  color: #62666d;
}

.exd-confirm-items {
  margin-top: 8px;
  padding: 2px 10px;
  border-radius: 8px;
  background: #f7f8f8;
}

.exd-confirm-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid #eceef0;
}

.exd-confirm-item:first-child {
  border-top: none;
}

.exd-confirm-item-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #0f1011;
  /* The full name, wrapping as it needs */
  overflow-wrap: anywhere;
}

.exd-confirm-item-sub {
  font-size: 11px;
  color: #62666d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exd-confirm-item-qty {
  flex-shrink: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f1011;
  white-space: nowrap;
}

.exd-confirm-note {
  margin-top: 12px;
  font-size: 12px;
  color: #8a8f98;
}

.exd-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.exd-confirm-back,
.exd-confirm-ok {
  height: 38px;
  padding: 0 18px;
  border: none;
  border-radius: 9px;
  background: #5e6ad2;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.exd-confirm-back:disabled,
.exd-confirm-ok:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ================ CLOSED HERE ================ */

/* The closed sheet fills the screen so "Next on the list" sticks to its bottom */
.exd-sheet:has(> .exd-submit) {
  min-height: calc(100vh - 56px);
  padding-bottom: 0;
}

.exd-confirm-dot.muted {
  background: #8a8f98;
}

/* ================ TOTES: Found / Lost ================ */

.exd-item-tile.tote {
  background: #f3f4f5;
  color: #62666d;
}

.exd-item.decided {
  background: #fbfbfc;
}

.exd-tote-choice {
  display: flex;
  gap: 8px;
}

.exd-tote-btn {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 10px;
  border: 1.5px solid #b9bdc4;
  border-radius: 9px;
  background: #ffffff;
  color: #0f1011;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.exd-tote-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.exd-tote-btn.off {
  border-color: #e6e7ea;
  color: #8a8f98;
}

.exd-tote-btn.good.on {
  border-color: #5e6ad2;
  background: #5e6ad2;
  color: #ffffff;
}

.exd-tote-btn.bad.on {
  border-color: #d93b3b;
  background: #d93b3b;
  color: #ffffff;
}

.exd-tote-hint {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exd-tote-hint.good {
  color: #4c56c4;
}

.exd-tote-hint.bad {
  color: #c52828;
}

/* A follow-up the backend hasn't created yet */
.exd-task-pending {
  color: #8a8f98;
  font-family: inherit;
  font-weight: 500;
}

/* ================ CLOSED: dialog and completed lines ================ */

.exd-items-state.done {
  color: #1f8a3e;
}

/* "Exception closed", over the confirm backdrop */
.exd-closed {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 93;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 48px));
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(15, 16, 17, 0.3);
  overflow: hidden;
}

.exd-closed-head {
  padding: 24px 24px 18px;
  text-align: center;
}

.exd-closed-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #1f8a3e;
  color: #ffffff;
}

.exd-closed-heading {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #0f1011;
}

.exd-closed-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px 18px;
}

.exd-closed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7f8f8;
}

.exd-closed-row.loss {
  background: rgba(235, 87, 87, 0.07);
}

.exd-closed-row.good {
  background: rgba(39, 166, 68, 0.08);
}

.exd-closed-value {
  width: 92px;
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #0f1011;
  white-space: nowrap;
}

.exd-closed-row.loss .exd-closed-value {
  color: #c52828;
}

.exd-closed-row.good .exd-closed-value {
  color: #1f8a3e;
}

.exd-closed-row-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #0f1011;
}

.exd-closed-row-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #62666d;
}

.exd-closed-foot {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid #f0f1f3;
  background: #fafafb;
}

.exd-closed-done,
.exd-closed-next {
  flex: 1 1 0%;
  height: 38px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.exd-closed-done {
  border: 1px solid #e6e7ea;
  background: #ffffff;
  color: #3c4047;
}

.exd-closed-done:hover {
  background: #f7f8f8;
}

.exd-closed-next {
  border: none;
  background: #5e6ad2;
  color: #ffffff;
}

.exd-closed-next:hover {
  background: #4c56c4;
}

/* A resolved line's bar: "✓ Completed · 2 damaged → ₹520 loss · 2 units" */
.exd-lcard-completed {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 14px;
  border-top: 1px solid #e3efe6;
  background: #f5faf6;
}

.exd-completed-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #1f8a3e;
  color: #ffffff;
}

.exd-completed-label {
  font-size: 14px;
  font-weight: 600;
  color: #1f8a3e;
}

.exd-completed-text {
  flex: 1 1 0%;
  min-width: 0;
  font-size: 13.5px;
  color: #3c4047;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exd-completed-units {
  flex-shrink: 0;
  font-size: 13.5px;
  color: #62666d;
  white-space: nowrap;
}

/* ================ PHOTOS on an item card ================ */

/* Product tile, thumbnails on the right */
.exd-lcard.with-photos .exd-lcard-top {
  grid-template-columns: 72px minmax(0, 1fr) auto;
}

/* The tile opens the photos; "4 photos" sits on it */
.exd-item-tile-btn {
  position: relative;
  padding: 0;
  border: 1px solid #e6e7ea;
  font-family: inherit;
  cursor: zoom-in;
  overflow: hidden;
}

.exd-tile-photos {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(15, 16, 17, 0.62);
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.exd-photos {
  display: flex;
  gap: 8px;
}

.exd-photo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 1px solid #e6e7ea;
  border-radius: 10px;
  color: #8a7f6e;
  cursor: zoom-in;
  overflow: hidden;
}

.exd-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.exd-photo:hover {
  border-color: #c9ccd1;
}

/* More photos than fit: "+2" over the last one */
.exd-photo-more {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 16, 17, 0.45);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
}

/* Column headers stay in view while the page scrolls (shifted by useStickyHead) */
.ex-header {
  position: relative;
  z-index: 3;
  transform: translateY(var(--head-shift, 0px));
}

.ex-header.stuck {
  box-shadow: 0 2px 4px rgba(15, 16, 17, 0.05);
}

/* ================ CONFIRM one line ahead of the rest ================ */

.exd-lcard-confirm {
  flex-shrink: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: 9px;
  background: #5e6ad2;
  color: #ffffff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.exd-lcard-confirm:hover:not(:disabled) {
  background: #4c56c4;
}

.exd-lcard-confirm:disabled {
  background: #eff0f2;
  color: #8a8f98;
  cursor: not-allowed;
}

.exd-bar .confirmed {
  background: #27a644;
}

/* Confirmed, not submitted: the head, then what each side will do */
.exd-lcard-completed.stacked {
  flex-direction: column;
  align-items: stretch;
}

.exd-completed-head {
  display: flex;
  align-items: center;
  gap: 12px;
}


.exd-completed-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: 42px;
}

.exd-completed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid #e6e7ea;
  border-radius: 9px;
  background: #ffffff;
  font-size: 13.5px;
  white-space: nowrap;
}

.exd-completed-row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(39, 166, 68, 0.12);
  color: #1f8a3e;
}

.exd-completed-row.bad .exd-completed-row-icon {
  background: #eff0f2;
  color: #62666d;
}

.exd-completed-row-text {
  min-width: 160px;
  color: #3c4047;
}

.exd-completed-row-effect {
  font-weight: 600;
  color: #1f8a3e;
}

.exd-completed-row.bad .exd-completed-row-effect {
  color: #3c4047;
}

.exd-completed-row-note {
  min-width: 0;
  color: #8a8f98;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================ EXCESS: WHICH BIN ================ */

.exd-confirm.exd-bin {
  width: min(460px, 100vw - 32px);
  padding: 22px 24px 20px;
}

.exd-bin-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: #0f1011;
}

.exd-bin-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
}

.exd-bin-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
}

.exd-bin-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.exd-bin-name {
  font-size: 15px;
  font-weight: 600;
  color: #0f1011;
}

.exd-bin-code {
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 12px;
  color: #3c4047;
}

.exd-bin-units {
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding-left: 14px;
  border-left: 1px solid #e6e7ea;
  font-size: 13px;
  font-weight: 500;
  color: #62666d;
  white-space: nowrap;
}

.exd-bin-units b {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: #0f1011;
}

/* The bin, typed in big enough to read across the floor, with matching bins under it */
.exd-bin-code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 18px 16px;
  border-radius: 12px;
  background: #0f1011;
}

.exd-bin-input {
  width: min(100%, 300px);
  height: 52px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1.5px solid #3c4047;
  border-radius: 10px;
  background: #1c1d1f;
  color: #ffffff;
  text-align: center;
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  outline: none;
}

.exd-bin-input:focus {
  border-color: #8b8f97;
}

.exd-bin-input::placeholder {
  color: #8b8f97;
}

/* The code a bin sends, under its name */
.exd-bin-sent-code {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--mono);
  font-size: 12px;
  color: #8b8f97;
}

.exd-bin-sent-code.ok {
  color: #4ade80;
}

/* The previous bin, by name, big enough to read across the floor */
.exd-bin-suggested {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #ffffff;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.exd-bin-hint {
  font-size: 12.5px;
  color: #b4b8bf;
  text-align: center;
}

.exd-bin-hint.error {
  color: #f87171;
}

.exd-bin-input[aria-invalid="true"] {
  border-color: #f87171;
}

.exd-bin-actions {
  gap: 10px;
  margin-top: 18px;
}

.exd-bin-actions button {
  height: 44px;
  font-size: 14px;
  border-radius: 10px;
}

.exd-bin-actions .exd-confirm-ok:disabled {
  background: #e6e7ea;
  color: #666a72;
  cursor: not-allowed;
}

.exd-bin-actions .exd-confirm-back {
  border: 1px solid #e6e7ea;
  background: #ffffff;
  color: #3c4047;
}

/* ================ CYCLE COUNT ================ */
/* Shares the card / list / range styles with Exceptions (exceptions.css) */

.ex-seg-btn.on .ex-seg-count.active {
  background: rgba(94, 106, 210, 0.12);
  color: #4c56c4;
}

.cc-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: none;
  border-radius: 8px;
  background: #5e6ad2;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.cc-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cc-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 14px;
  margin-bottom: 14px;
  align-items: stretch;
}

/* Tiles */
.ex-tiles.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: stretch;
}

.ex-tile.hot {
  border-color: rgba(235, 87, 87, 0.45);
  background: rgba(235, 87, 87, 0.06);
}

.ex-tile-value.good {
  color: #1f8a3e;
}

.ex-tile-value.bad {
  color: #c52828;
}

.ex-tile-label.strong-bad {
  font-weight: 600;
  color: #c52828;
}

.ex-tile-label.strong {
  font-weight: 600;
}

/* Completed today: counts | money */
.cc-done {
  flex: 1 1 0%;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr);
}

.cc-done-counts {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 0 2px;
  border-right: 1px solid #f0f1f3;
}

.cc-done-money {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-left: 16px;
}

.cc-loss {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cc-loss-units {
  margin-left: auto;
  font-size: 12px;
  color: #62666d;
  white-space: nowrap;
}

.cc-loss-bar {
  display: flex;
  gap: 2px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #f0f1f3;
}

.cc-loss-bar .missing,
.cc-swatch.missing {
  background: #c52828;
}

.cc-loss-bar .damaged,
.cc-swatch.damaged {
  background: #f08a8a;
}

.cc-swatch.gain {
  background: #5e6ad2;
}

.cc-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cc-swatch {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.ex-tile.cc-gain {
  justify-content: center;
  gap: 2px;
  margin-left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
}

.cc-gain-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.6px;
  line-height: 1.15;
  color: #4c56c4;
}

/* Counts table */
.cc-table {
  min-width: 1260px;
}

.cc-grid {
  display: grid;
  grid-template-columns:
    /* Count ID + copy button need ~136px on one line */
    136px 54px minmax(140px, 1.4fr) 92px 66px minmax(80px, 0.8fr) 88px 60px 44px 68px
    64px 76px 64px;
  gap: 8px;
}

.cc-grid .right {
  text-align: right;
}

.cc-grid.ex-row {
  padding: 12px 16px;
}

.ex-id-row.tight {
  margin-top: 0;
  gap: 3px;
}

.cc-grid .ex-doc {
  overflow: visible;
}

.cc-source {
  display: inline-flex;
  margin-top: 4px;
  padding: 1px 7px;
  border-radius: 5px;
  background: #f3f4f5;
  color: #3c4047;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.cc-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.cc-type svg {
  flex-shrink: 0;
}

.cc-type.bin {
  background: rgba(14, 116, 144, 0.1);
  color: #0e7490;
}

.cc-type.item {
  background: rgba(124, 58, 237, 0.09);
  color: #6d28d9;
}

.cc-what {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cc-what-sub {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: #62666d;
}

.cc-item-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.cc-item-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  /* The full name, wrapping as it needs */
  overflow-wrap: anywhere;
}

.cc-state {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.cc-state.active {
  background: rgba(94, 106, 210, 0.12);
  color: #4c56c4;
}

.cc-state.idle {
  background: #f3f4f5;
  color: #3c4047;
}

.cc-state.ok {
  background: rgba(39, 166, 68, 0.12);
  color: #1f8a3e;
}

.cc-state.bad {
  background: rgba(235, 87, 87, 0.12);
  color: #c52828;
}

.cc-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 64px;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  color: #ffffff;
}

.cc-timer .ex-wait-dot {
  width: 5px;
  height: 5px;
}

.cc-timer.ok {
  background: #1f8a3e;
}

.cc-timer.warn {
  background: #c2700c;
}

.cc-timer.late {
  background: #c52828;
}

.cc-timer.done {
  background: #f3f4f5;
  color: #3c4047;
}

.cc-escalated {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.cc-escalated.level-1 {
  background: rgba(242, 153, 74, 0.16);
  color: #a45a0c;
}

.cc-escalated.level-2 {
  background: rgba(235, 87, 87, 0.12);
  color: #c52828;
}

.cc-escalated.level-3 {
  background: #b42323;
  color: #ffffff;
}

.cc-num {
  text-align: right;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.cc-num .none {
  color: #8a8f98;
}

.cc-num .good {
  color: #1f8a3e;
}

.cc-num .bad {
  color: #c52828;
}

.cc-num .zero {
  color: #3c4047;
}

.cc-num .gain {
  color: #4c56c4;
}

.cc-system {
  display: block;
  font-size: 18px;
  letter-spacing: -0.3px;
}

.cc-progress {
  display: block;
  font-size: 10.5px;
  font-weight: 400;
  color: #8a8f98;
}

/* ================ COUNT DETAIL (pane + sheet) ================ */
/* Layout comes from the exception detail (.exd, .exd-pane, .exd-sheet) */

.exd-pane-head.tight {
  gap: 4px;
}

.cc-pane-count {
  margin-left: auto;
  font-size: 12px;
  color: #62666d;
}

.cc-pane-sub {
  font-size: 12px;
  color: #8a8f98;
}

.cc-push {
  margin-left: auto;
}

.cc-pane-title {
  flex: 1 1 0%;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-type.sm {
  padding: 0 6px;
  line-height: 18px;
  border-radius: 5px;
  font-size: 10.5px;
}

.cc-state.sm {
  flex-shrink: 0;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 11px;
}

.cc-state.warn {
  background: rgba(242, 153, 74, 0.16);
  color: #a45a0c;
}

.cc-timer.lg {
  width: auto;
  margin-top: 3px;
  padding: 2px 8px;
  border-radius: 7px;
  font-size: 13px;
}

/* Sheet */
.cc-sheet {
  gap: 22px;
  padding: 22px 32px 48px;
}

.cc-kind {
  font-size: 12px;
  font-weight: 600;
  color: #62666d;
}

.cc-source.auto {
  background: rgba(242, 153, 74, 0.16);
  color: #a45a0c;
}

.exd-title-row .cc-source {
  margin-top: 0;
  line-height: 18px;
}

.cc-subject {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.sp-bin.lg {
  padding: 4px 11px 4px 9px;
  background: #f0f1f3;
  font-size: 16px;
  font-weight: 600;
}

.cc-subject-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.cc-subject-sub {
  font-size: 12.5px;
  color: #62666d;
}

.cc-item-tile.lg {
  width: 32px;
  height: 32px;
}

.cc-item-tile.sm {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 10px;
}

/* Reassign */
.cc-reassign {
  position: relative;
  flex-shrink: 0;
}

.cc-reassign-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  background: #ffffff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f1011;
  cursor: pointer;
}

.cc-reassign-btn:hover {
  background: #f7f8f8;
}

.cc-reassign-menu {
  position: absolute;
  top: 38px;
  right: 0;
  z-index: 45;
  width: 300px;
  padding: 6px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 16, 17, 0.14);
}

.cc-reassign-label {
  padding: 6px 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a8f98;
}

.cc-reassign-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.cc-reassign-item:hover {
  background: #f7f8f8;
}

.cc-reassign-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
}

.cc-reassign-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0f1011;
}

.cc-reassign-status {
  display: block;
  margin-top: 1px;
  font-size: 11.5px;
  color: #1f8a3e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-reassign-status.soon {
  color: #a45a0c;
}

.cc-reassign-foot {
  margin-top: 4px;
  padding: 8px 8px 4px;
  border-top: 1px solid #f0f1f3;
  font-size: 11.5px;
  color: #8a8f98;
}

/* Lines */
.cc-section-head {
  display: flex;
  align-items: baseline;
  margin-bottom: 8px;
}

.cc-section-title {
  font-size: 14px;
  font-weight: 600;
}

.cc-section-meta {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: #3c4047;
}

.cc-lines {
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  overflow: clip;
}

.cc-lines-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 80px 88px 88px 88px;
  gap: 16px;
  align-items: center;
}

.cc-lines-grid .right {
  text-align: right;
}

.cc-lines-head {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 10px 18px;
  background: #f7f8f8;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #62666d;
}

.cc-line {
  padding: 14px 18px;
  border-top: 1px solid #f0f1f3;
  background: #fafafb;
  font-size: 13.5px;
}

.cc-line-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.cc-strong {
  font-weight: 600;
}

.cc-strong small {
  display: block;
  font-size: 11px;
  font-weight: 600;
}

.cc-strong.good {
  color: #1f8a3e;
}

.cc-strong.bad {
  color: #c52828;
}

.cc-strong.gain {
  color: #4c56c4;
}

.cc-dash {
  color: #8a8f98;
}

.cc-line-bar {
  display: flex;
  gap: 2px;
  height: 4px;
  margin-top: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #f0f1f3;
}

.cc-line-bar .pending {
  background: #e6e7ea;
}

.cc-line-bar .good {
  background: #27a644;
}

.cc-line-bar .damaged {
  background: #f08a8a;
}

.cc-line-bar .missing {
  background: #c52828;
}

/* Open-for strip */
.cc-open {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
}

.cc-open-note {
  font-size: 12.5px;
  font-weight: 600;
  color: #3c4047;
}

.cc-open-note.bad {
  color: #c52828;
}

.cc-open-note.good {
  color: #1f8a3e;
}

/* Facts */
.cc-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 20px;
  padding: 16px 18px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
}

.cc-fact-label {
  font-size: 11.5px;
  color: #62666d;
}

.cc-fact-value {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Earlier counts */
.cc-history {
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  overflow: hidden;
}

.cc-history-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 100px;
  gap: 10px;
  align-items: center;
  padding: 9px 14px;
  border-top: 1px solid #f0f1f3;
  font-size: 12.5px;
  cursor: pointer;
}

.cc-history-row:first-child {
  border-top: none;
}

.cc-history-row:hover {
  background: #fafafb;
}

.cc-history-time {
  color: #3c4047;
  white-space: nowrap;
}

.cc-history-id {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cc-history-id .cc-source {
  margin-top: 0;
}

.cc-history-sub {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  color: #62666d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-history-result {
  text-align: right;
  font-weight: 600;
  color: #3c4047;
}

.cc-history-result.good {
  color: #1f8a3e;
}

.cc-history-result.bad {
  color: #c52828;
}

.cc-history-empty {
  padding: 14px;
  border: 1px dashed #e6e7ea;
  border-radius: 12px;
  font-size: 12.5px;
  color: #8a8f98;
}

/* ================ INVENTORY ================ */
.inv-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}


.inv-strong {
  font-weight: 600;
  color: #0f1011;
}

.inv-soft {
  color: #3c4047;
}

.inv-muted {
  color: #62666d;
}

.inv-ellipsis {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-stack {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inv-sub {
  display: block;
  font-size: 11.5px;
  color: #62666d;
}

.inv-sub.indent {
  padding-left: 14px;
}

.inv-right {
  text-align: right;
}

/* Head: catalogue tile, name, status */
.inv-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.inv-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  padding: 0;
  border: none;
  border-radius: 11px;
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: zoom-in;
}

.inv-tile img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  background: #ffffff;
}


.inv-head-text {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.inv-name {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.inv-status {
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 22px;
}

.inv-status.good { background: rgba(39, 166, 68, 0.12); color: #15753a; }
.inv-status.muted { background: #f3f4f5; color: #3c4047; }
.inv-status.bad { background: rgba(235, 87, 87, 0.1); color: #b91c1c; }

/* Live stock, then the item's facts */
.inv-facts {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.inv-stock {
  padding: 14px 16px;
  border-right: 1px solid #e6e7ea;
  background: rgba(39, 166, 68, 0.06);
}

.inv-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #666a72;
}

.inv-label.good {
  color: #15753a;
}

.inv-stock-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
  font-size: 13px;
  color: #62666d;
}

.inv-stock-value .num {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.8px;
  line-height: 1;
  color: #0f1011;
}

.inv-stock-sub {
  margin-top: 6px;
  font-size: 12px;
  color: #62666d;
}

.inv-fact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
  align-items: start;
  padding: 4px 0;
}

.inv-fact {
  min-width: 0;
  padding: 10px 14px;
  border-left: 1px solid #f0f1f3;
}

.inv-fact:first-child {
  border-left: none;
}

.inv-fact-value {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #0f1011;
  overflow-wrap: anywhere;
}

.inv-fact-value.mono {
  font-family: var(--mono);
}

/* Sections */
.inv-card {
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #ffffff;
  overflow: clip;
}

.inv-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

.inv-card-head.wrap {
  flex-wrap: wrap;
  gap: 12px;
}

.inv-card-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #666a72;
}

.inv-card-count {
  font-size: 12px;
  color: #62666d;
}

.inv-card-actions {
  margin-left: auto;
}

.inv-row {
  display: grid;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid #f0f1f3;
  font-size: 13px;
}

/* Column heads stick under the top bar */
.inv-row.inv-th {
  position: sticky;
  top: 55px;
  z-index: 3;
  padding-top: 8px;
  padding-bottom: 8px;
  border-top-color: #e6e7ea;
  background: #f7f8f8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #62666d;
}

.inv-where {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) 90px 80px;
  gap: 16px;
}

.inv-tasks {
  grid-template-columns: 130px minmax(0, 1.2fr) 130px minmax(0, 1fr) 120px;
  gap: 14px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.inv-ledger {
  grid-template-columns: 70px 150px minmax(0, 1fr) 82px 196px 64px 70px;
  gap: 12px;
  padding-top: 9px;
  padding-bottom: 9px;
  font-size: 12.5px;
}

.inv-ledger.inv-th {
  padding-top: 7px;
  padding-bottom: 7px;
  font-size: 10.5px;
}

.inv-bin {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: #f0f1f3;
  max-width: 100%;
  line-height: 1.35;
  /* The full bin, breaking at its hyphens when it doesn't fit */
  overflow-wrap: anywhere;
  vertical-align: middle;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #0f1011;
}

.inv-batch {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: #0f1011;
}

.inv-batch.sm {
  font-size: 11.5px;
  font-weight: 400;
  color: #62666d;
}

.inv-expiry {
  font-size: 11.5px;
  font-weight: 600;
}

.inv-expiry.good { color: #15753a; }
.inv-expiry.warn { color: #975209; }
.inv-expiry.bad { color: #b91c1c; }

.inv-units {
  font-size: 16px;
  font-weight: 600;
  color: #0f1011;
}

/* Task status: a dot and its name */
.inv-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.inv-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.inv-pill.muted { background: #f3f4f5; color: #3c4047; }
.inv-pill.warn { background: rgba(242, 153, 74, 0.16); color: #975209; }
.inv-pill.info { background: rgba(94, 106, 210, 0.12); color: #4c56c4; }

.inv-person {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.inv-person svg {
  flex-shrink: 0;
  color: #666a72;
}

/* A document number; blue when it opens its page */
.inv-doc {
  display: block;
  width: fit-content;
  max-width: 100%;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: #3c4047;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.inv-doc.link {
  color: #4c56c4;
}

.inv-doc.link:hover {
  text-decoration: underline;
}

.inv-sub .inv-doc {
  display: inline;
  font-size: 11.5px;
}

/* Ledger */
.inv-day {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px;
  gap: 12px;
  align-items: center;
  padding: 7px 16px;
  border-top: 1px solid #e6e7ea;
  background: #fafafb;
  font-size: 12px;
}

.inv-day-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.inv-day-balance-label {
  margin-left: auto;
  font-size: 11.5px;
  color: #666a72;
}

.inv-day-balance {
  font-weight: 600;
  color: #3c4047;
}

.inv-what {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  white-space: nowrap;
}

.inv-what-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.inv-route {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.inv-route svg {
  flex-shrink: 0;
  color: #666a72;
}

/* Bins grey, staging orange, anything else plain text */
.inv-place {
  font-size: 11.5px;
  font-weight: 500;
  color: #62666d;
}

.inv-place.bin,
.inv-place.staging {
  padding: 1px 6px;
  border-radius: 5px;
  font-family: var(--mono);
  font-weight: 600;
}

.inv-place.bin { background: #f0f1f3; color: #0f1011; }
.inv-place.staging { background: rgba(242, 153, 74, 0.16); color: #975209; }

.inv-change {
  font-size: 13.5px;
  font-weight: 600;
}

.inv-change.good { color: #15753a; }
.inv-change.bad { color: #b91c1c; }
.inv-change.muted { color: #62666d; }

.inv-empty {
  padding: 18px 16px;
  border-top: 1px solid #f0f1f3;
  font-size: 13px;
  color: #8a8f98;
  text-align: center;
}

.inv-empty.error {
  color: #c52828;
}

.ol-search-wrap.inv-search {
  margin-bottom: 22px;
}

/* Name search dropdown */
.inv-sug {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  padding: 8px;
  border: 1px solid #e6e7ea;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 16, 17, 0.14);
}

.inv-sug-list {
  max-height: min(420px, 60vh);
  overflow-y: auto;
  transition: opacity 0.15s;
}

/* The last list while the next one loads */
.inv-sug-list.stale {
  opacity: 0.6;
}

.inv-sug-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.inv-sug-row.active {
  background: #f3f4f5;
}

.inv-sug-row.out .inv-sug-tile,
.inv-sug-row.out .inv-sug-name {
  opacity: 0.55;
}

.inv-tile.inv-sug-tile {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  font-size: 14px;
  cursor: inherit;
}

.inv-sug-text {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inv-sug-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: #0f1011;
}

.inv-status.sm {
  flex-shrink: 0;
  padding: 0 7px;
  font-size: 11px;
  line-height: 18px;
}

.inv-sug-sub {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--mono);
  font-size: 12px;
  color: #8a8f98;
}

.inv-sug-stock {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  color: #0f1011;
}

.inv-sug-stock.out {
  font-size: 13px;
  color: #b91c1c;
}

.inv-sug-empty {
  padding: 14px 10px;
  font-size: 13px;
  color: #8a8f98;
  text-align: center;
}

.inv-sug-empty.error {
  color: #c52828;
}

.inv-sug-foot {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  padding: 8px 10px 2px;
  border-top: 1px solid #f0f1f3;
  font-size: 12px;
  color: #8a8f98;
}

/* ================ DATE RANGE CALENDAR ================ */
.drc {
  position: relative;
}

.drc-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  padding: 20px 20px 14px;
  border: 1px solid #e6e7ea;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 16, 17, 0.14);
}

.drc-months {
  display: flex;
  gap: 32px;
}

.drc-month {
  width: 266px;
}

.drc-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.drc-month-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f1011;
}

.drc-nav,
.drc-nav-space {
  width: 26px;
  height: 26px;
}

.drc-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #0f1011;
  cursor: pointer;
}

.drc-nav:hover:not(:disabled) {
  background: #f3f4f5;
}

.drc-nav:disabled {
  color: #c4c6cb;
  cursor: default;
}

.drc-grid {
  display: grid;
  grid-template-columns: repeat(7, 38px);
  row-gap: 2px;
}

.drc-weekday {
  padding: 6px 0;
  font-size: 11px;
  font-weight: 600;
  color: #62666d;
  text-align: center;
}

.drc-day {
  position: relative;
  height: 38px;
  padding: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: #0f1011;
  cursor: pointer;
}

.drc-day .num {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
}

.drc-day:hover:not(:disabled):not(.picked) .num {
  background: #f3f4f5;
}

.drc-day:disabled {
  color: #c4c6cb;
  cursor: default;
}

/* The range: a grey band between the two picked days */
.drc-day.inside {
  background: #eff0f2;
}

.drc-day.band-start {
  background: linear-gradient(to right, transparent 50%, #eff0f2 50%);
}

.drc-day.band-end {
  background: linear-gradient(to left, transparent 50%, #eff0f2 50%);
}

.drc-day.picked .num {
  background: #0f1011;
  color: #ffffff;
  font-weight: 600;
}

.drc-foot {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e6e7ea;
}

.drc-foot-text {
  flex: 1 1 0%;
  min-width: 0;
}

.drc-summary {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f1011;
}

.drc-hint {
  margin-top: 2px;
  font-size: 11.5px;
  color: #62666d;
}

.drc-clear {
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #3c4047;
  text-decoration: underline;
  cursor: pointer;
}

.drc-done {
  height: 34px;
  padding: 0 18px;
  border: none;
  border-radius: 8px;
  background: #0f1011;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.drc-done:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ================ SETTINGS ================ */
.set-body {
  max-width: 860px;
}

/* Account card */
.set-account {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
}

.set-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 999px;
  background: #3c4047;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.set-account-meta {
  flex: 1;
  min-width: 0;
}

.set-account-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: #0f1011;
}

.set-account-sub {
  margin-top: 3px;
  font-size: 13px;
  color: #62666d;
}

.set-logout {
  height: 36px;
  padding: 0 14px;
  border: 1px solid #e6e7ea;
  border-radius: 9px;
  background: #ffffff;
  color: #3c4047;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.set-logout:hover {
  background: #fdf2f2;
  border-color: #f0c8c8;
  color: #c52828;
}

/* Sections */
.set-section {
  margin-top: 18px;
}

.set-section-title {
  margin: 0 0 8px 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #666a72;
}

.set-list {
  background: #ffffff;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  overflow: hidden;
}

.set-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  border: none;
  background: transparent;
  color: #0f1011;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.set-row + .set-row {
  border-top: 1px solid #f0f1f3;
}

.set-row:hover {
  background: #f7f8f8;
}

.set-row-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #f3f4f5;
  color: #3c4047;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.set-row-text {
  flex: 1;
  min-width: 0;
}

.set-row-title {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}

.set-row-desc {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: #62666d;
}

.set-row-chev {
  display: inline-flex;
  color: #666a72;
}

/* ================ PICKER ONBOARDING ================ */
.ob-body {
  max-width: 860px;
}

.ob-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 4px 0 10px -4px;
  padding: 4px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #3c4047;
  cursor: pointer;
}

.ob-back:hover {
  color: #0f1011;
}

.ob-title {
  margin: 0 0 4px;
  font-weight: 600;
  font-size: 25px;
  letter-spacing: -0.6px;
  color: #0f1011;
}

.ob-section {
  margin-top: 14px;
  padding: 18px 20px 20px;
  background: #ffffff;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
}

.ob-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.ob-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f1011;
}

.ob-same {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 500;
  color: #3c4047;
  cursor: pointer;
}

.ob-same input {
  width: 16px;
  height: 16px;
  accent-color: #5e6ad2;
  cursor: pointer;
}

.ob-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.ob-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.ob-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #3c4047;
}

.ob-required {
  color: #b91c1c;
}

.ob-input {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1.5px solid #d8d9dd;
  border-radius: 9px;
  background: #ffffff;
  font-family: inherit;
  font-size: 14px;
  color: #0f1011;
  outline: none;
}

.ob-input:focus {
  border-color: #5e6ad2;
}

.ob-input.invalid {
  border-color: #b91c1c;
}

.ob-error {
  font-size: 12px;
  font-weight: 500;
  color: #b91c1c;
}

.ob-input[readonly] {
  background: #f7f8f8;
  color: #62666d;
}

/* The native arrow hugs the edge; draw our own chevron with the same inset as the text */
select.ob-input {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2716%27 height=%2716%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%2362666d%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27m6 9 6 6 6-6%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

.ob-input.mono {
  font-family: "Geist Mono", monospace;
}

/* +91 joined to its input */
.ob-prefixed {
  display: flex;
  align-items: center;
}

.ob-prefix {
  display: inline-flex;
  align-items: center;
  height: 40px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1.5px solid #d8d9dd;
  border-right: none;
  border-radius: 9px 0 0 9px;
  background: #f7f8f8;
  font-size: 14px;
  color: #3c4047;
}

.ob-prefixed .ob-input {
  border-radius: 0 9px 9px 0;
}

/* Footer sticks to the bottom of the scrolling page */
.ob-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 0 16px;
  border-top: 1px solid #e6e7ea;
  background: #fcfcfd;
}

.ob-footer-note {
  flex: 1;
  font-size: 12.5px;
  font-weight: 600;
  color: #62666d;
}

.ob-cancel {
  height: 40px;
  padding: 0 16px;
  border: 1px solid #e6e7ea;
  border-radius: 9px;
  background: #ffffff;
  color: #3c4047;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.ob-cancel:hover {
  background: #f7f8f8;
}

.ob-submit {
  height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: 9px;
  background: #0f1011;
  color: #ffffff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.ob-submit:disabled {
  background: #e6e7ea;
  color: #62666d;
  cursor: not-allowed;
}

/* ================ TEAM (USERS) ================ */

/* One tile per status; the picked one filters the list. Six columns, so the tiles keep their
   width with five */
.team-tiles {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.team-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  background: #ffffff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.team-tile:hover {
  background: #f7f8f8;
}

.team-tile.active {
  border-color: #5e6ad2;
  background: rgba(94, 106, 210, 0.06);
}

.team-tile-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: #3c4047;
}

.team-tile-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.team-tile-dot.all {
  background: #0f1011;
}

.team-tile-dot.picking {
  background: #5e6ad2;
}

.team-tile-dot.task {
  background: #0e7490;
}

.team-tile-dot.free {
  background: #27a644;
}

.team-tile-dot.offline {
  background: #eab308;
}

.team-tile-count {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.8px;
  color: #0f1011;
}

/* ---- The list ---- */

.team-grid {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 112px minmax(290px, 2fr) 130px 66px 172px;
  gap: 16px;
  align-items: center;
}

/* Column heads stick under the top bar */
.team-grid.tm-head {
  position: sticky;
  top: 55px;
  z-index: 3;
}

.team-grid.tm-row {
  min-height: 58px;
  padding: 10px 20px;
}

.team-person {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.team-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13.5px;
  font-weight: 600;
  color: #0f1011;
}

/* tm-status is green (Free); the rest by what they're doing */
.team-status.picking {
  background: rgba(94, 106, 210, 0.12);
  color: #4c56c4;
}

.team-status.task {
  background: rgba(14, 116, 144, 0.12);
  color: #0b6a85;
}

.team-status.adhoc {
  background: rgba(109, 40, 217, 0.1);
  color: #6d28d9;
}

.team-status.offline {
  background: rgba(234, 179, 8, 0.16);
  color: #854d0e;
}

.team-task {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* No limit to be late against: ad-hoc work, or time free */
.tm-timer.team-idle {
  flex-shrink: 0;
  background: #f3f4f5;
  color: #3c4047;
}

.team-task .tm-timer {
  flex-shrink: 0;
  width: auto;
  min-width: 76px;
}

.team-task-text {
  min-width: 0;
  flex: 1 1 0%;
}

.team-task-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.team-task-sub {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #62666d;
}

.team-none {
  font-size: 13px;
  color: #8a8f98;
}

.team-shift {
  font-size: 13px;
  color: #3c4047;
}

.team-shift b {
  display: block;
  font-weight: 600;
  color: #0f1011;
}

.team-shift span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #62666d;
}

.team-done {
  font-size: 13px;
  color: #3c4047;
}

.team-done b {
  font-weight: 600;
  color: #0f1011;
}

.team-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.team-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e6e7ea;
  border-radius: 8px;
  background: #ffffff;
  color: #0f1011;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.team-btn:hover:not(:disabled) {
  background: #f7f8f8;
}

/* Holding a task, or the action is on its way */
.team-btn:disabled {
  color: #8a8f98;
  cursor: not-allowed;
}

/* Gone for the day */
.team-grid.tm-row.offline .team-person,
.team-grid.tm-row.offline .team-shift,
.team-grid.tm-row.offline .team-done {
  opacity: 0.6;
}

