:root {
  color-scheme: light;
  --ink: #12202f;
  --muted: #627084;
  --line: #d8e2ee;
  --paper: #ffffff;
  --soft: #f3f7fb;
  --brand: #1557d6;
  --brand-2: #00a6a6;
  --warn: #d97706;
  --danger: #d92d20;
  --shadow: 0 14px 40px rgba(23, 40, 70, 0.12);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 15% 0%, rgba(0, 166, 166, 0.18), transparent 28rem),
    linear-gradient(145deg, #f8fbff 0%, #eef5fb 45%, #f7fafc 100%);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
}

button, input { font: inherit; }
a { color: inherit; }
h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 6px;
  font-size: 28px;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

.muted { color: var(--muted); }

.login-shell {
  display: grid;
  place-items: center;
  padding: 20px;
}

.site-login-shell {
  background:
    radial-gradient(circle at 18% 12%, rgba(13, 148, 136, 0.18), transparent 19rem),
    radial-gradient(circle at 88% 0%, rgba(79, 70, 229, 0.14), transparent 18rem),
    linear-gradient(145deg, #f7fbff 0%, #edf4fb 52%, #f9fafb 100%);
}

.field-login-shell {
  background:
    radial-gradient(circle at 14% 10%, rgba(0, 166, 166, 0.18), transparent 18rem),
    radial-gradient(circle at 88% 4%, rgba(21, 87, 214, 0.12), transparent 19rem),
    linear-gradient(145deg, #f5fbff 0%, #ecf8fb 48%, #f8fbff 100%);
}

.login-wrap, .dashboard-wrap {
  width: min(100%, 980px);
}

.login-card, .empty-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(216, 226, 238, 0.9);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.login-card {
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 28px;
  overflow: hidden;
  animation: rise 360ms ease both;
}

.site-login-card {
  border-color: rgba(78, 105, 145, 0.22);
}

.field-login-card {
  border-color: rgba(0, 166, 166, 0.24);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(238, 250, 252, 0.9)),
    #fff;
  box-shadow: 0 22px 60px rgba(15, 118, 110, 0.14);
}

.login-card::before {
  content: "";
  display: block;
  height: 5px;
  margin: -28px -28px 22px;
  background: linear-gradient(90deg, #1557d6, #00a6a6);
}

.field-login-card::before {
  background: linear-gradient(90deg, #0f766e, #00a6a6, #1557d6);
}

.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-bottom: 14px;
}

.brand-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 38%),
    linear-gradient(135deg, #1557d6, #00a6a6);
  box-shadow: 0 12px 24px rgba(21, 87, 214, 0.22);
  overflow: hidden;
}

.brand-mark::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 14px;
  width: 28px;
  height: 28px;
  background: #fff;
  clip-path: polygon(0 0, 33% 0, 52% 31%, 72% 0, 100% 0, 66% 50%, 100% 100%, 68% 100%, 50% 69%, 29% 100%, 0 100%, 35% 50%);
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: 10px;
  width: 35px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  transform: rotate(-28deg);
}

.field-login-card .brand-mark {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 38%),
    linear-gradient(135deg, #0f766e, #00a6a6 58%, #1557d6);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
}

.field-login-card .brand-name span:first-child {
  color: #0f766e;
}

.field-login-card .brand-name span:last-child,
.field-login-card .app-slogan {
  color: #1557d6;
}

.brand-lockup h1 {
  margin: 0;
  color: #0f172a;
  font-size: 31px;
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: 0;
}

.brand-name {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  width: fit-content;
  color: #0f172a;
  font-weight: 1000;
  line-height: 0.92;
  text-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

.brand-name span:first-child {
  display: inline-block;
  color: #1557d6;
  transform-origin: center;
  animation: xFlyWordSpin 4.8s ease-in-out infinite;
  backface-visibility: hidden;
  contain: paint;
  will-change: transform;
}

.brand-name span:last-child {
  color: #0f766e;
}

.brand-name i {
  color: #94a3b8;
  font-style: normal;
}

.brand-name.mini {
  font-size: 20px;
}

.app-slogan {
  margin: 5px 0 0;
  color: #0f766e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-login-card .app-slogan {
  color: #1557d6;
}

.header-slogan {
  margin-top: 2px;
  color: #667085;
  font-size: 10px;
}

.login-mode {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  gap: 2px;
  max-width: 150px;
  padding: 8px 10px;
  border: 1px solid rgba(216, 226, 238, 0.92);
  border-radius: 13px;
  background: #f8fbff;
  text-align: center;
}

.login-mode span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.login-mode strong {
  color: var(--ink);
  font-size: 14px;
}

.user-mode {
  border-color: rgba(21, 87, 214, 0.16);
  background: linear-gradient(135deg, rgba(21, 87, 214, 0.08), rgba(255, 255, 255, 0.9));
}

.field-mode {
  border-color: rgba(0, 166, 166, 0.22);
  background:
    linear-gradient(135deg, rgba(0, 166, 166, 0.14), rgba(21, 87, 214, 0.08)),
    rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 10px 22px rgba(15, 118, 110, 0.08);
}

.field-mode span {
  color: #0f766e;
}

.field-mode strong {
  color: #12395d;
}

.field-login-card .primary-btn {
  border: 1px solid rgba(13, 148, 136, 0.34);
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 55%),
    linear-gradient(135deg, #0f766e, #0891b2);
  box-shadow:
    0 14px 26px rgba(8, 145, 178, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.field-login-card .primary-btn:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 55%),
    linear-gradient(135deg, #0f6b63, #087f9b);
  box-shadow:
    0 16px 30px rgba(8, 145, 178, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.field-login-card .login-copy {
  border-color: rgba(0, 166, 166, 0.18);
  color: #214158;
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.78), rgba(239, 246, 255, 0.82)),
    rgba(255, 255, 255, 0.78);
}

.field-login-card label {
  color: #214158;
}

.field-login-card input {
  border-color: rgba(0, 166, 166, 0.22);
  background: rgba(255, 255, 255, 0.92);
}

.field-login-card input:focus {
  border-color: #00a6a6;
  box-shadow: 0 0 0 4px rgba(0, 166, 166, 0.12);
}

.login-copy {
  margin: 12px 0 0;
  border: 1px solid rgba(216, 226, 238, 0.88);
  border-radius: 14px;
  padding: 10px 12px;
  color: #344054;
  background: linear-gradient(135deg, rgba(248, 251, 255, 0.94), rgba(240, 253, 250, 0.78));
  font-size: 13px;
  font-weight: 780;
  line-height: 1.42;
}

.site-login-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  border-color: rgba(21, 87, 214, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(239, 246, 255, 0.72)),
    rgba(255, 255, 255, 0.78);
}

.site-login-copy span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(21, 87, 214, 0.12);
  border-radius: 999px;
  padding: 6px 9px;
  color: #184b8f;
  background: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.site-login-copy span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1557d6, #00a6a6);
  box-shadow: 0 0 0 3px rgba(21, 87, 214, 0.08);
}

.lock-card {
  border-color: rgba(245, 158, 11, 0.38);
  background:
    linear-gradient(160deg, rgba(255, 251, 235, 0.94), rgba(255, 255, 255, 0.96)),
    #fff;
}

.lock-symbol {
  position: relative;
  width: 54px;
  height: 42px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  box-shadow: 0 16px 30px rgba(220, 38, 38, 0.18);
}

.lock-symbol::before {
  content: "";
  position: absolute;
  left: 13px;
  top: -18px;
  width: 24px;
  height: 25px;
  border: 6px solid #f59e0b;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}

.lock-symbol::after {
  content: "";
  position: absolute;
  left: 24px;
  top: 15px;
  width: 7px;
  height: 14px;
  border-radius: 5px;
  background: #fff;
}

.lock-details {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.lock-details span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.lock-details strong {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.stack-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(21, 87, 214, 0.14);
}

.primary-btn, .warning-btn, .danger-btn, .ghost-btn, .disabled-btn, .cnr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 11px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(18, 32, 47, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(14px);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.primary-btn {
  color: #1557d6;
  border-color: rgba(21, 87, 214, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(219, 234, 254, 0.46));
}
.warning-btn {
  color: #9a5b00;
  border-color: rgba(217, 119, 6, 0.2);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(254, 243, 199, 0.52));
}
.danger-btn {
  color: #b42318;
  border-color: rgba(217, 45, 32, 0.2);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(254, 226, 226, 0.52));
}
.cnr-btn {
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.2);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(204, 251, 241, 0.5));
}
.ghost-btn {
  color: #344054;
  border-color: rgba(148, 163, 184, 0.22);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(248, 251, 255, 0.54));
}

.locked-btn:disabled {
  cursor: not-allowed;
  color: #98a2b3;
  background: #f2f4f7;
  border-color: #e4e7ec;
  box-shadow: none;
}

.user-session-form {
  margin-top: 14px;
}

.login-change-btn {
  width: 100%;
  margin-top: 12px;
  color: #0f766e;
  border-color: rgba(13, 148, 136, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(204, 251, 241, 0.5)),
    rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.resend-otp-form {
  margin-top: 12px;
}

.resend-otp-btn {
  width: 100%;
  color: #1557d6;
  border-color: rgba(21, 87, 214, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(219, 234, 254, 0.5)),
    rgba(255, 255, 255, 0.78);
}

.resend-otp-btn:disabled {
  cursor: wait;
  color: #667085;
  border-color: rgba(148, 163, 184, 0.2);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(241, 245, 249, 0.66)),
    rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transform: none;
}

.resend-otp-btn.is-ready {
  color: #0f766e;
  border-color: rgba(13, 148, 136, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(204, 251, 241, 0.5)),
    rgba(255, 255, 255, 0.78);
}

.user-logout-btn {
  width: 100%;
  color: #9a5b00;
  border-color: rgba(217, 119, 6, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(254, 243, 199, 0.54)),
    rgba(255, 255, 255, 0.78);
}

.disabled-btn {
  color: #667085;
  background: #e5e7eb;
  box-shadow: none;
  cursor: not-allowed;
}

.primary-btn:hover, .warning-btn:hover, .danger-btn:hover, .ghost-btn:hover, .cnr-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 13px 24px rgba(18, 32, 47, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.small-btn {
  min-height: 36px;
  border-radius: 10px;
}

.icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.icon::before, .icon::after {
  content: "";
  position: absolute;
  display: block;
}

.icon-arrow::before {
  top: 8px;
  left: 3px;
  width: 11px;
  height: 2px;
  background: currentColor;
}

.icon-arrow::after {
  top: 4px;
  right: 3px;
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.icon-check::before {
  left: 4px;
  top: 3px;
  width: 7px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(42deg);
}

.icon-lock::before {
  left: 4px;
  top: 8px;
  width: 10px;
  height: 7px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.icon-lock::after {
  left: 6px;
  top: 2px;
  width: 6px;
  height: 8px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.icon-sync::before, .icon-reschedule::before {
  inset: 3px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.icon-sync::after, .icon-reschedule::after {
  right: 1px;
  top: 2px;
  width: 6px;
  height: 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(38deg);
}

.icon-cnr::before {
  left: 3px;
  top: 2px;
  width: 9px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 7px 7px 5px 5px;
  transform: rotate(-22deg);
}

.icon-cnr::after {
  right: 1px;
  bottom: 2px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
}

.icon-reject::before, .icon-reject::after {
  top: 8px;
  left: 3px;
  width: 12px;
  height: 2px;
  background: currentColor;
}

.icon-reject::before { transform: rotate(45deg); }
.icon-reject::after { transform: rotate(-45deg); }

.ghost-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.dashboard-wrap {
  margin: 0 auto;
  padding: 10px;
  animation: pageSwap 240ms ease both;
}

.topbar {
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0 8px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.97), rgba(248, 251, 255, 0.8));
  backdrop-filter: blur(12px);
}

.top-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.top-brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(135deg, #12395d, #1557d6 54%, #00a6a6);
  box-shadow: 0 12px 24px rgba(21, 87, 214, 0.2);
  overflow: hidden;
}

.top-brand-mark::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 11px;
  width: 22px;
  height: 22px;
  background: #fff;
  clip-path: polygon(0 0, 33% 0, 52% 31%, 72% 0, 100% 0, 66% 50%, 100% 100%, 68% 100%, 50% 69%, 29% 100%, 0 100%, 35% 50%);
}

.top-brand-mark::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: 7px;
  width: 31px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(-28deg);
}

.top-brand-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.brand-title-line,
.agent-line {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.brand-title-stack,
.view-agent-stack {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.brand-title-stack strong {
  color: #10263f;
  font-size: 19px;
  font-weight: 950;
  line-height: 0.95;
}

.brand-title-stack em {
  color: #0f766e;
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.view-agent-stack {
  grid-template-columns: auto minmax(0, auto);
  align-items: center;
  column-gap: 6px;
}

.view-agent-stack span {
  border-radius: 999px;
  padding: 3px 7px;
  color: #1557d6;
  background: rgba(21, 87, 214, 0.09);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.view-agent-stack b,
.view-agent-stack small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-agent-stack b {
  max-width: 150px;
  color: #344054;
  font-size: 13px;
  font-weight: 950;
}

.view-agent-stack small {
  grid-column: 2;
  color: #667085;
  font-size: 11px;
  font-weight: 850;
}

.agent-identity {
  display: inline-grid;
  gap: 1px;
  min-width: 0;
  border: 1px solid rgba(21, 87, 214, 0.12);
  border-radius: 13px;
  padding: 6px 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(239, 246, 255, 0.72));
  box-shadow: 0 8px 18px rgba(23, 40, 70, 0.07);
}

.agent-identity b,
.agent-identity small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-identity b {
  max-width: 190px;
  color: #10263f;
  font-size: 13px;
  font-weight: 950;
}

.agent-identity small {
  color: #667085;
  font-size: 11px;
  font-weight: 820;
}

.topbar h1 {
  margin: 0;
  font-size: 20px;
}

.topbar p { margin: 3px 0 0; }

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-actions form {
  margin: 0;
}

.top-actions a {
  text-decoration: none;
}

.session-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  margin: 0 0 6px;
  border: 0;
  border-radius: 12px;
  padding: 4px 10px;
  color: rgba(38, 52, 68, 0.9);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.62), rgba(239, 246, 255, 0.7), rgba(255, 255, 255, 0.62));
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
  isolation: isolate;
}

.top-session-strip {
  min-height: 26px;
}

.session-strip span {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  white-space: nowrap;
}

.session-strip span + span::before {
  content: "";
  width: 1px;
  height: 12px;
  margin-right: 10px;
  background: rgba(21, 87, 214, 0.18);
}

.session-strip span:nth-child(1) { color: #12395d; }
.session-strip span:nth-child(2) { color: #166534; }
.session-strip span:nth-child(3) { color: #92400e; }

.session-strip span:nth-child(3) b {
  color: #b45309;
}

.session-countdown {
  min-width: 44px;
  color: #7c2d12;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
}

.session-strip b {
  color: #1557d6;
  font-weight: 950;
}

.policy-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  border: 1px solid rgba(21, 87, 214, 0.16);
  border-radius: 12px;
  padding: 0 10px;
  color: #25364a;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(238, 245, 255, 0.72));
  box-shadow: 0 8px 18px rgba(23, 40, 70, 0.07);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.policy-chip b {
  border-radius: 8px;
  padding: 4px 6px;
  color: #fff;
  background: linear-gradient(135deg, #12395d, #1557d6);
}

.policy-chip span {
  border-radius: 999px;
  padding: 5px 7px;
}

.policy-chip .ok {
  color: #166534;
  background: #dcfce7;
}

.policy-chip .no {
  color: #991b1b;
  background: #fee2e2;
}

.eyebrow {
  margin-bottom: 3px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 6px 0 10px;
}

.filter-pill {
  display: grid;
  gap: 1px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 6px 6px;
  background: rgba(255, 255, 255, 0.78);
  color: #344054;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(23, 40, 70, 0.06);
}

.filter-pill span {
  align-self: end;
  overflow-wrap: anywhere;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-pill b { font-size: 18px; }

.filter-pill.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #0f8f9f);
}

.search-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -2px 0 9px;
}

.search-box {
  position: relative;
  flex: 1 1 auto;
}

.search-box input {
  min-height: 38px;
  border-radius: 13px;
  padding-left: 39px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 22px rgba(23, 40, 70, 0.07);
  backdrop-filter: blur(12px);
}

.search-box .icon {
  position: absolute;
  left: 12px;
  top: 10px;
  color: #667085;
  pointer-events: none;
}

.icon-search::before {
  left: 2px;
  top: 2px;
  width: 9px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon-search::after {
  left: 11px;
  top: 12px;
  width: 7px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

.search-count {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 9px;
  color: #344054;
  background: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(23, 40, 70, 0.06);
}

.app-tabs {
  position: sticky;
  top: 0;
  z-index: 9;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 5px 0 10px;
  border: 1px solid rgba(21, 87, 214, 0.18);
  border-radius: 16px;
  padding: 5px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(239, 246, 255, 0.7)),
    rgba(255, 255, 255, 0.82);
  box-shadow:
    0 14px 30px rgba(23, 40, 70, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.app-tabs a {
  display: grid;
  place-items: center;
  min-height: 40px;
  border: 1px solid rgba(128, 150, 178, 0.18);
  border-radius: 12px;
  color: #1d3552;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(248, 251, 255, 0.48));
  font-size: 13px;
  font-weight: 1000;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transition: transform 150ms ease, color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.app-tabs a.active {
  color: #fff;
  border-color: rgba(21, 87, 214, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 44%),
    linear-gradient(135deg, #1557d6, #0f8f9f);
  box-shadow:
    0 11px 22px rgba(21, 87, 214, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.app-tabs a:hover {
  transform: translateY(-1px);
}

.upload-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-bottom: 9px;
  border: 1px solid rgba(0, 166, 166, 0.22);
  border-radius: 12px;
  padding: 8px 10px;
  color: #0f3f46;
  background:
    linear-gradient(135deg, rgba(0, 166, 166, 0.13), rgba(21, 87, 214, 0.06)),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(23, 40, 70, 0.07);
}

.summary-icon {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-2), #0f8f9f);
  box-shadow: 0 9px 18px rgba(0, 166, 166, 0.22);
}

.summary-icon::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 11px;
  width: 14px;
  height: 8px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(-45deg);
}

.upload-summary strong,
.upload-summary span {
  display: block;
}

.upload-summary > div {
  min-width: 0;
}

.upload-summary strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-weight: 950;
}

.upload-summary span {
  margin-top: 2px;
  color: #42606a;
  font-size: 12px;
  font-weight: 820;
}

.db-total {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  border-radius: 999px;
  padding: 5px 8px;
  color: #164899;
  background: rgba(21, 87, 214, 0.1);
  white-space: nowrap;
}

.runsheet-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  border: 1px solid rgba(216, 226, 238, 0.95);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.86);
}

.runsheet-strip span,
.runsheet-strip strong {
  display: block;
}

.compact-link {
  margin-top: 0;
  white-space: nowrap;
}

.alert {
  border-radius: 11px;
  margin-bottom: 9px;
  padding: 9px 11px;
  font-weight: 750;
}

.alert-info {
  border: 1px solid rgba(21, 87, 214, 0.2);
  background: rgba(21, 87, 214, 0.08);
  color: #164899;
}

.alert-error {
  border: 1px solid rgba(217, 45, 32, 0.24);
  background: rgba(217, 45, 32, 0.08);
  color: #b42318;
}

.bulk-bar {
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  border: 1px solid rgba(21, 87, 214, 0.16);
  border-radius: 14px;
  padding: 8px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.04), rgba(21, 87, 214, 0.07)),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(23, 40, 70, 0.09);
  backdrop-filter: blur(12px);
}

.bulk-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bulk-icon {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #12395d, #1557d6);
  box-shadow: 0 8px 18px rgba(21, 87, 214, 0.18);
}

.bulk-icon::before,
.bulk-icon::after {
  content: "";
  position: absolute;
  border-radius: 3px;
  background: #fff;
}

.bulk-icon::before {
  left: 9px;
  top: 10px;
  width: 16px;
  height: 3px;
}

.bulk-icon::after {
  left: 9px;
  top: 18px;
  width: 16px;
  height: 3px;
  box-shadow: 0 8px 0 rgba(255, 255, 255, 0.9);
}

.bulk-info strong,
.bulk-info span {
  display: block;
}

.bulk-info strong {
  color: #10263f;
  font-size: 14px;
  font-weight: 950;
}

.bulk-info span {
  color: #526375;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.bulk-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bulk-actions .small-btn,
.bulk-actions .ghost-btn {
  min-height: 34px;
  border-radius: 10px;
  padding-inline: 10px;
}

.shipment-grid, .runsheet-grid {
  display: grid;
  gap: 8px;
  padding: 1px 2px 18px;
}

.shipment-card, .runsheet-card {
  position: relative;
  border: 1px solid rgba(128, 150, 178, 0.28);
  border-radius: 12px;
  padding: 9px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 255, 0.74));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 14px 32px rgba(23, 40, 70, 0.12),
    0 2px 8px rgba(23, 40, 70, 0.08);
  backdrop-filter: blur(14px);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.shipment-card::before,
.runsheet-card::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, rgba(21, 87, 214, 0.62), rgba(0, 166, 166, 0.54));
}

.shipment-card:hover,
.runsheet-card:hover {
  border-color: rgba(21, 87, 214, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.98) inset,
    0 18px 40px rgba(23, 40, 70, 0.16),
    0 5px 14px rgba(23, 40, 70, 0.09);
  transform: translateY(-1px);
}

.shipment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 158px;
  gap: 9px;
  align-items: stretch;
  overflow: visible;
}

.shipment-card-no-actions {
  grid-template-columns: minmax(0, 1fr);
}

.shipment-card-no-actions .shipment-main {
  grid-column: 1 / -1;
}

.shipment-card-locked {
  border-color: rgba(217, 45, 32, 0.34);
  background:
    linear-gradient(135deg, rgba(254, 226, 226, 0.86), rgba(255, 247, 237, 0.72)),
    rgba(255, 255, 255, 0.8);
  box-shadow: 0 14px 30px rgba(217, 45, 32, 0.13);
}

.shipment-card-locked::before {
  background: linear-gradient(180deg, #ef4444, #b42318);
}

.shipment-main {
  min-width: 0;
}

.shipment-card-locked .shipment-main {
  border-radius: 10px;
  padding: 1px;
  background: rgba(255, 255, 255, 0.42);
}

.shipment-card-locked .status-badge {
  border: 1px solid rgba(217, 45, 32, 0.18);
}

.shipment-action-updated {
  animation: actionPulse 620ms ease both;
}

.shipment-action-rfr {
  border-color: rgba(234, 179, 8, 0.95);
  border-left: 7px solid #facc15;
  background:
    linear-gradient(135deg, rgba(254, 240, 138, 0.96), rgba(255, 247, 237, 0.9));
  box-shadow: 0 16px 36px rgba(234, 179, 8, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.shipment-action-cnr {
  border-color: rgba(6, 182, 212, 0.72);
  border-left: 7px solid #06b6d4;
  background:
    linear-gradient(135deg, rgba(165, 243, 252, 0.96), rgba(240, 253, 250, 0.88));
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.shipment-action-reject {
  border-color: rgba(248, 113, 113, 0.82);
  border-left: 7px solid #ef4444;
  background:
    linear-gradient(135deg, rgba(254, 202, 202, 0.96), rgba(255, 247, 237, 0.88));
  box-shadow: 0 16px 36px rgba(239, 68, 68, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.shipment-card-moving {
  pointer-events: none;
  animation: shipmentMoveOut 420ms ease both;
}

.runsheet-card-closed {
  border-color: rgba(22, 163, 74, 0.32);
  border-left: 4px solid #22c55e;
  background: rgba(240, 253, 244, 0.94);
}

.runsheet-card-closed::before {
  background: linear-gradient(180deg, #22c55e, #0f766e);
}

.runsheet-card-pickup {
  border-color: rgba(124, 58, 237, 0.28);
  border-left: 4px solid #7c3aed;
  background:
    linear-gradient(135deg, rgba(237, 233, 254, 0.88), rgba(240, 253, 250, 0.68)),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 26px rgba(124, 58, 237, 0.12);
}

.runsheet-card-pickup::before {
  background: linear-gradient(180deg, #7c3aed, #0f766e);
}

.runsheet-card-pickup .shipment-id {
  color: #4c1d95;
}

.runsheet-card-pickup .metric-delivery {
  color: #5b21b6;
  background: rgba(237, 233, 254, 0.94);
}

.runsheet-closed-badge {
  color: #166534;
  background: #bbf7d0;
}

.shipment-head, .title-row, .meta-row, .action-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shipment-head { justify-content: space-between; }

.runsheet-head {
  display: grid;
  grid-template-columns: minmax(155px, 0.9fr) minmax(220px, 1.4fr) auto;
  align-items: center;
  gap: 10px;
}

.runsheet-title-block {
  min-width: 0;
}

.runsheet-head > .status-badge {
  justify-self: end;
}

.title-row {
  min-width: 0;
  flex: 1 1 auto;
}

.shipment-identity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.select-box {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 11px;
  background: #eef5ff;
  cursor: pointer;
}

.select-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
}

.select-box span {
  width: 18px;
  height: 18px;
  border: 2px solid #8aa4c3;
  border-radius: 6px;
  background: #fff;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.select-box input:checked + span {
  border-color: var(--brand);
  background:
    linear-gradient(135deg, transparent 47%, #fff 48%, #fff 55%, transparent 56%),
    linear-gradient(45deg, transparent 39%, #fff 40%, #fff 49%, transparent 50%),
    var(--brand);
  box-shadow: 0 0 0 4px rgba(21, 87, 214, 0.12);
}

.shipment-id {
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0;
}

.tracking-block {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  border-radius: 14px;
  padding: 6px;
  background:
    linear-gradient(135deg, rgba(16, 38, 63, 0.08), rgba(21, 87, 214, 0.07)),
    rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66), 0 8px 18px rgba(23, 40, 70, 0.055);
}

.track-pair {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.68);
}

.track-pair b {
  margin-right: 5px;
  color: #1557d6;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.track-pair strong {
  min-width: 0;
  overflow: hidden;
  color: #12202f;
  font-size: 14px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-lock-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 999px;
  padding: 4px 8px;
  color: #991b1b;
  background:
    linear-gradient(135deg, rgba(254, 226, 226, 0.92), rgba(255, 255, 255, 0.72));
  box-shadow: 0 8px 18px rgba(217, 45, 32, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.name-pair {
  min-height: auto;
  border: 1px solid rgba(217, 45, 32, 0.22);
  padding: 4px 8px;
  background:
    linear-gradient(135deg, rgba(254, 242, 242, 0.96), rgba(255, 255, 255, 0.82));
  box-shadow: 0 8px 18px rgba(217, 45, 32, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.name-pair b {
  color: #d92d20;
  font-size: 10px;
}

.name-pair strong {
  color: #7a271a;
  font-size: 14px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.header-name-pair {
  max-width: min(360px, 42vw);
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.98), rgba(255, 255, 255, 0.84));
  box-shadow: 0 8px 18px rgba(180, 83, 9, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.header-name-pair b {
  color: #9a3412;
}

.header-name-pair strong {
  color: #7c2d12;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merchant-ref {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.status-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  justify-items: end;
  gap: 5px;
  min-width: 150px;
}

.status-mainline {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  max-width: 100%;
  flex-wrap: wrap;
}

.status-name-pair {
  max-width: none;
}

.status-name-pair strong {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.status-badge, .action-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-in-progress { color: #065f46; background: #d1fae5; }
.status-incompleted {
  color: #8a4b00;
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.14);
}
.status-completed { color: #344054; background: #e5e7eb; }
.status-new, .status-assigned, .status-planned { color: #1d4ed8; background: #dbeafe; }
.status-unknown { color: #6b21a8; background: #f3e8ff; }
.action-badge {
  color: #12395d;
  background:
    linear-gradient(135deg, rgba(224, 237, 255, 0.96), rgba(236, 254, 255, 0.9));
  box-shadow: inset 0 0 0 1px rgba(21, 87, 214, 0.12), 0 6px 14px rgba(23, 40, 70, 0.055);
}

.status-incompleted + .action-badge,
.action-badge-live {
  min-height: 28px;
  padding: 6px 10px;
  font-size: 11px;
}
.pickup-badge { color: #6d28d9; background: #ede9fe; }
.prexo-badge {
  color: #0f766e;
  background:
    linear-gradient(135deg, rgba(204, 251, 241, 0.98), rgba(236, 253, 245, 0.92));
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.14), 0 6px 14px rgba(15, 118, 110, 0.08);
}
.replacement-badge {
  color: #9a3412;
  background:
    linear-gradient(135deg, rgba(255, 237, 213, 0.98), rgba(254, 249, 195, 0.9));
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.14), 0 6px 14px rgba(154, 52, 18, 0.08);
}

.info-list {
  display: grid;
  gap: 4px;
  margin-top: 5px;
}

.info-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(216, 226, 238, 0.72);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(23, 40, 70, 0.045);
}

.summary-chip b {
  margin-right: 4px;
  font-weight: 950;
}

.name-chip {
  color: #153e75;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.9), rgba(239, 246, 255, 0.84));
}

.number-chip {
  color: #075985;
  background: linear-gradient(135deg, rgba(207, 250, 254, 0.86), rgba(240, 253, 250, 0.82));
}

.cod-chip {
  color: #7a3f05;
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.92), rgba(255, 251, 235, 0.86));
}

.info-line {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid rgba(216, 226, 238, 0.66);
  border-radius: 10px;
  padding: 5px 8px;
  color: #263444;
  background: rgba(248, 251, 255, 0.64);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

button.info-line {
  cursor: pointer;
}

.info-line span {
  color: #667085;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.info-line strong,
.info-line a {
  min-width: 0;
  color: #12202f;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.info-line a {
  color: #0f766e;
}

.expandable-line strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expandable-line.expanded strong {
  display: block;
  overflow: visible;
  white-space: normal;
}

.meta-row {
  flex-wrap: wrap;
  margin-top: 8px;
}

.meta-row span {
  border-radius: 999px;
  padding: 4px 7px;
  color: #344054;
  background: var(--soft);
  font-size: 12px;
  font-weight: 850;
}

.cod-row span {
  color: #7a3f05;
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.92), rgba(255, 251, 235, 0.86));
}

.action-row {
  justify-content: stretch;
  margin-top: 10px;
}

.shipment-card .action-row {
  align-self: stretch;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  margin: -9px -9px -9px 0;
  border-left: 1px solid rgba(216, 226, 238, 0.7);
  border-radius: 0 12px 12px 0;
  padding: 10px 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(238, 245, 255, 0.35)),
    rgba(255, 255, 255, 0.28);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px);
}

.change-outcome-note {
  margin-top: 9px;
  color: #92400e;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.shipment-card .action-row form { width: 100%; }

.shipment-card .action-row.action-row-cooling form {
  display: none;
}

.shipment-action-cooldown {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  min-height: 142px;
  border: 1px solid rgba(217, 119, 6, 0.26);
  border-radius: 14px;
  padding: 12px 8px;
  color: #92400e;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(254, 243, 199, 0.62)),
    rgba(255, 255, 255, 0.5);
  box-shadow:
    0 10px 22px rgba(120, 72, 16, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.shipment-action-cooldown .mini-spinner {
  width: 22px;
  height: 22px;
  border-color: rgba(217, 119, 6, 0.18);
  border-top-color: #d97706;
}

.shipment-action-cooldown strong,
.shipment-action-cooldown b {
  display: block;
}

.shipment-action-cooldown strong {
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.shipment-action-cooldown b {
  margin-top: 4px;
  color: #7c2d12;
  font-size: 18px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.shipment-card .action-row button,
.shipment-card .action-row .primary-btn,
.shipment-card .action-row .ghost-btn,
.shipment-card .action-row .warning-btn,
.shipment-card .action-row .danger-btn,
.shipment-card .action-row .cnr-btn {
  width: 100%;
  min-height: 39px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(23, 40, 70, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.68);
  transform: translateZ(0);
}

.shipment-card .action-row .warning-btn {
  color: #9a5b00;
  border-color: rgba(217, 119, 6, 0.22);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(254, 243, 199, 0.48));
}

.shipment-card .action-row .cnr-btn {
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.22);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(204, 251, 241, 0.48));
}

.shipment-card .action-row .danger-btn {
  color: #b42318;
  border-color: rgba(217, 45, 32, 0.22);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(254, 226, 226, 0.5));
}

.button-loading {
  cursor: wait;
  filter: saturate(0.9);
}

.button-done {
  color: #065f46 !important;
  border-color: rgba(22, 163, 74, 0.32) !important;
  background:
    linear-gradient(135deg, rgba(220, 252, 231, 0.96), rgba(236, 253, 245, 0.84)) !important;
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

.mini-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 720ms linear infinite;
}

.shipment-card .action-row button:hover,
.shipment-card .action-row .primary-btn:hover,
.shipment-card .action-row .ghost-btn:hover,
.shipment-card .action-row .warning-btn:hover,
.shipment-card .action-row .danger-btn:hover,
.shipment-card .action-row .cnr-btn:hover {
  transform: translateY(-1px);
}

.action-row a {
  flex: 1 1 0;
  text-decoration: none;
}

.runsheet-card > .action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.runsheet-card > .action-row form {
  display: contents;
}

.runsheet-action-btn {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 12px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
  box-shadow: 0 8px 18px rgba(23, 40, 70, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(14px);
}

.open-runsheet-btn {
  color: #1557d6;
  border-color: rgba(21, 87, 214, 0.2);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(219, 234, 254, 0.5));
}

.active-shipments-btn {
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(204, 251, 241, 0.42));
}

.close-safe-btn {
  color: #166534;
  border-color: rgba(22, 163, 74, 0.22);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(220, 252, 231, 0.52));
  cursor: pointer;
}

.close-blocked-btn {
  position: relative;
  overflow: hidden;
  color: #991b1b;
  border-color: rgba(217, 45, 32, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(254, 226, 226, 0.62)),
    rgba(255, 255, 255, 0.46);
  cursor: pointer;
  box-shadow:
    0 8px 18px rgba(217, 45, 32, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.close-blocked-btn::after {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.62) 48%, transparent 58%);
  transform: translateX(-85%);
  transition: transform 420ms ease;
}

.close-blocked-btn:hover::after,
.close-blocked-btn:focus-visible::after,
.close-blocked-btn.blocked-shake::after {
  transform: translateX(85%);
}

.close-blocked-btn:hover,
.close-blocked-btn:focus-visible {
  border-color: rgba(217, 45, 32, 0.52);
  box-shadow:
    0 10px 24px rgba(217, 45, 32, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.close-blocked-btn.blocked-shake {
  animation: closeBlockedShake 560ms cubic-bezier(.36,.07,.19,.97), closeBlockedPulse 700ms ease;
}

.close-blocked-btn:disabled,
.close-closed-btn {
  cursor: not-allowed;
  opacity: 0.72;
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(23, 40, 70, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

@keyframes closeBlockedShake {
  0%, 100% { transform: translateX(0); }
  12%, 36%, 60%, 84% { transform: translateX(-4px) rotate(-1deg); }
  24%, 48%, 72% { transform: translateX(4px) rotate(1deg); }
}

@keyframes closeBlockedPulse {
  0% { box-shadow: 0 0 0 0 rgba(217, 45, 32, 0.42), 0 8px 18px rgba(217, 45, 32, 0.12); }
  100% { box-shadow: 0 0 0 12px rgba(217, 45, 32, 0), 0 10px 24px rgba(217, 45, 32, 0.18); }
}

.runsheet-action-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.runsheet-summary-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-top: 8px;
  border: 1px solid rgba(128, 150, 178, 0.24);
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(248, 251, 255, 0.68));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 8px 18px rgba(23, 40, 70, 0.055);
}

.runsheet-summary-line span {
  flex: 1 1 0;
  min-width: 92px;
  border-right: 1px solid rgba(128, 150, 178, 0.16);
  padding: 7px 8px;
  color: #344054;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.runsheet-summary-line span:last-child {
  border-right: 0;
}

.runsheet-summary-line b {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.runsheet-summary-line .stat-pending {
  color: #1557d6;
}

.runsheet-summary-line .stat-failed {
  color: #b45309;
}

.runsheet-summary-line .stat-delivered {
  color: #166534;
}

.runsheet-note {
  margin: 0;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(23, 40, 70, 0.055);
}

.runsheet-note.safe {
  color: #166534;
  border: 1px solid rgba(22, 163, 74, 0.16);
  background: linear-gradient(135deg, #dcfce7, rgba(240, 253, 244, 0.92));
}

.runsheet-note.blocked {
  color: #92400e;
  border: 1px solid rgba(217, 119, 6, 0.18);
  background: linear-gradient(135deg, #fef3c7, rgba(255, 247, 237, 0.94));
}

.runsheet-note.closed {
  color: #991b1b;
  border: 1px solid rgba(220, 38, 38, 0.18);
  background: linear-gradient(135deg, #fee2e2, rgba(255, 247, 237, 0.94));
}

.runsheet-summary-line .metric-delivery { color: #075985; }
.runsheet-summary-line .metric-orders { color: #3730a3; }
.runsheet-summary-line .metric-cash { color: #7a3f05; }

.cash-panel {
  margin-bottom: 9px;
  border: 1px solid rgba(217, 119, 6, 0.24);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 251, 235, 0.92);
  box-shadow: 0 8px 20px rgba(120, 72, 16, 0.08);
}

.cash-head,
.cash-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cash-head h2 {
  margin: 0;
  font-size: 16px;
}

.cash-head .eyebrow {
  margin-bottom: 1px;
  color: #b45309;
}

.cash-notice {
  margin: 8px 0;
  border-radius: 9px;
  padding: 7px 8px;
  color: #166534;
  background: #dcfce7;
  font-size: 12px;
  font-weight: 800;
}

.cash-notice.cash-error {
  color: #991b1b;
  background: #fee2e2;
}

.cash-balance {
  margin-top: 8px;
  border-radius: 10px;
  padding: 8px 10px;
  color: #78350f;
  background: #fef3c7;
}

.cash-balance span {
  font-size: 12px;
  font-weight: 800;
}

.cash-balance strong {
  font-size: 18px;
}

.transfer-strip {
  display: grid;
  gap: 8px;
  margin: 8px 0;
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: 14px;
  padding: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 251, 235, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 10px 24px rgba(120, 72, 16, 0.08);
}

.transfer-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #92400e;
}

.transfer-status-line span,
.cash-copy-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.transfer-status-line strong {
  border-radius: 999px;
  padding: 3px 8px;
  color: #166534;
  background: rgba(220, 252, 231, 0.88);
  font-size: 11px;
  font-weight: 900;
}

.cash-transfer-timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: 12px;
  padding: 8px 10px;
  color: #78350f;
  background: rgba(254, 243, 199, 0.82);
}

.cash-transfer-timer span {
  color: #92400e;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.cash-transfer-timer strong {
  border-radius: 999px;
  padding: 4px 10px;
  color: #9a3412;
  background: rgba(255, 255, 255, 0.74);
  font-size: 16px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.cash-transfer-timer.cash-transfer-expired {
  border-color: rgba(153, 27, 27, 0.22);
  color: #991b1b;
  background: rgba(254, 226, 226, 0.86);
}

.cash-transfer-timer.cash-transfer-expired strong {
  color: #991b1b;
}

.cash-copy-row {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(21, 87, 214, 0.14);
  border-radius: 12px;
  padding: 9px 10px;
  color: #12315e;
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(18, 32, 47, 0.06);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.cash-copy-row:hover,
.cash-copy-row:focus-visible {
  border-color: rgba(21, 87, 214, 0.34);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 24px rgba(21, 87, 214, 0.13);
  transform: translateY(-1px);
  outline: none;
}

.cash-copy-row strong,
.cash-copy-row em {
  display: block;
}

.cash-copy-row strong {
  margin-top: 2px;
  font-size: 17px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.cash-copy-row em {
  margin-top: 2px;
  color: #6b7280;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.cash-copy-row.cash-otp {
  border-color: rgba(153, 27, 27, 0.16);
  color: #991b1b;
  background: rgba(254, 242, 242, 0.72);
}

.cash-copy-row.cash-otp:hover,
.cash-copy-row.cash-otp:focus-visible {
  border-color: rgba(153, 27, 27, 0.32);
  box-shadow: 0 12px 24px rgba(153, 27, 27, 0.12);
}

.cash-copy-row.cash-otp strong {
  font-size: 24px;
  letter-spacing: 1px;
}

.cash-full-btn {
  width: 100%;
  margin-top: 8px;
}

.cash-empty {
  margin: 8px 0 0;
  font-size: 12px;
}

.cash-confirm-modal .warning-mark {
  font-size: 15px;
}

.cash-sheet-modal {
  max-height: min(82vh, 620px);
  overflow-y: auto;
}

.modal-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  color: #78350f;
  background: #fef3c7;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.locked-note {
  margin-top: 12px;
  border-radius: 14px;
  padding: 10px 11px;
  color: #344054;
  background: #eef2f6;
  font-weight: 850;
}

.closure-locked-note {
  border: 1px solid rgba(217, 45, 32, 0.26);
  color: #991b1b;
  background:
    linear-gradient(135deg, rgba(254, 226, 226, 0.94), rgba(255, 237, 213, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.admin-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.035), transparent 30%),
    linear-gradient(180deg, #f6f9fc 0%, #eef4f8 100%);
}

.admin-body .dashboard-wrap {
  width: min(100%, 1180px);
}

.admin-tabs {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 14px;
  border: 1px solid rgba(21, 87, 214, 0.18);
  border-radius: 18px;
  padding: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.72));
  box-shadow:
    0 16px 34px rgba(23, 40, 70, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.admin-tabs button {
  flex: 1 1 132px;
  min-height: 38px;
  border: 1px solid rgba(128, 150, 178, 0.16);
  border-radius: 13px;
  color: #1d3552;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(248, 251, 255, 0.42));
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: transform 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.admin-tabs button.active {
  color: #fff;
  border-color: rgba(21, 87, 214, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 45%),
    linear-gradient(135deg, var(--brand), #0f8f9f);
  box-shadow:
    0 10px 20px rgba(21, 87, 214, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.admin-tabs button:hover {
  transform: translateY(-1px);
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  padding: 0 2px 20px;
  scroll-behavior: smooth;
}

.admin-settings-grid {
  display: contents;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.admin-panel {
  border: 1px solid rgba(211, 223, 236, 0.98);
  border-radius: 20px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(248, 251, 255, 0.88));
  box-shadow: 0 18px 45px rgba(23, 40, 70, 0.1);
  backdrop-filter: blur(14px);
}

.admin-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-panel-head-split {
  justify-content: space-between;
  gap: 12px;
}

.admin-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-panel-head h2,
.admin-panel-head p {
  margin: 0;
}

.admin-panel-head p {
  margin-top: 2px;
  font-size: 12px;
}

.admin-panel-icon {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 13px;
  background: linear-gradient(135deg, #12395d, #1557d6);
  box-shadow: 0 10px 20px rgba(21, 87, 214, 0.18);
}

.admin-panel-icon::before,
.admin-panel-icon::after {
  content: "";
  position: absolute;
  background: #fff;
}

.users-icon::before {
  left: 13px;
  top: 9px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.users-icon::after {
  left: 8px;
  bottom: 8px;
  width: 22px;
  height: 10px;
  border-radius: 12px 12px 6px 6px;
}

.runtime-icon::before {
  left: 10px;
  top: 10px;
  width: 18px;
  height: 4px;
  border-radius: 3px;
  box-shadow: 0 7px 0 #fff, 0 14px 0 #fff;
}

.database-icon {
  background: linear-gradient(135deg, #0f766e, #16a34a);
}

.database-icon::before {
  left: 9px;
  top: 8px;
  width: 20px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 7px 0 rgba(255, 255, 255, 0.9), 0 14px 0 rgba(255, 255, 255, 0.82);
}

.notify-icon {
  background: linear-gradient(135deg, #7a3f05, #d97706);
}

.notify-icon::before {
  left: 11px;
  top: 9px;
  width: 16px;
  height: 16px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-35deg);
}

.notify-icon::after {
  left: 17px;
  bottom: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.features-icon {
  background: linear-gradient(135deg, #1557d6, #0f766e);
}

.features-icon::before {
  left: 10px;
  top: 10px;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.96);
}

.features-icon::after {
  right: 8px;
  bottom: 7px;
  width: 10px;
  height: 4px;
  border-radius: 999px;
  transform: rotate(-35deg);
}

.admin-form {
  display: grid;
  gap: 10px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-form select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  background: #fff;
}

.settings-form {
  grid-template-columns: 1fr;
}

.feature-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.feature-toggle-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(128, 150, 178, 0.24);
  border-radius: 16px;
  padding: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(239, 246, 255, 0.64));
  box-shadow: 0 10px 24px rgba(23, 40, 70, 0.075), inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.feature-toggle-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.feature-toggle-icon {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.32);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.feature-toggle-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 10px rgba(23, 40, 70, 0.18);
  transition: transform 160ms ease;
}

.feature-toggle-card input:checked + .feature-toggle-icon {
  background: linear-gradient(135deg, rgba(21, 87, 214, 0.7), rgba(15, 118, 110, 0.68));
  box-shadow: 0 8px 16px rgba(21, 87, 214, 0.16);
}

.feature-toggle-card input:checked + .feature-toggle-icon::before {
  transform: translateX(18px);
}

.feature-toggle-card strong,
.feature-toggle-card small {
  display: block;
}

.feature-toggle-card strong {
  color: #10263f;
  font-size: 14px;
  font-weight: 1000;
}

.feature-toggle-card small {
  margin-top: 3px;
  color: #667085;
  font-size: 10px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.admin-log-search {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-log-clear {
  margin: 0;
  flex: 0 0 auto;
}

.admin-log-search input {
  min-height: 38px;
}

.admin-log-table {
  display: grid;
  gap: 6px;
}

.admin-log-head,
.admin-log-row {
  display: grid;
  grid-template-columns: 1.05fr 0.75fr 0.85fr 1fr 0.85fr;
  gap: 6px;
  align-items: center;
}

.admin-log-head span {
  color: #667085;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.admin-log-row {
  border: 1px solid rgba(216, 226, 238, 0.76);
  border-radius: 12px;
  padding: 8px;
  background: rgba(248, 251, 255, 0.78);
  color: #263444;
  font-size: 12px;
  font-weight: 820;
}

.admin-log-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-empty {
  padding: 14px;
  font-size: 13px;
}

.device-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.device-terminal-field {
  grid-column: 1 / -1;
}

.admin-form-actions,
.user-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-form-actions > * {
  flex: 1 1 0;
}

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

.admin-check-card {
  justify-content: flex-start;
  min-height: 44px;
  border: 1px solid rgba(216, 226, 238, 0.92);
  border-radius: 14px;
  padding: 0 12px;
  color: #344054;
  background: rgba(248, 251, 255, 0.92);
  font-weight: 900;
}

.inline-check input {
  width: auto;
  min-height: auto;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(216, 226, 238, 0.94);
  border-radius: 12px;
  padding: 10px;
  background: var(--soft);
}

.toggle-row input {
  width: 42px;
  min-height: 24px;
  flex: 0 0 42px;
  accent-color: var(--brand);
}

.toggle-row span,
.toggle-row strong,
.toggle-row small {
  display: block;
}

.toggle-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.user-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.admin-users-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(420px, 1.12fr);
  gap: 14px;
  align-items: start;
}

.admin-user-list-panel,
.user-config-panel {
  border: 1px solid rgba(216, 226, 238, 0.9);
  border-radius: 18px;
  padding: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.user-config-panel {
  position: sticky;
  top: 10px;
}

.panel-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-subhead strong {
  color: #10263f;
  font-size: 14px;
  font-weight: 1000;
}

.panel-subhead span {
  border-radius: 999px;
  padding: 4px 8px;
  color: #1557d6;
  background: rgba(21, 87, 214, 0.08);
  font-size: 11px;
  font-weight: 950;
}

.user-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(216, 226, 238, 0.92);
  border-radius: 16px;
  padding: 11px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.82));
  box-shadow: 0 10px 20px rgba(23, 40, 70, 0.055);
}

.user-row.is-disabled {
  opacity: 0.72;
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.82));
}

.user-row-main {
  min-width: 0;
}

.user-row strong,
.user-row span {
  display: block;
}

.user-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.user-row strong {
  color: #10263f;
  font-size: 14px;
  font-weight: 1000;
}

.user-row .terminal-label {
  margin-top: 3px;
  color: #475467;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.user-row form {
  margin: 0;
}

.empty-card {
  padding: 24px;
  text-align: center;
}

.footer-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 16px 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.footer-actions a { text-decoration: none; }
.fade-in { animation: rise 300ms ease both; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(18, 32, 47, 0.42);
  backdrop-filter: blur(8px);
}

.modal-backdrop[hidden] {
  display: none;
}

.logout-modal {
  width: min(100%, 360px);
  border: 1px solid rgba(248, 113, 113, 0.5);
  border-radius: 16px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(254, 242, 242, 0.98), rgba(255, 251, 235, 0.96)),
    #fff;
  box-shadow: 0 24px 70px rgba(18, 32, 47, 0.3);
  animation: pop 180ms ease both;
}

.loading-modal {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(100%, 260px);
  border: 1px solid rgba(216, 226, 238, 0.68);
  border-radius: 18px;
  padding: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 70px rgba(18, 32, 47, 0.22);
  backdrop-filter: blur(18px);
  animation: pop 180ms ease both;
}

.loading-modal span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.loading-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(21, 87, 214, 0.14);
  border-top-color: var(--brand-2);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.action-toast {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 70;
  max-width: min(92vw, 360px);
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 14px;
  padding: 11px 14px;
  color: #064e3b;
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(239, 246, 255, 0.94)),
    #fff;
  box-shadow: 0 18px 42px rgba(23, 40, 70, 0.18);
  font-size: 13px;
  font-weight: 950;
  animation: toastIn 180ms ease both;
}

.action-toast-error {
  border-color: rgba(217, 45, 32, 0.28);
  color: #991b1b;
  background:
    linear-gradient(135deg, rgba(254, 242, 242, 0.97), rgba(255, 247, 237, 0.94)),
    #fff;
}

.action-toast.hiding {
  animation: toastOut 180ms ease both;
}

.is-busy button,
.is-busy a {
  pointer-events: none;
}

.warning-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  font-size: 25px;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.25);
}

.logout-modal h2 {
  margin: 0 0 6px;
  color: #991b1b;
}

.logout-modal p {
  margin: 0;
  color: #5f2f17;
  line-height: 1.35;
  font-size: 13px;
  font-weight: 760;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.modal-actions.single-action {
  grid-template-columns: minmax(120px, 180px);
  justify-content: end;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pageSwap {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

@keyframes actionPulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.01); }
  100% { transform: scale(1); }
}

@keyframes shipmentMoveOut {
  0% { opacity: 1; transform: translateX(0) scale(1); max-height: 260px; margin-bottom: 0; }
  70% { opacity: 0; transform: translateX(18px) scale(0.98); max-height: 260px; margin-bottom: 0; }
  100% { opacity: 0; transform: translateX(18px) scale(0.98); max-height: 0; margin-bottom: -8px; padding-top: 0; padding-bottom: 0; border-width: 0; }
}

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

@keyframes xFlyWordSpin {
  0%, 62%, 100% { transform: rotate(0deg) translateY(0); }
  16% { transform: rotate(180deg) translateY(-1px); }
  31% { transform: rotate(360deg) translateY(0); }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .dashboard-wrap { padding: 10px; }
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .top-session-strip {
    width: 100%;
    min-width: 0;
  }

  .policy-chip {
    order: -1;
  }

  .top-actions .small-btn,
  .top-actions .policy-chip {
    min-height: 34px;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .brand-lockup h1 {
    font-size: 27px;
  }

  .login-mode {
    max-width: 132px;
    padding: 7px 8px;
  }

  .login-mode span {
    font-size: 9px;
  }

  .login-mode strong {
    font-size: 12px;
  }

  .topbar h1 {
    max-width: 135px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 20px;
  }

  .brand-title-line {
    align-items: flex-start;
  }

  .view-agent-stack {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .view-agent-stack b {
    max-width: 150px;
  }

  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-panel { align-items: stretch; flex-direction: column; }
  .search-count { align-self: flex-start; }
  .shipment-card { grid-template-columns: 1fr; }
  .shipment-card .action-row {
    position: static;
    flex-direction: row;
    margin: 8px 0 0;
    border-top: 1px solid rgba(216, 226, 238, 0.7);
    border-left: 0;
    border-radius: 12px;
    padding: 8px;
  }
  .shipment-card .action-row form,
  .shipment-card .action-row button {
    flex: 1 1 0;
  }
  .shipment-card .action-row.action-row-cooling {
    display: block;
  }
  .shipment-action-cooldown {
    min-height: 62px;
  }
  .runsheet-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .runsheet-head {
    grid-template-columns: 1fr auto;
  }
  .runsheet-head .runsheet-note {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .runsheet-summary-line {
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .runsheet-summary-line::-webkit-scrollbar {
    display: none;
  }
  .runsheet-summary-line span {
    flex: 0 0 auto;
    min-width: max-content;
    padding: 7px 8px;
    font-size: 10px;
  }
  .runsheet-summary-line b {
    font-size: 12px;
  }
  .runsheet-card > .action-row { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-settings-grid { grid-template-columns: 1fr; }
  .feature-toggle-grid { grid-template-columns: 1fr; }
  .admin-panel-head-split {
    align-items: stretch;
    flex-direction: column;
  }
  .admin-log-clear .small-btn {
    width: 100%;
  }
  .admin-users-shell,
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
  .user-config-panel {
    position: static;
  }
  .admin-log-head { display: none; }
  .admin-log-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .admin-log-row span {
    white-space: normal;
  }
  .device-form-grid { grid-template-columns: 1fr; }
  .device-terminal-field { grid-column: auto; }
  .user-row { align-items: flex-start; }
  .user-row-actions { flex-direction: column; align-items: stretch; }
  .bulk-bar {
    top: 70px;
    align-items: stretch;
    flex-direction: column;
  }
  .bulk-actions {
    width: 100%;
  }
  .bulk-actions button {
    flex: 1 1 0;
  }
  .shipment-head { align-items: flex-start; }
  .shipment-identity {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .header-name-pair {
    max-width: 100%;
  }
  .header-name-pair strong {
    white-space: normal;
  }
  .status-stack { min-width: auto; }
  .status-mainline {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .status-name-pair,
  .status-name-pair strong {
    max-width: none;
  }
}
