@font-face {
  font-family: "Inter";
  src: url("fonts/inter-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

/* Installable app prompt: global so it survives login and SPA navigation. */
.pwa-install-prompt {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: calc(var(--z-modal) - 1);
  width: min(430px, calc(100vw - 36px));
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px 14px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 30%, var(--border-primary));
  border-radius: 18px;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--brand-primary) 15%, transparent), transparent 38%),
    color-mix(in srgb, var(--surface-primary) 94%, transparent);
  box-shadow: 0 24px 70px rgba(3, 15, 34, .28), inset 0 1px rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  animation: pwaPromptIn .32s cubic-bezier(.2, .8, .2, 1);
}
.pwa-install-prompt::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(var(--brand-secondary), var(--brand-primary)); }
.pwa-install-brand { position: relative; width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid var(--border-primary); border-radius: 16px; background: var(--surface-secondary); }
.pwa-install-brand > img { width: 44px; height: 44px; object-fit: contain; border-radius: 11px; }
.pwa-install-badge { position: absolute; right: -5px; bottom: -5px; width: 23px; height: 23px; display: grid; place-items: center; border: 2px solid var(--surface-primary); border-radius: 50%; color: #fff; background: var(--brand-primary); box-shadow: 0 5px 14px rgba(25, 86, 201, .35); }
.pwa-install-badge svg { width: 12px; height: 12px; }
.pwa-install-copy { min-width: 0; align-self: center; }
.pwa-install-eyebrow { display: block; margin-bottom: 3px; color: var(--brand-secondary); font-size: 8px; font-weight: 850; letter-spacing: .12em; }
.pwa-install-copy h2 { margin: 0; overflow-wrap: anywhere; font-size: 16px; line-height: 1.25; }
.pwa-install-copy p { margin: 5px 0 0; color: var(--text-secondary); font-size: 10px; line-height: 1.5; }
.pwa-install-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 7px; }
.pwa-install-actions button { min-height: 36px; }
.pwa-install-actions .primary-button[aria-busy="true"] { cursor: wait; opacity: .72; }

.pwa-ios-guide { display: grid; gap: 9px; }
.pwa-ios-guide > p { margin: 0 0 2px; color: var(--text-secondary); font-size: 11px; line-height: 1.5; }
.pwa-ios-step { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border-primary); border-radius: var(--radius-md); background: var(--surface-secondary); }
.pwa-ios-step > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: var(--brand-secondary); background: var(--brand-soft); }
.pwa-ios-step svg { width: 17px; height: 17px; }
.pwa-ios-step strong, .pwa-ios-step small { display: block; }
.pwa-ios-step strong { font-size: 11px; }
.pwa-ios-step small { margin-top: 2px; color: var(--text-muted); font-size: 9px; line-height: 1.4; }

@keyframes pwaPromptIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 680px) {
  .pwa-install-prompt {
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 8px;
    width: auto;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px 12px;
    padding: 14px;
    border-radius: 18px;
  }
  body:not([data-public-view]):has(.app-view:not(.hidden)) .pwa-install-prompt { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .pwa-install-brand { width: 52px; height: 52px; border-radius: 14px; }
  .pwa-install-brand > img { width: 39px; height: 39px; }
  .pwa-install-copy h2 { font-size: 14px; }
  .pwa-install-actions { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); }
  .pwa-install-actions button { width: 100%; padding-inline: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-install-prompt { animation: none; }
}

/* Attendance map control center: a dedicated, production-ready office
   geofence editor shared by Admin policy and Technician attendance status. */
@media screen {
  .attendance-map-page { --map-accent: #1aa9e8; }

  .attendance-map-summary {
    min-width: 0;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    margin-bottom: 12px;
    padding: 14px 16px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--map-accent) 28%, var(--border-primary));
    border-radius: var(--radius-lg);
    background:
      radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--map-accent) 16%, transparent), transparent 31%),
      linear-gradient(135deg, color-mix(in srgb, var(--surface-primary) 92%, #075e8a 8%), var(--surface-primary));
    box-shadow: 0 15px 38px rgba(0, 0, 0, .16), inset 0 1px rgba(255, 255, 255, .035);
  }

  .attendance-map-summary.needs-setup { --map-accent: var(--warning); }
  .attendance-map-summary-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--map-accent) 35%, transparent);
    border-radius: 14px;
    color: var(--map-accent);
    background: color-mix(in srgb, var(--map-accent) 13%, transparent);
  }
  .attendance-map-summary-icon svg { width: 23px; height: 23px; }
  .attendance-map-summary span { color: var(--map-accent); font-size: 8px; font-weight: 850; letter-spacing: .09em; }
  .attendance-map-summary h3 { margin: 3px 0 0; font-size: 15px; line-height: 1.25; }
  .attendance-map-summary p { margin: 4px 0 0; color: var(--text-secondary); font-size: 10px; line-height: 1.45; }
  .attendance-map-summary > b { padding: 7px 9px; border: 1px solid color-mix(in srgb, var(--map-accent) 32%, transparent); border-radius: 99px; color: var(--map-accent); background: color-mix(in srgb, var(--map-accent) 9%, transparent); font-size: 8px; letter-spacing: .05em; white-space: nowrap; }

  .attendance-map-layout { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(350px, .82fr); align-items: start; gap: 12px; }
  .attendance-map-form { min-width: 0; display: grid; align-content: start; gap: 10px; }
  .attendance-map-visual-card, .attendance-map-form-card, .attendance-map-policy-card { min-width: 0; }
  .attendance-map-visual-card { --card-accent: var(--map-accent); }
  .attendance-map-form-card, .attendance-map-policy-card { --card-accent: #7065f2; }

  .office-map-preview {
    position: relative;
    display: grid;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--map-accent) 30%, var(--border-primary));
    border-radius: 14px;
    background: #dce8ee;
    box-shadow: inset 0 1px rgba(255, 255, 255, .5);
    isolation: isolate;
  }
  .office-map-canvas {
    position: relative;
    container-type: size;
    height: 400px;
    min-height: 0;
    overflow: hidden;
    background: #dce8ee;
    isolation: isolate;
  }
  .office-map-canvas iframe, .office-map-grid { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
  .office-map-preview iframe { pointer-events: none; }
  .office-map-grid {
    background-color: #dce8ee;
    background-image:
      linear-gradient(28deg, transparent 43%, rgba(255,255,255,.95) 44%, rgba(255,255,255,.95) 48%, transparent 49%),
      linear-gradient(147deg, transparent 42%, rgba(174,194,204,.9) 43%, rgba(174,194,204,.9) 45%, transparent 46%),
      linear-gradient(90deg, rgba(122,164,184,.3) 1px, transparent 1px),
      linear-gradient(rgba(122,164,184,.3) 1px, transparent 1px);
    background-size: 160px 110px, 190px 130px, 34px 34px, 34px 34px;
  }
  .office-map-canvas::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(5, 19, 34, .05), transparent 70%, rgba(4, 16, 29, .18)); }
  .office-map-radius {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: auto;
    height: clamp(40px, var(--office-radius-size, 58%), 72%);
    aspect-ratio: 1;
    box-sizing: border-box;
    display: grid;
    place-items: center;
    border: 3px solid #087ff5;
    border-radius: 50%;
    background: rgba(0, 122, 245, .18);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, .78),
      0 0 0 2px rgba(255, 255, 255, .92),
      0 0 0 8px rgba(0, 113, 235, .2),
      0 14px 40px rgba(11, 60, 117, .24);
    pointer-events: none;
    transform: translate(-50%, -50%);
  }
  .office-map-preview.is-ready .office-map-radius::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(50% - 9px);
    border-top: 2px dashed #075fb6;
    filter: drop-shadow(0 1px rgba(255, 255, 255, .95));
  }
  .office-map-preview.is-ready .office-map-radius::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -6px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #087ff5;
    box-shadow: 0 2px 7px rgba(4, 38, 78, .38);
    transform: translateY(-50%);
  }
  .office-map-radius-label {
    position: absolute;
    top: -17px;
    left: 50%;
    z-index: 1;
    min-width: 94px;
    display: grid;
    justify-items: center;
    gap: 1px;
    padding: 5px 9px;
    border: 2px solid #fff;
    border-radius: 10px;
    color: #fff;
    background: #075fb6;
    box-shadow: 0 6px 17px rgba(4, 38, 78, .34);
    line-height: 1.05;
    white-space: nowrap;
    transform: translate(-50%, -50%);
  }
  .office-map-radius-label b { font-size: 11px; font-weight: 900; }
  .office-map-radius-label small { color: #ddecff; font-size: 6px; font-weight: 850; letter-spacing: .08em; }
  .office-map-radius i { width: 20px; height: 20px; border: 5px solid #fff; border-radius: 50% 50% 50% 0; background: #2078f4; box-shadow: 0 5px 16px rgba(0, 0, 0, .28); transform: rotate(-45deg); }
  .office-map-center {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    width: 34px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #168c55;
    filter: drop-shadow(0 5px 5px rgba(4, 28, 18, .38));
    pointer-events: none;
    transform: translate(-50%, -100%);
  }
  .office-map-center svg { width: 34px; height: 42px; fill: #75c844; stroke: #367f2f; stroke-width: 1.8; }
  .office-map-center::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 9px;
    height: 9px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #168c55;
    box-shadow: 0 2px 8px rgba(4, 28, 18, .42);
    transform: translate(-50%, 50%);
  }
  .office-map-legend {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 10px;
    color: #eef7ff;
    background: rgba(5, 30, 57, .9);
    box-shadow: 0 7px 20px rgba(4, 25, 48, .24);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    pointer-events: none;
  }
  .office-map-legend > i { width: 14px; height: 14px; flex: 0 0 auto; border: 2px solid #57aaff; border-radius: 50%; background: rgba(8, 127, 245, .26); box-shadow: 0 0 0 3px rgba(8, 127, 245, .12); }
  .office-map-legend strong, .office-map-legend small { display: block; }
  .office-map-legend strong { color: #8fc8ff; font-size: 7px; font-weight: 900; letter-spacing: .08em; }
  .office-map-legend small { margin-top: 2px; color: #fff; font-size: 8px; font-weight: 750; }
  .office-map-preview.is-empty .office-map-radius { border-color: rgba(244, 164, 22, .82); background: rgba(244, 164, 22, .13); }
  .office-map-preview.is-empty .office-map-radius i { background: var(--warning); }
  .office-map-info {
    position: relative;
    z-index: 3;
    min-width: 0;
    padding: 12px 132px 12px 13px;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, .16);
    color: #f8fbff;
    background: #081b30;
    box-shadow: 0 -7px 22px rgba(4, 18, 32, .16);
  }
  .office-map-info > strong, .office-map-info > small, .office-map-info > em { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .office-map-status { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 4px; color: #70dba5; font-size: 7px; font-weight: 850; letter-spacing: .07em; }
  .office-map-preview.is-empty .office-map-status { color: #ffc35f; }
  .office-map-status svg { width: 12px; height: 12px; }
  .office-map-info > strong { font-size: 13px; }
  .office-map-info > small { margin-top: 3px; color: #c5d5e6; font-size: 9px; }
  .office-map-info > em { margin-top: 3px; color: #8fa9c3; font-size: 8px; font-style: normal; }
  .office-map-info > button { position: absolute; right: 12px; bottom: 12px; color: #fff; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.09); }
  .office-map-preview.is-empty .office-map-info { padding-right: 13px; }
  .attendance-map-help { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; color: var(--text-muted); font-size: 8px; line-height: 1.45; }
  .attendance-map-help svg { flex: 0 0 auto; width: 13px; }

  .attendance-map-form-card, .attendance-map-policy-card { display: grid; align-content: start; gap: 10px; }
  .attendance-map-form .card-head { margin-bottom: 1px; }
  .attendance-map-form .form-control { width: 100%; }
  .office-address-input { min-height: 72px; padding-top: 9px; resize: vertical; }
  .office-map-inline-button { width: 100%; margin-top: 6px; }
  .office-map-reference-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
  .attendance-coordinate-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .office-radius-input { position: relative; }
  .office-radius-input input { padding-right: 48px; }
  .office-radius-input span { position: absolute; top: 50%; right: 9px; color: var(--text-muted); font-size: 8px; pointer-events: none; transform: translateY(-50%); }
  .attendance-map-accuracy { min-height: 30px; display: flex; align-items: center; gap: 6px; padding: 7px 8px; border: 1px solid var(--border-secondary); border-radius: var(--radius-sm); color: var(--text-muted); background: var(--surface-secondary); font-size: 8px; line-height: 1.4; }
  .attendance-map-accuracy svg { flex: 0 0 auto; width: 13px; color: var(--info); }
  .attendance-office-policy {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    cursor: pointer;
    border: 1px solid color-mix(in srgb, var(--success) 25%, var(--border-primary));
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--success) 7%, var(--surface-secondary));
  }
  .attendance-office-policy > span { min-width: 0; display: flex; align-items: center; gap: 8px; }
  .attendance-office-policy > span > svg { flex: 0 0 auto; width: 20px; color: var(--success); }
  .attendance-office-policy strong, .attendance-office-policy small { display: block; }
  .attendance-office-policy strong { font-size: 10px; }
  .attendance-office-policy small { margin-top: 2px; color: var(--text-muted); font-size: 8px; line-height: 1.35; }
  .attendance-office-policy > input { position: absolute; opacity: 0; pointer-events: none; }
  .attendance-office-policy > i { flex: 0 0 auto; width: 34px; height: 19px; padding: 2px; border-radius: 99px; background: var(--surface-tertiary); transition: .18s ease; }
  .attendance-office-policy > i::after { content: ""; display: block; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.25); transition: .18s ease; }
  .attendance-office-policy > input:checked + i { background: var(--success); }
  .attendance-office-policy > input:checked + i::after { transform: translateX(15px); }
  .attendance-office-policy.is-locked { justify-content: flex-start; }

  .attendance-map-steps { margin-top: 12px; }
  .attendance-map-steps > section { min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 8px; }
  .attendance-map-steps > section > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #8ddff2; background: rgba(25, 168, 232, .12); font-size: 11px; font-weight: 850; }
  .attendance-map-steps strong, .attendance-map-steps small { display: block; }
  .attendance-map-steps strong { font-size: 10px; }
  .attendance-map-steps small { margin-top: 2px; color: var(--text-muted); font-size: 8px; line-height: 1.4; }

  .technician-office-boundary {
    --card-accent: #1aa9e8;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }
  .technician-office-boundary.needs-setup { --card-accent: var(--warning); }
  .technician-office-boundary > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--card-accent); background: color-mix(in srgb, var(--card-accent) 12%, transparent); }
  .technician-office-boundary > span svg { width: 20px; }
  .technician-office-boundary > div { min-width: 0; }
  .technician-office-boundary small, .technician-office-boundary strong, .technician-office-boundary p, .technician-office-boundary em { display: block; }
  .technician-office-boundary small { color: var(--card-accent); font-size: 7px; font-weight: 850; letter-spacing: .08em; }
  .technician-office-boundary strong { margin-top: 2px; font-size: 12px; }
  .technician-office-boundary p { margin: 3px 0 0; color: var(--text-secondary); font-size: 9px; }
  .technician-office-boundary em { margin-top: 3px; color: var(--text-muted); font-size: 8px; font-style: normal; }
  .attendance-office-lock { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px; border: 1px solid rgba(40,199,111,.23); border-radius: var(--radius-sm); color: var(--success); background: var(--success-soft); }
  .attendance-office-lock > svg { flex: 0 0 auto; width: 17px; }
  .attendance-office-lock strong, .attendance-office-lock small { display: block; }
  .attendance-office-lock strong { font-size: 9px; }
  .attendance-office-lock small { margin-top: 2px; color: var(--text-secondary); font-size: 8px; }

  html[data-theme="light"] .attendance-map-summary {
    background: radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--map-accent) 12%, transparent), transparent 31%), linear-gradient(135deg, #ffffff, #f1f7fc);
    box-shadow: 0 14px 34px rgba(35, 61, 92, .1), inset 0 1px #fff;
  }
  html[data-theme="light"] .attendance-map-accuracy { background: #f5f8fc; }
  html[data-theme="light"] .attendance-office-policy { background: color-mix(in srgb, var(--success) 6%, #fff); }
  html[data-theme="light"] .office-map-canvas::after { background: linear-gradient(180deg, rgba(27, 73, 104, .03), transparent 70%, rgba(6, 27, 43, .14)); }
  html[data-theme="light"] .office-map-preview.is-ready .office-map-radius::after {
    border-color: #fff;
    background: #087ff5;
    box-shadow: 0 2px 7px rgba(4, 38, 78, .28);
  }

  @media (max-width: 1100px) {
    .attendance-map-layout { grid-template-columns: minmax(0, 1fr); }
    .office-map-canvas { height: 340px; }
  }

  @media (max-width: 639px) {
    .attendance-map-summary { grid-template-columns: 40px minmax(0, 1fr); padding: 11px; }
    .attendance-map-summary-icon { width: 40px; height: 40px; border-radius: 11px; }
    .attendance-map-summary > b { grid-column: 1 / -1; justify-self: start; }
    .attendance-map-summary h3 { font-size: 13px; }
    .attendance-map-layout { gap: 8px; }
    .office-map-preview { border-radius: 12px; }
    .office-map-canvas { height: 315px; }
    .office-map-radius { top: 50%; }
    .office-map-radius-label { top: 0; min-width: 82px; padding: 4px 7px; }
    .office-map-radius-label b { font-size: 9px; }
    .office-map-legend { display: none; }
    .office-map-info { padding: 10px; }
    .office-map-info > button { position: static; width: 100%; margin-top: 7px; }
    .office-map-info > strong, .office-map-info > small, .office-map-info > em { white-space: normal; }
    .attendance-coordinate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .attendance-coordinate-grid > :last-child { grid-column: 1 / -1; }
    .office-map-reference-row { grid-template-columns: minmax(0, 1fr); }
    .attendance-map-steps { grid-template-columns: minmax(0, 1fr); }
    .technician-office-boundary { grid-template-columns: 36px minmax(0, 1fr); }
    .technician-office-boundary > span { width: 36px; height: 36px; }
    .technician-office-boundary > button { grid-column: 1 / -1; width: 100%; }
  }
}

:root {
  color-scheme: dark;

  --background-primary: #050a13;
  --background-secondary: #07111d;
  --background-sidebar: #06101b;
  --surface-primary: #0b1726;
  --surface-secondary: #0f1d2e;
  --surface-tertiary: #132338;
  --surface-hover: #172940;
  --surface-active: #132a52;
  --surface-glass: rgba(11, 23, 38, .92);

  --border-primary: rgba(148, 163, 184, .15);
  --border-secondary: rgba(148, 163, 184, .09);
  --border-focus: rgba(63, 131, 248, .72);

  --text-primary: #f6f9fd;
  --text-secondary: #a7b4c7;
  --text-muted: #687991;
  --text-inverse: #03101f;

  --brand-primary: #2167f2;
  --brand-primary-hover: #3478ff;
  --brand-secondary: #6634ef;
  --brand-cyan: #3fdcff;
  --brand-soft: rgba(33, 103, 242, .14);
  --success: #28c76f;
  --success-soft: rgba(40, 199, 111, .13);
  --warning: #f5aa23;
  --warning-soft: rgba(245, 170, 35, .14);
  --danger: #f0525f;
  --danger-soft: rgba(240, 82, 95, .14);
  --info: #2bb9ef;
  --info-soft: rgba(43, 185, 239, .13);
  --purple: #8b63f6;
  --purple-soft: rgba(139, 99, 246, .14);
  --nav-blue: #60a5fa;
  --nav-cyan: #22d3ee;
  --nav-teal: #2dd4bf;
  --nav-emerald: #34d399;
  --nav-green: #4ade80;
  --nav-yellow: #facc15;
  --nav-amber: #fbbf24;
  --nav-orange: #fb923c;
  --nav-rose: #fb7185;
  --nav-pink: #f472b6;
  --nav-purple: #a78bfa;
  --nav-violet: #8b9cff;
  --nav-slate: #94a3b8;

  --primary: var(--brand-primary);
  --primary-2: var(--brand-secondary);
  --primary-dark: #1956c9;
  --primary-soft: var(--brand-soft);
  --navy: var(--background-sidebar);
  --navy-2: var(--surface-secondary);
  --canvas: var(--background-primary);
  --surface: var(--surface-primary);
  --surface-2: var(--surface-secondary);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --line: var(--border-primary);

  --font-family: "Inter", "Segoe UI", Arial, sans-serif;
  --font-xs: 10px;
  --font-sm: 11px;
  --font-md: 12px;
  --font-lg: 14px;
  --font-xl: 18px;
  --font-page: 18px;
  --font-stat: 20px;
  --line-tight: 1.25;
  --line-normal: 1.4;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;

  --shadow-card: 0 10px 30px rgba(0, 0, 0, .18);
  --shadow-floating: 0 24px 70px rgba(0, 0, 0, .46);
  --shadow-focus: 0 0 0 3px rgba(33, 103, 242, .2);

  --page-padding-desktop: 14px;
  --page-padding-tablet: 12px;
  --page-padding-mobile: 8px;
  --grid-gap-desktop: 10px;
  --grid-gap-mobile: 6px;
  --card-padding-desktop: 12px;
  --card-padding-mobile: 8px;
  --card-radius: 10px;
  --icon-small: 14px;
  --icon-medium: 16px;
  --icon-stat: 18px;

  --card-padding: var(--card-padding-desktop);
  --input-height: 34px;
  --button-height: 34px;
  --sidebar-width: 205px;
  --sidebar-collapsed-width: 64px;
  --topbar-height: 52px;
  --mobile-nav-height: 60px;

  --z-sidebar: 50;
  --z-topbar: 40;
  --z-dropdown: 70;
  --z-modal: 100;
  --z-toast: 200;
  --duration-fast: 160ms;
  --duration-base: 220ms;
}

html[data-theme="light"] {
  color-scheme: light;
  --background-primary: #f2f5fa;
  --background-secondary: #e9eef6;
  --background-sidebar: #f8fbff;
  --surface-primary: #ffffff;
  --surface-secondary: #f7f9fc;
  --surface-tertiary: #edf2f8;
  --surface-hover: #e9f1fb;
  --surface-active: #e1ebff;
  --surface-glass: rgba(255, 255, 255, .94);
  --border-primary: rgba(28, 50, 78, .16);
  --border-secondary: rgba(28, 50, 78, .09);
  --border-focus: rgba(33, 103, 242, .68);
  --text-primary: #102033;
  --text-secondary: #4f6178;
  --text-muted: #74849a;
  --text-inverse: #ffffff;
  --brand-soft: rgba(33, 103, 242, .1);
  --success-soft: rgba(20, 155, 86, .11);
  --warning-soft: rgba(211, 136, 7, .12);
  --danger-soft: rgba(218, 49, 67, .1);
  --info-soft: rgba(20, 151, 205, .1);
  --purple-soft: rgba(111, 67, 224, .1);
  --shadow-card: 0 8px 24px rgba(32, 54, 84, .08);
  --shadow-floating: 0 24px 60px rgba(32, 54, 84, .2);
}

/* Full daylight theme: every application shell surface is light by default.
   Dark styling is retained only inside branded media such as maps, QR codes,
   WhatsApp message previews, and the technician ID card. */
@media screen {
  html[data-theme="light"] .login-view {
    color: var(--text-primary);
    background:
      radial-gradient(circle at 82% 8%, rgba(78, 125, 255, .09), transparent 27%),
      linear-gradient(145deg, #edf4fb 0%, #f8fbff 58%, #edf2f8 100%);
  }

  html[data-theme="light"] .login-visual {
    border-color: rgba(37, 82, 137, .23);
    background-color: #dce9f6;
    background-image: url("images/login-network-hero.png");
    /* Pertahankan detail foto asli; tema siang dibentuk oleh panel, bukan
       lapisan putih yang membuat media tampak berkabut. */
    background-blend-mode: normal;
    box-shadow:
      0 20px 54px rgba(28, 55, 91, .18),
      inset 0 1px 0 rgba(255, 255, 255, .72);
  }

  html[data-theme="light"] .login-visual-overlay {
    background:
      linear-gradient(90deg, rgba(7, 28, 54, .04) 0%, rgba(7, 28, 54, .015) 48%, rgba(239, 246, 252, .5) 72%, #f3f7fb 88%, #f3f7fb 100%),
      linear-gradient(0deg, rgba(8, 32, 61, .08) 0%, transparent 36%);
  }

  html[data-theme="light"] .login-brand.brand-light,
  html[data-theme="light"] .login-card .brand-light,
  html[data-theme="light"] .hero-copy { color: #102033; }
  html[data-theme="light"] .login-brand {
    padding: 11px 16px 11px 12px;
    border: 1px solid rgba(255, 255, 255, .76);
    border-radius: 18px;
    background: rgba(249, 252, 255, .86);
    box-shadow: 0 12px 32px rgba(25, 57, 94, .16), inset 0 1px 0 #fff;
    backdrop-filter: blur(12px) saturate(1.12);
  }
  html[data-theme="light"] .login-brand .brand-logo {
    width: 68px;
    height: 68px;
    filter: drop-shadow(0 5px 10px rgba(33, 103, 242, .16));
  }
  html[data-theme="light"] .login-brand strong { color: #071b34; }
  html[data-theme="light"] .login-brand.brand-light small,
  html[data-theme="light"] .login-card .brand-light small { color: #566b84; }
  html[data-theme="light"] .hero-copy {
    max-width: 560px;
    padding: 19px 22px 20px;
    border: 1px solid rgba(255, 255, 255, .74);
    border-radius: 20px;
    background: rgba(249, 252, 255, .86);
    box-shadow: 0 15px 36px rgba(25, 57, 94, .15), inset 0 1px 0 #fff;
    backdrop-filter: blur(12px) saturate(1.1);
  }
  html[data-theme="light"] .hero-copy h1 { color: #071b34; }
  html[data-theme="light"] .hero-copy p { color: #294866; }
  html[data-theme="light"] .hero-kicker {
    color: #174fad;
    border-color: rgba(33, 103, 242, .22);
    background: rgba(255, 255, 255, .72);
  }
  html[data-theme="light"] .login-feature-grid article {
    color: var(--text-primary);
    border-color: rgba(31, 67, 111, .19);
    background-image:
      radial-gradient(circle at 96% -12%, rgba(33, 103, 242, .11), transparent 38%),
      linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(233, 241, 250, .96));
    box-shadow: 0 12px 28px rgba(25, 57, 94, .15), inset 0 1px 0 #fff;
    backdrop-filter: blur(14px) saturate(1.08);
  }
  html[data-theme="light"] .login-feature-grid svg { color: #1768db; }
  html[data-theme="light"] .login-feature-grid small { color: #5a6f88; }
  html[data-theme="light"] .login-card,
  html[data-theme="light"] body[data-login-portal="management"] .login-card {
    color: var(--text-primary);
    border-color: rgba(32, 70, 117, .22);
    background-color: #fff;
    background-image:
      radial-gradient(circle at 100% -12%, color-mix(in srgb, var(--card-accent, var(--brand-primary)) 10%, transparent), transparent 38%),
      linear-gradient(155deg, #ffffff, #f6f9fd 68%, #edf3fa);
    box-shadow:
      0 26px 68px rgba(25, 50, 84, .22),
      0 5px 16px rgba(33, 103, 242, .07),
      inset 0 1px 0 #fff;
  }
  html[data-theme="light"] .login-portal-icon {
    color: #245dcc;
    border-color: rgba(33, 103, 242, .22);
    background: linear-gradient(145deg, #edf4ff, #e6effc);
    box-shadow: inset 0 1px 0 #fff;
  }
  html[data-theme="light"] body[data-login-portal="management"] .login-portal-icon {
    color: #6844d5;
    border-color: rgba(105, 69, 218, .22);
    background: linear-gradient(145deg, #f4f0ff, #ece7fb);
  }
  html[data-theme="light"] .input-shell {
    border-color: rgba(35, 64, 101, .2);
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(35, 64, 101, .035);
  }
  html[data-theme="light"] .input-shell:focus-within { background: #fbfdff; }
  html[data-theme="light"] .input-shell input::placeholder { color: #8795a8; }
  html[data-theme="light"] .icon-button:hover,
  html[data-theme="light"] .modal-close:hover,
  html[data-theme="light"] .sidebar-close:hover,
  html[data-theme="light"] .sidebar-collapse:hover,
  html[data-theme="light"] .menu-button:hover,
  html[data-theme="light"] .top-icon-button:hover {
    color: #174fad;
    border-color: rgba(33, 103, 242, .25);
    background: #e8f1fc;
  }
  html[data-theme="light"] .login-footer { color: #667991; }

  html[data-theme="light"] .sidebar,
  html[data-theme="light"] .app-view[data-role="technician"] .sidebar {
    --background-sidebar: #f8fbff;
    --surface-primary: #ffffff;
    --surface-secondary: #f3f7fc;
    --surface-tertiary: #e9f0f8;
    --surface-hover: #eaf2fc;
    --surface-active: #e1ebff;
    --border-primary: rgba(28, 50, 78, .16);
    --border-secondary: rgba(28, 50, 78, .09);
    --text-primary: #102033;
    --text-secondary: #4f6178;
    --text-muted: #74849a;
    color: var(--text-primary);
    border-right-color: rgba(28, 50, 78, .14);
    background: linear-gradient(180deg, #ffffff 0%, #f4f8fd 100%);
    box-shadow: 10px 0 30px rgba(36, 59, 91, .07);
  }
  html[data-theme="light"] .sidebar-head {
    border-bottom-color: rgba(28, 50, 78, .1);
    background: rgba(255, 255, 255, .74);
  }
  html[data-theme="light"] .sidebar .brand-light,
  html[data-theme="light"] .app-view[data-role="technician"] .sidebar-head .brand { color: #102033; }
  html[data-theme="light"] .sidebar .brand-light small,
  html[data-theme="light"] .app-view[data-role="technician"] .sidebar-head .brand small { color: #61758f; }
  html[data-theme="light"] .nav-group-header,
  html[data-theme="light"] .app-view[data-role="technician"] .nav-group-header { color: #6c8099; }
  html[data-theme="light"] .nav-group-header:hover { color: #334c69; }
  html[data-theme="light"] .nav-group-header > i {
    background: linear-gradient(90deg, rgba(74, 103, 141, .28), rgba(74, 103, 141, .03));
  }
  html[data-theme="light"] .nav-item,
  html[data-theme="light"] .app-view[data-role="technician"] .nav-item { color: #455a73; }
  html[data-theme="light"] .nav-item:hover,
  html[data-theme="light"] .app-view[data-role="technician"] .nav-item:hover {
    color: #102033;
    background: #eaf2fc;
  }
  html[data-theme="light"] .nav-item.active,
  html[data-theme="light"] .app-view[data-role="technician"] .nav-item.active {
    color: #174fad;
    border-color: rgba(33, 103, 242, .25);
    background: linear-gradient(90deg, rgba(33, 103, 242, .13), rgba(33, 103, 242, .045));
    box-shadow: inset 2px 0 0 #2167f2, 0 5px 14px rgba(33, 103, 242, .07);
  }
  html[data-theme="light"] .sidebar-foot,
  html[data-theme="light"] .app-view[data-role="technician"] .sidebar-foot {
    border-top-color: rgba(28, 50, 78, .1);
    background: rgba(244, 248, 253, .96);
  }
  html[data-theme="light"] .system-mini,
  html[data-theme="light"] .sidebar-user,
  html[data-theme="light"] .app-view[data-role="technician"] .system-mini,
  html[data-theme="light"] .app-view[data-role="technician"] .sidebar-user {
    color: #102033;
    border-color: rgba(28, 50, 78, .12);
    background: rgba(255, 255, 255, .9);
  }
  html[data-theme="light"] .sidebar-user:hover,
  html[data-theme="light"] .app-view[data-role="technician"] .sidebar-user:hover {
    border-color: rgba(33, 103, 242, .24);
    background: #edf4fd;
  }
  html[data-theme="light"] .sidebar-user small,
  html[data-theme="light"] .app-view[data-role="technician"] .sidebar-user small { color: #657991; }
  html[data-theme="light"] .sidebar-user-meta { color: #3568aa; }
  html[data-theme="light"] .logout-button,
  html[data-theme="light"] .app-view[data-role="technician"] .logout-button {
    color: #697c93;
    border-color: rgba(28, 50, 78, .12);
    background: rgba(255, 255, 255, .88);
  }

  html[data-theme="light"] .settings-view[data-settings-view="whatsapp"] {
    --wa-panel: #ffffff;
    --wa-panel-soft: #f4f8fd;
    --wa-border: rgba(28, 50, 78, .14);
    --wa-muted: #657991;
  }
  html[data-theme="light"] .wa-console-hero {
    color: var(--text-primary);
    border-color: rgba(33, 103, 242, .18);
    background:
      radial-gradient(circle at 88% -20%, rgba(93, 99, 246, .1), transparent 40%),
      linear-gradient(135deg, #ffffff 0%, #f5f9fe 58%, #edf4fc 100%);
    box-shadow: 0 17px 42px rgba(36, 59, 91, .1);
  }
  html[data-theme="light"] .wa-console-hero::before {
    border-color: rgba(33, 184, 177, .13);
    box-shadow: 0 0 0 38px rgba(45, 221, 214, .025), 0 0 0 80px rgba(81, 102, 255, .02);
  }
  html[data-theme="light"] .wa-console-mark {
    color: #168f89;
    border-color: rgba(27, 163, 154, .2);
    background: linear-gradient(145deg, #e7f8f6, #eaf1fc);
    box-shadow: inset 0 1px #fff, 0 10px 24px rgba(36, 59, 91, .09);
  }
  html[data-theme="light"] .wa-console-eyebrow,
  html[data-theme="light"] .wa-section-eyebrow { color: #127d78; }
  html[data-theme="light"] .wa-console-hero-main h2 { color: var(--text-primary); }
  html[data-theme="light"] .wa-console-hero-main p,
  html[data-theme="light"] .wa-console-health small { color: var(--text-secondary); }
  html[data-theme="light"] .wa-console-kpis strong em { color: #687c94; }
  html[data-theme="light"] .wa-settings-tabs { border-bottom-color: var(--border-primary); }
  html[data-theme="light"] .wa-session-sender dd { color: #155d42; }
  html[data-theme="light"] .wa-session-details { background: rgba(28, 50, 78, .1); }
  html[data-theme="light"] .wa-delivery-head small,
  html[data-theme="light"] .gateway-outbox-row small,
  html[data-theme="light"] .wa-outbox-empty span,
  html[data-theme="light"] .reminder-error p,
  html[data-theme="light"] .reminder-alert span,
  html[data-theme="light"] .reminder-test-grid p,
  html[data-theme="light"] .reminder-history-card p,
  html[data-theme="light"] .reminder-log-table td small { color: var(--text-secondary); }

  @media (max-width: 639px) {
    html[data-theme="light"] .login-view {
      background:
        radial-gradient(circle at 84% 0, rgba(75, 123, 245, .1), transparent 32%),
        linear-gradient(180deg, #e7f1fa, #f5f8fc 58%, #edf3f9);
    }
    html[data-theme="light"] .login-visual {
      background-color: #dce9f6;
      background-position: center 67%;
    }
    html[data-theme="light"] .login-visual-overlay {
      background:
        linear-gradient(180deg, rgba(4, 18, 36, .04), transparent 42%, rgba(237, 245, 252, .7) 76%, #f3f7fb 100%),
        linear-gradient(90deg, rgba(6, 29, 57, .03), transparent);
    }
    html[data-theme="light"] .hero-copy {
      width: max-content;
      max-width: calc(100% - 28px);
      padding: 8px 14px;
      border-radius: 999px;
      background: rgba(250, 253, 255, .88);
      box-shadow: 0 10px 28px rgba(25, 57, 94, .16), inset 0 1px 0 #fff;
    }
    html[data-theme="light"] .mobile-brand {
      padding: 0;
      border: 0;
      background: transparent;
      box-shadow: none;
      backdrop-filter: none;
    }
    html[data-theme="light"] .login-card {
      box-shadow: 0 18px 46px rgba(25, 50, 84, .2), 0 4px 12px rgba(33, 103, 242, .06), inset 0 1px 0 #fff;
    }
    html[data-theme="light"] .login-footer { color: #667991; }
  }
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-width: 320px;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text-primary);
  background: var(--background-primary);
  font-family: var(--font-family);
  font-size: var(--font-md);
  line-height: var(--line-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
img { display: block; max-width: 100%; }
a { color: inherit; }
svg { display: block; width: 1em; height: 1em; stroke-width: 1.8; }
h1, h2, h3, h4, p { overflow-wrap: anywhere; }
.hidden { display: none !important; }
.muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-primary { color: var(--brand-primary) !important; }
.align-right { text-align: right; }
.nowrap { white-space: nowrap; }
.line-clamp-1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.full { width: 100%; }
.no-print { }

:focus-visible {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 999;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--brand-primary);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

/* Loading */
.loading-view {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: var(--background-primary);
  transition: opacity var(--duration-base) ease, visibility var(--duration-base) ease;
}
.loading-view.is-ready { opacity: 0; visibility: hidden; }
.loading-view img { width: 56px; height: 56px; }
.loading-view div { text-align: center; }
.loading-view strong, .loading-view span { display: block; }
.loading-view strong { font-size: 18px; }
.loading-view div span { margin-top: 3px; color: var(--text-secondary); font-size: 12px; }
.loading-bar { width: 154px; height: 3px; overflow: hidden; border-radius: 99px; background: var(--surface-tertiary); }
.loading-bar i { display: block; width: 45%; height: 100%; border-radius: inherit; background: var(--brand-primary); animation: loadingSlide 1s ease-in-out infinite alternate; }
@keyframes loadingSlide { from { transform: translateX(0); } to { transform: translateX(122%); } }

/* Brand */
.brand { min-width: 0; display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { flex: 0 0 auto; object-fit: contain; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; font-weight: 800; white-space: nowrap; }
.brand small { margin-top: 1px; color: var(--text-secondary); font-size: 9px; font-weight: 600; }
.brand-light { color: #fff; }
.brand-light small { color: rgba(235, 244, 255, .62); }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius-md); background: var(--brand-soft); color: #fff; font-weight: 800; }

/* Login */
.login-view {
  min-height: 100vh;
  position: relative;
  display: block;
  padding: 8px;
  overflow: hidden;
  background: #02060d;
}
.login-visual {
  position: absolute;
  inset: 8px;
  min-height: calc(100vh - 16px);
  overflow: hidden;
  border: 1px solid rgba(67, 127, 238, .18);
  border-radius: var(--radius-lg);
  background: #061329 url("images/login-network-hero.png") center center / cover no-repeat;
  box-shadow: var(--shadow-card);
}
.login-visual-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 8, 19, .16) 0%, rgba(3, 10, 24, .08) 48%, rgba(3, 8, 18, .76) 82%, rgba(2, 6, 14, .92) 100%),
    linear-gradient(0deg, rgba(2, 7, 16, .86) 0%, transparent 45%),
    linear-gradient(180deg, rgba(4, 12, 28, .3) 0%, transparent 44%);
}
.login-brand, .hero-copy, .login-feature-grid { position: absolute; z-index: 1; }
.login-brand { top: clamp(70px, 14vh, 126px); left: 48px; }
.login-brand .brand-logo { width: 64px; height: 64px; }
.login-brand strong { font-size: 31px; font-style: italic; }
.login-brand small { font-size: 10px; }
.hero-copy { top: clamp(168px, 27vh, 244px); bottom: auto; left: 48px; max-width: 520px; }
.hero-copy h1 { margin: 0 0 9px; font-size: 25px; font-style: normal; font-weight: 700; line-height: 1.2; }
.hero-copy p { max-width: 510px; margin: 0; color: rgba(232, 241, 252, .8); font-size: 15px; line-height: 1.65; }
.hero-kicker { display: inline-flex; align-items: center; min-height: 26px; padding: 5px 9px; border: 1px solid rgba(84, 154, 255, .28); border-radius: var(--radius-sm); color: #8fc2ff; background: rgba(33, 103, 242, .1); font-size: 11px; font-weight: 700; }
.login-feature-grid { left: 40px; bottom: 28px; width: min(700px, calc(100% - 530px)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.login-feature-grid article { min-width: 0; min-height: 72px; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid rgba(148, 163, 184, .13); border-radius: var(--radius-md); background: rgba(7, 18, 34, .74); box-shadow: 0 8px 20px rgba(0, 0, 0, .14); backdrop-filter: blur(9px); }
.login-feature-grid svg { flex: 0 0 auto; width: 20px; height: 20px; color: #72b8ff; }
.login-feature-grid b, .login-feature-grid small { display: block; }
.login-feature-grid b { font-size: 12px; }
.login-feature-grid small { margin-top: 2px; color: rgba(229, 239, 252, .58); font-size: 10px; line-height: 1.3; }

.login-panel { position: relative; z-index: 2; width: min(430px, calc(100% - 48px)); min-height: calc(100vh - 16px); display: grid; place-items: center; align-content: center; gap: 12px; margin-left: auto; margin-right: clamp(18px, 4.6vw, 88px); padding: 18px 0; background: transparent; }
.login-card { width: min(100%, 390px); padding: 18px; border: 1px solid rgba(148, 163, 184, .18); border-radius: var(--radius-xl); background: linear-gradient(180deg, rgba(15, 29, 46, .95), rgba(8, 18, 31, .97)); box-shadow: 0 24px 72px rgba(0, 0, 0, .46); backdrop-filter: blur(16px); }
.mobile-brand { display: none; margin-bottom: 25px; }
.login-portal-heading { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: start; gap: 11px; margin-bottom: 18px; }
.login-portal-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(62, 132, 255, .32); border-radius: 12px; color: #6faeff; background: linear-gradient(145deg, rgba(39, 103, 230, .2), rgba(12, 45, 88, .36)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.login-portal-icon svg { width: 20px; height: 20px; stroke-width: 2; }
.login-heading .eyebrow { display: block; color: #72b8ff; font-size: 11px; font-weight: 700; }
.login-heading h2 { margin: 5px 0 4px; font-size: 22px; line-height: 1.25; }
.login-subtitle { margin: 0; color: var(--text-secondary); font-size: 12px; }
.field-label { display: block; margin: 12px 0 6px; color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.input-shell { min-height: var(--input-height); display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); transition: border var(--duration-fast), box-shadow var(--duration-fast), background var(--duration-fast); }
.input-shell:focus-within { border-color: var(--border-focus); background: var(--surface-tertiary); box-shadow: var(--shadow-focus); }
.input-shell > svg { width: 16px; height: 16px; color: var(--text-muted); }
.input-shell input { min-width: 0; height: 40px; padding: 0; border: 0; outline: 0; color: var(--text-primary); background: transparent; font-size: 13px; }
.input-shell input::placeholder { color: #586a82; }
.icon-button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--radius-sm); color: var(--text-secondary); background: transparent; }
.icon-button:hover { color: #fff; background: var(--surface-hover); }
.icon-button svg { width: 16px; height: 16px; }
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 17px; }
.check-label { min-width: 0; display: inline-flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: 12px; }
.check-label input { width: 15px; height: 15px; margin: 0; accent-color: var(--brand-primary); }
.text-button { padding: 2px; border: 0; color: #6faeff; background: transparent; font-size: 12px; font-weight: 600; }
.text-button:hover { color: var(--brand-cyan); }
.form-message { min-height: 18px; margin: 8px 0 0; color: var(--danger); font-size: 12px; line-height: 1.45; }
.form-message.is-success { color: var(--success); }
body[data-login-portal="management"] .login-portal-icon { border-color: rgba(137, 95, 255, .34); color: #a98dff; background: linear-gradient(145deg, rgba(98, 69, 220, .22), rgba(32, 25, 76, .42)); }
body[data-login-portal="management"] .login-heading .eyebrow { color: #a98dff; }
body[data-login-portal="management"] .login-card { border-color: rgba(118, 93, 238, .25); }
body[data-login-portal="management"] #loginSubmit { background: linear-gradient(135deg, #2167f2, #6a35f2); }
.login-footer { color: var(--text-muted); font-size: 10px; }

/* Shell */
.app-view { min-height: 100vh; background: var(--background-primary); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: var(--z-sidebar); width: var(--sidebar-width); display: flex; flex-direction: column; border-right: 1px solid var(--border-primary); background: var(--background-sidebar); transition: width var(--duration-base) ease, transform var(--duration-base) ease; }
.sidebar-head { height: var(--topbar-height); display: flex; align-items: center; gap: 6px; padding: 0 9px; border-bottom: 1px solid var(--border-secondary); }
.sidebar-head .brand { flex: 1; min-width: 0; }
.sidebar-head .brand-logo { width: 28px; height: 28px; }
.sidebar-head .brand strong { font-size: 12px; }
.sidebar-head .brand small { font-size: 8px; }
.sidebar-collapse, .sidebar-close, .menu-button, .top-icon-button { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); color: var(--text-secondary); background: var(--surface-primary); transition: color var(--duration-fast), border var(--duration-fast), background var(--duration-fast); }
.sidebar-collapse:hover, .sidebar-close:hover, .menu-button:hover, .top-icon-button:hover { color: #fff; border-color: rgba(81, 142, 255, .42); background: var(--surface-hover); }
.sidebar-close { display: none; }
.sidebar-collapse svg, .sidebar-close svg, .menu-button svg, .top-icon-button svg { width: var(--icon-medium); height: var(--icon-medium); }
.main-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 5px 7px 8px; scrollbar-width: thin; scrollbar-color: var(--surface-tertiary) transparent; }
.nav-group { min-width: 0; margin: 1px 0 3px; }
.nav-group-header { width: 100%; min-height: 25px; display: grid; grid-template-columns: auto minmax(12px, 1fr) 13px; align-items: center; gap: 6px; padding: 3px 6px; border: 0; color: #71839b; background: transparent; text-align: left; font-size: 8px; font-weight: 750; text-transform: uppercase; }
.nav-group-header:hover { color: var(--text-secondary); }
.nav-group-header > i { height: 1px; background: linear-gradient(90deg, rgba(93, 125, 166, .45), rgba(93, 125, 166, .04)); }
.nav-group-header svg { width: 12px; height: 12px; color: #65a9ff; }
.nav-group-items { display: grid; }
.nav-group.is-collapsed .nav-group-items { display: none; }
.nav-section-label { padding: 8px 7px 3px; color: #53657d; font-size: 9px; font-weight: 700; }
.nav-item { position: relative; width: 100%; min-height: 32px; display: grid; grid-template-columns: 21px minmax(0, 1fr) auto; align-items: center; gap: 7px; margin: 0; padding: 3px 6px; overflow: hidden; border: 0; border-radius: var(--radius-sm); color: var(--text-secondary); background: transparent; text-align: left; font-size: 10.5px; font-weight: 550; transition: color var(--duration-fast), background var(--duration-fast), box-shadow var(--duration-fast); }
.nav-item:hover { color: #f8fbff; background: rgba(23, 41, 64, .72); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(33, 103, 242, .2), rgba(33, 103, 242, .07)); box-shadow: inset 2px 0 0 var(--brand-primary); }
.nav-icon { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 5px; color: var(--nav-slate); background: transparent; }
.nav-icon svg { width: 15px; height: 15px; stroke-width: 1.9; }
.nav-item.active .nav-icon { background: color-mix(in srgb, currentColor 13%, transparent); }
.nav-tone-blue .nav-icon { color: var(--nav-blue); }
.nav-tone-cyan .nav-icon { color: var(--nav-cyan); }
.nav-tone-teal .nav-icon { color: var(--nav-teal); }
.nav-tone-emerald .nav-icon { color: var(--nav-emerald); }
.nav-tone-green .nav-icon { color: var(--nav-green); }
.nav-tone-yellow .nav-icon { color: var(--nav-yellow); }
.nav-tone-amber .nav-icon { color: var(--nav-amber); }
.nav-tone-orange .nav-icon { color: var(--nav-orange); }
.nav-tone-rose .nav-icon { color: var(--nav-rose); }
.nav-tone-pink .nav-icon { color: var(--nav-pink); }
.nav-tone-purple .nav-icon { color: var(--nav-purple); }
.nav-tone-violet .nav-icon { color: var(--nav-violet); }
.nav-tone-slate .nav-icon { color: var(--nav-slate); }
.nav-count { min-width: 18px; height: 17px; display: grid; place-items: center; padding: 0 4px; border-radius: 99px; color: #fff; background: #a92f42; font-size: 8px; font-weight: 750; }
.sidebar-foot { flex: 0 0 auto; display: grid; gap: 4px; padding: 4px 7px 5px; border-top: 1px solid var(--border-secondary); background: rgba(3, 10, 18, .7); }
.system-mini { min-width: 0; min-height: 27px; display: flex; align-items: center; gap: 5px; padding: 3px 6px; border: 1px solid var(--border-secondary); border-radius: var(--radius-sm); background: rgba(15, 29, 46, .5); }
.system-mini-icon { flex: 0 0 auto; width: 16px; height: 16px; display: grid; place-items: center; color: var(--nav-slate); }
.system-mini-icon svg { width: 12px; height: 12px; }
.system-runtime { min-width: 0; flex: 1; display: flex; align-items: center; gap: 4px; overflow: hidden; color: var(--text-muted); white-space: nowrap; }
.system-runtime strong { color: var(--text-secondary); font-family: ui-monospace, "Cascadia Code", monospace; font-size: 9px; }
.system-runtime > span { font-size: 8px; }
.system-runtime small { min-width: 0; display: inline-flex; align-items: center; gap: 4px; overflow: hidden; color: var(--text-muted); font-size: 8px; text-overflow: ellipsis; }
.status-dot { flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 2px rgba(40, 199, 111, .11); }
.sidebar-account-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 4px; }
.sidebar-user { min-width: 0; min-height: 34px; display: flex; align-items: center; gap: 4px; padding: 3px 4px; overflow: hidden; border: 1px solid var(--border-secondary); border-radius: var(--radius-sm); color: #fff; background: rgba(15, 29, 46, .76); text-align: left; }
.sidebar-user:hover { border-color: rgba(74, 141, 255, .26); background: var(--surface-hover); }
.sidebar-user .avatar { width: 26px; height: 26px; }
.sidebar-user > div { min-width: 0; flex: 1; }
.sidebar-user > svg { flex: 0 0 auto; width: 10px; height: 10px; color: var(--nav-cyan); }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { font-size: 9px; line-height: 1.15; }
.sidebar-user small { margin-top: 2px; color: var(--text-secondary); font-size: 8px; line-height: 1.1; }
.logout-button { width: 28px; min-height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border-secondary); border-radius: var(--radius-sm); color: var(--text-muted); background: rgba(15, 29, 46, .46); }
.logout-button:hover { color: #ff9aa2; border-color: rgba(240, 82, 95, .35); background: var(--danger-soft); }
.logout-button svg { width: 14px; height: 14px; }

.app-view.sidebar-collapsed .sidebar { width: var(--sidebar-collapsed-width); }
.app-view.sidebar-collapsed .main-shell { margin-left: var(--sidebar-collapsed-width); }
.app-view.sidebar-collapsed .brand-copy,
.app-view.sidebar-collapsed .nav-item > span:not(.nav-icon):not(.nav-count),
.app-view.sidebar-collapsed .nav-group-header,
.app-view.sidebar-collapsed .sidebar-user > div,
.app-view.sidebar-collapsed .sidebar-user > svg,
.app-view.sidebar-collapsed .system-mini > div { display: none; }
.app-view.sidebar-collapsed .sidebar-head { justify-content: center; padding: 0 8px; }
.app-view.sidebar-collapsed .sidebar-head .brand { flex: 0 0 auto; }
.app-view.sidebar-collapsed .sidebar-collapse { position: absolute; left: 51px; width: 26px; height: 26px; background: var(--surface-secondary); }
.app-view.sidebar-collapsed .nav-item { grid-template-columns: 1fr; justify-items: center; padding: 4px; }
.app-view.sidebar-collapsed .nav-count { position: absolute; top: 0; right: 2px; min-width: 16px; height: 16px; font-size: 8px; }
.app-view.sidebar-collapsed .sidebar-user { justify-content: center; }
.app-view.sidebar-collapsed .system-mini { justify-content: center; }
.app-view.sidebar-collapsed .sidebar-account-row { grid-template-columns: 1fr; }
.app-view.sidebar-collapsed .logout-button { width: 100%; min-height: 30px; }

.main-shell { min-width: 0; min-height: 100vh; margin-left: var(--sidebar-width); transition: margin var(--duration-base) ease; }
.topbar { position: sticky; top: 0; z-index: var(--z-topbar); height: var(--topbar-height); display: grid; grid-template-columns: minmax(190px, .68fr) minmax(260px, 1fr) minmax(200px, .68fr); align-items: center; gap: 12px; padding: 0 12px; border-bottom: 1px solid var(--border-primary); background: rgba(5, 10, 19, .9); backdrop-filter: blur(16px); }
.topbar-left { min-width: 0; display: flex; align-items: center; gap: 8px; }
.menu-button { display: none; }
.topbar-title { min-width: 0; }
.page-eyebrow { margin: 0 0 1px; overflow: hidden; color: var(--text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title h1 { margin: 0; overflow: hidden; font-size: 14px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.global-search-wrap { position: relative; min-width: 0; height: 34px; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--border-secondary); border-radius: var(--radius-sm); background: var(--surface-primary); }
.global-search-wrap:focus-within { border-color: var(--border-focus); box-shadow: var(--shadow-focus); }
.global-search-wrap > svg { width: 15px; height: 15px; color: var(--text-muted); }
.global-search-wrap input { min-width: 0; height: 34px; padding: 0; border: 0; outline: 0; color: var(--text-primary); background: transparent; font-size: 12px; }
.global-search-wrap input::placeholder { color: #5e6f86; }
.global-search-wrap kbd { padding: 2px 5px; border: 1px solid var(--border-primary); border-radius: var(--radius-xs); color: var(--text-muted); background: var(--background-secondary); font-family: inherit; font-size: 9px; }
.global-search-results { position: absolute; top: 39px; right: 0; left: 0; z-index: var(--z-dropdown); max-height: 300px; overflow-y: auto; padding: 5px; border: 1px solid var(--border-primary); border-radius: var(--radius-md); background: var(--surface-primary); box-shadow: var(--shadow-floating); }
.search-result-item { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px; border: 0; border-radius: var(--radius-sm); color: var(--text-secondary); background: transparent; text-align: left; font-size: 12px; }
.search-result-item:hover { color: #fff; background: var(--surface-hover); }
.search-result-item svg { width: 16px; height: 16px; color: #77b3ff; }
.topbar-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.notification-button { position: relative; }
.notification-badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--background-primary); border-radius: 99px; color: #fff; background: var(--danger); font-size: 8px; font-weight: 800; }
.topbar-profile { min-width: 0; display: flex; align-items: center; gap: 6px; padding: 2px 4px; border: 0; border-radius: var(--radius-sm); color: #fff; background: transparent; text-align: left; }
.topbar-profile:hover { background: var(--surface-hover); }
.profile-copy { min-width: 0; }
.profile-copy strong, .profile-copy small { display: block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { font-size: 10px; }
.profile-copy small { color: var(--text-muted); font-size: 9px; }
.profile-menu { position: fixed; top: 46px; right: 10px; z-index: var(--z-dropdown); width: 184px; padding: 5px; border: 1px solid var(--border-primary); border-radius: var(--radius-md); background: var(--surface-primary); box-shadow: var(--shadow-floating); }
.profile-menu button { width: 100%; min-height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 9px; border: 0; border-radius: var(--radius-sm); color: var(--text-secondary); background: transparent; text-align: left; font-size: 12px; }
.profile-menu button:hover { color: #fff; background: var(--surface-hover); }
.profile-menu svg { width: 15px; height: 15px; }
.sidebar-backdrop { display: none; }

.page-outlet { width: 100%; max-width: none; margin: 0; padding: var(--page-padding-desktop); animation: pageIn var(--duration-base) ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.page-head { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 8px 10px; border: 1px solid var(--border-secondary); border-radius: var(--card-radius); background: rgba(9, 20, 34, .62); }
.page-head h2 { margin: 0; font-size: var(--font-page); line-height: var(--line-tight); }
.page-head p { margin: 2px 0 0; color: var(--text-secondary); font-size: 10px; }
.page-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }

/* Shared controls */
.primary-button, .secondary-button, .outline-button, .soft-button, .success-button, .danger-button {
  min-height: var(--button-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 650;
  transition: color var(--duration-fast), border var(--duration-fast), background var(--duration-fast), transform var(--duration-fast), box-shadow var(--duration-fast);
}
.primary-button svg, .secondary-button svg, .outline-button svg, .soft-button svg, .success-button svg, .danger-button svg { width: var(--icon-small); height: var(--icon-small); }
.primary-button { border: 1px solid transparent; color: #fff; background: linear-gradient(105deg, var(--brand-primary), var(--brand-secondary)); box-shadow: 0 8px 20px rgba(33, 103, 242, .18); }
.primary-button:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(33, 103, 242, .25); }
.secondary-button { border: 1px solid rgba(33, 103, 242, .35); color: #8fc2ff; background: var(--brand-soft); }
.secondary-button:hover { color: #fff; border-color: rgba(78, 146, 255, .62); background: rgba(33, 103, 242, .22); }
.outline-button { border: 1px solid var(--border-primary); color: var(--text-primary); background: transparent; }
.outline-button:hover, .soft-button:hover { border-color: rgba(81, 142, 255, .4); background: var(--surface-hover); }
.soft-button { border: 1px solid var(--border-primary); color: var(--text-secondary); background: var(--surface-primary); }
.success-button { border: 1px solid rgba(40, 199, 111, .28); color: #c9f8dc; background: rgba(40, 199, 111, .18); }
.success-button:hover { background: rgba(40, 199, 111, .25); }
.danger-button { border: 1px solid rgba(240, 82, 95, .28); color: #ffd6da; background: rgba(240, 82, 95, .16); }
.danger-button:hover { background: rgba(240, 82, 95, .24); }
.card-link { display: inline-flex; align-items: center; gap: 5px; padding: 3px; border: 0; color: #71adff; background: transparent; font-size: 11px; font-weight: 600; }
.card-link:hover { color: var(--brand-cyan); }

/* Cards and grids */
.grid { min-width: 0; display: grid; align-items: start; gap: var(--grid-gap-desktop); }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.full-span { grid-column: 1 / -1; }
.card { min-width: 0; width: 100%; padding: var(--card-padding); overflow: hidden; border: 1px solid var(--border-primary); border-radius: var(--card-radius); background: linear-gradient(180deg, rgba(13, 27, 44, .98), rgba(10, 22, 37, .98)); box-shadow: var(--shadow-card); }
.card.flat { box-shadow: none; background: var(--surface-secondary); }
.card:hover { border-color: rgba(148, 163, 184, .21); }
.card-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.card-head > div { min-width: 0; }
.card-head h3 { margin: 0; font-size: 12px; line-height: 1.3; }
.card-head p { margin: 2px 0 0; color: var(--text-muted); font-size: 9px; line-height: 1.35; }
.hero-card { position: relative; overflow: hidden; border-color: rgba(54, 122, 244, .23); background: linear-gradient(120deg, #0d2850 0%, #0d1c31 58%, #0b1728 100%); }
.hero-card::after { content: ""; position: absolute; right: -20%; bottom: -160px; width: 420px; height: 230px; border: 28px solid rgba(72, 156, 255, .06); border-radius: 50%; pointer-events: none; }
.hero-split { position: relative; z-index: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-split > div { min-width: 0; }
.hero-split h2 { margin: 4px 0 2px; font-size: 18px; }
.hero-split p { max-width: 780px; margin: 0; color: #9fb0c7; font-size: 10px; }
.hero-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.hero-badges { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.hero-badge { padding: 3px 6px; border: 1px solid rgba(125, 169, 238, .18); border-radius: var(--radius-sm); color: #9bbbe3; background: rgba(7, 20, 39, .45); font-size: 9px; }
.welcome-line { display: flex; align-items: center; gap: 12px; }
.welcome-copy small, .welcome-copy p { color: #a7b9ce; }
.welcome-copy h2 { margin: 1px 0 2px; }

.kpi-card { position: relative; min-height: 82px; display: flex; flex-direction: column; overflow: hidden; padding: 9px 10px; border-color: rgba(133, 157, 190, .16); background: #0f1a2c; box-shadow: 0 7px 18px rgba(0, 0, 0, .13), inset 0 1px 0 rgba(255, 255, 255, .015); transition: transform var(--duration-fast), border-color var(--duration-fast), background var(--duration-fast); }
.kpi-card::before { display: none; }
.kpi-card:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--kpi, var(--brand-primary)) 38%, var(--border-primary)); background: #111f33; }
.kpi-top { min-width: 0; min-height: 13px; padding-right: 37px; }
.kpi-icon { position: absolute; top: 9px; right: 10px; width: 31px; height: 31px; display: grid; place-items: center; border: 0; border-radius: 8px; color: #fff; background: var(--kpi, var(--brand-primary)); box-shadow: 0 6px 14px color-mix(in srgb, var(--kpi, var(--brand-primary)) 22%, transparent), inset 0 1px 0 rgba(255, 255, 255, .18); }
.kpi-icon svg { width: 16px; height: 16px; stroke-width: 2; }
.kpi-label { min-width: 0; overflow: hidden; color: #9caac0; font-size: 9px; font-weight: 700; line-height: 1.2; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.kpi-value { margin-top: 7px; overflow: hidden; font-size: var(--font-stat); font-weight: 760; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.kpi-value.value-long { font-size: 17px; }
.kpi-value.value-xlong { font-size: 15px; }
.kpi-value-compact { display: none; }
.kpi-trend { min-width: 0; margin-top: auto; padding-top: 4px; overflow: hidden; color: var(--text-secondary); font-size: 9px; font-weight: 450; line-height: 1.15; text-align: left; text-overflow: ellipsis; white-space: nowrap; }

.dashboard-layout { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(250px, .75fr); gap: 10px; margin-top: 10px; }
.dashboard-layout > .grid { align-content: start; }
.ops-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(230px, .75fr); gap: 12px; }
.ops-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.ops-item, .stage-row, .next-step, .quick-action { min-width: 0; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); color: var(--text-primary); background: var(--surface-secondary); text-align: left; transition: border var(--duration-fast), background var(--duration-fast), transform var(--duration-fast); }
.ops-item:hover, .stage-row:hover, .next-step:hover, .quick-action:hover { border-color: rgba(73, 140, 255, .42); background: var(--surface-hover); transform: translateY(-1px); }
.ops-item { min-height: 62px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding: 9px; }
.ops-item strong, .ops-item small { display: block; }
.ops-item strong { font-size: 11px; line-height: 1.3; }
.ops-item small { margin-top: 3px; display: -webkit-box; overflow: hidden; color: var(--text-muted); font-size: 10px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ops-item b { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: var(--radius-sm); color: #8ec1ff; background: var(--brand-soft); font-size: 10px; }
.ops-item.needs-action { border-color: rgba(245, 170, 35, .25); }
.stage-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.stage-row { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 9px; }
.stage-row span { color: var(--text-secondary); font-size: 10px; }
.stage-row b { font-size: 12px; text-align: right; }
.next-step-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.next-step { min-height: 70px; padding: 10px; }
.next-step strong, .next-step span { display: block; }
.next-step strong { font-size: 11px; line-height: 1.3; }
.next-step span { margin-top: 4px; color: var(--text-muted); font-size: 10px; line-height: 1.4; }
.next-step.success { border-color: rgba(40, 199, 111, .24); }
.next-step.warning { border-color: rgba(245, 170, 35, .25); }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick-action { min-height: 62px; padding: 10px; }
.quick-action b, .quick-action small { display: block; }
.quick-action b { font-size: 11px; }
.quick-action small { margin-top: 3px; color: var(--text-muted); font-size: 10px; line-height: 1.35; }

/* Charts */
.chart-shell { position: relative; min-height: 188px; height: 188px; }
.chart-shell canvas { width: 100% !important; height: 188px !important; }
.chart-bars { height: 188px; display: flex; align-items: flex-end; justify-content: space-around; gap: 7px; padding: 12px 6px 0; border-bottom: 1px solid var(--border-primary); background-image: linear-gradient(to bottom, var(--border-secondary) 1px, transparent 1px); background-size: 100% 25%; }
.chart-column { flex: 1; height: 100%; display: flex; align-items: center; justify-content: flex-end; flex-direction: column; gap: 5px; }
.chart-value { color: var(--text-secondary); font-size: 10px; }
.chart-bar { width: min(28px, 55%); min-height: 4px; border-radius: 4px 4px 0 0; background: var(--brand-primary); box-shadow: 0 5px 16px rgba(33, 103, 242, .18); }
.chart-label { color: var(--text-muted); font-size: 10px; }
.donut-wrap { display: grid; place-items: center; min-height: 145px; }
.donut { --pct: 0; width: 110px; height: 110px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--success) calc(var(--pct) * 1%), var(--surface-tertiary) 0); }
.donut::before { content: ""; grid-area: 1 / 1; width: 78px; height: 78px; border-radius: 50%; background: var(--surface-primary); }
.donut-copy { z-index: 1; grid-area: 1 / 1; text-align: center; }
.donut-copy b, .donut-copy small { display: block; }
.donut-copy b { font-size: 20px; }
.donut-copy small { color: var(--text-muted); font-size: 10px; }

/* Tables */
.table-card { padding: 0; overflow: hidden; }
.table-toolbar { min-width: 0; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--border-primary); }
.table-toolbar h3 { margin: 0; font-size: 12px; }
.table-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.search-input, .form-control { min-width: 0; min-height: var(--input-height); padding: 0 9px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); outline: none; color: var(--text-primary); background: var(--surface-secondary); font-size: 11px; transition: border var(--duration-fast), box-shadow var(--duration-fast), background var(--duration-fast); }
.search-input { width: 220px; min-height: 34px; }
.search-input::placeholder, .form-control::placeholder { color: #5e6f86; }
.search-input:focus, .form-control:focus { border-color: var(--border-focus); background: var(--surface-tertiary); box-shadow: var(--shadow-focus); }
.table-wrap { width: 100%; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--surface-tertiary) transparent; }
table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 12px; }
th { height: 32px; padding: 6px 9px; color: #8191a6; background: #0a1523; font-size: 10px; font-weight: 650; text-align: left; white-space: nowrap; }
td { min-width: 64px; height: 38px; padding: 7px 9px; border-top: 1px solid var(--border-secondary); color: var(--text-secondary); font-size: 11px; vertical-align: middle; }
tbody tr { transition: background var(--duration-fast); }
tbody tr:hover { background: rgba(72, 111, 169, .08); }
.table-primary, .table-secondary { display: block; }
.table-primary { color: var(--text-primary); font-size: 12px; font-weight: 600; }
.table-secondary { margin-top: 2px; color: var(--text-muted); font-size: 10px; line-height: 1.35; }
.table-avatar { min-width: 160px; display: flex; align-items: center; gap: 8px; }
.table-avatar > div { min-width: 0; }
.row-actions { display: flex; align-items: center; gap: 5px; }
.action-dot { width: 27px; height: 27px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); color: var(--text-secondary); background: var(--surface-secondary); }
.action-dot:hover { color: #fff; border-color: rgba(73, 140, 255, .4); background: var(--surface-hover); }
.action-dot svg { width: 13px; height: 13px; }
.pagination { display: flex; justify-content: flex-end; gap: 4px; padding: 7px 10px; border-top: 1px solid var(--border-secondary); }
.pagination button { min-width: 27px; height: 27px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); color: var(--text-secondary); background: var(--surface-secondary); font-size: 10px; }
.pagination button.active { color: #fff; border-color: var(--brand-primary); background: var(--surface-active); }

/* Avatars, badges and status */
.avatar { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(130, 173, 232, .18); border-radius: var(--radius-sm); color: #fff; background: linear-gradient(145deg, #1758c9, #2073ea); font-size: 10px; font-weight: 750; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.company-avatar { padding: 3px; border-color: color-mix(in srgb, var(--brand-primary) 28%, var(--border-primary)); background: var(--surface-primary); box-shadow: inset 0 1px rgba(255, 255, 255, .08); }
.avatar.company-avatar img { object-fit: contain; }
.avatar-lg { width: 42px; height: 42px; border-radius: var(--radius-md); font-size: 12px; }
.badge { min-height: 18px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border: 1px solid transparent; border-radius: 99px; font-size: 9px; font-weight: 650; line-height: 1.15; white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-primary, .badge-info { color: #76b7ff; border-color: rgba(33, 103, 242, .18); background: var(--brand-soft); }
.badge-success { color: #63dc98; border-color: rgba(40, 199, 111, .18); background: var(--success-soft); }
.badge-warning { color: #f8bf57; border-color: rgba(245, 170, 35, .18); background: var(--warning-soft); }
.badge-danger { color: #ff818b; border-color: rgba(240, 82, 95, .18); background: var(--danger-soft); }
.badge-purple { color: #b69bff; border-color: rgba(139, 99, 246, .2); background: var(--purple-soft); }
.badge-muted { color: #9aabc0; border-color: var(--border-primary); background: rgba(104, 121, 145, .11); }

/* Activity and timeline */
.activity-list { display: grid; }
.activity-item { min-width: 0; display: flex; gap: 7px; padding: 6px 0; border-bottom: 1px solid var(--border-secondary); }
.activity-item:last-child { border-bottom: 0; }
.activity-bullet { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--radius-sm); color: #74b2ff; background: var(--brand-soft); font-size: 0; }
.activity-bullet::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.activity-item > div { min-width: 0; }
.activity-item strong, .activity-item small { display: block; }
.activity-item strong { font-size: 11px; line-height: 1.35; }
.activity-item small { margin-top: 1px; overflow: hidden; color: var(--text-muted); font-size: 9px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 6px; width: 1px; background: var(--border-primary); }
.timeline-item { position: relative; padding: 0 0 9px 8px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; top: 2px; left: -21px; width: 11px; height: 11px; border: 3px solid var(--surface-primary); border-radius: 50%; background: var(--brand-primary); box-shadow: 0 0 0 2px var(--brand-soft); }
.timeline-item b, .timeline-item span { display: block; }
.timeline-item b { font-size: 11px; }
.timeline-item span { margin-top: 2px; color: var(--text-muted); font-size: 10px; line-height: 1.4; }

/* Attendance and location */
.attendance-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 12px; }
.clock-card { position: relative; overflow: hidden; border-color: rgba(57, 130, 255, .26); background: linear-gradient(135deg, #0d2c57, #0c1d34); }
.clock-card::after { content: ""; position: absolute; top: -120px; right: -70px; width: 250px; height: 250px; border: 24px solid rgba(63, 220, 255, .05); border-radius: 50%; }
.live-clock { position: relative; z-index: 1; margin: 6px 0 0; font-size: 28px; font-weight: 750; line-height: 1; }
.live-date { position: relative; z-index: 1; margin-top: 5px; color: var(--text-secondary); font-size: 12px; }
.clock-meta { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 16px; }
.clock-meta div { min-width: 0; padding: 9px; border: 1px solid rgba(136, 178, 234, .13); border-radius: var(--radius-sm); background: rgba(5, 15, 29, .4); }
.clock-meta b, .clock-meta span { display: block; }
.clock-meta b { font-size: 12px; }
.clock-meta span { margin-top: 3px; color: var(--text-muted); font-size: 10px; }
.attendance-action { min-height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.attendance-orb { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 11px; border: 1px solid rgba(77, 153, 255, .3); border-radius: 50%; color: #8bc6ff; background: var(--brand-soft); box-shadow: 0 0 0 7px rgba(33, 103, 242, .06); font-size: 20px; }
.attendance-orb svg { width: 24px; height: 24px; }
.attendance-action h3 { margin: 0; font-size: 15px; }
.attendance-action p { max-width: 280px; margin: 6px 0 13px; color: var(--text-secondary); font-size: 11px; }
.location-box { min-width: 0; display: flex; align-items: flex-start; gap: 9px; padding: 11px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); }
.location-icon { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--radius-sm); color: #78b7ff; background: var(--brand-soft); }
.location-icon svg { width: 17px; height: 17px; }
.location-box > div { min-width: 0; }
.location-box strong, .location-box small { display: block; }
.location-box strong { font-size: 11px; }
.location-box small { margin-top: 3px; color: var(--text-muted); font-size: 10px; line-height: 1.45; }
.location-box em { display: block; margin-top: 5px; color: var(--text-secondary); font-size: 9px; font-style: normal; line-height: 1.45; }
.location-settings-list { display: grid; gap: 8px; }
.location-settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); }
.location-settings-row > div { min-width: 0; }
.location-settings-row strong, .location-settings-row span { display: block; }
.location-settings-row strong { font-size: 11px; }
.location-settings-row span { margin-top: 3px; color: var(--text-muted); font-size: 10px; }
.map-preview { position: relative; min-height: 190px; overflow: hidden; border: 1px solid var(--border-primary); border-radius: var(--radius-md); background-color: #dbe4eb; background-image: linear-gradient(28deg, transparent 43%, rgba(255,255,255,.9) 44%, rgba(255,255,255,.9) 48%, transparent 49%), linear-gradient(147deg, transparent 42%, rgba(183,195,204,.85) 43%, rgba(183,195,204,.85) 45%, transparent 46%), linear-gradient(90deg, rgba(177,201,213,.35) 1px, transparent 1px), linear-gradient(rgba(177,201,213,.35) 1px, transparent 1px); background-size: 120px 85px, 150px 100px, 32px 32px, 32px 32px; }
.map-preview::after { content: ""; position: absolute; inset: 0; background: rgba(12, 34, 55, .08); }
.map-pin { position: absolute; top: 50%; left: 50%; z-index: 2; width: 88px; height: 88px; display: grid; place-items: center; border: 1px solid rgba(33, 103, 242, .55); border-radius: 50%; color: #fff; background: rgba(33, 103, 242, .16); transform: translate(-50%, -50%); }
.map-pin::after { content: ""; width: 30px; height: 30px; border: 5px solid #fff; border-radius: 50% 50% 50% 0; background: var(--brand-primary); box-shadow: 0 5px 12px rgba(0, 0, 0, .22); transform: rotate(-45deg); }
.map-overlay { position: absolute; right: 8px; bottom: 8px; left: 8px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px; border-radius: var(--radius-sm); color: var(--text-primary); background: rgba(5, 14, 25, .88); backdrop-filter: blur(8px); }
.map-overlay strong, .map-overlay span { display: block; }
.map-overlay strong { font-size: 11px; }
.map-overlay span { color: var(--text-secondary); font-size: 10px; }
.camera-frame { position: relative; min-height: 220px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border-primary); border-radius: var(--radius-md); background: #050b13; }
.camera-frame::before { content: ""; width: 132px; height: 170px; border: 1px dashed rgba(130, 172, 226, .36); border-radius: 70px 70px 45px 45px; background: radial-gradient(circle at 50% 34%, #21344c 0 24px, transparent 25px), radial-gradient(ellipse at 50% 100%, #172b42 0 65px, transparent 66px); }
.camera-frame .file-drop { position: absolute; inset: 0; border: 0; background: transparent; }
.camera-frame.is-optional { min-height: 168px; background: var(--surface-secondary); }
.camera-frame.is-optional::before { display: none; }
.camera-frame.is-optional .file-drop { position: relative; inset: auto; width: 100%; min-height: 168px; border: 1px dashed rgba(125, 159, 204, .42); background: var(--surface-secondary); }

/* Jobs */
.jobs-list-card { margin-top: 12px; }
.jobs-list-card .table-toolbar { min-height: 38px; }
.jobs-list-card tbody tr { transition: background var(--duration-fast); }
.jobs-list-card tbody tr:hover { background: rgba(35, 91, 163, .08); }
.jobs-list-card tbody tr.is-selected { background: color-mix(in srgb, var(--brand-primary) 11%, transparent); }
.jobs-list-card .table-primary { line-height: 1.3; }
.jobs-list-card .row-actions { flex-wrap: nowrap; }
.jobs-table-heading { min-width: 130px; display: grid; gap: 2px; }
.jobs-table-heading > span { color: var(--text-muted); font-size: 9px; line-height: 1.25; }
.job-bulk-actions { display: flex; align-items: center; gap: 5px; }
.job-bulk-actions .danger-button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.job-select-column { width: 38px; min-width: 38px; padding-right: 5px; padding-left: 9px; text-align: center; }
.table-checkbox { position: relative; width: 20px; height: 20px; display: inline-grid; place-items: center; cursor: pointer; }
.table-checkbox input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.table-checkbox span { width: 15px; height: 15px; display: grid; place-items: center; border: 1px solid var(--border-primary); border-radius: 4px; pointer-events: none; background: var(--surface-secondary); transition: border-color var(--duration-fast), background var(--duration-fast), box-shadow var(--duration-fast); }
.table-checkbox span::after { content: ''; width: 7px; height: 4px; margin-top: -2px; border-bottom: 2px solid #fff; border-left: 2px solid #fff; opacity: 0; transform: rotate(-45deg) scale(.7); transition: opacity var(--duration-fast), transform var(--duration-fast); }
.table-checkbox input:checked + span,
.table-checkbox input:indeterminate + span { border-color: var(--brand-primary); background: var(--brand-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 14%, transparent); }
.table-checkbox input:checked + span::after { opacity: 1; transform: rotate(-45deg) scale(1); }
.table-checkbox input:indeterminate + span::after { width: 7px; height: 0; margin: 0; border-bottom: 2px solid #fff; border-left: 0; opacity: 1; transform: none; }
.table-checkbox input:focus-visible + span { outline: 2px solid var(--brand-light); outline-offset: 2px; }
.bulk-delete-list { max-height: 210px; margin: 8px 0; padding: 4px 8px; overflow-y: auto; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); list-style: none; }
.bulk-delete-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 3px; border-bottom: 1px solid var(--border-secondary); font-size: 10px; }
.bulk-delete-list li:last-child { border-bottom: 0; }
.bulk-delete-list li span { color: var(--text-muted); text-align: right; }
.job-board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); align-items: start; gap: 10px; overflow-x: auto; padding-bottom: 5px; }
.job-column { min-width: 240px; padding: 8px; border: 1px solid var(--border-primary); border-radius: var(--radius-md); background: rgba(7, 17, 29, .7); }
.job-column-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 3px 9px; }
.job-column-head h3 { margin: 0; font-size: 12px; }
.job-column-head span { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 99px; color: var(--text-secondary); background: var(--surface-secondary); font-size: 10px; }
.job-stack { display: grid; gap: 8px; }
.job-card { --job-accent: var(--brand-primary); min-width: 0; padding: 10px; border: 1px solid color-mix(in srgb, var(--job-accent) 25%, var(--border-primary)); border-left: 3px solid var(--job-accent); border-radius: var(--radius-sm); background: linear-gradient(145deg, color-mix(in srgb, var(--job-accent) 7%, var(--surface-primary)), var(--surface-primary)); box-shadow: 0 5px 14px rgba(0, 0, 0, .12); }
.job-card.priority-rendah { --job-accent: var(--info); }
.job-card.priority-normal { --job-accent: var(--brand-primary); }
.job-card.priority-tinggi { --job-accent: var(--warning); }
.job-card.priority-darurat { --job-accent: var(--danger); }
.job-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ticket { color: #80bbff; font-size: 10px; font-weight: 750; }
.priority-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--job-accent); }
.job-card h4 { margin: 7px 0 3px; font-size: 12px; line-height: 1.35; }
.job-card p { margin: 0; color: var(--text-muted); font-size: 10px; line-height: 1.45; }
.job-card-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.meta-chip { padding: 4px 6px; border-radius: var(--radius-xs); color: var(--text-secondary); background: var(--surface-secondary); font-size: 9px; }
.job-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-secondary); }
.job-assignee { min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 10px; }
.job-assignee .avatar { width: 24px; height: 24px; }
.coin-preview { color: #b69bff; font-size: 10px; font-weight: 700; }
.job-detail-tabs { margin-top: 14px; }
.job-detail-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.job-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

/* Finance, coin and payroll */
.finance-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 8px; }
.finance-box { min-width: 0; padding: 8px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); }
.finance-box span, .finance-box b { display: block; }
.finance-box span { color: var(--text-muted); font-size: 10px; }
.finance-box b { margin-top: 2px; overflow-wrap: anywhere; font-size: 12px; }
.coin-balance { display: flex; align-items: center; gap: 16px; }
.coin-orb { flex: 0 0 auto; width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid rgba(139, 99, 246, .3); border-radius: 50%; color: #fff; background: rgba(139, 99, 246, .18); box-shadow: 0 0 0 6px rgba(139, 99, 246, .06); font-size: 17px; font-weight: 750; }
.coin-balance h3 { margin: 0; font-size: 17px; }
.coin-balance p { margin: 4px 0 0; color: var(--text-secondary); font-size: 11px; }
.rule-list { display: grid; }
.rule-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 6px 0; border-bottom: 1px solid var(--border-secondary); }
.rule-row:last-child { border-bottom: 0; }
.rule-row span { color: var(--text-secondary); font-size: 11px; }
.rule-row b { overflow-wrap: anywhere; color: #ad93f8; font-size: 11px; text-align: right; }
.salary-slip { position: relative; overflow: hidden; }
.salary-slip::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 2px; background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary)); }
.salary-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--border-primary); font-size: 10px; }
.salary-line span { color: var(--text-secondary); }
.salary-line b { text-align: right; }
.salary-line.total { margin-top: 7px; padding: 13px 10px; border: 1px solid rgba(40, 199, 111, .22); border-radius: var(--radius-sm); background: var(--success-soft); }
.salary-line.total b { color: var(--success); font-size: 16px; }
.salary-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 10px; border-radius: var(--radius-sm); background: var(--surface-secondary); }
.salary-status span { font-size: 11px; }
.progress { height: 6px; overflow: hidden; border-radius: 99px; background: var(--surface-tertiary); }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--brand-primary); }
.payroll-detail { display: grid; grid-template-columns: minmax(210px, .68fr) minmax(210px, .74fr) minmax(360px, 1.58fr); align-items: start; gap: 10px; }
.payroll-detail-aside { display: contents; }
.payroll-meta-card, .payroll-tech-card, .payroll-components-card { min-width: 0; }
.payroll-detail .card.flat { background: var(--surface-secondary); }
.detail-list { display: grid; margin-top: 12px; }
.detail-list > div { min-width: 0; display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--border-secondary); }
.detail-list span { color: var(--text-muted); font-size: 10px; }
.detail-list b { overflow-wrap: anywhere; font-size: 11px; }
.payroll-component-group + .payroll-component-group { margin-top: 10px; }
.component-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border-primary); }
.component-title h3 { margin: 0; font-size: 12px; }
.component-title strong { color: var(--success); font-size: 12px; }
.payroll-component-group.deduction .component-title h3, .payroll-component-group.deduction .component-title strong { color: var(--danger); }
.payroll-component-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--border-secondary); }
.payroll-component-row span { color: var(--text-secondary); font-size: 11px; }
.payroll-component-row b { flex: 0 0 auto; font-size: 11px; text-align: right; }
.payroll-component-group.income .payroll-component-row b { color: #8ae9b2; }
.payroll-component-group.deduction .payroll-component-row b { color: #ff818b; }
.payroll-component-row.muted-row { opacity: .75; }
.payroll-net-total { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 10px; border: 1px solid rgba(40, 199, 111, .24); border-radius: var(--radius-md); background: var(--success-soft); }
.payroll-net-total span, .payroll-net-total small, .payroll-net-total em { display: block; }
.payroll-net-total small { color: #bdeed1; font-size: 11px; font-weight: 700; }
.payroll-net-total em { margin-top: 2px; color: #82b99a; font-size: 9px; font-style: normal; }
.payroll-net-total strong { color: #5de094; font-size: 17px; text-align: right; }
.payment-proof-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 10px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-primary); }
.payment-proof-row strong, .payment-proof-row small { display: block; }
.payment-proof-row strong { font-size: 11px; }
.payment-proof-row small { margin-top: 2px; color: var(--text-muted); font-size: 9px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.job-form-simple-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.job-form-simple-grid textarea.form-control { min-height: 72px; resize: vertical; }
.user-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#settingsForm > .grid:first-child > .card.span-2 .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-view > [data-settings-group] { margin-top: 0 !important; }
.payroll-monthly-default { border-top: 2px solid var(--brand-primary); }
.payroll-monthly-default .eyebrow { display: block; margin-bottom: 2px; }
.payroll-monthly-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-group.payroll-money-field > label { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.form-group.payroll-money-field > label small { margin-left: auto; color: var(--text-muted); font-size: 8px; font-weight: 500; }
.payroll-input-shell { min-width: 0; min-height: var(--input-height); display: grid; grid-template-columns: 29px minmax(0, 1fr); align-items: stretch; overflow: hidden; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); transition: border var(--duration-fast), box-shadow var(--duration-fast); }
.payroll-input-shell:focus-within { border-color: var(--brand-primary); box-shadow: 0 0 0 3px var(--brand-soft); }
.payroll-input-shell > span { display: grid; place-items: center; color: var(--text-muted); font-size: 9px; font-weight: 700; pointer-events: none; }
.payroll-input-shell .form-control { min-width: 0; width: 100%; min-height: 100%; padding: 0 8px 0 0 !important; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-weight: 700; }
.payroll-input-shell .form-control:focus { border: 0; box-shadow: none; }
.payroll-total-row { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--border-primary); }
.payroll-total-row > span { min-width: 0; display: flex; align-items: center; gap: 9px; }
.payroll-total-row svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--brand-primary); }
.payroll-total-row small, .payroll-total-row b { display: block; }
.payroll-total-row small { color: var(--text-muted); font-size: 8px; }
.payroll-total-row b { margin-top: 1px; font-size: 9px; }
.payroll-total-row > strong { flex: 0 0 auto; color: var(--success); font-size: 17px; }
.payroll-team-editor { margin-top: 16px !important; }
.payroll-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding: 0 2px; }
.payroll-section-head h3 { margin: 0; font-size: 13px; }
.payroll-section-head p { margin: 2px 0 0; color: var(--text-muted); font-size: 9px; }
.payroll-technician-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.payroll-technician-card { padding: 11px; }
.payroll-technician-head { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border-primary); }
.payroll-technician-head .avatar { width: 34px; height: 34px; }
.payroll-technician-head strong, .payroll-technician-head span { display: block; }
.payroll-technician-head strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.payroll-technician-head > div > span { margin-top: 1px; overflow: hidden; color: var(--text-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.payroll-technician-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; }
.payroll-technician-total { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border-primary); color: var(--text-secondary); font-size: 9px; }
.payroll-technician-total strong { color: var(--text-primary); font-size: 13px; }
.payroll-empty-state { min-height: 150px; border: 1px dashed var(--border-primary); border-radius: var(--card-radius); }
.settings-view[data-settings-view="general"] > [data-settings-group]:not([data-settings-group~="general"]),
.settings-view[data-settings-view="operations"] > [data-settings-group]:not([data-settings-group~="operations"]),
.settings-view[data-settings-view="payroll"] > [data-settings-group]:not([data-settings-group~="payroll"]),
.settings-view[data-settings-view="notifications"] > [data-settings-group]:not([data-settings-group~="notifications"]),
.settings-view[data-settings-view="whatsapp"] > [data-settings-group]:not([data-settings-group~="whatsapp"]),
.settings-view[data-settings-view="templates"] > [data-settings-group]:not([data-settings-group~="templates"]) { display: none; }
.settings-view[data-settings-view="notifications"] [data-settings-panel="whatsapp"],
.settings-view[data-settings-view="whatsapp"] [data-settings-panel="notifications"] { display: none; }
.settings-view[data-settings-view="whatsapp"] .notification-channel-grid { grid-template-columns: minmax(220px, 320px); }
.settings-view[data-settings-view="whatsapp"] .notification-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .form-control { width: 100%; }
.form-group { min-width: 0; }
.form-group label { display: block; margin-bottom: 4px; color: var(--text-secondary); font-size: 11px; font-weight: 600; }
.form-group label small { color: var(--text-muted); font-weight: 400; }
.form-group > small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 9px; line-height: 1.35; }
textarea.form-control { min-height: 80px; padding-top: 8px; padding-bottom: 8px; resize: vertical; }
select.form-control { padding-right: 30px; }
input[type="date"].form-control, input[type="datetime-local"].form-control, input[type="time"].form-control, input[type="month"].form-control { color-scheme: dark; }
.form-control:disabled { color: var(--text-muted); background: #09131f; cursor: not-allowed; }
.form-control[aria-invalid="true"] { border-color: var(--danger); }
.form-hint { margin: 5px 0 0; color: var(--text-muted); font-size: 10px; line-height: 1.45; }
.form-section { margin: 12px 0 7px; padding-bottom: 5px; border-bottom: 1px solid var(--border-primary); color: var(--text-primary); font-size: 11px; font-weight: 700; }
.form-section:first-child { margin-top: 0; }
.form-help { margin: -3px 0 8px; color: var(--text-muted); font-size: 10px; line-height: 1.45; }
.file-drop { position: relative; min-height: 92px; display: grid; place-items: center; padding: 10px; overflow: hidden; border: 1px dashed rgba(125, 159, 204, .36); border-radius: var(--radius-md); color: var(--text-secondary); background: var(--surface-secondary); text-align: center; }
.file-drop:hover { border-color: rgba(80, 146, 255, .58); background: var(--surface-hover); }
.file-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-drop b, .file-drop span { display: block; }
.file-drop b { color: var(--text-primary); font-size: 12px; }
.file-drop span { margin-top: 3px; font-size: 10px; }
.file-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.preview-image { aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); }
.preview-image img { width: 100%; height: 100%; object-fit: cover; }
.company-logo-control { min-width: 0; display: grid; grid-template-columns: minmax(150px, .65fr) minmax(220px, 1.35fr); gap: 10px; padding: 9px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); transition: border-color var(--duration-fast), opacity var(--duration-fast); }
.company-logo-control.is-processing { border-color: rgba(63, 220, 255, .42); opacity: .72; }
.company-logo-preview { min-width: 0; min-height: 92px; display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 9px; padding: 8px; overflow: hidden; border: 1px solid var(--border-secondary); border-radius: var(--radius-sm); background: var(--background-secondary); }
.company-logo-image { width: 72px; height: 72px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: #07111d; }
.company-logo-image img { max-width: calc(100% - 10px); max-height: calc(100% - 10px); object-fit: contain; }
.company-logo-preview-copy { min-width: 0; }
.company-logo-preview-copy strong, .company-logo-preview-copy span { display: block; overflow: hidden; text-overflow: ellipsis; }
.company-logo-preview-copy strong { color: var(--text-primary); font-size: 11px; white-space: nowrap; }
.company-logo-preview-copy span { margin-top: 3px; color: var(--text-muted); font-size: 9px; line-height: 1.4; }
.company-logo-tools { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.company-logo-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.company-logo-upload { position: relative; cursor: pointer; }
.company-logo-upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.company-logo-tools > small { color: var(--text-muted); font-size: 9px; line-height: 1.45; }
.company-logo-error { margin: 0; color: #ff929a; font-size: 9px; line-height: 1.4; }
.signature-pad { width: 100%; height: 140px; border: 1px dashed rgba(125, 159, 204, .36); border-radius: var(--radius-md); background: #f8fafc; touch-action: none; }
.form-footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border-primary); }
.switch-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border-secondary); }
.switch-row:last-child { border-bottom: 0; }
.switch-copy { min-width: 0; }
.switch-copy strong, .switch-copy span { display: block; }
.switch-copy strong { font-size: 11px; }
.switch-copy span { margin-top: 2px; color: var(--text-muted); font-size: 10px; }
.switch { position: relative; flex: 0 0 auto; width: 38px; height: 21px; }
.switch input { width: 0; height: 0; opacity: 0; }
.switch-slider { position: absolute; inset: 0; border-radius: 99px; background: #26384d; transition: background var(--duration-fast); }
.switch-slider::before { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #dce6f2; transition: transform var(--duration-fast); }
.switch input:checked + .switch-slider { background: var(--brand-primary); }
.switch input:checked + .switch-slider::before { transform: translateX(17px); }
.sectioned-form { display: grid; gap: 8px; }
.form-panel { min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--border-primary); border-radius: var(--radius-md); background: var(--surface-secondary); }
.form-panel legend { width: auto; max-width: 100%; display: flex; align-items: center; gap: 8px; padding: 0 6px; color: var(--text-primary); }
.form-panel legend > span:first-child { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--radius-sm); color: #7ebaff; background: var(--brand-soft); }
.form-panel legend svg { width: 15px; height: 15px; }
.form-panel legend strong, .form-panel legend small { display: block; }
.form-panel legend > span:last-child { font-size: 12px; font-weight: 700; }
.form-panel legend small { margin-top: 1px; color: var(--text-muted); font-size: 9px; font-weight: 400; }
.required-marker { color: var(--danger); }
.schedule-fields > div { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; }
.schedule-fields > div > span { color: var(--text-muted); font-size: 10px; }
.payroll-form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.toggle-row { position: relative; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
.toggle-row > span { min-width: 0; }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { font-size: 11px; }
.toggle-row small { margin-top: 2px; color: var(--text-muted); font-size: 9px; }
.toggle-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-row i { position: relative; flex: 0 0 auto; width: 40px; height: 22px; border-radius: 99px; background: #27394e; transition: background var(--duration-fast); }
.toggle-row i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #dce6f2; transition: transform var(--duration-fast); }
.toggle-row input:checked + i { background: var(--brand-primary); }
.toggle-row input:checked + i::after { transform: translateX(18px); }
.toggle-row input:focus-visible + i { box-shadow: var(--shadow-focus); }

/* Profile, notifications, reports */
.profile-hero { display: flex; align-items: center; gap: 13px; }
.profile-hero > div { min-width: 0; }
.profile-hero h3 { margin: 0; font-size: 18px; }
.profile-hero p { margin: 3px 0 0; color: var(--text-secondary); font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 6px; margin-top: 8px; }
.device-label { display: -webkit-box; overflow: hidden; overflow-wrap: anywhere; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.detail-box { min-width: 0; padding: 7px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); }
.detail-box span, .detail-box b { display: block; }
.detail-box span { color: var(--text-muted); font-size: 10px; }
.detail-box b { margin-top: 3px; overflow-wrap: anywhere; font-size: 11px; }
.notification-list { display: grid; gap: 6px; }
.notification-card { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: flex-start; gap: 7px; padding: 8px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-primary); }
.notification-card.unread { border-color: rgba(33, 103, 242, .3); background: linear-gradient(90deg, var(--brand-soft), var(--surface-primary) 34%); }
.notification-card.is-selected { border-color: color-mix(in srgb, var(--brand-primary) 58%, var(--border-primary)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-primary) 11%, transparent); }
.notification-open { min-width: 0; display: flex; align-items: flex-start; gap: 7px; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.notification-open.is-read { cursor: default; }
.notification-open:focus-visible { outline: 2px solid var(--brand-light); outline-offset: 3px; border-radius: var(--radius-xs); }
.notification-select { margin-top: 4px; }
.notification-item-actions { display: flex; align-items: center; gap: 4px; }
.notification-item-actions .action-dot { width: 28px; height: 28px; }
.notification-bulk-toolbar { display: grid; grid-template-columns: auto minmax(80px, 1fr) auto; align-items: center; gap: 8px; margin-bottom: 8px; padding: 7px 8px; border: 1px solid var(--border-secondary); border-radius: var(--radius-sm); background: var(--surface-secondary); }
.notification-bulk-toolbar > strong { font-size: 10px; }
.notification-bulk-toolbar > div { display: flex; align-items: center; gap: 5px; }
.notification-bulk-toolbar button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.notification-storage-note { display: flex; align-items: flex-start; gap: 6px; margin: 8px 0 0; color: var(--text-muted); font-size: 8px; line-height: 1.45; }
.notification-storage-note svg { flex: 0 0 auto; width: 13px; height: 13px; }
.notification-icon { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--radius-sm); color: #80bcff; background: var(--brand-soft); }
.notification-icon svg { width: 17px; height: 17px; }
.notification-copy { flex: 1; min-width: 0; }
.notification-copy strong, .notification-copy p, .notification-copy small { display: block; }
.notification-copy strong { font-size: 11px; }
.notification-copy p { margin: 3px 0 0; color: var(--text-secondary); font-size: 11px; line-height: 1.45; }
.notification-copy small { margin-top: 6px; color: var(--text-muted); font-size: 9px; }
.notification-delivery-badge { min-height: 16px; margin-left: 6px; padding: 1px 5px; vertical-align: middle; }
.whatsapp-gateway-panel { min-width: 0; margin-top: 10px; padding: 10px; border: 1px solid rgba(45, 122, 242, .24); border-radius: var(--radius-md); background: linear-gradient(145deg, rgba(18, 43, 72, .72), rgba(8, 20, 34, .84)); }
.gateway-heading, .gateway-identity, .gateway-empty, .gateway-actions, .gateway-outbox-title, .gateway-outbox-row { min-width: 0; display: flex; align-items: center; }
.gateway-heading, .gateway-empty, .gateway-outbox-title, .gateway-outbox-row { justify-content: space-between; }
.gateway-identity, .gateway-empty { gap: 9px; }
.gateway-identity > div, .gateway-empty > div, .gateway-outbox-row > span { min-width: 0; flex: 1; }
.gateway-identity strong, .gateway-identity p, .gateway-empty strong, .gateway-empty p, .gateway-outbox-row b, .gateway-outbox-row small { display: block; }
.gateway-identity strong, .gateway-empty strong, .gateway-outbox-row b { font-size: 11px; }
.gateway-identity p, .gateway-empty p { margin: 2px 0 0; overflow: hidden; color: var(--text-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.gateway-icon { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--radius-sm); color: #7db9ff; background: var(--brand-soft); }
.gateway-icon svg { width: 16px; height: 16px; }
.gateway-icon.success { color: #63dc98; background: var(--success-soft); }
.gateway-icon.warning { color: #f8bf57; background: var(--warning-soft); }
.gateway-icon.danger { color: #ff818b; background: var(--danger-soft); }
.gateway-status { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 3px 7px; border: 1px solid var(--border-primary); border-radius: 99px; color: var(--text-secondary); background: var(--surface-secondary); font-size: 9px; font-weight: 700; }
.gateway-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px currentColor; opacity: .85; }
.gateway-status.success { color: #63dc98; border-color: rgba(40, 199, 111, .2); background: var(--success-soft); }
.gateway-status.warning { color: #f8bf57; border-color: rgba(245, 170, 35, .2); background: var(--warning-soft); }
.gateway-status.danger { color: #ff818b; border-color: rgba(240, 82, 95, .2); background: var(--danger-soft); }
.gateway-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }
.gateway-metric { min-width: 0; padding: 7px; border: 1px solid var(--border-secondary); border-radius: var(--radius-sm); background: rgba(5, 14, 25, .46); }
.gateway-metric span, .gateway-metric b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gateway-metric span { color: var(--text-muted); font-size: 9px; }
.gateway-metric b { margin-top: 2px; font-size: 11px; }
.gateway-notice { margin-top: 7px; padding: 6px 7px; border: 1px solid var(--border-primary); border-radius: var(--radius-xs); color: var(--text-secondary); background: rgba(5, 14, 25, .42); font-size: 9px; line-height: 1.4; }
.gateway-notice.warning { color: #f8c66b; border-color: rgba(245, 170, 35, .2); background: var(--warning-soft); }
.gateway-notice.danger { color: #ff969e; border-color: rgba(240, 82, 95, .2); background: var(--danger-soft); }
.gateway-outbox { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--border-secondary); }
.gateway-outbox-title { margin-bottom: 2px; color: var(--text-secondary); font-size: 9px; font-weight: 700; }
.gateway-outbox-title small { color: var(--text-muted); font-size: 8px; font-weight: 400; }
.gateway-outbox-row { gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border-secondary); }
.gateway-outbox-row:last-child { border-bottom: 0; }
.gateway-outbox-row small { margin-top: 1px; color: var(--text-muted); font-size: 8px; }
.gateway-actions { flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-secondary); }
.gateway-actions button { min-height: 30px; }
.gateway-loading { min-height: 74px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-secondary); font-size: 10px; }
.loading-spinner { width: 16px; height: 16px; border: 2px solid var(--border-primary); border-top-color: var(--brand-primary); border-radius: 50%; animation: spin .8s linear infinite; }
.notification-config-grid { margin-top: 10px; }
.pairing-code-result { display: grid; place-items: center; gap: 5px; margin-top: 10px; padding: 12px; border: 1px solid rgba(45, 122, 242, .28); border-radius: var(--radius-md); background: var(--brand-soft); text-align: center; }
.pairing-code-result span, .pairing-code-result small { color: var(--text-secondary); font-size: 10px; }
.pairing-code-result strong { color: #fff; font-size: 24px; letter-spacing: 0; }
.wa-qr-panel { min-height: 292px; display: grid; place-items: center; padding: 10px; overflow: hidden; border: 1px solid #2a405d; border-radius: 10px; background: #091421; }
.wa-qr-loading,
.wa-qr-success,
.wa-qr-error { width: 100%; min-height: 250px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 14px; color: #9cb0ca; text-align: center; }
.wa-qr-loading strong,
.wa-qr-success strong,
.wa-qr-error strong { color: #f5f9ff; font-size: 12px; }
.wa-qr-loading small,
.wa-qr-success small,
.wa-qr-error small { max-width: 320px; color: #8296b2; font-size: 9px; line-height: 1.5; }
.wa-qr-success > svg { width: 36px; height: 36px; color: var(--success); }
.wa-qr-error > svg { width: 30px; height: 30px; color: var(--danger); }
.wa-qr-error .soft-button { margin-top: 4px; }
.wa-qr-frame { width: min(100%, 272px); aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border: 7px solid #fff; border-radius: 8px; background: #fff; box-shadow: 0 12px 32px rgba(0, 0, 0, .32); }
.wa-qr-frame img { width: 100%; height: 100%; display: block; object-fit: contain; }
.wa-qr-timestamp { display: block; margin-top: 7px; color: #8197b4; font-size: 8px; text-align: center; }
.wa-qr-instructions { margin: 10px 0 0; padding: 8px 8px 8px 28px; border: 1px solid rgba(45, 122, 242, .2); border-radius: 8px; color: #9fb1c9; background: rgba(45, 122, 242, .07); font-size: 9px; line-height: 1.65; }
.wa-qr-instructions b { color: #eaf2ff; }
.wa-pairing-divider { position: relative; display: flex; align-items: center; justify-content: center; margin: 10px 0 8px; color: #7187a4; font-size: 8px; text-transform: uppercase; }
.wa-pairing-divider::before { content: ""; position: absolute; inset-inline: 0; height: 1px; background: var(--border-primary); }
.wa-pairing-divider span { position: relative; padding: 0 8px; background: var(--surface-primary); }
.wa-pairing-phone-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 7px; }
.wa-pairing-phone-row .form-group { margin: 0; }
.wa-pairing-phone-row .soft-button { min-height: var(--input-height); }
.reminder-grid, .template-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.template-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.reminder-card, .template-card { min-width: 0; min-height: 68px; padding: 9px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); color: var(--text-primary); background: var(--surface-secondary); text-align: left; }
.reminder-card { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.reminder-card strong, .reminder-card small, .template-card strong, .template-card p { display: block; }
.reminder-card strong, .template-card strong { font-size: 11px; }
.reminder-card small, .template-card p { margin-top: 3px; color: var(--text-muted); font-size: 10px; line-height: 1.4; }
.reminder-card b { color: #82bdff; font-size: 15px; }
.notification-template-input { min-height: 110px !important; }
.tabs { display: flex; gap: 3px; margin-bottom: 9px; padding: 3px; overflow-x: auto; border: 1px solid var(--border-primary); border-radius: var(--radius-md); background: var(--background-secondary); }
.tab-button { flex: 0 0 auto; min-height: 30px; padding: 0 9px; border: 0; border-radius: var(--radius-sm); color: var(--text-secondary); background: transparent; font-size: 10px; font-weight: 600; white-space: nowrap; }
.tab-button:hover { color: #fff; background: var(--surface-hover); }
.tab-button.active { color: #fff; background: var(--surface-active); box-shadow: inset 0 -2px 0 var(--brand-primary); }
.filter-bar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; padding: 8px; border: 1px solid var(--border-secondary); border-radius: var(--radius-md); background: rgba(9, 20, 34, .55); }
.filter-bar .form-control { width: auto; min-width: 140px; min-height: 36px; }
.report-tabs .tab-button { display: flex; align-items: center; gap: 6px; }
.report-tabs .tab-button svg { width: 14px; height: 14px; }
.report-filter-card { margin-bottom: 10px; }
.report-filter-grid { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 8px; }
.report-filter-grid .form-control { width: 100%; min-height: 38px; }
.report-kpis { margin-bottom: 10px; }
.report-overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(240px, .65fr); align-items: start; gap: 10px; margin-bottom: 10px; }
.report-chart-shell, .report-chart-shell canvas { min-height: 190px; height: 190px !important; }
.report-insight-card .rule-row b { color: var(--text-primary); }
.log-line { display: grid; grid-template-columns: 130px 120px minmax(0, 1fr) 110px; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border-secondary); font-size: 10px; }
.backup-zone { min-height: 150px; display: grid; place-items: center; align-content: center; padding: 12px; border: 1px dashed rgba(125, 159, 204, .34); border-radius: var(--radius-md); background: var(--surface-secondary); text-align: center; }
.backup-zone h3 { margin: 10px 0 4px; font-size: 15px; }
.backup-zone p { max-width: 500px; margin: 0 0 14px; color: var(--text-secondary); font-size: 11px; }

/* Empty, skeleton and alerts */
.empty-state { min-height: 48px; display: grid; place-items: center; align-content: center; padding: 6px; color: var(--text-muted); text-align: center; }
.empty-icon { width: 28px; height: 28px; display: grid; place-items: center; margin-bottom: 4px; border-radius: var(--radius-sm); color: #7fbaff; background: var(--brand-soft); font-size: 0; }
.empty-icon::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 50%; }
.empty-icon:has(svg)::after { display: none; }
.empty-icon svg { width: 18px; height: 18px; }
.empty-state h3 { margin: 0; color: var(--text-primary); font-size: 11px; }
.empty-state p { margin: 3px 0 0; font-size: 9px; }
.table-wrap td .empty-state { min-height: 36px; padding: 3px; }
.table-wrap td .empty-icon { width: 22px; height: 22px; margin-bottom: 2px; }
.table-wrap td .empty-icon svg { width: 15px; height: 15px; }
.skeleton { position: relative; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-tertiary); }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); transform: translateX(-100%); animation: skeletonMove 1.3s infinite; }
@keyframes skeletonMove { to { transform: translateX(100%); } }
.alert { display: flex; align-items: flex-start; gap: 7px; padding: 8px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); color: var(--text-secondary); background: var(--surface-secondary); font-size: 10px; line-height: 1.4; }
.alert-info { color: #9bcfff; border-color: rgba(43, 185, 239, .2); background: var(--info-soft); }
.alert-warning { color: #f5c66e; border-color: rgba(245, 170, 35, .2); background: var(--warning-soft); }
.alert-danger { color: #ff9aa2; border-color: rgba(240, 82, 95, .2); background: var(--danger-soft); }

/* Modal and toast */
.modal-backdrop { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: 12px; background: rgba(1, 5, 11, .72); backdrop-filter: blur(7px); animation: fadeIn var(--duration-fast) ease; }
.modal { width: min(680px, 100%); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border-primary); border-radius: var(--radius-lg); background: var(--surface-primary); box-shadow: var(--shadow-floating); animation: modalIn var(--duration-base) ease; }
.modal:focus { outline: none; }
.modal-lg { width: min(980px, 100%); }
.modal-sm { width: min(440px, 100%); }
.modal-head { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border-primary); background: var(--surface-glass); backdrop-filter: blur(12px); }
.modal-head h3 { margin: 0; font-size: 14px; }
.modal-head p { margin: 2px 0 0; color: var(--text-secondary); font-size: 10px; }
.modal-close { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); color: var(--text-secondary); background: var(--surface-secondary); }
.modal-close:hover { color: #fff; background: var(--surface-hover); }
.modal-close svg { width: 16px; height: 16px; }
.modal-body { min-height: 0; overflow-y: auto; padding: 12px; }
.modal-footer { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; padding: 9px 12px; border-top: 1px solid var(--border-primary); background: var(--surface-glass); backdrop-filter: blur(12px); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.toast-root { position: fixed; right: 14px; bottom: 14px; z-index: var(--z-toast); width: min(340px, calc(100vw - 28px)); display: grid; gap: 7px; pointer-events: none; }
.toast { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; padding: 11px; border: 1px solid var(--border-primary); border-radius: var(--radius-md); color: #fff; background: #101d2c; box-shadow: var(--shadow-floating); animation: toastIn var(--duration-base) ease; }
.toast-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--radius-sm); color: #7db8ff; background: var(--brand-soft); }
.toast-icon svg { width: 15px; height: 15px; }
.toast-success .toast-icon { color: var(--success); background: var(--success-soft); box-shadow: inset 0 0 0 1px rgba(40,199,111,.2); }
.toast-danger .toast-icon { color: var(--danger); background: var(--danger-soft); box-shadow: inset 0 0 0 1px rgba(240,82,95,.2); }
.toast-warning .toast-icon { color: var(--warning); background: var(--warning-soft); box-shadow: inset 0 0 0 1px rgba(245,170,35,.2); }
.toast b, .toast span { display: block; }
.toast b { font-size: 11px; }
.toast span { margin-top: 2px; color: var(--text-secondary); font-size: 10px; line-height: 1.4; }
@keyframes toastIn { from { opacity: 0; transform: translateX(12px); } }
.network-status { position: fixed; top: 9px; left: 50%; z-index: 300; min-height: 32px; display: flex; align-items: center; padding: 0 12px; border: 1px solid rgba(240,82,95,.25); border-radius: 99px; color: #ffd7da; background: rgba(125, 28, 40, .95); box-shadow: var(--shadow-card); font-size: 11px; font-weight: 600; transform: translate(-50%, -150%); transition: transform var(--duration-base); }
.network-status.show { transform: translate(-50%, 0); }
.network-status.online { color: #d1ffe2; border-color: rgba(40,199,111,.28); background: rgba(21, 113, 67, .96); }

.mobile-bottom-nav { display: none; }

#pageOutlet [style*="margin-top:16px"],
#pageOutlet [style*="margin-top: 16px"],
#pageOutlet [style*="margin-top:20px"],
#pageOutlet [style*="margin-top: 20px"],
#pageOutlet [style*="margin-top:14px"],
#pageOutlet [style*="margin-top: 14px"],
#pageOutlet [style*="margin-top:13px"],
#pageOutlet [style*="margin-top: 13px"],
#pageOutlet [style*="margin-top:12px"],
#pageOutlet [style*="margin-top: 12px"] { margin-top: 10px !important; }

/* Material */
.stock-meter { height: 5px; overflow: hidden; border-radius: 99px; background: var(--surface-tertiary); }
.stock-meter span { display: block; height: 100%; border-radius: inherit; background: var(--success); }
.stock-meter.warning span { background: var(--warning); }
.stock-meter.danger span { background: var(--danger); }

/* Premium role dashboards */
.management-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; gap: var(--grid-gap-desktop); }
.responsive-kpi, .coin-kpi-extra { display: none; }
.admin-queue-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 8px; margin-top: 10px; }
.queue-card { --queue-accent: var(--info); position: relative; min-width: 0; min-height: 68px; display: block; padding: 8px 40px 8px 9px; border: 1px solid rgba(133, 157, 190, .16); border-radius: var(--card-radius); color: var(--text-primary); background: #0f1a2c; text-align: left; }
.queue-card:nth-child(2) { --queue-accent: var(--warning); }
.queue-card:nth-child(3) { --queue-accent: var(--danger); }
.queue-card:nth-child(4) { --queue-accent: var(--purple); }
.queue-card:hover { border-color: color-mix(in srgb, var(--queue-accent) 38%, var(--border-primary)); background: #111f33; }
.queue-card > span { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--queue-accent); box-shadow: 0 5px 12px color-mix(in srgb, var(--queue-accent) 20%, transparent); }
.queue-card > span svg { width: 14px; height: 14px; }
.queue-card > div { min-width: 0; }
.queue-card small, .queue-card strong, .queue-card em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-card small { padding-right: 2px; color: #9caac0; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.queue-card strong { margin-top: 5px; font-size: 16px; line-height: 1; }
.queue-card em { margin-top: 4px; color: var(--text-secondary); font-size: 8px; font-style: normal; }
.queue-card > svg { position: absolute; right: 10px; bottom: 7px; width: 12px; height: 12px; color: color-mix(in srgb, var(--queue-accent) 78%, white); }
.management-dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; gap: 10px; margin-top: 10px; }
.management-dashboard-grid .attendance-chart-card { grid-column: span 6; }
.management-dashboard-grid .job-summary-card,
.management-dashboard-grid .finance-today-card { grid-column: span 3; }
.management-dashboard-grid .attendance-chart-card .chart-shell { min-height: 160px; height: 160px; }
.management-dashboard-grid .attendance-chart-card .chart-shell canvas { height: 160px !important; }
.chart-shell.compact { min-height: 140px; height: 140px; }
.chart-shell.compact canvas { height: 140px !important; }
.job-chart-layout { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(90px, .72fr); align-items: center; gap: 8px; }
.job-status-legend { display: grid; gap: 7px; }
.job-status-legend span { min-width: 0; display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; align-items: center; gap: 5px; }
.job-status-legend small { color: var(--text-secondary); font-size: 10px; }
.job-status-legend b { font-size: 11px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-primary); }
.legend-dot.danger { background: var(--danger); }
.legend-dot.warning { background: var(--warning); }
.legend-dot.success { background: var(--success); }
.legend-dot.primary { background: var(--brand-primary); }
.finance-today-list { display: grid; gap: 6px; }
.finance-today-row { min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 7px; padding: 7px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); }
.finance-today-row > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: var(--radius-sm); }
.finance-today-row.income > span { color: var(--success); background: var(--success-soft); }
.finance-today-row.expense > span { color: var(--danger); background: var(--danger-soft); }
.finance-today-row.balance > span { color: #77b5ff; background: var(--brand-soft); }
.finance-today-row svg { width: 14px; height: 14px; }
.finance-today-row small, .finance-today-row strong { display: block; }
.finance-today-row small { color: var(--text-muted); font-size: 10px; }
.finance-today-row strong { margin-top: 1px; overflow-wrap: anywhere; font-size: 11px; }
.dashboard-bottom-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 10px; margin-top: 10px; }
.summary-number { display: block; margin-top: 4px; font-size: 20px; font-weight: 750; line-height: 1; }
.approval-summary-card > small, .approval-summary-card > span { display: block; color: var(--text-muted); font-size: 10px; }
.compact-summary-card > small { display: -webkit-box; overflow: hidden; color: var(--text-muted); font-size: 9px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.followup-summary-list { display: grid; gap: 6px; }
.followup-summary-row { min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 7px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); color: var(--text-primary); background: var(--surface-secondary); text-align: left; }
.followup-summary-row:hover { border-color: rgba(74, 141, 255, .36); background: var(--surface-hover); }
.followup-summary-row > span:first-child { width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--radius-sm); color: #7db8ff; background: var(--brand-soft); }
.followup-summary-row > span:first-child svg { width: 14px; height: 14px; }
.followup-summary-row > span:nth-child(2) { min-width: 0; }
.followup-summary-row strong, .followup-summary-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.followup-summary-row strong { font-size: 10px; }
.followup-summary-row small { margin-top: 1px; color: var(--text-muted); font-size: 9px; }
.followup-summary-row > b { font-size: 15px; }
.summary-money { display: block; margin-top: 10px; font-size: 15px; }
.payroll-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.payroll-split > div { min-width: 0; padding: 7px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); }
.payroll-split small, .payroll-split strong { display: block; }
.payroll-split small { color: var(--text-muted); font-size: 10px; }
.payroll-split strong { margin-top: 2px; overflow-wrap: anywhere; font-size: 11px; }
.payroll-total { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-primary); }
.payroll-total span { color: var(--text-secondary); font-size: 10px; }
.payroll-total b { font-size: 14px; }
.dashboard-jobs-table { margin-top: 10px; }

/* Technician detail and error states */
.technician-detail-page { display: grid; gap: 10px; }
.technician-detail-hero { min-width: 0; display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid rgba(33, 103, 242, .25); border-radius: var(--radius-md); background: linear-gradient(120deg, #102b52, var(--surface-secondary) 64%); }
.technician-detail-hero > div { min-width: 0; }
.technician-detail-hero h2 { margin: 0; font-size: 19px; }
.technician-detail-hero p { margin: 3px 0 7px; color: var(--text-secondary); font-size: 11px; }
.technician-detail-hero div > div { display: flex; flex-wrap: wrap; gap: 5px; }
.technician-detail-kpis .kpi-card { min-height: 82px; }
.technician-detail-sections { gap: 10px; }
.technician-activity { min-height: 140px; }
.error-page { min-height: calc(100dvh - var(--topbar-height) - 28px); display: grid; place-items: center; align-content: center; padding: 16px; text-align: center; }
.error-page > span { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid rgba(33, 103, 242, .28); border-radius: var(--radius-md); color: #81bdff; background: var(--brand-soft); }
.error-page > span svg { width: 28px; height: 28px; }
.error-page > small { margin-top: 12px; color: var(--brand-cyan); font-size: 12px; font-weight: 750; }
.error-page h2 { margin: 4px 0; font-size: 20px; }
.error-page p { max-width: 460px; margin: 0 0 16px; color: var(--text-secondary); font-size: 12px; }

/* Technician home and jobs */
.technician-dashboard { width: 100%; max-width: none; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "greeting greeting" "attendance mini" "attendance daily" "jobs jobs" "desktop desktop"; align-items: start; gap: 10px; margin: 0; }
.technician-greeting { grid-area: greeting; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 7px 9px; border: 1px solid var(--border-secondary); border-radius: var(--card-radius); background: rgba(9, 20, 34, .62); }
.technician-greeting span, .technician-greeting p { display: block; margin: 0; color: var(--text-secondary); font-size: 11px; }
.technician-greeting h2 { margin: 1px 0; font-size: 18px; }
.tech-attendance-card { grid-area: attendance; max-width: none; }
.attendance-status-row { min-width: 0; display: grid; grid-template-columns: 32px minmax(0, 1fr) 14px; align-items: center; gap: 7px; margin-bottom: 7px; padding: 7px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); }
.status-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--radius-sm); color: #80bbff; background: var(--brand-soft); }
.status-icon.warning { color: var(--warning); background: var(--warning-soft); }
.status-icon.success { color: var(--success); background: var(--success-soft); }
.status-icon svg { width: 15px; height: 15px; }
.attendance-status-row > div { min-width: 0; }
.attendance-status-row strong, .attendance-status-row small { display: block; }
.attendance-status-row strong { font-size: 12px; }
.attendance-status-row small { margin-top: 2px; color: var(--text-secondary); font-size: 10px; }
.attendance-status-row > svg { width: 15px; height: 15px; color: var(--text-muted); }
.attendance-radius-note { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 5px; overflow: hidden; color: #7193bd; font-size: 9px; white-space: nowrap; }
.attendance-radius-note svg { width: 13px; height: 13px; }
.today-jobs-card { grid-area: jobs; max-width: none; margin: 0; }
.mobile-job-list { display: grid; }
.mobile-job-row { min-width: 0; min-height: 58px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 0; border: 0; border-bottom: 1px solid var(--border-secondary); color: var(--text-primary); background: transparent; text-align: left; }
.mobile-job-row:last-child { border-bottom: 0; }
.mobile-job-row:hover { background: rgba(74, 125, 190, .06); }
.mobile-job-row > span { min-width: 0; }
.mobile-job-row b, .mobile-job-row strong, .mobile-job-row small { display: block; }
.mobile-job-row b { color: #d8e7fa; font-size: 11px; }
.mobile-job-row strong { margin-top: 2px; font-size: 11px; }
.mobile-job-row small { margin-top: 2px; overflow: hidden; color: var(--text-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.mobile-job-row > span:last-child { display: grid; justify-items: end; gap: 3px; }
.tech-mini-grid, .tech-daily-grid { max-width: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 6px; margin: 0; }
.tech-mini-grid { grid-area: mini; }
.tech-daily-grid { grid-area: daily; }
.tech-mini-card { --mini-accent: var(--brand-primary); position: relative; min-height: 72px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 7px 37px 7px 8px; color: var(--text-primary); background: #0f1a2c; text-align: left; }
.tech-mini-card.coin { --mini-accent: var(--purple); }
.tech-mini-card.salary { --mini-accent: var(--success); }
.tech-mini-card.tasks { --mini-accent: var(--info); }
.tech-mini-card > span { position: absolute; top: 7px; right: 7px; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--mini-accent); box-shadow: 0 5px 12px color-mix(in srgb, var(--mini-accent) 20%, transparent); }
.tech-mini-card > span svg { width: 14px; height: 14px; }
.tech-mini-card small, .tech-mini-card strong, .tech-mini-card em { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tech-mini-card small { color: #9caac0; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.tech-mini-card strong { width: 100%; margin-top: 5px; font-size: 12px; line-height: 1.05; }
.tech-mini-card em { width: 100%; margin-top: 3px; color: var(--text-secondary); font-size: 8px; font-style: normal; }
.tech-daily-card { --daily-accent: var(--success); position: relative; min-height: 62px; display: grid; align-content: center; gap: 3px; padding: 7px 33px 7px 7px; color: var(--text-primary); background: #0f1a2c; text-align: left; }
.tech-daily-card:nth-child(2) { --daily-accent: var(--info); }
.tech-daily-card:nth-child(3) { --daily-accent: var(--warning); }
.tech-daily-card > span { position: absolute; top: 7px; right: 7px; width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: var(--daily-accent); }
.tech-daily-card > span svg { width: 12px; height: 12px; }
.tech-daily-card small, .tech-daily-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tech-daily-card small { color: #9caac0; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.tech-daily-card strong { font-size: 14px; }
.tech-mobile-actions, .tech-mobile-activity { display: none; }
.tech-desktop-grid { grid-area: desktop; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 10px; margin: 0; }
.quick-action b { display: flex; align-items: center; gap: 5px; }
.quick-action b svg { width: 14px; height: 14px; }
.technician-job-list-card { margin-top: 10px; }
.mobile-job-filter { margin: 0 0 10px; padding: 0; border: 0; background: transparent; }
.technician-job-list { display: grid; gap: 6px; }
.technician-job-filter-empty { margin-top: 6px; border: 1px dashed var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); }
.technician-job-item { position: relative; min-width: 0; display: grid; grid-template-columns: 3px minmax(0, 1fr) auto; gap: 8px; padding: 8px; overflow: hidden; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); color: var(--text-primary); background: var(--surface-secondary); text-align: left; }
.technician-job-item:hover { border-color: rgba(72, 141, 255, .4); background: var(--surface-hover); }
.job-item-accent { width: 3px; height: 100%; border-radius: 3px; background: var(--brand-primary); }
.job-item-accent.priority-tinggi { background: var(--warning); }
.job-item-accent.priority-darurat { background: var(--danger); }
.job-item-accent.priority-rendah { background: var(--success); }
.job-item-main { min-width: 0; }
.job-item-main small, .job-item-main strong, .job-item-main em, .job-item-main > span { display: block; }
.job-item-main small { color: #7fbaff; font-size: 10px; }
.job-item-main strong { margin-top: 2px; font-size: 13px; }
.job-item-main em { margin-top: 2px; overflow: hidden; color: var(--text-secondary); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.job-item-main > span { display: flex; align-items: center; gap: 4px; margin-top: 5px; color: var(--text-muted); font-size: 9px; }
.job-item-main > span svg { width: 11px; height: 11px; }
.job-item-side { min-width: 100px; display: grid; align-content: space-between; justify-items: end; gap: 5px; }
.job-item-side small { color: var(--text-muted); font-size: 9px; }
.job-item-side > svg { width: 15px; height: 15px; color: var(--text-muted); }

/* Job detail and photo workflow */
.job-detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid rgba(53, 124, 246, .22); border-radius: var(--radius-md); background: linear-gradient(120deg, #102c55, #0e1d31 65%); }
.job-detail-hero h2 { margin: 5px 0 2px; font-size: 20px; }
.job-detail-hero p { margin: 0; color: var(--text-secondary); font-size: 11px; }
.job-detail-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.job-detail-tabs .tab-button { display: flex; align-items: center; gap: 5px; }
.job-detail-tabs svg { width: 14px; height: 14px; }
.job-information-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.job-information-layout .full-panel { grid-column: 1 / -1; }
.job-description { margin: 0; color: var(--text-secondary); font-size: 11px; line-height: 1.65; }
.job-timeline .timeline-item p { margin: 4px 0 0; color: var(--text-secondary); font-size: 10px; }
.job-photo-card { min-height: 210px; }
.job-photo-preview { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; padding: 0; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: #050b13; }
.job-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.material-used-panel { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid rgba(40, 199, 111, .2); border-radius: var(--radius-sm); background: var(--success-soft); }
.material-used-panel > svg { width: 25px; height: 25px; color: var(--success); }
.material-used-panel strong, .material-used-panel small { display: block; }
.material-used-panel strong { font-size: 12px; }
.material-used-panel small { margin-top: 3px; color: var(--text-secondary); font-size: 10px; }
.attendance-capture-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.attendance-capture-column { min-width: 0; }
.attendance-location-intro strong, .attendance-location-intro small { display: block; }
.attendance-location-intro small { margin-top: 3px; line-height: 1.45; }
.attendance-modal-map { min-height: 200px; }
.attendance-technician-map {
  position: relative;
  container-type: size;
  height: 180px;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 30%, var(--border-primary));
  border-radius: var(--radius-md);
  background: #dce8ee;
  box-shadow: inset 0 1px rgba(255, 255, 255, .55);
  isolation: isolate;
}
.attendance-technician-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.attendance-technician-map::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(4, 24, 43, .03), transparent 74%, rgba(4, 24, 43, .12)); }
.attendance-technician-map-radius {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: auto;
  height: clamp(40px, var(--office-radius-size, 58%), 72%);
  aspect-ratio: 1;
  box-sizing: border-box;
  border: 3px solid #087ff5;
  border-radius: 50%;
  background: rgba(0, 122, 245, .17);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .78), 0 0 0 2px rgba(255, 255, 255, .9), 0 0 0 6px rgba(0, 113, 235, .16);
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.attendance-technician-map-office {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 28px;
  height: 35px;
  display: grid;
  place-items: center;
  color: #168c55;
  filter: drop-shadow(0 4px 5px rgba(4, 28, 18, .4));
  pointer-events: none;
  transform: translate(-50%, -100%);
}
.attendance-technician-map-office svg { width: 28px; height: 35px; fill: #75c844; stroke: #367f2f; stroke-width: 1.8; }
.attendance-technician-map-office::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #168c55;
  box-shadow: 0 2px 7px rgba(4, 28, 18, .4);
  transform: translate(-50%, 50%);
}
.attendance-technician-map-device {
  position: absolute;
  top: var(--attendance-device-y, 50%);
  left: var(--attendance-device-x, 50%);
  z-index: 4;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .18), 0 5px 12px rgba(21, 28, 72, .38);
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.attendance-technician-map-device svg { width: 12px; height: 12px; fill: currentColor; }
html[data-theme="light"] .attendance-technician-map::after { background: linear-gradient(180deg, rgba(27, 73, 104, .02), transparent 74%, rgba(6, 27, 43, .09)); }
html[data-theme="light"] .attendance-technician-map-office::after { background: #149963; }
#attendanceForm .camera-frame.is-optional .file-drop > span > span { max-width: 470px; margin: 8px auto 0; line-height: 1.55; }
.camera-state-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.camera-state-row > span { display: flex; align-items: center; gap: 5px; color: var(--text-secondary); }
.camera-state-row svg { width: 14px; height: 14px; }
.camera-preview-output { position: absolute; inset: 0; display: block; margin: 0; }
.camera-preview-output .preview-image { width: 100%; height: 100%; border: 0; border-radius: 0; }
.attendance-camera > img { width: 100%; height: 100%; object-fit: cover; }
.camera-placeholder { display: grid; justify-items: center; gap: 7px; color: var(--text-secondary); text-align: center; }
.camera-placeholder strong, .camera-placeholder small { display: block; }
.camera-placeholder strong { font-size: 12px; }
.camera-placeholder small { max-width: 220px; font-size: 10px; }
.attendance-confirm-card > div:first-child { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.attendance-confirm-card strong, .attendance-confirm-card small { display: block; }
.attendance-confirm-card strong { font-size: 12px; }
.attendance-confirm-card small { margin-top: 2px; color: var(--text-secondary); font-size: 10px; }
.gps-status-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }
.gps-status-row { min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.gps-status-row > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--radius-sm); color: #7bb8ff; background: var(--brand-soft); }
.gps-status-row small, .gps-status-row strong { display: block; }
.gps-status-row small { color: var(--text-muted); font-size: 9px; }
.gps-status-row strong, .gps-status-row b { font-size: 10px; }
.attendance-camera, .attendance-confirm-card, .attendance-history-card { margin-top: 9px; }
.photo-upload-stage { min-height: 340px; }
.photo-upload-panel { display: none; }
.photo-upload-panel.active { display: block; }
.photo-upload-preview { position: relative; min-height: 290px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border-primary); border-radius: var(--radius-md); background: #040a12; }
.photo-upload-preview > img { width: 100%; height: 100%; min-height: 290px; object-fit: cover; }
.photo-upload-preview > div:first-child { display: grid; justify-items: center; gap: 6px; color: var(--text-secondary); text-align: center; }
.photo-upload-preview > div:first-child svg { width: 40px; height: 40px; color: #76b5ff; }
.photo-upload-preview strong, .photo-upload-preview small { display: block; }
.photo-upload-preview small { color: var(--text-muted); font-size: 10px; }
.photo-capture-button { position: relative; width: 100%; margin-top: 9px; overflow: hidden; }
.photo-capture-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-preview-output { position: absolute; inset: 0; display: block; margin: 0; }
.upload-preview-output .preview-image { width: 100%; height: 100%; border: 0; border-radius: 0; }
.upload-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 10px 0; }
.upload-progress span { height: 4px; border-radius: 99px; background: var(--surface-tertiary); }
.upload-progress span.active { background: var(--brand-primary); }

/* Calendar */
.calendar-status-bar { min-width: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.calendar-status-bar > span { position: relative; min-width: 0; min-height: 46px; display: grid; grid-template-columns: 27px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; gap: 1px 6px; overflow: hidden; padding: 6px 7px; border: 1px solid var(--border-primary); border-radius: 8px; background: var(--surface-primary); }
.calendar-status-bar > span::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: currentColor; opacity: .85; }
.calendar-status-bar svg { grid-row: 1 / 3; width: 15px; height: 15px; padding: 5px; box-sizing: content-box; border-radius: 7px; color: currentColor; background: color-mix(in srgb, currentColor 12%, transparent); }
.calendar-status-bar b, .calendar-status-bar small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-status-bar b { color: var(--text-primary); font-size: 11px; line-height: 1.1; }
.calendar-status-bar small { color: var(--text-muted); font-size: 8px; line-height: 1.15; }
.calendar-stat.info { color: var(--info); background: linear-gradient(135deg, var(--info-soft), var(--surface-primary) 56%); }
.calendar-stat.success { color: var(--success); background: linear-gradient(135deg, var(--success-soft), var(--surface-primary) 56%); }
.calendar-stat.primary { color: #5da0ff; background: linear-gradient(135deg, var(--brand-soft), var(--surface-primary) 56%); }
.calendar-stat.warning { color: var(--warning); background: linear-gradient(135deg, var(--warning-soft), var(--surface-primary) 56%); }
.calendar-stat.purple { color: #a786ff; background: linear-gradient(135deg, var(--purple-soft), var(--surface-primary) 56%); }
.calendar-stat.danger { color: #ff6f79; background: linear-gradient(135deg, var(--danger-soft), var(--surface-primary) 56%); }
.calendar-layout { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 28%); align-items: stretch; gap: 8px; }
.calendar-card, .calendar-agenda { height: min(calc(var(--calendar-weeks) * 84px + 29px), calc(100dvh - 206px)); min-height: 390px; max-height: 560px; }
.calendar-card { min-width: 0; display: grid; grid-template-rows: 29px minmax(0, 1fr); overflow: hidden; padding: 0; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { background: rgba(9, 20, 34, .72); }
.calendar-weekdays span { display: grid; place-items: center; padding: 4px; border-right: 1px solid var(--border-secondary); color: var(--text-muted); font-size: 9px; font-weight: 700; text-align: center; }
.calendar-weekdays span:last-child { border-right: 0; }
.calendar-grid { min-height: 0; grid-template-rows: repeat(var(--calendar-weeks), minmax(0, 1fr)); border-top: 1px solid var(--border-primary); border-left: 1px solid var(--border-primary); }
.calendar-day { position: relative; min-width: 0; min-height: 0; overflow: hidden; padding: 4px 5px; border-right: 1px solid var(--border-primary); border-bottom: 1px solid var(--border-primary); background: rgba(8, 18, 31, .5); }
.calendar-day.empty { background: rgba(5, 12, 21, .35); }
.calendar-day.holiday { box-shadow: inset 2px 0 rgba(240, 82, 95, .72); background: linear-gradient(135deg, rgba(240, 82, 95, .11), rgba(8, 18, 31, .48) 68%); }
.calendar-day.today { box-shadow: inset 0 0 0 1px var(--brand-cyan), inset 3px 0 var(--brand-primary); background: linear-gradient(135deg, rgba(33, 103, 242, .2), rgba(10, 25, 43, .74)); }
.calendar-day.today.holiday { box-shadow: inset 0 0 0 1px var(--brand-cyan), inset 3px 0 var(--danger); }
.calendar-date-head { min-width: 0; height: 21px; display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.calendar-date-head b { flex: 0 0 auto; width: 21px; height: 21px; display: grid; place-items: center; border-radius: 6px; color: var(--text-primary); font-size: 9px; }
.calendar-date-head small { min-width: 0; overflow: hidden; color: var(--text-muted); font-size: 7px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.calendar-day.holiday .calendar-date-head b, .calendar-day.holiday .calendar-date-head small { color: #ff818b; }
.calendar-day.today .calendar-date-head b { color: #fff; background: var(--brand-primary); }
.calendar-day.today.holiday .calendar-date-head b { background: var(--danger); }
.calendar-day-events { min-width: 0; display: grid; gap: 2px; margin-top: 3px; }
.calendar-event { min-width: 0; overflow: hidden; padding: 2px 4px; border: 1px solid rgba(83, 149, 255, .12); border-radius: 4px; color: #8fc3ff; background: var(--brand-soft); font-size: 7px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event.warning { color: #f8c76d; background: var(--warning-soft); }
.calendar-event.purple { color: #c2a9ff; background: var(--purple-soft); }
.calendar-event.danger { color: #ff929b; background: var(--danger-soft); }
.calendar-event.primary { border-color: rgba(83, 149, 255, .16); }
.calendar-more { overflow: hidden; color: var(--text-muted); font-size: 7px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.calendar-agenda { min-width: 0; display: flex; align-self: stretch; flex-direction: column; overflow: hidden; padding: 9px; }
.calendar-agenda > .card-head { flex: 0 0 auto; margin-bottom: 5px; padding-bottom: 6px; border-bottom: 1px solid var(--border-secondary); }
.calendar-agenda-scroll { min-height: 0; flex: 1 1 auto; overflow-x: hidden; overflow-y: auto; padding: 2px 3px 0 0; scrollbar-width: thin; scrollbar-color: var(--surface-tertiary) transparent; }
.calendar-agenda .timeline { padding-left: 18px; }
.calendar-agenda .timeline::before { left: 5px; }
.calendar-agenda .timeline-item { padding: 0 0 7px 6px; }
.calendar-agenda .timeline-dot { left: -17px; width: 9px; height: 9px; border-width: 2px; }
.calendar-agenda .timeline-item b { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-agenda .timeline-item > span:last-child { display: -webkit-box; margin-top: 1px; overflow: hidden; font-size: 8px; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.calendar-agenda .timeline-item.warning .timeline-dot { background: var(--warning); box-shadow: 0 0 0 2px var(--warning-soft); }
.calendar-agenda .timeline-item.purple .timeline-dot { background: var(--purple); box-shadow: 0 0 0 2px var(--purple-soft); }
.calendar-agenda .timeline-item.danger .timeline-dot { background: var(--danger); box-shadow: 0 0 0 2px var(--danger-soft); }
.calendar-agenda .form-section { margin: 7px 0 2px; padding-bottom: 4px; font-size: 9px; }
.calendar-agenda .rule-row { padding: 4px 0; }
.calendar-agenda .rule-row span, .calendar-agenda .rule-row b { font-size: 9px; }
.calendar-agenda .rule-row small { display: block; margin-top: 1px; font-size: 8px; }
.calendar-agenda .empty-state { min-height: 84px; padding: 10px; }
.calendar-agenda .empty-state.compact { min-height: 52px; }
.calendar-legend { flex: 0 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border-primary); }
.calendar-legend span { display: inline-flex; align-items: center; gap: 4px; padding: 2px 5px; border-radius: 999px; color: var(--text-secondary); background: var(--surface-secondary); font-size: 7px; font-weight: 700; }
.calendar-legend span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.calendar-legend .primary { color: #8fc3ff; background: var(--brand-soft); }
.calendar-legend .warning { color: #f8c76d; background: var(--warning-soft); }
.calendar-legend .purple { color: #c2a9ff; background: var(--purple-soft); }
.calendar-legend .saturday { color: #b9a8ff; background: rgba(139, 99, 246, .1); }
.calendar-legend .danger { color: #ff929b; background: var(--danger-soft); }

.compact-record-list { display: none; margin-top: 10px; padding: 0; overflow: hidden; }
.compact-record-list .card-head { margin: 0; padding: 8px 9px; border-bottom: 1px solid var(--border-primary); }
.compact-record-stack { display: grid; }
.compact-record-item { min-width: 0; display: grid; gap: 6px; padding: 8px 9px; border-bottom: 1px solid var(--border-secondary); }
.compact-record-item:last-child { border-bottom: 0; }
.compact-record-top, .compact-record-main, .compact-record-meta { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.compact-record-top { color: var(--text-muted); font-size: 9px; }
.compact-record-main > div { min-width: 0; display: grid; gap: 2px; }
.compact-record-main strong, .compact-record-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-record-main strong { font-size: 11px; }
.compact-record-main span { color: var(--text-secondary); font-size: 9px; }
.compact-record-main > b { flex: 0 0 auto; font-size: 11px; }
.compact-record-meta { justify-content: flex-start; color: var(--text-secondary); font-size: 9px; }
.compact-record-meta > span { min-width: 0; display: inline-flex; align-items: center; gap: 4px; }
.compact-record-meta svg { width: 12px; height: 12px; }
.compact-record-actions { display: flex; justify-content: flex-end; gap: 5px; }
.compact-record-note { margin: 0; font-size: 9px; }
.compact-record-empty { min-height: 82px; display: grid; place-items: center; align-content: center; gap: 4px; padding: 12px; color: var(--text-secondary); text-align: center; }
.compact-record-empty svg { width: 22px; height: 22px; color: #72afff; }
.compact-record-empty b { color: var(--text-primary); font-size: 11px; }
.compact-record-empty span { font-size: 9px; }
.compact-record-inline { margin: 0; border-top: 1px solid var(--border-primary); }
.search-result-item span { min-width: 0; }
.search-result-item strong, .search-result-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-item strong { color: var(--text-primary); font-size: 11px; }
.search-result-item small { margin-top: 2px; color: var(--text-muted); font-size: 9px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Print */
.print-only { display: none; }
@media print {
  @page { margin: 13mm; }
  :root { color-scheme: light; }
  body { color: #111827; background: #fff; }
  .sidebar, .topbar, .mobile-bottom-nav, .no-print, .toast-root, .network-status { display: none !important; }
  .main-shell { margin: 0 !important; }
  .page-outlet { max-width: none; padding: 0; }
  .card, .salary-slip { color: #111827; border-color: #d8dee8; background: #fff; box-shadow: none; }
  .salary-line span, .table-secondary, .card-head p { color: #596273 !important; }
  .table-wrap { overflow: visible; }
  table { min-width: 0; color: #111827; }
  th { color: #374151; background: #f3f4f6; }
  td { color: #374151; border-color: #e5e7eb; }
  .print-only { display: block; }
}

/* Tablet */
@media (max-width: 1180px) {
  :root { --sidebar-width: 205px; }
  .topbar { grid-template-columns: minmax(190px, .7fr) minmax(220px, 1fr) minmax(190px, .7fr); gap: 10px; }
  .grid-5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ops-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-layout { grid-template-columns: minmax(0, 1.45fr) minmax(250px, .75fr); }
  .login-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-panel { width: 410px; margin-right: 24px; }
  .report-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  .management-kpi-grid .responsive-kpi { display: flex; }
}

@media (max-width: 1023px) {
  .sidebar { width: min(280px, 84vw); transform: translateX(-101%); box-shadow: var(--shadow-floating); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: grid; }
  .sidebar-collapse { display: none; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: calc(var(--z-sidebar) - 1); display: block; visibility: hidden; background: rgba(1, 5, 11, .68); opacity: 0; transition: opacity var(--duration-base), visibility var(--duration-base); }
  .sidebar-backdrop.show { visibility: visible; opacity: 1; }
  .main-shell, .app-view.sidebar-collapsed .main-shell { margin-left: 0; }
  .menu-button { display: grid; }
  .topbar { grid-template-columns: minmax(180px, .7fr) minmax(220px, 1fr) auto; }
  .profile-copy { display: none; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4:has(> .kpi-card), .grid-3:has(> .kpi-card) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .management-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .management-kpi-grid .responsive-kpi-1, .coin-kpi-extra { display: flex; }
  .management-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .management-dashboard-grid .attendance-chart-card { grid-column: 1 / -1; }
  .management-dashboard-grid .job-summary-card,
  .management-dashboard-grid .finance-today-card { grid-column: span 1; }
  .dashboard-bottom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-bottom-grid > * { grid-column: span 1 !important; }
  .ops-grid, .dashboard-layout { grid-template-columns: 1fr; }
  .next-step-grid, .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-brand { left: 32px; }
  .hero-copy { left: 32px; }
  .login-feature-grid { left: 24px; bottom: 22px; width: min(500px, calc(100% - 450px)); }
  .login-panel { width: 390px; margin-right: 16px; }
  .report-overview-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payroll-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payroll-detail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payroll-components-card { grid-column: 1 / -1; }
  .calendar-status-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .calendar-layout { grid-template-columns: 1fr; }
  .calendar-card { height: min(calc(var(--calendar-weeks) * 68px + 27px), 440px); min-height: 0; max-height: 440px; grid-template-rows: 27px minmax(0, 1fr); }
  .calendar-agenda { height: 320px; min-height: 0; max-height: 320px; }
}

/* Mobile */
@media (max-width: 639px) {
  :root {
    --card-padding: var(--card-padding-mobile);
    --topbar-height: 52px;
    --button-height: 34px;
  }
  body { font-size: 12px; }
  .login-view { width: 100%; min-height: 100svh; display: block; padding: 0; overflow-x: clip; overflow-y: auto; background: #030812; }
  .login-visual { position: absolute; inset: 0 0 auto; width: 100%; height: 224px; min-height: 0; border: 0; border-radius: 0; background-position: center 68%; background-size: cover; pointer-events: none; }
  .login-visual-overlay { background: linear-gradient(180deg, rgba(3,8,18,.36), rgba(3,8,18,.52) 45%, #030812 100%); }
  .login-brand, .login-feature-grid { display: none; }
  .hero-copy { top: 30px; right: 16px; bottom: auto; left: 16px; text-align: center; }
  .hero-copy h1 { margin: 0; font-size: clamp(17px, 5vw, 20px); text-wrap: balance; }
  .hero-copy p { display: none; }
  .login-panel { position: relative; z-index: 2; width: 100%; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; margin: 0; padding: 126px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); border: 0; border-radius: 0; background: transparent; }
  .login-card { flex: 0 0 auto; width: min(100%, 420px); min-width: 0; max-width: none; margin: 0; padding: 15px; overflow: visible; border-radius: var(--radius-lg); background: rgba(8, 18, 31, .97); box-shadow: 0 18px 52px rgba(0, 0, 0, .4); backdrop-filter: blur(15px); }
  .mobile-brand { display: flex; margin-bottom: 12px; }
  .mobile-brand .brand-logo { width: 38px; height: 38px; }
  .mobile-brand strong { font-size: 13px; }
  .login-portal-heading { grid-template-columns: 38px minmax(0, 1fr); gap: 9px; margin-bottom: 10px; }
  .login-portal-icon { width: 38px; height: 38px; }
  .login-heading { min-width: 0; }
  .login-heading h2 { margin-top: 3px; font-size: clamp(18px, 5.2vw, 20px); text-wrap: balance; }
  .login-subtitle { overflow-wrap: anywhere; }
  .field-label { margin-top: 10px; }
  .input-shell { width: 100%; min-width: 0; }
  .login-row { min-width: 0; flex-wrap: wrap; gap: 8px 12px; margin: 11px 0 13px; }
  .login-row > * { min-width: 0; }
  .login-row .text-button { flex: 0 0 auto; max-width: 100%; white-space: normal; text-align: right; overflow-wrap: anywhere; }
  .form-message { min-height: 17px; margin-top: 7px; overflow-wrap: anywhere; }
  .login-footer { width: 100%; margin: 0 0 2px; padding: 0 8px; color: rgba(211,223,238,.5); text-align: center; overflow-wrap: anywhere; }

  .topbar { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 0 10px; }
  .topbar-title h1 { font-size: 14px; }
  .page-eyebrow { max-width: 170px; font-size: 9px; }
  .global-search-wrap { display: none; }
  .topbar-actions > .soft-button, .topbar-actions > [data-action="toggle-theme"] { display: none; }
  .topbar-profile { padding: 2px; }
  .topbar-profile .avatar { width: 30px; height: 30px; }
  .app-view[data-role="technician"] .topbar { display: none; }
  .app-view[data-role="technician"] .page-outlet { padding-top: var(--page-padding-mobile); }
  .page-outlet { padding: var(--page-padding-mobile) var(--page-padding-mobile) calc(var(--mobile-nav-height) + 14px); }
  .page-head { min-height: 40px; align-items: center; margin-bottom: 8px; padding: 7px 8px; }
  .page-head h2 { font-size: 16px; }
  .page-head p { display: none; }
  .page-actions { width: auto; flex-wrap: nowrap; }
  .page-actions .primary-button, .page-actions .soft-button, .page-actions .outline-button, .page-actions .secondary-button { min-width: 34px; min-height: 30px; padding: 0 7px; font-size: 9px; white-space: nowrap; }
  .page-head:not(:has([data-action="calendar-prev"])):has(.page-actions > :nth-child(3)) { align-items: stretch; flex-wrap: wrap; }
  .page-head:not(:has([data-action="calendar-prev"])):has(.page-actions > :nth-child(3)) > div:first-child { width: 100%; }
  .page-head:not(:has([data-action="calendar-prev"])):has(.page-actions > :nth-child(3)) .page-actions { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .page-head:not(:has([data-action="calendar-prev"])):has(.page-actions > :nth-child(3)) .page-actions > * { min-width: 0; width: 100%; padding-right: 4px; padding-left: 4px; }

  .mobile-bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 45; height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border-primary); background: rgba(5, 12, 22, .96); box-shadow: 0 -10px 28px rgba(0, 0, 0, .26); backdrop-filter: blur(14px); }
  .mobile-nav-item { min-width: 0; height: 48px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; padding: 2px; border: 0; border-radius: var(--radius-sm); color: #718198; background: transparent; font-size: 9px; }
  .mobile-nav-item svg { width: 16px; height: 16px; }
  .mobile-nav-item.active { color: #6dadff; background: rgba(33, 103, 242, .1); }
  .toast-root { right: 10px; bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 10px); width: calc(100vw - 20px); }

  .card { border-radius: 8px; }
  .grid { gap: var(--grid-gap-mobile); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4, .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .grid-3:has(> .kpi-card) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .grid-4:not(.coin-kpi-grid):has(> .kpi-card) > .kpi-card:nth-child(4) { display: none; }
  .grid-4 > .card:not(.kpi-card), .grid-5 > .card:not(.kpi-card) { grid-column: span 3; }
  .span-2, .span-3 { grid-column: 1 / -1; }
  .kpi-card { min-height: 72px; padding: 7px; }
  .kpi-top { padding-right: 28px; }
  .kpi-icon { top: 7px; right: 7px; width: 24px; height: 24px; border-radius: 7px; }
  .kpi-icon svg { width: 13px; height: 13px; }
  .kpi-trend { display: none; }
  .kpi-value { margin-top: 4px; font-size: 15px; }
  .kpi-value.value-long, .kpi-value.value-xlong { font-size: 13px; white-space: nowrap; }
  .kpi-value-full.has-compact { display: none; }
  .kpi-value-compact.has-compact { display: inline; }
  .kpi-label { display: -webkit-box; overflow: hidden; font-size: 9px; line-height: 1.15; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .hero-card { padding: 9px; }
  .hero-split { align-items: stretch; flex-direction: column; gap: 12px; }
  .hero-split h2 { font-size: 17px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-actions > * { width: 100%; }
  .hero-badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-badge { min-width: 0; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .welcome-line .avatar { width: 38px; height: 38px; }
  .ops-list, .stage-stack, .next-step-grid, .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .next-step, .quick-action { min-height: 56px; }
  .next-panel { display: none; }
  .dashboard-layout { margin-top: 8px; }
  .dashboard-layout > .table-card { order: 1; }
  .finance-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-shell, .chart-bars { min-height: 160px; height: 160px; }
  .chart-shell canvas { height: 160px !important; }

  .table-toolbar { align-items: flex-start; flex-direction: column; padding: 7px 8px; }
  .table-actions { width: 100%; justify-content: stretch; }
  .table-actions > *, .search-input { flex: 1; width: 100%; }
  .jobs-table-toolbar .table-actions { display: grid; grid-template-columns: 1fr; }
  .job-bulk-actions { width: 100%; display: grid; grid-template-columns: minmax(86px, .65fr) minmax(150px, 1fr); }
  .job-bulk-actions > * { min-width: 0; width: 100%; }
  .job-select-column { position: sticky; left: 0; z-index: 1; width: 36px; min-width: 36px; background: var(--surface-primary); }
  #jobsTable tbody tr.is-selected .job-select-column { background: color-mix(in srgb, var(--brand-primary) 11%, var(--surface-primary)); }
  .table-wrap { margin: 0; padding-bottom: 2px; }
  table { min-width: 720px; }
  th, td { padding-right: 10px; padding-left: 10px; }
  .mobile-card-table table, .mobile-card-table tbody, .mobile-card-table tr, .mobile-card-table td { display: block; min-width: 0; width: 100%; }
  .mobile-card-table thead { display: none; }
  .mobile-card-table tbody { display: grid; gap: 6px; padding: 6px; }
  .mobile-card-table tr { padding: 8px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); }
  .mobile-card-table td { padding: 4px 0; border: 0; }

  .attendance-hero { grid-template-columns: 1fr; }
  .live-clock { font-size: 26px; }
  .clock-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .clock-meta div { padding: 7px; }
  .clock-meta b { font-size: 11px; }
  .clock-meta span { font-size: 9px; }
  .attendance-action { min-height: 145px; }
  .map-preview { min-height: 180px; }
  .camera-frame { min-height: 220px; }
  .detail-grid, .job-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job-board { grid-template-columns: repeat(4, 260px); }
  .job-photo-grid { grid-template-columns: 1fr; }

  .form-grid { grid-template-columns: 1fr; gap: 8px; }
  .settings-view[data-settings-view="whatsapp"] .notification-config-grid,
  .settings-view[data-settings-view="whatsapp"] .notification-channel-grid { grid-template-columns: 1fr; }
  .settings-view .form-grid,
  #settingsForm > .grid:first-child > .card.span-2 .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .settings-view .form-group.full-span, .settings-view .form-grid > .form-section, .settings-view .form-grid > .alert { grid-column: 1 / -1; }
  .settings-view .card-head p { display: none; }
  .settings-view .form-group label { margin-bottom: 3px; font-size: 9px; line-height: 1.2; }
  .settings-view textarea.form-control { min-height: 64px; }
  .settings-view[data-settings-view="payroll"] [data-settings-group~="payroll"] .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-view[data-settings-view="templates"] [data-settings-group~="templates"] > .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings-view[data-settings-view="templates"] .notification-template-input { min-height: 66px !important; padding: 6px; font-size: 9px; }
  .form-group.full-span, .form-grid > .form-section, .form-grid > .alert { grid-column: 1 / -1; }
  .form-footer { position: sticky; bottom: 0; z-index: 2; margin-right: -8px; margin-bottom: -8px; margin-left: -8px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--surface-primary); }
  .file-drop { min-height: 88px; }
  .company-logo-control { grid-template-columns: 96px minmax(0, 1fr); gap: 7px; padding: 7px; }
  .company-logo-preview { min-height: 86px; grid-template-columns: 1fr; justify-items: center; padding: 5px; }
  .company-logo-preview-copy { display: none; }
  .company-logo-image { width: 68px; height: 68px; }
  .company-logo-buttons > * { flex: 1; min-width: 0; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-bar .form-control { width: 100%; }
  .reminder-grid, .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log-line { grid-template-columns: 1fr; gap: 3px; }

  .modal-backdrop { align-items: end; padding: 0; }
  .modal, .modal-sm, .modal-lg { width: 100%; max-height: calc(100dvh - 14px); border-right: 0; border-bottom: 0; border-left: 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; animation: sheetIn var(--duration-base) ease; }
  .modal-head { padding: 9px 10px; }
  .modal-body { padding: 10px 8px; }
  .modal-footer { padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .modal-footer > button { flex: 1; }
  @keyframes sheetIn { from { opacity: 0; transform: translateY(35px); } }

  .profile-menu { top: 52px; right: 8px; }
  .management-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .admin-queue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .queue-card { min-height: 66px; padding: 7px 36px 7px 7px; }
  .queue-card > span { top: 7px; right: 7px; width: 25px; height: 25px; }
  .queue-card > svg { display: none; }
  .management-dashboard-grid { grid-template-columns: 1fr; }
  .management-dashboard-grid > * { grid-column: 1 / -1 !important; }
  .dashboard-bottom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-bottom-grid > * { grid-column: span 1 !important; }
  .dashboard-bottom-grid > :nth-child(3) { grid-column: 1 / -1 !important; }
  .dashboard-bottom-grid > :nth-child(4) { grid-column: 1 / -1 !important; }
  .management-dashboard-grid .attendance-chart-card { min-height: 196px; }
  .job-chart-layout { grid-template-columns: minmax(130px, .8fr) minmax(110px, 1fr); }
  .dashboard-bottom-grid { gap: 8px; }
  .dashboard-jobs-table { margin-top: 8px; }
  .technician-dashboard { max-width: 100%; display: block; }
  .technician-greeting { margin-bottom: 8px; }
  .technician-greeting h2 { font-size: 17px; }
  .tech-attendance-card, .today-jobs-card, .tech-mini-grid, .tech-daily-grid { max-width: none; }
  .today-jobs-card, .tech-mini-grid, .tech-daily-grid { margin-top: 8px; }
  .tech-attendance-card .card-head p, .today-jobs-card .card-head p { display: none; }
  .tech-attendance-card .primary-button, .tech-attendance-card .outline-button { min-height: 38px; }
  .tech-mobile-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
  .tech-mobile-actions button { min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 5px; border: 1px solid var(--border-primary); border-radius: 8px; color: var(--text-secondary); background: var(--surface-secondary); font-size: 10px; }
  .tech-mobile-actions button:hover { color: #fff; border-color: rgba(74, 141, 255, .4); background: var(--surface-hover); }
  .tech-mobile-actions svg { width: 14px; height: 14px; color: #72afff; }
  .tech-mobile-activity { display: block; margin-top: 8px; }
  .tech-mobile-activity .card-head { margin-bottom: 3px; }
  .tech-mobile-activity .activity-item { padding: 4px 0; }
  .tech-desktop-grid { display: none; }
  .technician-job-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .technician-job-stats .kpi-card:nth-child(4) { display: none; }
  .technician-finance-kpis .kpi-card:nth-child(4), .overtime-kpi-grid .kpi-card:nth-child(4) { display: none; }
  .desktop-table-mobile-hidden,
  .page-outlet > .card:has(#technicianFinanceTable),
  .page-outlet > .card:has(#financeTable) { display: none; }
  .page-outlet .card:has(#adminAttendanceTable) .table-wrap { display: none; }
  .compact-record-list { display: block; }
  .compact-record-item { gap: 4px; padding: 5px 7px; }
  .compact-record-actions { gap: 4px; }
  .compact-record-actions button { min-height: 30px; }
  .coin-rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coin-rule-grid .rule-row { align-items: flex-start; gap: 5px; padding: 4px 0; }
  .coin-rule-grid .rule-row span, .coin-rule-grid .rule-row b { font-size: 9px; line-height: 1.25; }
  #coinTable tbody td:nth-child(4) > .table-secondary { max-width: 150px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  #coinTable tbody td:nth-child(4) > .table-secondary br { display: none; }
  #coinTable tbody td { padding-top: 5px; padding-bottom: 5px; }
  .app-view[data-role="technician"] #coinTable tbody td:nth-child(3) > .table-secondary { max-width: 150px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .app-view[data-role="technician"] #coinTable tbody td:nth-child(3) > .table-secondary br { display: none; }
  .template-card { min-height: 58px; padding: 7px; }
  .template-card p { display: -webkit-box; overflow: hidden; font-size: 8px; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .settings-view[data-settings-view="payroll"] [data-settings-group~="payroll"] .grid { gap: 5px; }
  .payroll-monthly-grid, .payroll-technician-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .payroll-technician-grid { grid-template-columns: 1fr; gap: 8px; }
  .payroll-section-head { align-items: center; }
  .payroll-section-head p { display: none; }
  .payroll-total-row { align-items: flex-end; }
  .payroll-total-row b { max-width: 180px; }
  .payroll-technician-card { padding: 10px; }
  .technician-job-list-card { padding: 10px; }
  .mobile-job-filter { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, auto); }
  .mobile-job-filter .form-control { min-width: 0; }
  .technician-job-item { grid-template-columns: 3px minmax(0, 1fr) 82px; padding: 7px; }
  .job-item-main strong { font-size: 12px; }
  .job-item-side { min-width: 80px; }
  .job-detail-hero { padding: 11px; }
  .job-detail-hero h2 { font-size: 17px; }
  .job-detail-tabs { margin-right: -8px; margin-left: -8px; border-right: 0; border-left: 0; border-radius: 0; }
  .job-detail-tabs .tab-button { flex-direction: column; gap: 2px; min-width: 70px; height: 48px; padding: 3px 8px; font-size: 9px; }
  .job-information-layout { grid-template-columns: 1fr; }
  .job-information-layout .full-panel { grid-column: auto; }
  .job-photo-grid { grid-template-columns: 1fr; }
  .attendance-capture-grid { grid-template-columns: 1fr; }
  .attendance-modal-map { min-height: 190px; }
  .attendance-technician-map { height: 150px; }
  .photo-upload-stage { min-height: 280px; }
  .photo-upload-preview, .photo-upload-preview > img { min-height: 245px; }
  .photo-upload-tabs .tab-button { flex: 1; }
  .gps-status-panel { grid-template-columns: 1fr 1fr; padding: 9px; }
  .attendance-mobile-page .map-preview { min-height: 180px; }
  .attendance-mobile-page .attendance-history-card { margin-top: 9px; }
  .attendance-mobile-page { padding-bottom: 54px; }
  .attendance-mobile-page .attendance-confirm-card .primary-button,
  .attendance-mobile-page .attendance-confirm-card .outline-button { position: fixed; right: 8px; bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 6px); left: 8px; z-index: 44; min-height: 38px; box-shadow: 0 9px 24px rgba(0, 0, 0, .42); }
  .page-head:has([data-action="calendar-prev"]) { gap: 5px; }
  .page-head:has([data-action="calendar-prev"]) > div:first-child { min-width: 0; }
  .page-head:has([data-action="calendar-prev"]) h2 { font-size: 14px; }
  .page-head:has([data-action="calendar-prev"]) p { font-size: 8px; }
  .page-head:has([data-action="calendar-prev"]) .page-actions { flex: 0 0 auto; gap: 3px; }
  .page-head:has([data-action="calendar-prev"]) .soft-button { min-width: 29px; min-height: 30px; padding: 0 6px; font-size: 9px; }
  .calendar-layout { grid-template-columns: 1fr; gap: 6px; }
  .calendar-status-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-bottom: 6px; }
  .calendar-status-bar > span { min-height: 42px; grid-template-columns: 22px minmax(0, 1fr); gap: 0 4px; padding: 5px; }
  .calendar-status-bar svg { width: 12px; height: 12px; padding: 4px; border-radius: 6px; }
  .calendar-status-bar b { font-size: 9px; }
  .calendar-status-bar small { font-size: 7px; }
  .calendar-card { height: calc(var(--calendar-weeks) * 47px + 25px); min-height: 0; max-height: none; grid-template-rows: 25px minmax(0, 1fr); overflow: hidden; }
  .calendar-agenda { height: 275px; min-height: 0; max-height: 275px; padding: 7px; }
  .calendar-weekdays, .calendar-grid { min-width: 0; width: 100%; }
  .calendar-weekdays span { padding: 3px 1px; font-size: 8px; }
  .calendar-day { min-height: 0; padding: 3px; }
  .calendar-date-head { height: 18px; }
  .calendar-date-head b { width: 18px; height: 18px; font-size: 8px; }
  .calendar-date-head small { display: none; }
  .calendar-day-events { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin-top: 2px; }
  .calendar-event { width: 7px; height: 7px; flex: 0 0 7px; padding: 0; border: 0; border-radius: 50%; color: transparent; background: var(--brand-primary); font-size: 0; }
  .calendar-event.primary { background: var(--brand-primary); }
  .calendar-event.warning { background: var(--warning); }
  .calendar-event.purple { background: var(--purple); }
  .calendar-event.danger { background: var(--danger); }
  .calendar-more { max-width: calc(100% - 18px); font-size: 6px; }
  .calendar-agenda > .card-head p { display: none; }
  .calendar-agenda .timeline-item { padding-bottom: 5px; }
  .calendar-legend { margin-top: 4px; padding-top: 4px; }
  .calendar-legend span { padding: 2px 4px; font-size: 6px; }
  .technician-detail-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .technician-detail-sections { grid-template-columns: 1fr; }
  .report-tabs .tab-button { flex: 1; justify-content: center; min-width: 74px; }
  .report-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-filter-card { padding: 10px; }
  .report-chart-shell, .report-chart-shell canvas { min-height: 160px; height: 160px !important; }
  .payroll-detail { grid-template-columns: 1fr; }
  .payroll-detail-aside { display: contents; }
  .payroll-net-total strong { font-size: 17px; }
  .notification-settings-card > .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .whatsapp-gateway-panel { padding: 8px; }
  .gateway-heading { align-items: flex-start; gap: 7px; }
  .gateway-status { max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gateway-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gateway-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gateway-actions button { min-width: 0; padding-right: 6px; padding-left: 6px; }
  .gateway-empty { align-items: flex-start; flex-wrap: wrap; }
  .gateway-empty button { width: 100%; }
  .form-panel { padding: 10px; }
}

@media (max-width: 389px) {
  html, body { min-width: 0; }
  .login-panel { padding-top: 116px; padding-right: 8px; padding-left: 8px; }
  .login-visual { height: 208px; }
  .hero-copy { top: 24px; }
  .login-card { padding: 12px; }
  .mobile-brand { margin-bottom: 10px; }
  .login-portal-heading { margin-bottom: 8px; }
  .grid-4, .grid-5 { gap: 5px; }
  .kpi-card { min-height: 70px; padding: 6px; }
  .kpi-top { padding-right: 26px; }
  .kpi-icon { top: 6px; right: 6px; width: 22px; height: 22px; }
  .kpi-value { font-size: 14px; }
  .kpi-label { font-size: 9px; }
  .page-outlet { padding-right: 8px; padding-left: 8px; }
  .page-head { gap: 8px; }
  .page-head p { max-width: 210px; }
  .hero-badges { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full-span { grid-column: auto; }
  .settings-view[data-settings-view="templates"] [data-settings-group~="templates"] > .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-filter-grid, .payroll-form-grid { grid-template-columns: 1fr; }
  .payroll-net-total { align-items: flex-start; flex-direction: column; }
  .payroll-net-total strong { text-align: left; }
  .schedule-fields > div { grid-template-columns: 1fr; }
  .schedule-fields > div > span { display: none; }
}

@media (min-width: 1440px) {
  :root { --sidebar-width: 205px; --card-padding: var(--card-padding-desktop); }
  .page-outlet { padding: var(--page-padding-desktop); }
  .management-kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .kpi-card { min-height: 82px; }
}

@media (min-width: 1800px) {
  .management-kpi-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .management-kpi-grid .responsive-kpi-1 { display: flex; }
}

/* WhatsApp gateway session card */
.whatsapp-settings-shell { min-width: 0; }
.whatsapp-config-hidden { display: none !important; }
.whatsapp-gateway-panel { min-width: 0; margin-top: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.wa-gateway-layout { min-width: 0; display: grid; grid-template-columns: minmax(330px, 470px) minmax(0, 1fr); align-items: start; gap: 10px; }
.wa-session-card,
.wa-delivery-panel { min-width: 0; overflow: hidden; border: 1px solid #263852; border-radius: 12px; background: #111d30; box-shadow: 0 10px 26px rgba(0, 0, 0, .18); }
.wa-session-card { display: flex; flex-direction: column; padding: 14px; }
.wa-session-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wa-session-head > strong { min-width: 0; overflow: hidden; color: #f7faff; font-size: 15px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.wa-session-power { flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center; color: #19d77b; }
.wa-session-power svg { width: 19px; height: 19px; stroke-width: 2.4; }
.wa-session-power.warning { color: #f5aa23; }
.wa-session-power.danger { color: #f0525f; }
.wa-session-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.wa-provider-badge,
.wa-connection-badge { min-height: 25px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 5px; font-size: 11px; line-height: 1; font-weight: 700; }
.wa-provider-badge { color: #6d73ff; background: rgba(64, 68, 202, .24); }
.wa-connection-badge { color: #8798af; background: rgba(108, 126, 151, .1); }
.wa-connection-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.wa-connection-badge.success { color: #19c875; background: rgba(19, 158, 96, .15); }
.wa-connection-badge.warning { color: #f3ad36; background: rgba(191, 123, 12, .15); }
.wa-connection-badge.danger { color: #ff707b; background: rgba(196, 55, 67, .15); }
.wa-session-details { display: grid; gap: 6px; margin: 12px 0 10px; }
.wa-session-details > div { min-width: 0; display: flex; align-items: baseline; gap: 4px; }
.wa-session-details > div:first-child { display: grid; gap: 1px; }
.wa-session-details dt,
.wa-session-details dd { min-width: 0; margin: 0; font-size: 12px; line-height: 1.25; }
.wa-session-details dt { color: #8cadd9; font-weight: 500; }
.wa-session-details dd { overflow: hidden; color: #f2f6fc; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.wa-session-details dd.success { color: #1bce7a; }
.wa-session-card .gateway-notice { margin: 0 0 8px; }
.wa-session-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 38px; gap: 7px; margin-top: auto; padding-top: 4px; }
.wa-session-button { min-width: 0; min-height: 37px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 9px; border: 1px solid transparent; border-radius: 6px; color: #f8fbff; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; transition: filter var(--duration-fast), transform var(--duration-fast), border-color var(--duration-fast); }
.wa-session-button:hover { filter: brightness(1.09); transform: translateY(-1px); }
.wa-session-button:focus-visible { outline: 2px solid #77a9ff; outline-offset: 2px; }
.wa-session-button svg { flex: 0 0 auto; width: 14px; height: 14px; }
.wa-session-button.qr { background: #405bf2; }
.wa-session-button.edit { border-color: rgba(139, 161, 196, .08); color: #e0e7f2; background: #1c2b47; }
.wa-session-button.delete { padding: 0; background: #f04444; }
.wa-session-button.restart { grid-column: 1 / -1; background: #f18b00; }
.wa-delivery-panel { padding: 12px; }
.wa-delivery-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wa-delivery-head > div:first-child { min-width: 0; }
.wa-delivery-head strong,
.wa-delivery-head small { display: block; }
.wa-delivery-head strong { font-size: 12px; }
.wa-delivery-head small { margin-top: 2px; color: var(--text-muted); font-size: 9px; }
.wa-delivery-head-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; }
.wa-delivery-head-actions .icon-button { width: 30px; height: 30px; }
.wa-delivery-head-actions .soft-button { min-height: 30px; }
.wa-delivery-metrics { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 10px; padding: 8px 0; border-top: 1px solid var(--border-secondary); border-bottom: 1px solid var(--border-secondary); }
.wa-delivery-metrics > div { min-width: 0; padding: 0 8px; }
.wa-delivery-metrics > div:first-child { padding-left: 0; }
.wa-delivery-metrics > div + div { border-left: 1px solid var(--border-secondary); }
.wa-delivery-metrics span,
.wa-delivery-metrics b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-delivery-metrics span { color: var(--text-muted); font-size: 9px; }
.wa-delivery-metrics b { margin-top: 2px; font-size: 11px; }
.wa-delivery-metrics b.success { color: #28c76f; }
.wa-delivery-metrics b.danger { color: #ff6c77; }
.wa-channel-toggle { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 7px 8px; border: 1px solid var(--border-secondary); border-radius: 7px; background: rgba(5, 13, 24, .28); cursor: pointer; }
.wa-channel-toggle > span:first-child { min-width: 0; }
.wa-channel-toggle strong,
.wa-channel-toggle small { display: block; }
.wa-channel-toggle strong { font-size: 10px; }
.wa-channel-toggle small { margin-top: 1px; color: var(--text-muted); font-size: 9px; }
.wa-delivery-panel .gateway-outbox { margin-top: 8px; padding-top: 0; border-top: 0; }
.wa-outbox-empty { min-height: 70px; display: grid; place-items: center; align-content: center; gap: 4px; color: var(--text-muted); font-size: 9px; }
.wa-outbox-empty svg { width: 20px; height: 20px; }
.whatsapp-gateway-panel > .gateway-loading,
.whatsapp-gateway-panel > .gateway-empty { min-height: 130px; padding: 14px; border: 1px solid #263852; border-radius: 12px; background: #111d30; }

/* WhatsApp provider console */
.wa-settings-console { min-width: 0; overflow: hidden; border-top: 1px solid var(--border-primary); }
.wa-settings-tabs { min-width: 0; display: flex; align-items: stretch; gap: 4px; overflow-x: auto; border-bottom: 1px solid #263852; scrollbar-width: thin; }
.wa-settings-tabs button { position: relative; flex: 0 0 auto; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border: 0; color: #91a6c4; background: transparent; font: inherit; font-size: 11px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.wa-settings-tabs button::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 2px; border-radius: 2px 2px 0 0; background: transparent; }
.wa-settings-tabs button:hover { color: #d8e6fb; background: rgba(47, 91, 170, .08); }
.wa-settings-tabs button.active { color: #5f79ff; }
.wa-settings-tabs button.active::after { background: #5268ff; }
.wa-settings-tabs svg { width: 15px; height: 15px; color: #2fd0ff; }
.wa-settings-tabs button.active svg { color: #5f79ff; }
.wa-settings-content { min-width: 0; padding-top: 12px; }
.wa-provider-view,
.wa-tab-panel { min-width: 0; display: grid; gap: 10px; }
.wa-provider-heading,
.wa-tab-panel > header { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wa-provider-heading > div,
.wa-tab-panel > header > div { min-width: 0; }
.wa-provider-heading h2,
.wa-tab-panel h2 { margin: 0; color: #f4f8ff; font-size: 18px; line-height: 1.2; }
.wa-provider-heading h2 { color: #67f1f4; }
.wa-provider-heading p,
.wa-tab-panel header p { margin: 3px 0 0; color: #8aa7d3; font-size: 10px; }
.wa-provider-heading .primary-button,
.wa-tab-panel > header .primary-button,
.wa-tab-panel > header .soft-button { flex: 0 0 auto; }
.wa-heading-actions { flex: 0 0 auto; display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.wa-heading-actions .soft-button.danger { color: #ff8a93; border-color: rgba(240, 68, 68, .28); background: rgba(240, 68, 68, .08); }
.wa-webhook-banner { min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid #263852; border-radius: 9px; background: #111d30; }
.wa-webhook-icon { width: 22px; height: 22px; display: grid; place-items: center; color: #5875ff; }
.wa-webhook-icon svg { width: 16px; height: 16px; }
.wa-webhook-banner > div { min-width: 0; }
.wa-webhook-banner strong,
.wa-webhook-banner small,
.wa-webhook-banner code { display: block; }
.wa-webhook-banner strong { color: #eef5ff; font-size: 11px; }
.wa-webhook-banner small { margin-top: 2px; color: #91aad0; font-size: 9px; }
.wa-webhook-banner code { margin-top: 7px; padding: 7px 9px; overflow: hidden; border-radius: 5px; color: #f4f8ff; background: #1a2946; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.wa-webhook-banner .primary-button { align-self: end; min-height: 32px; }
.wa-provider-grid { min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 470px)); align-items: stretch; gap: 10px; }
.wa-provider-grid .wa-session-card { width: 100%; min-height: 276px; }
.wa-provider-description { min-height: 28px; margin: -1px 0 8px; color: #8ea4c2; font-size: 9px; line-height: 1.45; }
.wa-provider-disabled { min-height: 25px; display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 5px; color: #98a8bc; background: rgba(100, 116, 139, .14); font-size: 10px; font-weight: 700; }
.wa-provider-role { min-height: 25px; display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid rgba(34, 207, 122, .2); border-radius: 5px; color: #65dda0; background: rgba(34, 207, 122, .08); font-size: 8px; font-weight: 800; letter-spacing: .04em; }
.wa-provider-empty { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 6px; padding: 16px; border: 1px dashed #2b405d; border-radius: 10px; color: #8197b5; background: rgba(17, 29, 48, .55); text-align: center; }
.wa-provider-empty svg { width: 28px; height: 28px; color: #4c6fff; }
.wa-provider-empty strong { color: #eef5ff; font-size: 12px; }
.wa-provider-empty span { max-width: 320px; font-size: 9px; }
.wa-provider-empty .primary-button { margin-top: 4px; }
.wa-provider-summary,
.wa-reminder-metrics { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.wa-provider-summary article,
.wa-reminder-metrics article { min-width: 0; padding: 9px 10px; border: 1px solid #263852; border-radius: 8px; background: #111d30; }
.wa-provider-summary span,
.wa-provider-summary b,
.wa-reminder-metrics span,
.wa-reminder-metrics b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-provider-summary span,
.wa-reminder-metrics span { color: #8198b8; font-size: 9px; }
.wa-provider-summary b,
.wa-reminder-metrics b { margin-top: 2px; color: #eef5ff; font-size: 14px; }
.wa-provider-summary b.success,
.wa-reminder-metrics b.success { color: #22cf7a; }
.wa-provider-summary b.danger,
.wa-reminder-metrics b.danger { color: #ff6b76; }
.wa-priority-warning,
.wa-readiness-banner { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid rgba(245, 170, 35, .28); border-radius: 8px; color: #f4c46b; background: rgba(245, 170, 35, .09); font-size: 9px; line-height: 1.45; }
.wa-priority-warning svg,
.wa-readiness-banner svg { flex: 0 0 auto; width: 16px; height: 16px; }
.wa-readiness-banner.ready { border-color: rgba(34, 207, 122, .25); color: #9ce1bd; background: rgba(34, 207, 122, .08); }
.wa-provider-view > .wa-delivery-panel { width: min(100%, 960px); }
.wa-tab-panel { padding: 1px 0; }
.wa-template-help { display: flex; align-items: flex-start; gap: 7px; padding: 8px 10px; border: 1px solid rgba(47, 208, 255, .2); border-radius: 8px; color: #9eb7d8; background: rgba(47, 208, 255, .06); font-size: 9px; line-height: 1.45; }
.wa-template-help svg { flex: 0 0 auto; width: 15px; height: 15px; color: #2fd0ff; }
.wa-template-grid { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wa-template-grid article { min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding: 10px; border: 1px solid #263852; border-radius: 9px; background: #111d30; }
.wa-template-grid article > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: #40d7ff; background: rgba(28, 184, 224, .12); }
.wa-template-grid svg { width: 15px; height: 15px; }
.wa-template-grid strong { display: block; color: #edf4ff; font-size: 10px; }
.wa-template-status { display: block; margin-top: 2px; font-size: 8px; }
.wa-template-status.success { color: #55d995; }
.wa-template-status.danger { color: #ff7d87; }
.wa-template-grid p { margin: 3px 0 0; color: #859bb9; font-size: 9px; line-height: 1.4; }
.wa-inline-action { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 4px 7px; border: 1px solid rgba(82, 104, 255, .3); border-radius: 5px; color: #8da0ff; background: rgba(82, 104, 255, .08); font: inherit; font-size: 8px; font-weight: 700; cursor: pointer; }
.wa-inline-action:hover { color: #c5ceff; background: rgba(82, 104, 255, .15); }
.wa-inline-action svg { width: 11px; height: 11px; }
.wa-message-preview { min-width: 0; margin-top: 10px; padding: 10px; border: 1px solid #2b405d; border-radius: 8px; background: #091421; }
.wa-message-preview > span { display: block; margin-bottom: 6px; color: #8aa7d3; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.wa-message-preview pre { max-height: 240px; margin: 0; overflow: auto; color: #e7f0fb; font: inherit; font-size: 10px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.wa-placeholder-buttons { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.wa-placeholder-buttons button { padding: 4px 6px; border: 1px solid rgba(47, 208, 255, .22); border-radius: 5px; color: #75dcf6; background: rgba(47, 208, 255, .06); font: 8px ui-monospace, SFMono-Regular, Consolas, monospace; cursor: pointer; }
.wa-placeholder-buttons button:hover { background: rgba(47, 208, 255, .13); }
.wa-template-validation { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 7px 8px; border: 1px solid rgba(34, 207, 122, .2); border-radius: 6px; color: #82ddb0; background: rgba(34, 207, 122, .06); font-size: 8px; }
.wa-template-validation.danger { border-color: rgba(240, 68, 68, .24); color: #ff8d95; background: rgba(240, 68, 68, .06); }
.wa-template-validation svg { flex: 0 0 auto; width: 13px; height: 13px; }
.wa-tab-panel > .wa-channel-toggle { max-width: 560px; margin-top: 0; padding: 10px; border-color: #263852; background: #111d30; }
.wa-reminder-note { max-width: 560px; display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid rgba(25, 200, 117, .2); border-radius: 8px; color: #9ddeb9; background: rgba(25, 200, 117, .08); font-size: 9px; }
.wa-reminder-note svg { width: 15px; height: 15px; }
.wa-reminder-note.warning { border-color: rgba(245, 170, 35, .25); color: #efbd60; background: rgba(245, 170, 35, .08); }
.wa-reminder-preview-list,
.wa-confirm-list { min-width: 0; display: grid; gap: 6px; }
.wa-reminder-preview-list article { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #263852; border-radius: 8px; background: #111d30; }
.wa-reminder-preview-list article > span { flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; color: #2fd0ff; background: rgba(47, 208, 255, .09); }
.wa-reminder-preview-list svg { width: 14px; height: 14px; }
.wa-reminder-preview-list strong,
.wa-reminder-preview-list small { display: block; }
.wa-reminder-preview-list strong { color: #eef5ff; font-size: 10px; }
.wa-reminder-preview-list small { margin-top: 2px; color: #8198b8; font-size: 8px; }
.wa-confirm-list { max-height: 340px; margin-top: 9px; overflow: auto; }
.wa-confirm-list article { display: grid; gap: 3px; padding: 9px; border: 1px solid var(--border-secondary); border-radius: 7px; background: rgba(10, 21, 35, .55); }
.wa-confirm-list strong { font-size: 10px; }
.wa-confirm-list span { color: #8da0ff; font-size: 9px; }
.wa-confirm-list small { color: #8ea4c2; font-size: 8px; line-height: 1.45; white-space: pre-wrap; }
.wa-confirm-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.wa-confirm-reminder { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 6px; cursor: pointer; }
.wa-confirm-reminder > input { margin-top: 11px; accent-color: #5268ff; }
.wa-reminder-settings { min-width: 0; display: grid; gap: 9px; padding: 10px; border: 1px solid #263852; border-radius: 9px; background: #111d30; }
.wa-reminder-auto { display: flex; align-items: center; justify-content: space-between; gap: 9px; cursor: pointer; }
.wa-reminder-auto strong,
.wa-reminder-auto small { display: block; }
.wa-reminder-auto strong { font-size: 10px; }
.wa-reminder-auto small { margin-top: 2px; color: #8198b8; font-size: 8px; }
.wa-reminder-rule-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.wa-reminder-rule-grid label { min-width: 0; display: flex; align-items: center; gap: 6px; padding: 7px; border: 1px solid var(--border-secondary); border-radius: 6px; color: #a8bbd3; font-size: 8px; cursor: pointer; }
.wa-reminder-rule-grid input { flex: 0 0 auto; accent-color: #5268ff; }
.wa-reminder-time-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.wa-reminder-time-grid label { display: grid; gap: 4px; color: #8198b8; font-size: 8px; }
.wa-reminder-time-grid input { min-width: 0; min-height: 32px; padding: 0 8px; border: 1px solid #2b405d; border-radius: 6px; color: #e8f0fb; background: #0c1828; color-scheme: dark; }
.wa-send-panel > .wa-delivery-panel { width: 100%; }
.wa-manual-layout { min-width: 0; display: grid; grid-template-columns: minmax(220px, .75fr) minmax(280px, 1.25fr); gap: 12px; }
.wa-manual-layout > div, .wa-manual-layout .form-group { min-width: 0; }
.wa-manual-layout .form-control { width: 100%; }
.wa-recipient-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wa-recipient-heading strong { font-size: 10px; }
.wa-recipient-heading span { color: #6f88a9; font-size: 8px; }
.wa-recipient-list { max-height: 245px; display: grid; gap: 5px; margin-top: 7px; overflow: auto; }
.wa-recipient-list label { min-width: 0; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 6px; padding: 7px 8px; border: 1px solid var(--border-secondary); border-radius: 6px; background: rgba(10, 21, 35, .46); cursor: pointer; }
.wa-recipient-list input { accent-color: #5268ff; }
.wa-recipient-list strong,
.wa-recipient-list small { display: block; }
.wa-recipient-list strong { color: #e7f0fb; font-size: 9px; }
.wa-recipient-list small { margin-top: 2px; color: #748ba9; font-size: 8px; }
.wa-history-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(130px, 190px); gap: 8px; }
.wa-history-toolbar label { min-width: 0; display: flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid #2b405d; border-radius: 7px; color: #8198b8; background: #111d30; }
.wa-history-toolbar label svg { flex: 0 0 auto; width: 14px; height: 14px; }
.wa-history-toolbar input,
.wa-history-toolbar select { width: 100%; min-width: 0; min-height: 36px; border: 1px solid #2b405d; color: #e8f0fb; background: #111d30; font: inherit; font-size: 9px; outline: none; }
.wa-history-toolbar input { border: 0; background: transparent; }
.wa-history-toolbar select { padding: 0 9px; border-radius: 7px; }
.wa-history-list { min-width: 0; overflow: hidden; border: 1px solid #263852; border-radius: 9px; background: #111d30; }
.wa-history-list article { min-width: 0; display: grid; grid-template-columns: 26px minmax(170px, 1fr) minmax(130px, .6fr) auto; align-items: center; gap: 8px; padding: 8px 10px; }
.wa-history-list article + article { border-top: 1px solid var(--border-secondary); }
.wa-history-status { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; color: #f0b44d; background: rgba(245, 170, 35, .11); }
.wa-history-status.accepted, .wa-history-status.sent { color: #e2a32d; background: rgba(226, 163, 45, .12); }
.wa-history-status.delivered, .wa-history-status.read { color: #22cf7a; background: rgba(34, 207, 122, .11); }
.wa-history-status.failed { color: #ff6b76; background: rgba(240, 68, 68, .12); }
.wa-history-status svg { width: 14px; height: 14px; }
.wa-history-list article > div { min-width: 0; }
.wa-history-list strong,
.wa-history-list small,
.wa-history-list b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-history-list strong { font-size: 10px; }
.wa-history-list b { color: #bdd1ee; font-size: 9px; }
.wa-history-list small { margin-top: 2px; color: #748ba9; font-size: 8px; }
.wa-history-list .wa-history-message,
.wa-history-list .wa-history-error { margin: 4px 0 0; overflow: hidden; font-size: 8px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.wa-history-list .wa-history-message { color: #9eb1ca; }
.wa-history-list .wa-history-error { color: #ff818a; }
.wa-history-actions { display: flex; align-items: flex-end; flex-direction: column; gap: 3px; }
.wa-history-actions .wa-inline-action { margin-top: 0; color: #ff9ca3; border-color: rgba(240, 68, 68, .25); background: rgba(240, 68, 68, .08); white-space: nowrap; }
.wa-history-actions .wa-inline-action:not(.danger) { color: #8da0ff; border-color: rgba(82, 104, 255, .28); background: rgba(82, 104, 255, .08); }
.wa-history-detail { display: grid; gap: 10px; }
.wa-history-detail dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--border-secondary); border-radius: 8px; background: var(--border-secondary); }
.wa-history-detail dl > div { min-width: 0; padding: 8px; background: #101d30; }
.wa-history-detail dt { color: #7c93b1; font-size: 8px; }
.wa-history-detail dd { margin: 3px 0 0; overflow: hidden; color: #e8f0fb; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.wa-provider-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 12px; }
.wa-provider-form .full-span { grid-column: 1 / -1; }
.wa-provider-form .form-control { width: 100%; min-height: 38px; border-color: #31445e; background: #18283c; font-size: 12px; }
.wa-provider-form textarea.form-control { min-height: 72px; }
.wa-provider-form .form-group > label b,
.wa-field-label label b { color: #ff6172; }
.wa-provider-form .is-readonly .form-control,
.wa-provider-form .is-disabled .form-control { color: #91a0b6; background: #0a1522; }
.wa-field-label { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.wa-field-label label { margin: 0; }
.wa-field-label button { display: inline-flex; align-items: center; gap: 4px; padding: 2px 5px; border: 1px solid rgba(82, 104, 255, .3); border-radius: 4px; color: #627aff; background: rgba(82, 104, 255, .08); font: inherit; font-size: 8px; cursor: pointer; }
.wa-field-label button svg { width: 10px; height: 10px; }
.wa-priority-input { max-width: none; }
.wa-provider-enabled { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid #2a3d57; border-radius: 8px; background: rgba(8, 18, 31, .46); cursor: pointer; }
.wa-provider-enabled strong,
.wa-provider-enabled small { display: block; }
.wa-provider-enabled strong { font-size: 10px; }
.wa-provider-enabled small { margin-top: 2px; color: var(--text-muted); font-size: 8px; }

@media (max-width: 900px) {
  .wa-gateway-layout { grid-template-columns: 1fr; }
  .wa-session-card { width: 100%; max-width: 520px; }
  .wa-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa-provider-summary,
  .wa-reminder-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa-reminder-rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa-manual-layout { grid-template-columns: 1fr; }
}

@media (max-width: 639px) {
  .whatsapp-gateway-panel { padding: 0; }
  .wa-gateway-layout { gap: 8px; }
  .wa-session-card,
  .wa-delivery-panel { border-radius: 10px; }
  .wa-session-card { max-width: none; padding: 11px; }
  .wa-session-head > strong { font-size: 14px; }
  .wa-session-details { margin-top: 10px; }
  .wa-session-details dt,
  .wa-session-details dd { font-size: 11px; }
  .wa-session-actions { gap: 6px; }
  .wa-session-button { min-height: 35px; padding: 5px 7px; font-size: 10px; }
  .wa-delivery-panel { padding: 10px; }
  .wa-delivery-head { align-items: flex-start; }
  .wa-delivery-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; }
  .wa-delivery-metrics > div { padding-left: 7px; }
  .wa-delivery-metrics > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .wa-delivery-metrics > div:nth-child(n+3) { padding-top: 7px; border-top: 1px solid var(--border-secondary); }
  .wa-settings-content { padding-top: 9px; }
  .wa-settings-tabs { gap: 0; }
  .wa-settings-tabs button { min-height: 39px; padding: 6px 10px; font-size: 9px; }
  .wa-settings-tabs svg { width: 14px; height: 14px; }
  .wa-provider-heading,
  .wa-tab-panel > header { align-items: flex-start; }
  .wa-heading-actions { justify-content: flex-start; }
  .wa-provider-heading h2,
  .wa-tab-panel h2 { font-size: 15px; }
  .wa-provider-heading p,
  .wa-tab-panel header p { font-size: 9px; }
  .wa-provider-heading .primary-button span { display: none; }
  .wa-webhook-banner { grid-template-columns: 20px minmax(0, 1fr); padding: 8px; }
  .wa-webhook-banner .primary-button { grid-column: 2; justify-self: start; }
  .wa-provider-grid { grid-template-columns: 1fr; }
  .wa-provider-grid .wa-session-card { min-height: 0; }
  .wa-template-grid { grid-template-columns: 1fr; }
  .wa-reminder-rule-grid,
  .wa-reminder-time-grid { grid-template-columns: 1fr; }
  .wa-history-toolbar { grid-template-columns: 1fr; }
  .wa-history-list article { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .wa-history-list article > div:nth-of-type(2) { display: none; }
  .wa-history-detail dl { grid-template-columns: 1fr; }
  .wa-provider-form { grid-template-columns: 1fr; gap: 9px; }
  .wa-provider-form .full-span { grid-column: auto; }
  .wa-qr-panel { min-height: 260px; padding: 8px; }
  .wa-qr-frame { width: min(100%, 242px); }
  .wa-qr-loading,
  .wa-qr-success,
  .wa-qr-error { min-height: 224px; }
  .wa-pairing-phone-row { grid-template-columns: 1fr; }
  .wa-pairing-phone-row .soft-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Reminder center: backend-driven settings, queue, templates, and history. */
.reminder-center { min-width: 0; padding-bottom: 76px; }
.reminder-page-head { margin-bottom: 12px; }
.reminder-server-time { display: inline-flex; align-items: center; gap: 5px; color: #8ba1bf; font-size: 9px; }
.reminder-server-time svg { width: 13px; height: 13px; }
.reminder-loading { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.reminder-loading span { min-height: 76px; border-radius: 10px; background: linear-gradient(100deg, #101e31 20%, #1b2d45 38%, #101e31 55%); background-size: 220% 100%; animation: reminder-shimmer 1.4s infinite; }
@keyframes reminder-shimmer { to { background-position-x: -220%; } }
.reminder-error { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 9px; padding: 30px; border: 1px solid rgba(255, 91, 104, .3); border-radius: 12px; text-align: center; background: rgba(255, 91, 104, .06); }
.reminder-error > svg { width: 34px; height: 34px; color: #ff6b76; }
.reminder-error p { max-width: 520px; margin: 0; color: #9cb0ca; font-size: 10px; }
.reminder-alert { min-width: 0; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 10px; padding: 11px 12px; border: 1px solid rgba(56, 211, 139, .25); border-radius: 10px; color: #79e7b4; background: rgba(21, 143, 98, .09); }
.reminder-alert.warning { color: #f4bc57; border-color: rgba(245, 170, 35, .25); background: rgba(245, 170, 35, .08); }
.reminder-alert.danger { color: #ff8a92; border-color: rgba(255, 91, 104, .26); background: rgba(255, 91, 104, .08); }
.reminder-alert > svg { width: 20px; height: 20px; }
.reminder-alert strong, .reminder-alert span { display: block; }
.reminder-alert strong { font-size: 10px; }
.reminder-alert span { margin-top: 2px; color: #91a7c4; font-size: 9px; line-height: 1.45; }
.reminder-overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 11px; }
.reminder-kpi { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 11px; border: 1px solid #283c58; border-radius: 10px; background: #111e31; }
.reminder-kpi > span { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; color: #6f83ff; background: rgba(82, 104, 255, .12); }
.reminder-kpi > span svg { width: 16px; height: 16px; }
.reminder-kpi b, .reminder-kpi small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reminder-kpi b { color: #edf4ff; font-size: 11px; }
.reminder-kpi small { margin-top: 2px; color: #7890af; font-size: 8px; }
.reminder-kpi.success > span, .reminder-kpi.success b { color: #34d991; }
.reminder-kpi.warning > span, .reminder-kpi.warning b { color: #f3b84f; }
.reminder-kpi.danger > span, .reminder-kpi.danger b { color: #ff707b; }
.reminder-master-card { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 11px; padding: 14px; border: 1px solid #304462; border-radius: 12px; background: linear-gradient(145deg, #111f34, #0d1828); }
.reminder-master-card.active { border-color: rgba(47, 211, 142, .36); box-shadow: inset 3px 0 #26cd87; }
.reminder-master-copy { min-width: 0; display: flex; align-items: center; gap: 11px; }
.reminder-master-copy > div { min-width: 0; }
.reminder-master-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: #6478ff; background: rgba(82, 104, 255, .14); }
.reminder-master-icon svg { width: 20px; height: 20px; }
.reminder-master-copy strong { font-size: 12px; }
.reminder-master-copy p { margin: 3px 0; color: #9bb0cc; font-size: 9px; }
.reminder-master-copy small { color: #667f9f; font-size: 8px; }
.reminder-master-switch { transform: scale(1.08); }
.reminder-master-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 7px; padding-top: 9px; border-top: 1px solid #223653; }
.reminder-accordion { margin-bottom: 9px; overflow: clip; border: 1px solid #283d59; border-radius: 11px; background: #101d30; }
.reminder-accordion summary { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 13px; cursor: pointer; list-style: none; }
.reminder-accordion summary::-webkit-details-marker { display: none; }
.reminder-accordion summary > span:first-child { min-width: 0; display: flex; align-items: center; gap: 9px; }
.reminder-accordion summary > span:first-child > svg { width: 18px; height: 18px; flex: 0 0 auto; color: #34caee; }
.reminder-accordion summary strong, .reminder-accordion summary small { display: block; }
.reminder-accordion summary strong { color: #f0f5ff; font-size: 11px; }
.reminder-accordion summary small { margin-top: 2px; overflow: hidden; color: #7890af; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.reminder-accordion summary > svg { width: 15px; height: 15px; flex: 0 0 auto; color: #7590b1; transition: transform .2s; }
.reminder-accordion[open] summary > svg:last-child { transform: rotate(180deg); }
.reminder-summary-count { margin-left: auto; padding: 4px 7px; border-radius: 999px; color: #8ea2ff; background: rgba(82, 104, 255, .12); font-size: 8px; white-space: nowrap; }
.reminder-accordion-body { min-width: 0; padding: 12px 13px 13px; border-top: 1px solid #243852; }
.reminder-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.reminder-form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.reminder-form-grid > label, .reminder-test-grid label { min-width: 0; }
.reminder-form-grid > label > span, .reminder-test-grid label > span, .reminder-field-title { display: block; margin-bottom: 4px; color: #a8bad2; font-size: 9px; font-weight: 700; }
.reminder-form-grid small { display: block; margin-top: 3px; color: #6f87a7; font-size: 8px; }
.reminder-form-grid .full-span { grid-column: 1 / -1; }
.reminder-form-grid textarea { resize: vertical; }
.reminder-day-selector { display: flex; flex-wrap: wrap; gap: 5px; }
.reminder-day-selector input { position: absolute; opacity: 0; pointer-events: none; }
.reminder-day-selector span { min-width: 39px; min-height: 32px; display: grid; place-items: center; border: 1px solid #304562; border-radius: 7px; color: #849ab9; background: #0b1727; font-size: 9px; cursor: pointer; }
.reminder-day-selector input:checked + span { color: #fff; border-color: #536cff; background: rgba(82, 104, 255, .25); }
.reminder-check-row { min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #2a3e59; border-radius: 8px; background: #0c1828; cursor: pointer; }
.reminder-check-row input { accent-color: #5268ff; }
.reminder-check-row span { margin: 0 !important; }
.reminder-info { display: flex; align-items: center; gap: 7px; margin-top: 10px; padding: 9px; border-radius: 8px; color: #73aefb; background: rgba(49, 126, 230, .09); font-size: 9px; }
.reminder-info svg { width: 14px; height: 14px; flex: 0 0 auto; }
.reminder-group-setting > small { display: block; margin-top: 5px; color: #6f87a7; font-size: 8px; }
.reminder-group-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.reminder-group-picker label { min-width: 0; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 7px; padding: 8px 9px; border: 1px solid #2a3e59; border-radius: 8px; background: #0c1828; cursor: pointer; }
.reminder-group-picker input { accent-color: #25d79f; }
.reminder-group-picker strong, .reminder-group-picker small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reminder-group-picker strong { color: #e6eef9; font-size: 9px; }
.reminder-group-picker small { margin: 2px 0 0; color: #7088a8; font-size: 8px; }
.reminder-rule-list { display: grid; gap: 6px; }
.reminder-rule-row { min-width: 0; display: grid; grid-template-columns: auto minmax(180px, 1fr) 80px 90px auto; align-items: center; gap: 9px; padding: 9px; border: 1px solid #263a55; border-radius: 9px; background: #0c1828; }
.reminder-rule-row.active { border-color: rgba(82, 104, 255, .38); }
.reminder-rule-row > div { min-width: 0; }
.reminder-rule-row strong, .reminder-rule-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reminder-rule-row strong { font-size: 9px; }
.reminder-rule-row small { margin-top: 2px; color: #7088a8; font-size: 8px; }
.reminder-rule-row > label:not(.switch) span { display: block; margin-bottom: 2px; color: #7189a8; font-size: 7px; }
.reminder-rule-row .form-control { min-height: 31px; padding: 5px 7px; font-size: 9px; }
.reminder-escalation-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 999px; color: #7edebc; background: rgba(36, 197, 137, .09); font-size: 8px; white-space: nowrap; }
.reminder-escalation-chip svg { width: 11px; height: 11px; }
.reminder-rule-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.reminder-rule-actions .soft-button { min-height: 29px; padding: 5px 7px; font-size: 8px; }
.reminder-template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.reminder-template-grid article { min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px; border: 1px solid #273b56; border-radius: 9px; background: #0b1727; }
.reminder-template-grid article > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: #2fc7ec; background: rgba(36, 184, 218, .1); }
.reminder-template-grid article > span svg { width: 14px; height: 14px; }
.reminder-template-grid article > div { min-width: 0; }
.reminder-template-grid strong, .reminder-template-grid small, .reminder-template-grid p { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reminder-template-grid strong { font-size: 9px; }
.reminder-template-grid small { margin-top: 2px; color: #6d86a6; font-size: 8px; }
.reminder-template-grid p { margin: 4px 0 0; color: #8fa4c0; font-size: 8px; }
.reminder-test-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.reminder-test-grid form { min-width: 0; display: grid; align-content: start; gap: 8px; padding: 11px; border: 1px solid #293e5a; border-radius: 9px; background: #0b1727; }
.reminder-test-grid h4 { margin: 0; font-size: 10px; }
.reminder-test-grid p { margin: 0; color: #7990ad; font-size: 8px; line-height: 1.5; }
.reminder-inline-actions { display: flex; justify-content: flex-end; gap: 6px; }
.reminder-preview-box { min-width: 0; min-height: 55px; max-height: 190px; overflow: auto; padding: 9px; border: 1px dashed #324a69; border-radius: 8px; color: #9fb2cc; background: #07121f; font-size: 8px; line-height: 1.55; white-space: pre-wrap; }
.reminder-history-card { min-width: 0; margin-top: 10px; overflow: hidden; border: 1px solid #2a3e59; border-radius: 11px; background: #101d30; }
.reminder-history-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 13px; }
.reminder-history-card h3 { margin: 0; font-size: 11px; }
.reminder-history-card p { margin: 2px 0 0; color: #758dab; font-size: 8px; }
.reminder-log-toolbar { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(130px, 210px); gap: 7px; padding: 0 13px 10px; }
.reminder-log-table-wrap { max-width: 100%; overflow-x: auto; border-top: 1px solid #243852; border-bottom: 1px solid #243852; }
.reminder-log-table { width: 100%; min-width: 720px; }
.reminder-log-table th, .reminder-log-table td { padding: 9px 11px; }
.reminder-log-table td strong, .reminder-log-table td small { display: block; }
.reminder-log-table td strong { font-size: 9px; }
.reminder-log-table td small { margin-top: 2px; color: #7189a8; font-size: 8px; }
.reminder-log-table .danger-text { max-width: 220px; overflow: hidden; color: #ff7e88; text-overflow: ellipsis; white-space: nowrap; }
.reminder-status { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 999px; color: #9fb0c7; background: rgba(142, 160, 185, .12); font-size: 8px; font-weight: 800; white-space: nowrap; }
.reminder-status.accepted, .reminder-status.sent { color: #e2a32d; background: rgba(226, 163, 45, .12); }
.reminder-status.delivered, .reminder-status.read { color: #4cdda0; background: rgba(41, 203, 137, .12); }
.reminder-status.failed { color: #ff7f89; background: rgba(255, 91, 104, .12); }
.reminder-status.queued, .reminder-status.processing, .reminder-status.waiting_provider { color: #79a9ff; background: rgba(61, 126, 245, .12); }
.reminder-status.quiet_hours { color: #bb94ff; background: rgba(147, 92, 246, .12); }
.reminder-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 13px; color: #7189a8; font-size: 8px; }
.reminder-pagination > div { display: flex; gap: 6px; }
.reminder-empty { padding: 24px; color: #758dab; text-align: center; font-size: 9px; }
.reminder-save-bar { position: sticky; z-index: 15; bottom: 8px; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px 12px; border: 1px solid #2b405d; border-radius: 11px; background: rgba(11, 23, 39, .96); box-shadow: 0 12px 32px rgba(0, 0, 0, .32); backdrop-filter: blur(12px); }
.reminder-save-bar.dirty { border-color: rgba(245, 170, 35, .45); }
.reminder-save-bar > span, .reminder-save-bar > div { display: flex; align-items: center; gap: 7px; }
.reminder-save-bar > span { min-width: 0; color: #8da4c2; font-size: 9px; }
.reminder-save-bar.dirty > span { color: #f1bc5c; }
.reminder-save-bar > span svg { width: 15px; height: 15px; flex: 0 0 auto; }
.reminder-template-editor-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; color: #7189a8; font-size: 8px; }

@media (max-width: 1100px) {
  .reminder-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reminder-form-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reminder-rule-row { grid-template-columns: auto minmax(160px, 1fr) 75px 85px; }
  .reminder-rule-actions { grid-column: 2 / -1; justify-self: start; }
  .reminder-group-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
  .reminder-center { padding-bottom: 110px; }
  .reminder-page-head { gap: 8px; }
  .reminder-server-time { width: 100%; }
  .reminder-alert { grid-template-columns: 22px minmax(0, 1fr); }
  .reminder-alert .soft-button { grid-column: 2; justify-self: start; }
  .reminder-overview-grid, .reminder-loading, .reminder-form-grid, .reminder-form-grid.three, .reminder-template-grid, .reminder-test-grid, .reminder-log-toolbar { grid-template-columns: 1fr; }
  .reminder-kpi { padding: 10px; }
  .reminder-master-card { grid-template-columns: minmax(0, 1fr) auto; padding: 11px; }
  .reminder-master-copy { align-items: flex-start; }
  .reminder-master-copy p { line-height: 1.45; }
  .reminder-master-actions { display: grid; grid-template-columns: 1fr; }
  .reminder-master-actions button { width: 100%; }
  .reminder-accordion summary { padding: 11px; }
  .reminder-accordion summary small { max-width: 230px; }
  .reminder-summary-count { display: none; }
  .reminder-accordion-body { padding: 10px; }
  .reminder-form-grid .full-span { grid-column: auto; }
  .reminder-day-selector { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .reminder-day-selector span { min-width: 0; }
  .reminder-group-picker { grid-template-columns: 1fr; }
  .reminder-rule-row { grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
  .reminder-rule-row > label:not(.switch), .reminder-rule-actions { grid-column: 2; }
  .reminder-rule-actions { align-items: flex-start; flex-direction: column; }
  .reminder-template-grid article { grid-template-columns: 28px minmax(0, 1fr); }
  .reminder-template-grid article .soft-button { grid-column: 2; justify-self: start; }
  .reminder-inline-actions { display: grid; grid-template-columns: 1fr; }
  .reminder-history-card > header { align-items: flex-start; }
  .reminder-history-card > header .soft-button span { display: none; }
  .reminder-log-table { min-width: 0; }
  .reminder-log-table thead { display: none; }
  .reminder-log-table, .reminder-log-table tbody, .reminder-log-table tr, .reminder-log-table td { display: block; width: 100%; }
  .reminder-log-table tr { padding: 9px 10px; border-bottom: 1px solid #243852; }
  .reminder-log-table td { padding: 4px 0; border: 0; }
  .reminder-pagination { align-items: flex-start; flex-direction: column; }
  .reminder-pagination > div, .reminder-pagination button { width: 100%; }
  .reminder-save-bar { bottom: 64px; align-items: stretch; flex-direction: column; }
  .reminder-save-bar > div { display: grid; grid-template-columns: 1fr; width: 100%; }
  .reminder-save-bar button { width: 100%; }
}
/* Notification Template management */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.notification-template-page { min-width: 0; display: grid; gap: 16px; }
.template-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.template-page-header h2 { margin: 0; color: #f7fbff; font-size: 24px; letter-spacing: -.02em; }
.template-page-header p { max-width: 720px; margin: 5px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 1.55; }
.template-page-header > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.template-page-header button { min-height: 38px; }
.template-provider-alert { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid rgba(245,170,35,.28); border-radius: var(--radius-md); color: #f8c66b; background: linear-gradient(90deg, rgba(245,170,35,.1), rgba(245,170,35,.04)); }
.template-provider-alert > svg { flex: 0 0 auto; width: 18px; }
.template-provider-alert strong, .template-provider-alert span { display: block; }
.template-provider-alert span { margin-top: 2px; color: var(--text-secondary); font-size: 11px; }
.template-summary-grid { min-width: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.template-summary-card { min-width: 0; min-height: 70px; display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid var(--border-primary); border-radius: 12px; color: var(--text-primary); background: linear-gradient(145deg, rgba(20,39,64,.94), rgba(11,25,43,.94)); text-align: left; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.template-summary-card:hover { border-color: rgba(53,120,246,.6); background: var(--surface-hover); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.14); }
.template-summary-card > span { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #56dff4; background: rgba(34,211,238,.1); }
.template-summary-card > span svg { width: 18px; }
.template-summary-card strong, .template-summary-card small { display: block; overflow: hidden; text-overflow: ellipsis; }
.template-summary-card strong { font-size: 20px; line-height: 1; }
.template-summary-card small { margin-top: 5px; color: var(--text-secondary); font-size: 10px; white-space: nowrap; }
.template-summary-card.tone-green > span { color: #5ee9a4; background: rgba(40,199,111,.1); }
.template-summary-card.tone-red > span { color: #ff7b87; background: rgba(240,82,95,.1); }
.template-summary-card.tone-yellow > span { color: #ffd16f; background: rgba(245,170,35,.1); }
.template-summary-card.tone-purple > span { color: #9d8cff; background: rgba(119,87,255,.12); }
.template-summary-card.tone-slate > span { color: #98aac2; background: rgba(125,159,204,.1); }
.template-last-update { margin: -8px 0 0; color: var(--text-muted); font-size: 10px; text-align: right; }
.template-last-update strong { color: var(--text-secondary); }
.template-toolbar { min-width: 0; display: grid; grid-template-columns: minmax(280px, 1.55fr) repeat(3, minmax(145px, 1fr)); gap: 9px; padding: 11px; border: 1px solid var(--border-primary); border-radius: 12px; background: rgba(8,18,31,.68); }
.template-toolbar .form-control { min-width: 0; width: 100%; }
.template-toolbar .form-control, .template-toolbar .soft-button { min-height: 38px; font-size: 11px; }
.template-search { position: relative; min-width: 0; }
.template-search > svg { position: absolute; top: 50%; left: 10px; z-index: 1; width: 15px; color: var(--text-muted); transform: translateY(-50%); }
.template-search input { padding-left: 32px; }
.template-category-tabs { min-width: 0; display: flex; gap: 7px; overflow-x: auto; padding: 1px 1px 4px; scrollbar-width: thin; }
.template-category-tabs button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 13px; border: 1px solid var(--border-primary); border-radius: 99px; color: var(--text-secondary); background: var(--surface-secondary); font-size: 11px; font-weight: 700; }
.template-category-tabs button svg { width: 14px; }
.template-category-tabs button.active { color: #fff; border-color: rgba(53,120,246,.65); background: linear-gradient(135deg, #2364df, #6339ee); }
.template-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: -5px; }
.template-results-heading > div { display: flex; align-items: center; gap: 9px; }
.template-results-heading > div > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #64dff0; background: rgba(34,211,238,.1); }
.template-results-heading svg { width: 16px; }
.template-results-heading strong, .template-results-heading small { display: block; }
.template-results-heading strong { color: #f2f7ff; font-size: 13px; }
.template-results-heading small { margin-top: 2px; color: var(--text-muted); font-size: 10px; }
.notification-template-grid { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 14px; }
.notification-template-card { --template-accent: #38bdf8; position: relative; min-width: 0; min-height: 308px; display: flex; flex-direction: column; gap: 11px; padding: 15px; overflow: visible; border: 1px solid var(--border-primary); border-top: 2px solid var(--template-accent); border-radius: 12px; background: linear-gradient(150deg, rgba(21,42,69,.98), rgba(9,22,39,.98)); box-shadow: 0 10px 28px rgba(0,0,0,.12); transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.notification-template-card:hover { border-color: color-mix(in srgb, var(--template-accent) 58%, var(--border-primary)); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.2); }
.notification-template-card[data-category="attendance"] { --template-accent: #2dd4bf; }
.notification-template-card[data-category="job"] { --template-accent: #38bdf8; }
.notification-template-card[data-category="approval"] { --template-accent: #a78bfa; }
.notification-template-card[data-category="coin"] { --template-accent: #facc15; }
.notification-template-card[data-category="salary"] { --template-accent: #4ade80; }
.notification-template-card[data-category="escalation"] { --template-accent: #fb7185; }
.notification-template-card[data-category="overtime"] { --template-accent: #f59e0b; }
.notification-template-card[data-category="system"] { --template-accent: #94a3b8; }
.notification-template-card > header { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: flex-start; gap: 11px; }
.template-category-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--template-accent); background: color-mix(in srgb, var(--template-accent) 13%, transparent); }
.template-category-icon svg { width: 19px; }
.notification-template-card h3 { margin: 1px 0 0; overflow: hidden; color: #fff; font-size: 14px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.notification-template-card code { display: block; margin-top: 4px; overflow: hidden; color: #86a3ca; font-size: 9px; letter-spacing: .03em; text-overflow: ellipsis; white-space: nowrap; }
.template-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.template-badges span { padding: 4px 7px; border: 1px solid rgba(100,139,194,.18); border-radius: 99px; color: #a6b9d4; background: rgba(62,91,135,.12); font-size: 9px; font-weight: 700; }
.template-badges span:first-child { color: var(--template-accent); border-color: color-mix(in srgb, var(--template-accent) 25%, transparent); background: color-mix(in srgb, var(--template-accent) 9%, transparent); }
.template-badges .tone-success { color: #58e29b; border-color: rgba(40,199,111,.22); background: rgba(40,199,111,.1); }
.template-badges .tone-warning { color: #ffc75e; border-color: rgba(245,170,35,.22); background: rgba(245,170,35,.1); }
.template-badges .tone-danger { color: #ff7d87; border-color: rgba(240,82,95,.25); background: rgba(240,82,95,.1); }
.template-card-message { min-height: 0; display: block; margin: 0; padding: 10px 11px; overflow: visible; border: 1px solid rgba(86,126,183,.16); border-radius: 9px; color: #a8c1e2; background: rgba(4,13,25,.3); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-line; }
.notification-template-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 0; }
.notification-template-card dl div { min-width: 0; padding: 8px; border: 1px solid rgba(77,113,165,.2); border-radius: 8px; background: rgba(5,15,28,.28); }
.notification-template-card dt { overflow: hidden; color: #7895bc; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.notification-template-card dd { margin: 3px 0 0; overflow: hidden; color: #e2edf9; font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.template-card-update { color: var(--text-muted); font-size: 9px; }
.template-card-warning { display: flex; align-items: flex-start; gap: 6px; padding: 8px; border-radius: 8px; color: #ffc874; background: rgba(245,170,35,.08); font-size: 9px; line-height: 1.4; }
.template-card-warning svg { flex: 0 0 auto; width: 13px; }
.notification-template-card > footer { display: grid; grid-template-columns: 1fr 1fr 1fr auto; align-items: stretch; gap: 6px; margin-top: auto; padding-top: 4px; }
.notification-template-card > footer > button { min-width: 0; min-height: 36px; padding-inline: 8px; font-size: 10px; }
.template-more { position: relative; }
.template-more summary { width: 38px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); color: var(--text-secondary); background: var(--surface-secondary); cursor: pointer; list-style: none; }
.template-more summary::-webkit-details-marker { display: none; }
.template-more summary svg { width: 15px; }
.template-more > div { position: absolute; right: 0; bottom: 41px; z-index: 15; width: 205px; display: grid; gap: 2px; padding: 6px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: #101f33; box-shadow: var(--shadow-floating); }
.template-more > div button { padding: 8px 9px; border: 0; border-radius: 6px; color: var(--text-secondary); background: transparent; font-size: 10px; text-align: left; }
.template-more > div button:hover { color: #fff; background: var(--surface-hover); }
.template-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--border-primary); border-radius: 11px; background: rgba(8,18,31,.62); }
.template-pagination p { margin: 0; color: var(--text-muted); font-size: 10px; }
.template-pagination p strong { color: var(--text-primary); }
.template-pagination > div { display: flex; align-items: center; gap: 5px; }
.template-pagination button { min-width: 34px; height: 34px; display: grid; place-items: center; padding: 0 8px; border: 1px solid var(--border-primary); border-radius: 8px; color: var(--text-secondary); background: var(--surface-secondary); font-size: 10px; font-weight: 750; }
.template-pagination button.active { color: #fff; border-color: #4f6df4; background: linear-gradient(135deg, #2364df, #6339ee); }
.template-pagination button:disabled { opacity: .4; cursor: not-allowed; }
.template-pagination button svg { width: 14px; }
.template-loading { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.template-loading span { min-height: 220px; }

.modal:has(.template-editor-layout) { width: min(1180px, 100%); }
.template-editor-layout { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 12px; }
.template-editor-main, .template-editor-side { min-width: 0; display: grid; align-content: start; gap: 10px; }
.template-editor-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.template-editor-main > label, .template-editor-fields label { min-width: 0; display: block; }
.template-editor-layout .form-control { min-width: 0; width: 100%; }
.template-editor-layout label > span, .template-test-grid label > span { display: block; margin-bottom: 5px; color: var(--text-secondary); font-size: 10px; font-weight: 700; }
.template-message-field textarea { min-height: 290px; resize: vertical; font-family: 'Inter Variable', sans-serif; font-size: 11px; line-height: 1.6; }
.template-editor-stats { display: flex; flex-wrap: wrap; gap: 5px; }
.template-editor-stats span { padding: 5px 8px; border-radius: 99px; color: #83a5d1; background: rgba(59,95,145,.14); font-size: 9px; }
.template-inline-validation { display: grid; gap: 4px; }
.template-inline-validation p { display: flex; align-items: flex-start; gap: 5px; margin: 0; padding: 6px 7px; border-radius: 7px; background: rgba(40,199,111,.07); font-size: 9px; }
.template-inline-validation p.tone-danger { background: rgba(240,82,95,.08); }
.template-inline-validation p svg { flex: 0 0 auto; width: 13px; }
.template-related-inline { display: grid; gap: 4px; padding: 9px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: rgba(7,17,30,.38); }
.template-related-inline strong { font-size: 10px; }
.template-related-inline span { color: var(--text-secondary); font-size: 9px; }
.whatsapp-preview { min-width: 0; overflow: hidden; border: 1px solid rgba(40,199,111,.25); border-radius: var(--radius-md); background: #0c1c21; }
.whatsapp-preview > header { display: flex; align-items: center; gap: 7px; padding: 8px 10px; color: #dfffee; background: #123a32; }
.whatsapp-preview > header svg { width: 16px; color: #4de39a; }
.whatsapp-preview > header strong, .whatsapp-preview > header small { display: block; }
.whatsapp-preview > header strong { font-size: 11px; }
.whatsapp-preview > header small { color: #94baaa; font-size: 9px; }
.whatsapp-preview-stage { min-height: 180px; display: flex; align-items: flex-start; justify-content: flex-end; padding: 18px 12px; background-color: #081916; background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px); background-size: 14px 14px; }
.whatsapp-bubble { position: relative; max-width: 92%; padding: 10px 11px 21px; border-radius: 9px 2px 9px 9px; color: #eaf8ef; background: #075e54; box-shadow: 0 3px 12px rgba(0,0,0,.2); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.whatsapp-bubble code { padding: 2px 3px; color: #fff; background: rgba(0,0,0,.22); }
.whatsapp-bubble time { position: absolute; right: 7px; bottom: 4px; color: #9cd7ca; font-size: 7px; }
.whatsapp-preview.standalone > p { margin: 7px 10px 10px; color: var(--text-muted); font-size: 8px; }
.placeholder-panel { min-width: 0; overflow: hidden; border: 1px solid var(--border-primary); border-radius: var(--radius-md); background: rgba(9,22,38,.7); }
.placeholder-panel > header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, .65fr); align-items: center; gap: 8px; padding: 9px; border-bottom: 1px solid var(--border-primary); }
.placeholder-panel > header strong, .placeholder-panel > header small { display: block; }
.placeholder-panel > header strong { font-size: 11px; }
.placeholder-panel > header small { margin-top: 2px; color: var(--text-muted); font-size: 9px; }
.placeholder-panel > header label { position: relative; }
.placeholder-panel > header label svg { position: absolute; top: 50%; left: 7px; width: 12px; color: var(--text-muted); transform: translateY(-50%); }
.placeholder-panel > header input { width: 100%; min-height: 30px; padding: 4px 7px 4px 25px; border: 1px solid var(--border-primary); border-radius: 7px; color: #fff; background: var(--surface-secondary); font-size: 8px; }
.placeholder-list { max-height: 360px; overflow-y: auto; padding: 8px; }
.placeholder-list section + section { margin-top: 9px; }
.placeholder-list h4 { margin: 0 0 5px; color: #62ddef; font-size: 10px; text-transform: uppercase; }
.placeholder-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 6px; border-radius: 7px; }
.placeholder-list article:hover, .placeholder-list article.is-used { background: rgba(53,120,246,.09); }
.placeholder-list article code, .placeholder-list article small, .placeholder-list article em { display: block; }
.placeholder-list article code { color: #78e2f2; font-size: 10px; font-weight: 700; }
.placeholder-list article small { margin-top: 2px; color: var(--text-secondary); font-size: 9px; }
.placeholder-list article em { margin-top: 2px; color: var(--text-muted); font-size: 8px; font-style: normal; }
.placeholder-list article > span { display: flex; gap: 3px; }
.placeholder-list article button { width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border-primary); border-radius: 6px; color: #9bb5d8; background: var(--surface-secondary); }
.placeholder-list article button svg { width: 12px; }
.modal-footer-spacer { flex: 1 1 auto; }
.template-validation-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.template-validation-summary span { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 9px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); font-size: 10px; font-weight: 800; }
.template-validation-summary svg { width: 14px; }
.template-validation-list { display: grid; gap: 7px; margin-top: 9px; }
.template-validation-list article { padding: 9px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: rgba(8,19,33,.52); }
.template-validation-list header { display: flex; align-items: center; gap: 7px; }
.template-validation-list header code { color: var(--text-muted); font-size: 8px; }
.template-validation-list p { margin: 5px 0; color: var(--text-secondary); font-size: 9px; }
.template-validation-list p b { margin-right: 5px; }
.template-rule-list, .template-version-list { display: grid; gap: 7px; }
.template-rule-list article { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; padding: 9px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); }
.template-rule-list article > span svg { width: 15px; color: #49dd91; }
.template-rule-list strong, .template-rule-list code, .template-rule-list p, .template-rule-list small { display: block; }
.template-rule-list strong { font-size: 10px; }
.template-rule-list code, .template-rule-list small { margin-top: 3px; color: var(--text-muted); font-size: 8px; }
.template-rule-list p { margin: 4px 0 0; color: var(--text-secondary); font-size: 9px; }
.template-version-dialog { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); gap: 10px; }
.template-version-list { max-height: 540px; overflow-y: auto; }
.template-version-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 5px; padding: 8px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); }
.template-version-list strong, .template-version-list span, .template-version-list small { display: block; }
.template-version-list strong { font-size: 10px; }
.template-version-list span, .template-version-list small { margin-top: 2px; color: var(--text-muted); font-size: 8px; }
.template-diff-view { min-width: 0; padding: 9px; border: 1px solid var(--border-primary); border-radius: var(--radius-sm); background: rgba(7,17,30,.5); }
.template-diff-view h4 { margin: 0 0 8px; font-size: 10px; }
.template-diff-view > div, .template-reset-diff { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.template-diff-view pre, .template-reset-diff pre { max-height: 380px; margin: 5px 0 0; padding: 8px; overflow: auto; border: 1px solid var(--border-secondary); border-radius: 7px; color: #b9cbe4; background: #07111f; font: 8px/1.5 monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.template-reset-diff { margin-bottom: 9px; }
.template-test-grid { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr); gap: 10px; }
.template-test-grid > div { display: grid; align-content: start; gap: 8px; }

@media (max-width: 1180px) {
  .template-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .template-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-search { grid-column: span 2; }
  .notification-template-grid, .template-loading { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .template-page-header { display: grid; }
  .template-page-header > div:last-child { display: grid; grid-template-columns: 1fr; justify-content: stretch; }
  .template-page-header > div:last-child button { width: 100%; }
  .template-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-toolbar { grid-template-columns: 1fr; }
  .template-search { grid-column: auto; }
  .template-results-heading { align-items: flex-start; flex-direction: column; }
  .template-results-heading > small { display: none; }
  .notification-template-grid, .template-loading { grid-template-columns: minmax(0, 1fr); }
  .notification-template-card { min-height: 0; padding: 13px; }
  .notification-template-card > footer { grid-template-columns: 1fr 1fr; }
  .template-more { grid-column: span 2; }
  .template-more summary { width: 100%; }
  .template-more > div { right: 0; left: 0; width: auto; }
  .modal:has(.template-editor-layout) { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .modal:has(.template-editor-layout) .modal-body { padding: 9px; }
  .template-editor-layout { grid-template-columns: minmax(0, 1fr); }
  .template-editor-fields { grid-template-columns: minmax(0, 1fr); }
  .template-editor-side { grid-row: auto; }
  .placeholder-list { max-height: 300px; }
  .template-validation-summary { grid-template-columns: minmax(0, 1fr); }
  .template-version-dialog, .template-test-grid, .template-diff-view > div, .template-reset-diff { grid-template-columns: minmax(0, 1fr); }
  .template-version-list article { grid-template-columns: minmax(0, 1fr) 1fr 1fr; }
  .modal:has(.template-editor-layout) .modal-footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal:has(.template-editor-layout) .modal-footer > button { width: 100%; }
  .modal-footer-spacer { display: none; }
  .template-pagination { align-items: stretch; flex-direction: column; }
  .template-pagination > div { justify-content: space-between; }
  .template-pagination button { flex: 1 1 auto; }
}

/* WhatsApp Operations Center: commercial SaaS presentation. */
.settings-view[data-settings-view="whatsapp"] { --wa-panel: #0d1a2d; --wa-panel-soft: #111f35; --wa-border: rgba(128, 163, 211, .18); --wa-muted: #8fa4c2; }
.settings-view[data-settings-view="whatsapp"] > .whatsapp-settings-shell { margin-top: 12px !important; }
.wa-settings-console { display: grid; gap: 18px; overflow: visible; border-top: 0; }
.wa-console-hero { position: relative; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 22px; overflow: hidden; border: 1px solid rgba(81, 135, 217, .25); border-radius: 18px; background: radial-gradient(circle at 88% -20%, rgba(67, 75, 245, .28), transparent 38%), linear-gradient(135deg, #12233c 0%, #0b1729 58%, #0b1424 100%); box-shadow: 0 22px 56px rgba(0, 0, 0, .22); }
.wa-console-hero::before { content: ""; position: absolute; width: 320px; height: 320px; right: -190px; bottom: -235px; border: 1px solid rgba(45, 221, 214, .18); border-radius: 50%; box-shadow: 0 0 0 38px rgba(45, 221, 214, .03), 0 0 0 80px rgba(81, 102, 255, .025); pointer-events: none; }
.wa-console-hero-main { position: relative; min-width: 0; display: flex; align-items: center; gap: 14px; }
.wa-console-mark { flex: 0 0 auto; width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid rgba(79, 230, 218, .3); border-radius: 15px; color: #54e3d5; background: linear-gradient(145deg, rgba(39, 200, 183, .2), rgba(58, 105, 232, .13)); box-shadow: inset 0 1px rgba(255,255,255,.08), 0 12px 28px rgba(0,0,0,.22); }
.wa-console-mark svg { width: 25px; height: 25px; stroke-width: 1.8; }
.wa-console-hero-main > div { min-width: 0; }
.wa-console-eyebrow, .wa-section-eyebrow { display: block; color: #55ddcf; font-size: 9px; font-weight: 800; letter-spacing: .14em; line-height: 1.4; }
.wa-console-hero-main h2 { margin: 3px 0 4px; color: #f8fbff; font-size: 23px; font-weight: 770; letter-spacing: -.025em; line-height: 1.15; }
.wa-console-hero-main p { max-width: 700px; margin: 0; color: #a2b4ce; font-size: 11px; line-height: 1.55; }
.wa-console-health { position: relative; align-self: center; display: grid; justify-items: end; gap: 6px; }
.wa-console-health > span { display: inline-flex; align-items: center; gap: 7px; min-height: 29px; padding: 5px 10px; border: 1px solid rgba(244, 178, 69, .25); border-radius: 999px; color: #f6c56e; background: rgba(244, 162, 32, .09); font-size: 9px; font-weight: 750; white-space: nowrap; }
.wa-console-health > span.ready { border-color: rgba(48, 210, 141, .25); color: #6fe1aa; background: rgba(25, 185, 117, .1); }
.wa-console-health > span i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent); }
.wa-console-health small { color: #768ba8; font-size: 8px; }
.wa-console-kpis { position: relative; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; padding-top: 2px; }
.wa-console-kpis article { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid rgba(125, 157, 204, .15); border-radius: 11px; background: rgba(7, 16, 29, .48); backdrop-filter: blur(8px); }
.wa-console-kpis article > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #75a5ff; background: rgba(62, 106, 230, .13); }
.wa-console-kpis article > span svg { width: 17px; height: 17px; }
.wa-console-kpis small, .wa-console-kpis strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-console-kpis small { color: #8297b5; font-size: 8px; font-weight: 650; letter-spacing: .02em; }
.wa-console-kpis strong { margin-top: 2px; color: #eff5ff; font-size: 16px; font-weight: 780; }
.wa-console-kpis strong em { color: #6f84a2; font-size: 10px; font-style: normal; font-weight: 600; }
.wa-console-kpis strong.success { color: #44d98d; }
.wa-console-kpis strong.danger { color: #ff747f; }

.wa-settings-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; padding: 6px; overflow: visible; border: 1px solid var(--wa-border); border-radius: 14px; background: rgba(8, 17, 30, .7); box-shadow: 0 12px 32px rgba(0,0,0,.12); }
.wa-settings-tabs button { min-width: 0; min-height: 57px; justify-content: flex-start; gap: 9px; padding: 8px 10px; border: 1px solid transparent; border-radius: 9px; text-align: left; }
.wa-settings-tabs button::after { display: none; }
.wa-settings-tabs button:hover { border-color: rgba(93, 128, 194, .16); color: #e6efff; background: rgba(36, 59, 96, .36); }
.wa-settings-tabs button.active { border-color: rgba(88, 111, 255, .32); color: #f6f8ff; background: linear-gradient(135deg, rgba(65, 78, 213, .26), rgba(35, 61, 107, .48)); box-shadow: inset 0 1px rgba(255,255,255,.04), 0 8px 20px rgba(0,0,0,.14); }
.wa-tab-icon { flex: 0 0 auto; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; color: #43d7ea; background: rgba(31, 180, 207, .1); }
.wa-settings-tabs button.active .wa-tab-icon { color: #8ea0ff; background: rgba(85, 99, 235, .16); }
.wa-tab-icon svg { width: 16px; height: 16px; }
.wa-tab-copy { min-width: 0; display: grid; gap: 2px; }
.wa-tab-copy strong, .wa-tab-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-tab-copy strong { font-size: 10px; font-weight: 750; }
.wa-tab-copy small { color: #6f85a3; font-size: 8px; font-weight: 500; }
.wa-settings-tabs button.active .wa-tab-copy small { color: #a5b2d4; }
.wa-settings-content { padding-top: 0; }
.wa-provider-view, .wa-tab-panel { gap: 14px; }
.wa-provider-heading, .wa-tab-panel > header { align-items: flex-start; }
.wa-provider-heading h2, .wa-tab-panel h2 { margin-top: 3px; color: #f5f9ff; font-size: 22px; font-weight: 760; letter-spacing: -.02em; }
.wa-provider-heading p, .wa-tab-panel header p { max-width: 720px; margin-top: 5px; color: #8fa8cb; font-size: 11px; line-height: 1.5; }
.wa-provider-heading .primary-button, .wa-provider-heading .soft-button, .wa-tab-panel > header .primary-button, .wa-tab-panel > header .soft-button { min-height: 38px; }

.wa-provider-summary, .wa-reminder-metrics { gap: 10px; }
.wa-provider-summary article, .wa-reminder-metrics article { position: relative; padding: 12px 13px; overflow: hidden; border-color: var(--wa-border); border-radius: 11px; background: linear-gradient(145deg, rgba(18, 32, 54, .94), rgba(12, 24, 42, .94)); }
.wa-provider-summary article::after { content: ""; position: absolute; right: -18px; bottom: -30px; width: 70px; height: 70px; border: 1px solid rgba(91, 121, 255, .08); border-radius: 50%; }
.wa-provider-summary span, .wa-reminder-metrics span { color: #849ab8; font-size: 9px; font-weight: 650; }
.wa-provider-summary b, .wa-reminder-metrics b { margin-top: 5px; font-size: 19px; letter-spacing: -.02em; }
.wa-priority-warning, .wa-readiness-banner { min-height: 44px; padding: 10px 13px; border-radius: 10px; font-size: 10px; }

.wa-webhook-banner { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; padding: 13px 14px; border-color: rgba(71, 136, 218, .22); border-radius: 12px; background: linear-gradient(105deg, rgba(21, 43, 72, .95), rgba(15, 29, 51, .95)); }
.wa-webhook-icon { width: 38px; height: 38px; border-radius: 10px; color: #6d94ff; background: rgba(75, 93, 228, .15); }
.wa-webhook-icon svg { width: 18px; height: 18px; }
.wa-webhook-banner strong { font-size: 11px; }
.wa-webhook-banner small { margin-top: 3px; font-size: 9px; line-height: 1.4; }
.wa-webhook-banner code { margin-top: 8px; padding: 8px 10px; border: 1px solid rgba(112, 147, 201, .1); border-radius: 7px; background: rgba(5, 13, 25, .48); font-size: 9px; }
.wa-webhook-banner .soft-button { align-self: center; min-height: 36px; white-space: nowrap; }

.wa-provider-grid { grid-template-columns: repeat(auto-fit, minmax(390px, 1fr)); gap: 14px; }
.wa-provider-grid .wa-session-card { min-height: 318px; }
.wa-session-card { position: relative; padding: 17px; overflow: hidden; border-color: var(--wa-border); border-radius: 16px; background: linear-gradient(155deg, #14243b 0%, #0e1b2e 58%, #0b1727 100%); box-shadow: 0 18px 42px rgba(0, 0, 0, .2); }
.wa-session-card:hover { border-color: rgba(99, 131, 190, .34); box-shadow: 0 22px 50px rgba(0,0,0,.27); }
.wa-session-accent { position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #f4a722, #f4c967 45%, transparent); }
.wa-session-card.success .wa-session-accent { background: linear-gradient(90deg, #25cc86, #48e4aa 45%, transparent); }
.wa-session-card.danger .wa-session-accent { background: linear-gradient(90deg, #f04f5d, #ff8a92 45%, transparent); }
.wa-session-head { align-items: flex-start; }
.wa-session-identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.wa-session-logo { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(53, 222, 209, .18); border-radius: 10px; color: #49dacc; background: rgba(35, 185, 171, .1); }
.wa-session-logo svg { width: 19px; height: 19px; }
.wa-session-identity > div { min-width: 0; }
.wa-session-identity span:not(.wa-session-logo) { display: block; overflow: hidden; color: #7187a5; font-size: 8px; font-weight: 800; letter-spacing: .1em; text-overflow: ellipsis; white-space: nowrap; }
.wa-session-identity strong { display: block; margin-top: 3px; overflow: hidden; color: #f7faff; font-size: 17px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.wa-session-power { width: 34px; height: 34px; border: 1px solid currentColor; border-radius: 10px; background: color-mix(in srgb, currentColor 8%, transparent); }
.wa-session-power svg { width: 17px; height: 17px; }
.wa-session-badges { margin-top: 12px; }
.wa-provider-badge, .wa-connection-badge, .wa-provider-disabled, .wa-provider-role { min-height: 25px; border-radius: 999px; font-size: 8px; letter-spacing: .03em; }
.wa-provider-badge { color: #93a4ff; background: rgba(81, 92, 218, .17); }
.wa-provider-description { min-height: 35px; margin: 11px 0 12px; color: #8da2bf; font-size: 10px; line-height: 1.55; }
.wa-session-sender { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid rgba(43, 209, 135, .2); border-radius: 10px; background: rgba(25, 176, 109, .08); }
.wa-session-sender > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: #4ddd97; background: rgba(34, 202, 128, .12); }
.wa-session-sender svg { width: 16px; height: 16px; }
.wa-session-sender dt { color: #83bca1; font-size: 8px; font-weight: 650; }
.wa-session-sender dd { margin: 2px 0 0; overflow: hidden; color: #e9fff4; font-size: 13px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.wa-session-pairing-note { min-height: 45px; display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid rgba(94, 120, 171, .18); border-radius: 10px; color: #8da1be; background: rgba(6, 15, 27, .38); font-size: 9px; line-height: 1.45; }
.wa-session-pairing-note svg { flex: 0 0 auto; width: 16px; height: 16px; color: #6e8fff; }
.wa-session-details { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 13px 0 12px; overflow: hidden; border: 1px solid rgba(116, 147, 193, .13); border-radius: 10px; background: rgba(116, 147, 193, .1); }
.wa-session-details > div, .wa-session-details > div:first-child { min-width: 0; display: grid; align-content: start; gap: 4px; padding: 10px; background: rgba(8, 17, 30, .74); }
.wa-session-details dt { min-width: 0; display: flex; align-items: center; gap: 5px; overflow: hidden; color: #778ca8; font-size: 8px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.wa-session-details dt svg { flex: 0 0 auto; width: 12px; height: 12px; }
.wa-session-details dd { font-size: 10px; }
.wa-session-actions { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 40px; gap: 7px; padding-top: 2px; }
.wa-session-button { min-height: 40px; border-radius: 8px; font-size: 10px; }
.wa-session-button.qr { background: linear-gradient(105deg, #3d64f0, #5a45ed); box-shadow: 0 9px 20px rgba(62, 85, 225, .18); }
.wa-session-button.edit { border-color: rgba(117, 145, 188, .14); background: rgba(35, 55, 89, .72); }
.wa-session-button.delete { background: rgba(240, 68, 68, .88); }
.wa-session-button.restart { color: #f7c470; border: 1px solid rgba(243, 164, 34, .24); background: rgba(174, 103, 6, .16); }

.wa-provider-view > .wa-delivery-panel { width: 100%; }
.wa-delivery-panel { padding: 16px; border-color: var(--wa-border); border-radius: 14px; background: linear-gradient(150deg, rgba(17, 31, 52, .98), rgba(11, 23, 40, .98)); box-shadow: 0 16px 38px rgba(0,0,0,.16); }
.wa-delivery-title { min-width: 0; display: flex; align-items: center; gap: 10px; }
.wa-delivery-title > span { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: #62dccc; background: rgba(40, 196, 179, .1); }
.wa-delivery-title svg { width: 17px; height: 17px; }
.wa-delivery-head strong { color: #f3f7ff; font-size: 13px; }
.wa-delivery-head small { margin-top: 3px; font-size: 9px; line-height: 1.4; }
.wa-delivery-head-actions .icon-button { width: 36px; height: 36px; }
.wa-delivery-head-actions .soft-button { min-height: 36px; }
.wa-delivery-metrics { gap: 8px; margin-top: 14px; padding: 0; border: 0; }
.wa-delivery-metrics > div { padding: 10px 11px; border: 1px solid rgba(116, 147, 193, .13) !important; border-radius: 9px; background: rgba(6, 15, 28, .42); }
.wa-delivery-metrics span { font-size: 8px; }
.wa-delivery-metrics b { margin-top: 4px; font-size: 12px; }
.wa-delivery-panel .gateway-outbox { margin-top: 14px; }
.gateway-outbox-title { margin-bottom: 6px; font-size: 10px; }
.gateway-outbox-title small { font-size: 8px; }
.gateway-outbox-row { gap: 9px; min-height: 48px; padding: 7px 4px; }
.gateway-outbox-row > .wa-outbox-avatar { flex: 0 0 auto; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: #7396d6; background: rgba(64, 101, 170, .12); }
.wa-outbox-avatar svg { width: 14px; height: 14px; }
.gateway-outbox-row b { font-size: 10px; }
.gateway-outbox-row small { font-size: 8px; }
.wa-outbox-empty { min-height: 130px; gap: 5px; }
.wa-outbox-empty svg { width: 24px; height: 24px; color: #5676a7; }
.wa-outbox-empty strong { color: #d7e2f3; font-size: 10px; }
.wa-outbox-empty span { color: #7187a4; font-size: 9px; }

.wa-send-guide { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.wa-send-guide article { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--wa-border); border-radius: 11px; background: linear-gradient(145deg, rgba(17,31,52,.94), rgba(11,23,40,.94)); }
.wa-send-guide article > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: #64d9d0; background: rgba(43, 192, 181, .1); }
.wa-send-guide svg { width: 17px; height: 17px; }
.wa-send-guide strong, .wa-send-guide small { display: block; }
.wa-send-guide strong { color: #ecf3ff; font-size: 10px; }
.wa-send-guide small { margin-top: 3px; color: #7f95b2; font-size: 8px; line-height: 1.45; }

.wa-history-toolbar { grid-template-columns: minmax(280px, 1fr) minmax(160px, 220px); gap: 10px; padding: 10px; border: 1px solid var(--wa-border); border-radius: 11px; background: rgba(9, 18, 32, .55); }
.wa-history-toolbar label, .wa-history-toolbar select { border-radius: 8px; background: #111f34; }
.wa-history-toolbar input, .wa-history-toolbar select { min-height: 39px; font-size: 10px; }
.wa-history-list { border-color: var(--wa-border); border-radius: 12px; background: #101e33; box-shadow: 0 14px 34px rgba(0,0,0,.14); }
.wa-history-list article { grid-template-columns: 34px minmax(190px, 1fr) minmax(150px, .6fr) auto; gap: 11px; min-height: 66px; padding: 10px 12px; }
.wa-history-list article + article { border-top-color: rgba(113, 144, 191, .12); }
.wa-history-status { width: 34px; height: 34px; border-radius: 9px; }
.wa-history-status svg { width: 15px; height: 15px; }
.wa-history-list strong { font-size: 11px; }
.wa-history-list b { font-size: 9px; }
.wa-history-list small, .wa-history-list .wa-history-message, .wa-history-list .wa-history-error { font-size: 8px; }
.wa-history-actions { gap: 5px; }
.wa-history-actions .wa-inline-action { min-height: 24px; }

.wa-settings-content .notification-template-page, .wa-settings-content .reminder-center { padding: 2px 0 20px; }
.wa-settings-content .template-page-header h2, .wa-settings-content .reminder-page-head h2 { font-size: 22px; }

@media (max-width: 1100px) {
  .wa-settings-tabs { grid-template-columns: repeat(5, minmax(118px, 1fr)); overflow-x: auto; }
  .wa-console-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa-provider-grid { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
  .wa-send-guide { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .wa-settings-console { gap: 12px; }
  .wa-console-hero { grid-template-columns: minmax(0, 1fr); gap: 13px; padding: 15px; border-radius: 14px; }
  .wa-console-hero-main { align-items: flex-start; }
  .wa-console-mark { width: 42px; height: 42px; border-radius: 12px; }
  .wa-console-mark svg { width: 21px; height: 21px; }
  .wa-console-eyebrow { font-size: 7px; }
  .wa-console-hero-main h2 { margin-top: 4px; font-size: 17px; }
  .wa-console-hero-main p { font-size: 9px; }
  .wa-console-health { justify-items: start; }
  .wa-console-kpis { grid-column: auto; gap: 6px; }
  .wa-console-kpis article { grid-template-columns: 28px minmax(0, 1fr); gap: 7px; padding: 8px; }
  .wa-console-kpis article > span { width: 28px; height: 28px; }
  .wa-console-kpis article > span svg { width: 14px; height: 14px; }
  .wa-console-kpis strong { font-size: 13px; }
  .wa-settings-tabs { display: flex; gap: 5px; padding: 5px; border-radius: 11px; }
  .wa-settings-tabs button { flex: 0 0 118px; min-height: 51px; gap: 7px; padding: 7px; }
  .wa-tab-icon { width: 27px; height: 27px; }
  .wa-tab-copy strong { font-size: 9px; }
  .wa-tab-copy small { font-size: 7px; }
  .wa-provider-heading, .wa-tab-panel > header { display: grid; gap: 10px; }
  .wa-provider-heading h2, .wa-tab-panel h2 { font-size: 18px; }
  .wa-provider-heading p, .wa-tab-panel header p { font-size: 9px; }
  .wa-heading-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa-heading-actions > button { width: 100%; }
  .wa-provider-heading > .wa-heading-actions { grid-template-columns: 1fr 1fr; }
  .wa-provider-heading .primary-button span { display: inline; }
  .wa-provider-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .wa-provider-summary article { padding: 10px; }
  .wa-provider-summary b { font-size: 16px; }
  .wa-webhook-banner { grid-template-columns: 34px minmax(0, 1fr); gap: 9px; padding: 11px; }
  .wa-webhook-icon { width: 34px; height: 34px; }
  .wa-webhook-banner .soft-button { grid-column: 1 / -1; width: 100%; }
  .wa-provider-grid { grid-template-columns: minmax(0, 1fr); }
  .wa-provider-grid .wa-session-card { min-height: 0; }
  .wa-session-card { padding: 14px; border-radius: 13px; }
  .wa-session-identity strong { font-size: 15px; }
  .wa-session-details { grid-template-columns: minmax(0, 1fr); }
  .wa-session-actions { grid-template-columns: minmax(0, 1fr) 41px; }
  .wa-session-button.qr { grid-column: 1 / -1; }
  .wa-session-button.edit { grid-column: 1; }
  .wa-session-button.delete { grid-column: 2; }
  .wa-delivery-panel { padding: 12px; }
  .wa-delivery-head { display: grid; }
  .wa-delivery-head-actions { width: 100%; display: grid; grid-template-columns: 36px minmax(0, 1fr); }
  .wa-delivery-head-actions .soft-button { width: 100%; }
  .wa-delivery-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa-delivery-metrics > div:nth-child(n) { padding: 9px; border: 1px solid rgba(116, 147, 193, .13) !important; }
  .wa-history-toolbar { grid-template-columns: minmax(0, 1fr); padding: 8px; }
  .wa-history-list article { grid-template-columns: 32px minmax(0, 1fr); align-items: start; }
  .wa-history-list article > div:nth-of-type(2) { display: none; }
  .wa-history-actions { grid-column: 2; align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .wa-history-status { width: 32px; height: 32px; }
  .wa-settings-content .template-page-header h2, .wa-settings-content .reminder-page-head h2 { font-size: 18px; }
}

@media (max-width: 420px) {
  .wa-console-hero-main { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 9px; }
  .wa-console-mark { width: 38px; height: 38px; }
  .wa-console-hero-main p { grid-column: 1 / -1; }
  .wa-console-kpis { grid-template-columns: minmax(0, 1fr); }
  .wa-session-actions { grid-template-columns: minmax(0, 1fr) 40px; }
}

/* Compact WhatsApp workspace: dense without losing operational detail. */
.page-head:has(+ .settings-view[data-settings-view="whatsapp"]) { padding: 10px 12px; }
.page-head:has(+ .settings-view[data-settings-view="whatsapp"]) h2 { font-size: 17px; }
.page-head:has(+ .settings-view[data-settings-view="whatsapp"]) p { margin-top: 1px; font-size: 9px; }
.settings-view[data-settings-view="whatsapp"] > .whatsapp-settings-shell { margin-top: 7px !important; }
.wa-settings-console { gap: 10px; }

.wa-settings-tabs { display: flex; align-items: stretch; gap: 20px; padding: 0; overflow-x: auto; border: 0; border-bottom: 1px solid #263852; border-radius: 0; background: transparent; box-shadow: none; }
.wa-settings-tabs button { position: relative; flex: 0 0 auto; width: auto; min-height: 42px; justify-content: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 0; background: transparent; }
.wa-settings-tabs button::after { display: block; content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 2px; border-radius: 2px 2px 0 0; background: transparent; }
.wa-settings-tabs button:hover { border: 0; color: #d8e6fb; background: rgba(47, 91, 170, .07); }
.wa-settings-tabs button.active { border: 0; color: #7287ff; background: transparent; box-shadow: none; }
.wa-settings-tabs button.active::after { background: #5268ff; }
.wa-tab-icon, .wa-settings-tabs button.active .wa-tab-icon { width: 18px; height: 18px; border-radius: 0; color: #2fd0ff; background: transparent; }
.wa-settings-tabs button.active .wa-tab-icon { color: #667cff; }
.wa-tab-icon svg { width: 15px; height: 15px; }
.wa-tab-copy { display: block; }
.wa-tab-copy strong { font-size: 11px; }

.wa-provider-view, .wa-tab-panel { gap: 9px; }
.wa-provider-heading, .wa-tab-panel > header { align-items: center; }
.wa-section-eyebrow { display: none; }
.wa-provider-heading h2, .wa-tab-panel h2 { margin-top: 0; font-size: 18px; }
.wa-provider-heading p, .wa-tab-panel header p { margin-top: 2px; font-size: 9px; line-height: 1.35; }
.wa-provider-heading .primary-button, .wa-provider-heading .soft-button, .wa-tab-panel > header .primary-button, .wa-tab-panel > header .soft-button { min-height: 33px; padding: 5px 9px; font-size: 9px; }
.wa-heading-actions { gap: 5px; }

.wa-provider-summary, .wa-reminder-metrics { gap: 6px; }
.wa-provider-summary article, .wa-reminder-metrics article { min-height: 45px; padding: 7px 9px; border-radius: 7px; }
.wa-provider-summary article::after { width: 48px; height: 48px; right: -15px; bottom: -25px; }
.wa-provider-summary span, .wa-reminder-metrics span { font-size: 8px; }
.wa-provider-summary b, .wa-reminder-metrics b { margin-top: 2px; font-size: 14px; }
.wa-priority-warning, .wa-readiness-banner { min-height: 34px; padding: 7px 9px; border-radius: 7px; font-size: 8px; }
.wa-priority-warning svg, .wa-readiness-banner svg { width: 13px; height: 13px; }

.wa-webhook-banner { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; padding: 8px 10px; border-radius: 8px; }
.wa-webhook-icon { width: 24px; height: 24px; border-radius: 6px; background: transparent; }
.wa-webhook-icon svg { width: 14px; height: 14px; }
.wa-webhook-banner strong { font-size: 10px; }
.wa-webhook-banner small { margin-top: 1px; font-size: 8px; }
.wa-webhook-banner code { margin-top: 5px; padding: 6px 8px; border-radius: 5px; font-size: 9px; }
.wa-webhook-banner .soft-button { min-height: 30px; padding: 4px 8px; font-size: 8px; }

.wa-provider-grid { grid-template-columns: repeat(auto-fill, minmax(310px, 430px)); gap: 9px; }
.wa-provider-grid .wa-session-card { min-height: 318px; }
.wa-session-card { padding: 11px; border-radius: 10px; box-shadow: 0 10px 26px rgba(0,0,0,.17); }
.wa-session-card:hover { box-shadow: 0 13px 30px rgba(0,0,0,.21); }
.wa-session-accent { height: 2px; }
.wa-session-identity { gap: 7px; }
.wa-session-logo { width: 30px; height: 30px; border-radius: 7px; }
.wa-session-logo svg { width: 15px; height: 15px; }
.wa-session-identity span:not(.wa-session-logo) { font-size: 7px; }
.wa-session-identity strong { margin-top: 1px; font-size: 14px; }
.wa-session-power { width: 27px; height: 27px; border: 0; border-radius: 7px; }
.wa-session-power svg { width: 15px; height: 15px; }
.wa-session-badges { gap: 4px; margin-top: 7px; }
.wa-provider-badge, .wa-connection-badge, .wa-provider-disabled, .wa-provider-role { min-height: 20px; padding: 3px 6px; font-size: 7px; }
.wa-connection-badge i { width: 5px; height: 5px; }
.wa-provider-description { min-height: 0; margin: 6px 0; font-size: 8px; line-height: 1.35; }
.wa-session-sender { grid-template-columns: 26px minmax(0, 1fr); gap: 7px; padding: 6px 7px; border-radius: 7px; }
.wa-session-sender > span { width: 26px; height: 26px; border-radius: 6px; }
.wa-session-sender svg { width: 13px; height: 13px; }
.wa-session-sender dt { font-size: 7px; }
.wa-session-sender dd { margin-top: 1px; font-size: 10px; }
.wa-session-pairing-note { min-height: 36px; gap: 6px; padding: 6px 7px; border-radius: 7px; font-size: 8px; }
.wa-session-pairing-note svg { width: 13px; height: 13px; }
.wa-session-details { gap: 1px; margin: 6px 0; border-radius: 7px; }
.wa-session-details > div, .wa-session-details > div:first-child { gap: 2px; padding: 5px 7px; }
.wa-session-details dt { gap: 4px; font-size: 7px; }
.wa-session-details dt svg { width: 10px; height: 10px; }
.wa-session-details dd { font-size: 8px; }
.wa-session-actions { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 33px; gap: 5px; }
.wa-session-button { min-height: 31px; padding: 4px 7px; border-radius: 6px; font-size: 8px; }
.wa-session-button svg { width: 12px; height: 12px; }
.wa-session-button.restart { min-height: 30px; }
.wa-provider-grid .gateway-notice { margin-bottom: 7px; }

.wa-delivery-panel { padding: 10px; border-radius: 9px; box-shadow: 0 9px 24px rgba(0,0,0,.13); }
.wa-delivery-title { gap: 7px; }
.wa-delivery-title > span { width: 27px; height: 27px; border-radius: 6px; }
.wa-delivery-title svg { width: 14px; height: 14px; }
.wa-delivery-head strong { font-size: 10px; }
.wa-delivery-head small { margin-top: 1px; font-size: 8px; }
.wa-delivery-head-actions .icon-button { width: 29px; height: 29px; }
.wa-delivery-head-actions .soft-button { min-height: 29px; padding: 4px 7px; font-size: 8px; }
.wa-delivery-metrics { gap: 5px; margin-top: 8px; }
.wa-delivery-metrics > div { padding: 6px 7px; border-radius: 6px; }
.wa-delivery-metrics span { font-size: 7px; }
.wa-delivery-metrics b { margin-top: 2px; font-size: 9px; }
.wa-delivery-panel .gateway-outbox { margin-top: 8px; }
.gateway-outbox-title { margin-bottom: 2px; font-size: 8px; }
.gateway-outbox-row { gap: 6px; min-height: 36px; padding: 4px 2px; }
.gateway-outbox-row > .wa-outbox-avatar { width: 23px; height: 23px; border-radius: 6px; }
.wa-outbox-avatar svg { width: 11px; height: 11px; }
.gateway-outbox-row b { font-size: 8px; }
.gateway-outbox-row small { font-size: 7px; }
.wa-outbox-empty { min-height: 76px; }

.wa-send-guide { gap: 6px; }
.wa-send-guide article { grid-template-columns: 28px minmax(0, 1fr); gap: 7px; padding: 7px 8px; border-radius: 7px; }
.wa-send-guide article > span { width: 28px; height: 28px; border-radius: 7px; }
.wa-send-guide svg { width: 13px; height: 13px; }
.wa-send-guide strong { font-size: 8px; }
.wa-send-guide small { margin-top: 1px; font-size: 7px; }

.wa-history-toolbar { gap: 6px; padding: 6px; border-radius: 7px; }
.wa-history-toolbar input, .wa-history-toolbar select { min-height: 32px; font-size: 8px; }
.wa-history-list { border-radius: 8px; }
.wa-history-list article { grid-template-columns: 27px minmax(170px, 1fr) minmax(125px, .5fr) auto; gap: 7px; min-height: 50px; padding: 7px 8px; }
.wa-history-status { width: 27px; height: 27px; border-radius: 6px; }
.wa-history-status svg { width: 12px; height: 12px; }
.wa-history-list strong { font-size: 9px; }
.wa-history-list b, .wa-history-list small, .wa-history-list .wa-history-message, .wa-history-list .wa-history-error { font-size: 7px; }
.wa-history-actions { gap: 3px; }
.wa-history-actions .wa-inline-action { min-height: 20px; padding: 3px 5px; font-size: 7px; }

.wa-settings-content .notification-template-page, .wa-settings-content .reminder-center { gap: 10px; padding-top: 0; }
.wa-settings-content .template-page-header h2, .wa-settings-content .reminder-page-head h2 { font-size: 18px; }
.wa-settings-content .template-page-header p, .wa-settings-content .reminder-page-head p { font-size: 9px; }
.wa-settings-content .template-summary-grid { gap: 7px; }
.wa-settings-content .template-summary-card { min-height: 58px; padding: 8px; }
.wa-settings-content .template-summary-card > span { width: 28px; height: 28px; }
.wa-settings-content .template-toolbar { gap: 6px; padding: 7px; }

@media (max-width: 760px) {
  .page-head:has(+ .settings-view[data-settings-view="whatsapp"]) { padding: 8px 9px; }
  .wa-settings-console { gap: 8px; }
  .wa-settings-tabs { gap: 3px; padding: 0; border-radius: 0; }
  .wa-settings-tabs button { flex: 0 0 auto; min-height: 39px; gap: 5px; padding: 5px 8px; }
  .wa-tab-icon { width: 16px; height: 16px; }
  .wa-tab-icon svg { width: 13px; height: 13px; }
  .wa-tab-copy strong { font-size: 9px; }
  .wa-provider-heading, .wa-tab-panel > header { gap: 7px; }
  .wa-provider-heading h2, .wa-tab-panel h2 { font-size: 15px; }
  .wa-heading-actions { gap: 5px; }
  .wa-provider-summary { gap: 5px; }
  .wa-provider-summary article { min-height: 40px; padding: 6px 7px; }
  .wa-provider-summary b { font-size: 12px; }
  .wa-webhook-banner { grid-template-columns: 22px minmax(0, 1fr); gap: 6px; padding: 7px; }
  .wa-webhook-icon { width: 22px; height: 22px; }
  .wa-webhook-banner .soft-button { min-height: 28px; }
  .wa-provider-grid { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .wa-provider-grid .wa-session-card { min-height: 0; }
  .wa-session-card { padding: 10px; border-radius: 9px; }
  .wa-session-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa-session-actions { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 32px; }
  .wa-session-button.qr, .wa-session-button.edit, .wa-session-button.delete { grid-column: auto; }
  .wa-delivery-panel { padding: 8px; }
  .wa-delivery-head { display: flex; }
  .wa-delivery-head-actions { width: auto; display: flex; }
  .wa-delivery-head-actions .soft-button { width: auto; }
  .wa-delivery-metrics > div:nth-child(n) { padding: 6px; }
  .wa-send-guide { grid-template-columns: 1fr; }
  .wa-history-list article { grid-template-columns: 27px minmax(0, 1fr); }
  .wa-settings-content .template-page-header h2, .wa-settings-content .reminder-page-head h2 { font-size: 16px; }
}

@media (max-width: 420px) {
  .wa-session-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa-provider-grid .wa-session-card { padding: 9px; }
  .wa-provider-grid .wa-provider-description { margin: 5px 0; }
  .wa-provider-grid .wa-session-details { margin: 5px 0; }
  .wa-session-actions { grid-template-columns: minmax(0, 1fr) 32px; }
  .wa-session-button.qr { grid-column: 1 / -1; }
  .wa-session-button.edit { grid-column: 1; }
  .wa-session-button.delete { grid-column: 2; }
}

/* Application-wide compact density pass.
   Keep operational text readable while aligning spacing, controls, icons, cards,
   tables, forms, and dialogs to the same compact rhythm on every route. */
:root {
  --page-padding-desktop: 12px;
  --grid-gap-desktop: 8px;
  --card-padding-desktop: 10px;
  --input-height: 32px;
  --button-height: 32px;
  --topbar-height: 52px;
}

.page-head { min-height: 42px; gap: 8px; margin-bottom: 8px; padding: 7px 9px; }
.page-head p { margin-top: 1px; }
.page-actions { gap: 4px; }
.card-head { gap: 7px; margin-bottom: 6px; }
.card-head p { margin-top: 1px; }

.primary-button,
.secondary-button,
.outline-button,
.soft-button,
.success-button,
.danger-button { gap: 5px; padding-inline: 9px; }

.icon-button { width: 28px; height: 28px; }
.icon-button svg { width: 15px; height: 15px; }

.kpi-card { min-height: 76px; padding: 8px 9px; }
.kpi-top { padding-right: 34px; }
.kpi-icon { top: 8px; right: 9px; width: 28px; height: 28px; border-radius: 7px; }
.kpi-icon svg { width: 15px; height: 15px; }
.kpi-value { margin-top: 5px; }
.kpi-trend { padding-top: 3px; }

.management-kpi-grid,
.management-dashboard-grid,
.dashboard-bottom-grid { gap: 8px; }
.management-dashboard-grid,
.dashboard-bottom-grid,
.dashboard-jobs-table { margin-top: 8px; }
.admin-queue-grid { gap: 7px; margin-top: 8px; }
.queue-card { min-height: 64px; padding: 7px 37px 7px 8px; }
.queue-card > span { top: 7px; right: 7px; width: 26px; height: 26px; border-radius: 7px; }
.queue-card strong { margin-top: 4px; }
.queue-card em { margin-top: 3px; }

.table-toolbar { min-height: 38px; gap: 6px; padding: 5px 8px; }
.table-actions { gap: 5px; }
.search-input { min-height: 32px; }
th { height: 30px; padding: 5px 8px; }
td { height: 36px; padding: 6px 8px; }
.table-avatar { gap: 7px; }
.row-actions { gap: 4px; }
.action-dot { width: 26px; height: 26px; }
.pagination { padding: 6px 8px; }

.form-grid { gap: 8px; }
.form-group label { margin-bottom: 3px; }
.form-group > small { margin-top: 3px; }
textarea.form-control { min-height: 74px; padding-top: 7px; padding-bottom: 7px; }
.form-hint { margin-top: 4px; }
.form-section { margin: 10px 0 6px; padding-bottom: 4px; }
.form-footer { gap: 5px; margin-top: 8px; padding-top: 7px; }
.switch-row { gap: 10px; padding: 7px 0; }
.form-panel { padding: 8px; }
.form-panel legend { gap: 7px; }
.form-panel legend > span:first-child { width: 26px; height: 26px; }

.modal-head { padding: 8px 10px; }
.modal-body { padding: 10px; }
.modal-footer { gap: 5px; padding: 7px 10px; }

.notification-list { gap: 5px; }
.notification-card { gap: 6px; padding: 7px; }
.notification-icon { width: 26px; height: 26px; }
.notification-icon svg { width: 15px; height: 15px; }
.notification-copy p { margin-top: 2px; }
.notification-copy small { margin-top: 4px; }
.notification-config-grid { margin-top: 8px; }

.report-filter-card,
.report-kpis,
.report-overview-grid { margin-bottom: 8px; }
.report-filter-grid { gap: 6px; }
.report-filter-grid .form-control { min-height: 34px; }
.report-overview-grid { gap: 8px; }
.report-chart-shell,
.report-chart-shell canvas { min-height: 176px; height: 176px !important; }

.backup-zone { min-height: 132px; padding: 10px; }
.backup-zone h3 { margin: 7px 0 3px; font-size: 14px; }
.backup-zone p { margin-bottom: 10px; }

.notification-template-page { gap: 12px; }
.notification-template-grid { gap: 10px; }
.notification-template-card { min-height: 282px; gap: 8px; padding: 12px; border-radius: 10px; }
.notification-template-card > header { gap: 8px; }
.notification-template-card h3 { font-size: 13px; }
.notification-template-card dl { gap: 5px; }
.notification-template-card dl div { padding: 6px; border-radius: 7px; }
.notification-template-card > footer { gap: 5px; padding-top: 2px; }
.notification-template-card > footer > button { min-height: 32px; padding-inline: 6px; }
.template-toolbar .form-control,
.template-toolbar .soft-button { min-height: 34px; }

.reminder-page-head,
.reminder-alert,
.reminder-overview-grid,
.reminder-master-card { margin-bottom: 8px; }
.reminder-overview-grid { gap: 7px; }
.reminder-kpi { gap: 7px; padding: 9px; }
.reminder-kpi > span { width: 28px; height: 28px; border-radius: 7px; }
.reminder-master-card { gap: 9px; padding: 11px; }
.reminder-master-copy { gap: 8px; }
.reminder-master-icon { width: 32px; height: 32px; border-radius: 8px; }
.reminder-master-icon svg { width: 17px; height: 17px; }
.reminder-master-actions { gap: 5px; padding-top: 7px; }
.reminder-accordion { margin-bottom: 7px; border-radius: 9px; }
.reminder-accordion summary { gap: 8px; padding: 9px 10px; }
.reminder-accordion-body { padding: 9px 10px 10px; }
.reminder-form-grid,
.reminder-test-grid { gap: 8px; }
.reminder-rule-list { gap: 5px; }
.reminder-rule-row { gap: 7px; padding: 7px; }
.reminder-history-card { margin-top: 8px; }
.reminder-history-card > header { padding: 9px 10px; }
.reminder-log-toolbar { padding: 0 10px 8px; }
.reminder-log-table th,
.reminder-log-table td { padding: 7px 9px; }
.reminder-pagination { padding: 8px 10px; }
.reminder-save-bar { gap: 8px; margin-top: 9px; padding: 8px 10px; }

@media (max-width: 760px) {
  :root {
    --page-padding-mobile: 7px;
    --grid-gap-mobile: 5px;
    --card-padding-mobile: 7px;
    --topbar-height: 52px;
  }

  .page-head { min-height: 40px; margin-bottom: 7px; padding: 6px 8px; }
  .card-head { margin-bottom: 5px; }
  .kpi-card { min-height: 68px; padding: 6px; }
  .kpi-top { padding-right: 25px; }
  .kpi-icon { top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 6px; }
  .kpi-icon svg { width: 12px; height: 12px; }
  .kpi-value { margin-top: 3px; }

  .management-dashboard-grid .attendance-chart-card { min-height: 178px; }
  .management-dashboard-grid .attendance-chart-card .chart-shell,
  .management-dashboard-grid .attendance-chart-card .chart-shell canvas { min-height: 146px; height: 146px !important; }
  .chart-shell.compact,
  .chart-shell.compact canvas { min-height: 128px; height: 128px !important; }
  .donut-wrap { min-height: 126px; }
  .donut { width: 96px; height: 96px; }
  .donut::before { width: 68px; height: 68px; }
  .finance-today-list { gap: 4px; }
  .finance-today-row { grid-template-columns: 25px minmax(0, 1fr); gap: 6px; padding: 5px 6px; }
  .finance-today-row > span { width: 24px; height: 24px; }

  .table-toolbar { padding: 6px 7px; }
  .mobile-card-table tbody { gap: 5px; padding: 5px; }
  .mobile-card-table tr { padding: 7px; }
  .mobile-card-table td { padding: 3px 0; }

  .modal-head { padding: 8px 9px; }
  .modal-body { padding: 8px 7px; }
  .modal-footer { padding: 7px 7px calc(7px + env(safe-area-inset-bottom)); }

  .report-filter-card { padding: 8px; }
  .report-chart-shell,
  .report-chart-shell canvas { min-height: 148px; height: 148px !important; }

  .notification-template-page { gap: 9px; }
  .notification-template-grid { gap: 7px; }
  .notification-template-card { min-height: 0; gap: 7px; padding: 10px; }
  .notification-template-card > footer > button { min-height: 31px; }

  .reminder-center { padding-bottom: 94px; }
  .reminder-alert { gap: 8px; padding: 9px; }
  .reminder-kpi { padding: 8px; }
  .reminder-master-card { padding: 9px; }
  .reminder-accordion summary { padding: 8px 9px; }
  .reminder-accordion-body { padding: 8px 9px 9px; }
  .reminder-save-bar { bottom: 62px; }
}

/* Profile and printable technician identity */
.profile-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(420px, .95fr); align-items: start; gap: 10px; }
.profile-main-column, .profile-side-column { min-width: 0; display: grid; gap: 10px; }
.profile-account-card { overflow: visible; }
.profile-identity-row { min-width: 0; display: flex; align-items: center; gap: 12px; }
.profile-identity-row > div:last-child { min-width: 0; }
.profile-identity-row h2 { margin: 2px 0 3px; overflow: hidden; font-size: 19px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.profile-identity-row p { margin: 0; color: var(--text-secondary); font-size: 10px; }
.profile-eyebrow { color: var(--brand-cyan); font-size: 8px; font-weight: 800; letter-spacing: .7px; }
.profile-photo-frame { flex: 0 0 auto; width: 76px; height: 76px; display: grid; place-items: center; overflow: hidden; border: 3px solid color-mix(in srgb, var(--brand-primary) 34%, var(--surface-primary)); border-radius: 18px; color: #fff; background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary)); box-shadow: 0 8px 22px rgba(33, 103, 242, .18); font-size: 22px; font-weight: 800; }
.profile-photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-frame.management-company-photo { padding: 10px; background: var(--surface-primary); }
.profile-photo-frame.management-company-photo img { object-fit: contain; }
.profile-photo-editor { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding: 8px; border: 1px solid var(--border-secondary); border-radius: var(--radius-md); background: var(--surface-secondary); }
.profile-photo-editor label { position: relative; overflow: hidden; }
.profile-photo-editor input, .technician-photo-input input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.profile-photo-editor > small { flex: 1 1 190px; color: var(--text-muted); font-size: 9px; line-height: 1.4; }
.profile-edit-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-secondary); }
.profile-edit-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.profile-edit-heading strong, .profile-edit-heading small { display: block; }
.profile-edit-heading strong { font-size: 12px; }
.profile-edit-heading small { margin-top: 2px; color: var(--text-muted); font-size: 9px; }
.profile-edit-heading > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--brand-primary); background: var(--primary-soft); }
.profile-edit-heading svg { width: 15px; height: 15px; }
.profile-edit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.profile-edit-footer, .profile-password-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-secondary); }
.profile-edit-footer > small, .profile-password-footer > small { max-width: 65%; color: var(--text-muted); font-size: 8px; line-height: 1.45; }
.profile-details { margin-top: 10px; }
.profile-photo-cropper { display: grid; justify-items: stretch; gap: 12px; }
.profile-crop-stage { position: relative; width: min(100%, 360px); aspect-ratio: 1; justify-self: center; overflow: hidden; border: 1px solid var(--border-primary); border-radius: 16px; background: #071321; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04); }
.profile-crop-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; user-select: none; }
.profile-crop-stage canvas.is-dragging { cursor: grabbing; }
.profile-crop-guide { position: absolute; inset: 12px; border: 2px solid rgba(255, 255, 255, .9); border-radius: 14px; box-shadow: 0 0 0 999px rgba(2, 8, 18, .28), inset 0 0 0 1px rgba(4, 17, 37, .18); pointer-events: none; }
.profile-crop-guide::before, .profile-crop-guide::after { content: ""; position: absolute; opacity: .42; pointer-events: none; }
.profile-crop-guide::before { top: 0; bottom: 0; left: 33.333%; width: 33.333%; border-right: 1px solid #fff; border-left: 1px solid #fff; }
.profile-crop-guide::after { right: 0; left: 0; top: 33.333%; height: 33.333%; border-top: 1px solid #fff; border-bottom: 1px solid #fff; }
.profile-crop-zoom { display: grid; gap: 7px; }
.profile-crop-zoom > span { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 10px; font-weight: 700; }
.profile-crop-zoom svg { width: 14px; height: 14px; }
.profile-crop-zoom input { width: 100%; accent-color: var(--brand-primary); cursor: pointer; }
.profile-crop-help { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.profile-crop-help small { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 9px; line-height: 1.4; }
.profile-crop-help svg { flex: 0 0 auto; width: 14px; height: 14px; }
.profile-card-preview { display: grid; justify-items: stretch; }
.profile-card-preview > .full { margin-top: 10px; }
.technician-detail-card-panel { display: grid; justify-items: center; margin-top: 10px; }
.technician-detail-card-panel > .card-head { width: 100%; }
.technician-detail-card-panel > .technician-card-preview-tabs,
.technician-detail-card-panel > .technician-card-preview-stage,
.technician-detail-card-panel > .full { width: min(100%, 520px); }
.technician-detail-card-panel > .full { margin-top: 10px; }
.technician-card-size { padding: 4px 7px; border: 1px solid var(--border-primary); border-radius: 999px; color: var(--text-muted); background: var(--surface-secondary); font-size: 7px; font-weight: 750; white-space: nowrap; }
.technician-card-preview-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 9px; padding: 4px; border: 1px solid var(--border-secondary); border-radius: 10px; background: var(--surface-secondary); }
.technician-card-preview-tabs button { min-height: 32px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 7px; color: var(--text-muted); background: transparent; font: inherit; font-size: 9px; font-weight: 750; cursor: pointer; }
.technician-card-preview-tabs button:hover { color: var(--text-primary); background: var(--surface-hover); }
.technician-card-preview-tabs button.active { color: #fff; background: linear-gradient(135deg, #176df1, #6045ef); box-shadow: 0 5px 14px rgba(38, 91, 219, .22); }
.technician-card-preview-tabs svg { width: 14px; height: 14px; }
.technician-card-preview-stage { width: 100%; min-width: 0; display: grid; place-items: center; }
.technician-card-preview-stage .technician-id-card { display: none; }
.technician-card-preview-stage .technician-id-card.is-preview-active { display: grid; }
.profile-security-note { align-items: flex-start; margin-top: 9px; }
.profile-security-note svg { flex: 0 0 auto; width: 15px; height: 15px; }
.technician-photo-input { position: relative; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px; border: 1px solid var(--border-secondary); border-radius: var(--radius-sm); background: var(--surface-secondary); }
.technician-photo-input .file-preview { display: flex; margin: 0; }
.technician-photo-input .preview-image { width: 46px; height: 46px; aspect-ratio: 1; }
.technician-id-card { container-type: inline-size; position: relative; isolation: isolate; width: 100%; max-width: 520px; aspect-ratio: 85.6 / 54; overflow: hidden; border: 1px solid rgba(45, 137, 255, .42); border-radius: 18px; color: #fff; background: radial-gradient(circle at 12% 8%, rgba(0, 223, 245, .06), transparent 28%), linear-gradient(135deg, #020d20 0%, #03172d 52%, #08264b 100%); box-shadow: 0 14px 34px rgba(2, 13, 32, .28); }
.technician-card-front { grid-template-rows: 1.2% 23.8% 53% 22%; }
.technician-card-back { grid-template-rows: 1.2% 81% 17.8%; }
.technician-card-accent { position: relative; z-index: 5; background: linear-gradient(90deg, #00dff5, #1565ff 57%, #6445ff); }
.technician-card-orbit { position: absolute; z-index: -1; border: 1px solid rgba(21, 121, 255, .28); border-radius: 50%; pointer-events: none; }
.technician-card-orbit.orbit-one { top: -46cqw; right: -17cqw; width: 75cqw; height: 75cqw; box-shadow: 0 0 0 12cqw rgba(20, 121, 255, .025), 0 0 0 24cqw rgba(98, 70, 255, .018); }
.technician-card-orbit.orbit-two { right: 13cqw; bottom: -39cqw; width: 58cqw; height: 58cqw; border-color: rgba(0, 223, 245, .08); }
.technician-card-header { position: relative; z-index: 2; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 3cqw; padding: 2.7cqw 4.1cqw 1.9cqw; }
.technician-card-brand { min-width: 0; display: flex; align-items: center; gap: 2.4cqw; }
.technician-card-brand > img { flex: 0 0 auto; width: 9.6cqw; height: 9.6cqw; object-fit: contain; }
.technician-card-brand > div { min-width: 0; }
.technician-card-brand strong, .technician-card-brand span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.technician-card-brand strong { font-size: 4.4cqw; line-height: 1; letter-spacing: -.02em; }
.technician-card-brand span { margin-top: 1.1cqw; color: #a9c1e1; font-size: 1.75cqw; letter-spacing: .28em; }
.technician-card-verification { flex: 0 0 auto; display: flex; align-items: center; gap: 1.4cqw; }
.technician-card-verification > i, .technician-card-verification > svg { display: grid; width: 5.8cqw; height: 5.8cqw; color: #20e8d0; }
.technician-card-verification.is-inactive > i, .technician-card-verification.is-inactive > svg { color: #ff7b86; }
.technician-card-verification div { min-width: 0; }
.technician-card-verification small, .technician-card-verification strong { display: block; white-space: nowrap; }
.technician-card-verification small { color: #c7d7eb; font-size: 1.55cqw; font-weight: 650; }
.technician-card-verification strong { margin-top: .45cqw; font-size: 1.75cqw; }
.technician-card-front-body { position: relative; z-index: 2; min-width: 0; display: grid; grid-template-columns: 27cqw minmax(0, 1fr); align-items: center; gap: 4.2cqw; padding: 1.4cqw 4.1cqw 2.2cqw; }
.technician-card-photo { width: 27cqw; height: 31cqw; object-fit: cover; object-position: center; border: .9cqw solid rgba(65, 133, 226, .45); border-radius: 3.2cqw; background: #102d54; box-shadow: 0 5px 14px rgba(0, 4, 13, .24); }
.technician-card-initials { display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #175fca, #503fd2); font-size: 8cqw; font-weight: 800; }
.management-card-company-photo { padding: 3.5cqw; object-fit: contain; background: rgba(255, 255, 255, .96); }
.management-card-mark .technician-card-qr-frame { padding: 3cqw; }
.technician-card-primary { min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.technician-card-primary > small { color: #20e8d0; font-size: 2.25cqw; font-weight: 800; letter-spacing: .13em; }
.technician-card-primary h3 { max-width: 100%; margin: 1.8cqw 0 .65cqw; overflow: hidden; font-size: clamp(15px, 5.7cqw, 30px); line-height: 1.03; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.technician-card-primary > p { margin: 0; overflow: hidden; color: #b6c9e5; font-size: clamp(8px, 3.2cqw, 17px); text-overflow: ellipsis; white-space: nowrap; }
.technician-card-primary dl { min-width: 0; display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: 3.6cqw; margin: auto 0 0; }
.technician-card-primary dl div { min-width: 0; }
.technician-card-primary dt { color: #91a9ca; font-size: 1.65cqw; font-weight: 600; }
.technician-card-primary dd { margin: .8cqw 0 0; overflow: hidden; font-size: clamp(7px, 2.8cqw, 15px); font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.technician-card-front-footer { position: relative; z-index: 2; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr) auto; align-items: center; gap: 2cqw; margin: 0 4.1cqw; border-top: 1px solid rgba(132, 180, 236, .19); color: #b6c9e5; }
.technician-card-front-footer > span { min-width: 0; display: flex; align-items: center; gap: 1.5cqw; overflow: hidden; white-space: nowrap; }
.technician-card-front-footer svg { flex: 0 0 auto; width: 3.4cqw; height: 3.4cqw; color: #85b9f5; }
.technician-card-front-footer b { overflow: hidden; font-size: clamp(6px, 2.1cqw, 11px); font-weight: 600; text-overflow: ellipsis; }
.technician-card-status { display: inline-flex; align-items: center; gap: 1.2cqw; min-height: 6.5cqw; padding: 0 2.7cqw; border: 1px solid rgba(32, 214, 160, .62); border-radius: 999px; color: #e9fffa; background: rgba(12, 167, 128, .3); font-size: clamp(7px, 2.25cqw, 12px); letter-spacing: .04em; }
.technician-card-status i { width: 1.8cqw; height: 1.8cqw; border-radius: 50%; background: #20e8d0; box-shadow: 0 0 8px rgba(32, 232, 208, .6); }
.technician-card-status.inactive { border-color: rgba(255, 94, 106, .55); color: #ffe9eb; background: rgba(151, 33, 47, .32); }
.technician-card-status.inactive i { background: #ff6875; box-shadow: 0 0 8px rgba(255, 104, 117, .5); }
.technician-card-back-body { position: relative; z-index: 2; min-width: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .78fr) minmax(0, 1fr); gap: 3.1cqw; padding: 4.2cqw 4.1cqw 2.5cqw; }
.technician-card-mission { min-width: 0; }
.technician-card-mission h4 { margin: 0; color: #b6c9e5; font-size: 1.85cqw; letter-spacing: .04em; }
.technician-card-mission h4.accent-title { margin-top: 2.2cqw; color: #20e8d0; }
.technician-card-mission p { margin: 1cqw 0 0; color: #d5e2f3; font-size: 1.55cqw; line-height: 1.48; }
.technician-card-mission ul { display: grid; gap: .45cqw; margin: 1cqw 0 0; padding: 0; list-style: none; color: #d5e2f3; font-size: 1.35cqw; line-height: 1.35; }
.technician-card-mission li::before { content: "•"; margin-right: .8cqw; color: #66aaff; }
.technician-card-support { display: flex; align-items: center; gap: 1.5cqw; margin-top: 1.8cqw; padding: 1.4cqw; border: 1px solid rgba(21, 121, 255, .36); border-radius: 2cqw; background: linear-gradient(135deg, rgba(21, 101, 255, .2), rgba(12, 51, 101, .35)); }
.technician-card-support svg { flex: 0 0 auto; width: 3.5cqw; height: 3.5cqw; color: #91c5ff; }
.technician-card-support span, .technician-card-support small, .technician-card-support strong { min-width: 0; display: block; }
.technician-card-support small { color: #b6c9e5; font-size: 1.2cqw; }
.technician-card-support strong { margin-top: .35cqw; font-size: 1.65cqw; white-space: nowrap; }
.technician-card-qr { min-width: 0; display: flex; align-items: center; flex-direction: column; text-align: center; }
.technician-card-qr-frame { width: 23cqw; height: 23cqw; padding: 1.4cqw; border: .8cqw solid rgba(179, 204, 235, .26); border-radius: 2.3cqw; background: #fff; }
.technician-card-qr-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.technician-card-qr > strong { margin-top: 1.6cqw; color: #20e8d0; font-size: 1.65cqw; }
.technician-card-qr > p { margin: .7cqw 0 0; color: #c3d4e9; font-size: 1.3cqw; line-height: 1.35; }
.technician-card-back-details { min-width: 0; display: grid; align-content: center; gap: 1.7cqw; margin: 0; }
.technician-card-back-details > div { min-width: 0; display: grid; grid-template-columns: 4cqw minmax(0, 1fr); align-items: center; gap: 1.5cqw; }
.technician-card-back-details svg { width: 3.4cqw; height: 3.4cqw; color: #6eaaff; }
.technician-card-back-details span, .technician-card-back-details dt, .technician-card-back-details dd { min-width: 0; display: block; }
.technician-card-back-details dt { color: #91a9ca; font-size: 1.2cqw; }
.technician-card-back-details dd { margin: .4cqw 0 0; overflow: hidden; font-size: 1.8cqw; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.technician-card-back-details .text-active { color: #20e8d0; }
.technician-card-back-details .text-inactive { color: #ff7b86; }
.technician-card-back-footer { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 2cqw; border-top: 1px solid rgba(132, 180, 236, .2); background: rgba(13, 49, 94, .42); }
.technician-card-back-footer svg { width: 4cqw; height: 4cqw; color: #1688ff; }
.technician-card-back-footer span, .technician-card-back-footer strong, .technician-card-back-footer small { display: block; }
.technician-card-back-footer strong { font-size: 1.75cqw; }
.technician-card-back-footer small { margin-top: .35cqw; color: #a9bedb; font-size: 1.35cqw; }
.technician-print-options { display: grid; gap: 13px; }
.technician-print-options > div:first-child { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--border-secondary); border-radius: 11px; background: var(--surface-secondary); }
.technician-print-options > div:first-child > svg { width: 24px; height: 24px; justify-self: center; color: var(--brand-primary); }
.technician-print-options strong, .technician-print-options small { display: block; }
.technician-print-options strong { font-size: 11px; }
.technician-print-options small { margin-top: 4px; color: var(--text-muted); font-size: 9px; line-height: 1.45; }
.technician-print-option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.technician-print-option-grid .primary-button { grid-column: 1 / -1; }
.technician-print-option-grid button { justify-content: center; }
.technician-verification-view { min-height: 100dvh; display: grid; place-items: center; padding: 28px 16px; color: #f5f9ff; background: radial-gradient(circle at 50% 0%, rgba(21, 101, 255, .18), transparent 34%), linear-gradient(145deg, #020d20, #061b35); }
.technician-verification-view.hidden { display: none; }
.verification-public-card { width: min(100%, 460px); padding: 20px; border: 1px solid rgba(70, 145, 245, .28); border-top: 3px solid #1688ff; border-radius: 20px; background: linear-gradient(155deg, rgba(8, 31, 61, .98), rgba(2, 13, 32, .98)); box-shadow: 0 22px 60px rgba(0, 4, 13, .42); }
.verification-public-card.is-verified { border-top-color: #20e8d0; }
.verification-public-card.is-inactive, .verification-public-card.is-invalid { border-top-color: #ff6875; }
.verification-public-brand { display: flex; align-items: center; gap: 11px; }
.verification-public-brand img { width: 50px; height: 50px; object-fit: contain; }
.verification-public-brand strong, .verification-public-brand span { display: block; }
.verification-public-brand strong { font-size: 20px; }
.verification-public-brand span { margin-top: 3px; color: #91a9ca; font-size: 9px; letter-spacing: .17em; }
.verification-public-status { display: flex; align-items: center; gap: 11px; margin-top: 18px; padding: 13px; border: 1px solid rgba(32, 232, 208, .32); border-radius: 13px; color: #20e8d0; background: rgba(14, 139, 117, .12); }
.verification-public-status.is-inactive, .verification-public-status.is-invalid { border-color: rgba(255, 104, 117, .32); color: #ff8791; background: rgba(153, 35, 49, .13); }
.verification-public-status > svg { flex: 0 0 auto; width: 30px; height: 30px; }
.verification-public-status strong, .verification-public-status span { display: block; }
.verification-public-status strong { font-size: 12px; letter-spacing: .04em; }
.verification-public-status span { margin-top: 3px; color: #b6c9e5; font-size: 9px; line-height: 1.4; }
.verification-public-identity { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 14px; margin-top: 18px; }
.verification-public-photo { width: 88px; height: 100px; display: grid; place-items: center; overflow: hidden; border: 3px solid rgba(70, 145, 245, .35); border-radius: 14px; color: #fff; background: linear-gradient(145deg, #175fca, #503fd2); font-size: 25px; font-weight: 800; }
.verification-public-photo img { width: 100%; height: 100%; object-fit: cover; }
.verification-public-identity small { color: #20e8d0; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.verification-public-identity h1 { margin: 5px 0 2px; overflow-wrap: anywhere; font-size: 26px; line-height: 1.08; }
.verification-public-identity p { margin: 0; color: #b6c9e5; font-size: 12px; }
.verification-public-details { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0 0; }
.verification-public-details > div { min-width: 0; padding: 10px; border: 1px solid rgba(116, 158, 211, .16); border-radius: 10px; background: rgba(8, 36, 72, .52); }
.verification-public-details > div:last-child { grid-column: 1 / -1; }
.verification-public-details dt { color: #91a9ca; font-size: 8px; text-transform: uppercase; }
.verification-public-details dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 11px; font-weight: 750; }
.verification-status-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 23px; padding: 0 9px; border: 1px solid rgba(32, 214, 160, .45); border-radius: 999px; color: #bfffee; background: rgba(12, 167, 128, .18); font-size: 9px; }
.verification-status-pill i { width: 7px; height: 7px; border-radius: 50%; background: #20e8d0; }
.verification-status-pill.inactive { border-color: rgba(255, 104, 117, .45); color: #ffd4d8; background: rgba(153, 35, 49, .18); }
.verification-status-pill.inactive i { background: #ff6875; }
.verification-public-note { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0; padding: 10px; border-radius: 10px; color: #91a9ca; background: rgba(14, 44, 81, .5); font-size: 8px; line-height: 1.5; }
.verification-public-note svg { flex: 0 0 auto; width: 15px; height: 15px; color: #69a8ef; }
.verification-public-help { margin: 18px 0; color: #b6c9e5; font-size: 11px; line-height: 1.6; }
.overtime-form-note { align-items: flex-start; margin-bottom: 10px; }
.overtime-form-note svg { flex: 0 0 auto; width: 15px; height: 15px; }

/* Light mode uses daylight surfaces throughout the application shell. */
@media screen {
  html[data-theme="light"] body { background: var(--background-primary); color: var(--text-primary); }
  html[data-theme="light"] .sidebar {
    --surface-primary: #ffffff;
    --surface-secondary: #f3f7fc;
    --surface-tertiary: #e9f0f8;
    --surface-hover: #eaf2fc;
    --surface-active: #e1ebff;
    --border-primary: rgba(28, 50, 78, .16);
    --border-secondary: rgba(28, 50, 78, .09);
    --text-primary: #102033;
    --text-secondary: #4f6178;
    --text-muted: #74849a;
    color: var(--text-primary);
  }
  html[data-theme="light"] .sidebar-foot { background: rgba(244, 248, 253, .96); }
  html[data-theme="light"] .topbar { background: rgba(255, 255, 255, .92); }
  html[data-theme="light"] .topbar-profile { color: var(--text-primary); }
  html[data-theme="light"] .page-head,
  html[data-theme="light"] .technician-greeting { background: rgba(255, 255, 255, .72); }
  html[data-theme="light"] .card { background: linear-gradient(180deg, #fff, #fbfcfe); }
  html[data-theme="light"] .card.flat { background: var(--surface-secondary); }
  html[data-theme="light"] .kpi-card,
  html[data-theme="light"] .queue-card,
  html[data-theme="light"] .tech-mini-card,
  html[data-theme="light"] .tech-daily-card { background: #fff; box-shadow: var(--shadow-card); }
  html[data-theme="light"] .kpi-card:hover,
  html[data-theme="light"] .queue-card:hover { background: #f8faff; }
  html[data-theme="light"] th { color: #667991; background: #edf2f8; }
  html[data-theme="light"] .form-control:disabled { background: #e8edf4; }
  html[data-theme="light"] input[type="date"].form-control,
  html[data-theme="light"] input[type="datetime-local"].form-control,
  html[data-theme="light"] input[type="time"].form-control,
  html[data-theme="light"] input[type="month"].form-control { color-scheme: light; }
  html[data-theme="light"] .toast { color: var(--text-primary); background: #fff; }
  html[data-theme="light"] .mobile-bottom-nav { background: rgba(255, 255, 255, .97); box-shadow: 0 -10px 28px rgba(32, 54, 84, .12); }
  html[data-theme="light"] .mobile-nav-item { color: #61728a; }
  html[data-theme="light"] .hero-card,
  html[data-theme="light"] .clock-card,
  html[data-theme="light"] .job-detail-hero,
  html[data-theme="light"] .technician-detail-hero {
    --text-primary: #f7fbff;
    --text-secondary: #b4c6dc;
    --text-muted: #7f96b3;
    color: var(--text-primary);
  }
  html[data-theme="light"] .company-logo-image,
  html[data-theme="light"] .camera-frame,
  html[data-theme="light"] .job-photo-preview,
  html[data-theme="light"] .photo-upload-preview { background: #edf2f8; }
  html[data-theme="light"] .wa-delivery-panel,
  html[data-theme="light"] .whatsapp-gateway-panel > .gateway-empty,
  html[data-theme="light"] .wa-webhook-banner,
  html[data-theme="light"] .wa-reminder-metrics article,
  html[data-theme="light"] .wa-template-grid article,
  html[data-theme="light"] .wa-tab-panel > .wa-channel-toggle,
  html[data-theme="light"] .wa-reminder-preview-list article,
  html[data-theme="light"] .wa-reminder-settings,
  html[data-theme="light"] .wa-history-toolbar label,
  html[data-theme="light"] .wa-history-toolbar select,
  html[data-theme="light"] .wa-history-list,
  html[data-theme="light"] .wa-history-detail dl > div,
  html[data-theme="light"] .reminder-kpi,
  html[data-theme="light"] .reminder-accordion,
  html[data-theme="light"] .reminder-check-row,
  html[data-theme="light"] .reminder-group-picker label,
  html[data-theme="light"] .reminder-rule-row,
  html[data-theme="light"] .reminder-template-grid article,
  html[data-theme="light"] .reminder-test-grid form,
  html[data-theme="light"] .reminder-history-card,
  html[data-theme="light"] .template-more > div { border-color: var(--border-primary); color: var(--text-primary); background: var(--surface-primary); box-shadow: var(--shadow-card); }
  html[data-theme="light"] .reminder-master-card { border-color: var(--border-primary); background: linear-gradient(145deg, #fff, #f3f7fc); }
  html[data-theme="light"] .reminder-day-selector span,
  html[data-theme="light"] .reminder-preview-box,
  html[data-theme="light"] .template-diff-view pre,
  html[data-theme="light"] .template-reset-diff pre,
  html[data-theme="light"] .wa-message-preview { color: var(--text-secondary); background: var(--surface-secondary); }
  html[data-theme="light"] .wa-webhook-banner code { color: #102033; background: #e9f0fb; }
  html[data-theme="light"] .wa-reminder-time-grid input,
  html[data-theme="light"] .wa-provider-form .form-control { color: var(--text-primary); background: #fff; color-scheme: light; }
  html[data-theme="light"] .wa-provider-form .is-disabled .form-control { color: var(--text-muted); background: #e8edf4; }
  html[data-theme="light"] .wa-session-card { color: #f7fbff; }
}

@media screen {
  html[data-theme="light"] .wa-settings-tabs { border-color: var(--border-primary); background: rgba(255, 255, 255, .78); box-shadow: var(--shadow-card); }
  html[data-theme="light"] .wa-settings-tabs button { color: var(--text-secondary); }
  html[data-theme="light"] .wa-settings-tabs button:hover { color: var(--text-primary); border-color: var(--border-primary); background: var(--surface-hover); }
  html[data-theme="light"] .wa-settings-tabs button.active { color: #245fe3; border-color: rgba(33, 103, 242, .25); background: linear-gradient(135deg, rgba(33, 103, 242, .1), rgba(102, 52, 239, .07)); box-shadow: inset 0 1px #fff, 0 6px 16px rgba(33, 103, 242, .08); }
  html[data-theme="light"] .wa-settings-tabs button.active .wa-tab-copy small { color: #617695; }
  html[data-theme="light"] .wa-provider-heading h2,
  html[data-theme="light"] .wa-tab-panel h2,
  html[data-theme="light"] .template-page-header h2,
  html[data-theme="light"] .template-results-heading strong { color: var(--text-primary); }
  html[data-theme="light"] .wa-provider-heading p,
  html[data-theme="light"] .wa-tab-panel header p,
  html[data-theme="light"] .template-page-header p { color: var(--text-secondary); }
  html[data-theme="light"] .wa-provider-summary article,
  html[data-theme="light"] .wa-reminder-metrics article,
  html[data-theme="light"] .template-summary-card,
  html[data-theme="light"] .wa-console-kpis article { border-color: var(--border-primary); color: var(--text-primary); background: #fff; box-shadow: var(--shadow-card); }
  html[data-theme="light"] .wa-provider-summary span,
  html[data-theme="light"] .wa-reminder-metrics span,
  html[data-theme="light"] .wa-console-kpis small { color: var(--text-secondary); }
  html[data-theme="light"] .wa-provider-summary b,
  html[data-theme="light"] .wa-reminder-metrics b,
  html[data-theme="light"] .template-summary-card strong,
  html[data-theme="light"] .wa-console-kpis strong { color: var(--text-primary); }
  html[data-theme="light"] .wa-provider-summary b.success,
  html[data-theme="light"] .wa-reminder-metrics b.success,
  html[data-theme="light"] .wa-console-kpis strong.success { color: #13925a; }
  html[data-theme="light"] .wa-provider-summary b.danger,
  html[data-theme="light"] .wa-reminder-metrics b.danger,
  html[data-theme="light"] .wa-console-kpis strong.danger { color: #d83345; }
  html[data-theme="light"] .wa-webhook-banner strong,
  html[data-theme="light"] .wa-template-grid strong,
  html[data-theme="light"] .wa-reminder-preview-list strong,
  html[data-theme="light"] .wa-delivery-head strong,
  html[data-theme="light"] .wa-send-guide strong { color: var(--text-primary); }
  html[data-theme="light"] .wa-webhook-banner small,
  html[data-theme="light"] .wa-template-grid p,
  html[data-theme="light"] .wa-reminder-preview-list small,
  html[data-theme="light"] .wa-send-guide small { color: var(--text-secondary); }
  html[data-theme="light"] .template-toolbar,
  html[data-theme="light"] .wa-history-toolbar { border-color: var(--border-primary); background: rgba(255, 255, 255, .82); }
  html[data-theme="light"] .template-summary-card:hover { color: var(--text-primary); background: var(--surface-hover); }
  html[data-theme="light"] .reminder-loading span { background: linear-gradient(100deg, #edf2f8 20%, #dfe7f1 38%, #edf2f8 55%); background-size: 220% 100%; }
  html[data-theme="light"] .reminder-kpi b,
  html[data-theme="light"] .reminder-accordion summary strong,
  html[data-theme="light"] .reminder-group-picker strong { color: var(--text-primary); }
  html[data-theme="light"] .reminder-kpi small,
  html[data-theme="light"] .reminder-master-copy p,
  html[data-theme="light"] .reminder-master-copy small,
  html[data-theme="light"] .reminder-accordion summary small,
  html[data-theme="light"] .reminder-form-grid > label > span,
  html[data-theme="light"] .reminder-test-grid label > span,
  html[data-theme="light"] .reminder-field-title,
  html[data-theme="light"] .reminder-form-grid small,
  html[data-theme="light"] .reminder-group-picker small,
  html[data-theme="light"] .reminder-rule-row small { color: var(--text-secondary); }
  html[data-theme="light"] .reminder-master-actions,
  html[data-theme="light"] .reminder-accordion-body,
  html[data-theme="light"] .reminder-log-table-wrap { border-color: var(--border-primary); }
  html[data-theme="light"] .reminder-save-bar { border-color: var(--border-primary); background: rgba(255, 255, 255, .96); box-shadow: 0 12px 30px rgba(32, 54, 84, .14); }
  html[data-theme="light"] .reminder-save-bar > span { color: var(--text-secondary); }
  html[data-theme="light"] .wa-send-guide article,
  html[data-theme="light"] .wa-delivery-panel,
  html[data-theme="light"] .wa-delivery-metrics > div { border-color: var(--border-primary) !important; color: var(--text-primary); background: #fff; box-shadow: var(--shadow-card); }
  html[data-theme="light"] .wa-history-list article + article { border-top-color: var(--border-primary); }
}

/* Complete light-theme surface coverage.
   Keep only maps, QR, WhatsApp message previews, and the ID card branded dark. */
@media screen {
  html[data-theme="light"] .page-outlet { background-color: transparent; }

  html[data-theme="light"] .hero-card,
  html[data-theme="light"] .clock-card,
  html[data-theme="light"] .job-detail-hero,
  html[data-theme="light"] .technician-detail-hero {
    --text-primary: #102033;
    --text-secondary: #4f6178;
    --text-muted: #74849a;
    color: var(--text-primary);
    border-color: var(--border-primary);
    background: linear-gradient(135deg, #ffffff, #edf4fd);
    box-shadow: var(--shadow-card);
  }
  html[data-theme="light"] .hero-split p,
  html[data-theme="light"] .welcome-copy small,
  html[data-theme="light"] .welcome-copy p { color: var(--text-secondary); }
  html[data-theme="light"] .hero-badge { color: #45617f; background: rgba(33, 103, 242, .08); }

  html[data-theme="light"] .clock-meta div,
  html[data-theme="light"] .job-column,
  html[data-theme="light"] .gateway-metric,
  html[data-theme="light"] .gateway-notice,
  html[data-theme="light"] .filter-bar,
  html[data-theme="light"] .calendar-weekdays,
  html[data-theme="light"] .calendar-day,
  html[data-theme="light"] .calendar-day.empty {
    color: var(--text-primary);
    border-color: var(--border-primary);
    background: var(--surface-primary);
  }
  html[data-theme="light"] .calendar-day.empty { background: var(--surface-secondary); }
  html[data-theme="light"] .success-button { color: #117a49; background: var(--success-soft); }
  html[data-theme="light"] .danger-button { color: #b42335; background: var(--danger-soft); }
  html[data-theme="light"] .secondary-button { color: #245dcc; }
  html[data-theme="light"] .action-dot:hover,
  html[data-theme="light"] .profile-menu button:hover,
  html[data-theme="light"] .search-result-item:hover,
  html[data-theme="light"] .tab-button:hover { color: var(--text-primary); }

  html[data-theme="light"] .template-summary-card,
  html[data-theme="light"] .notification-template-card,
  html[data-theme="light"] .template-toolbar,
  html[data-theme="light"] .template-pagination,
  html[data-theme="light"] .template-related-inline,
  html[data-theme="light"] .placeholder-panel,
  html[data-theme="light"] .template-validation-list article,
  html[data-theme="light"] .template-diff-view,
  html[data-theme="light"] .notification-template-card dl div,
  html[data-theme="light"] .template-card-message {
    color: var(--text-primary);
    border-color: var(--border-primary);
    background: var(--surface-primary);
    box-shadow: var(--shadow-card);
  }
  html[data-theme="light"] .notification-template-card { background: linear-gradient(150deg, #ffffff, #f3f7fc); }
  html[data-theme="light"] .notification-template-card h3,
  html[data-theme="light"] .notification-template-card dd,
  html[data-theme="light"] .template-results-heading strong { color: var(--text-primary); }
  html[data-theme="light"] .notification-template-card code,
  html[data-theme="light"] .notification-template-card dt,
  html[data-theme="light"] .template-card-message { color: var(--text-secondary); }
  html[data-theme="light"] .template-more > div { color: var(--text-primary); background: var(--surface-primary); }
  html[data-theme="light"] .template-more > div button:hover { color: var(--text-primary); }
  html[data-theme="light"] .placeholder-panel > header input { color: var(--text-primary); }

  html[data-theme="light"] .whatsapp-gateway-panel > .gateway-loading,
  html[data-theme="light"] .whatsapp-gateway-panel > .gateway-empty,
  html[data-theme="light"] .wa-provider-empty,
  html[data-theme="light"] .wa-confirm-list article,
  html[data-theme="light"] .wa-recipient-list label,
  html[data-theme="light"] .wa-provider-enabled,
  html[data-theme="light"] .wa-session-pairing-note,
  html[data-theme="light"] .wa-session-details > div,
  html[data-theme="light"] .wa-history-detail dl > div {
    color: var(--text-primary);
    border-color: var(--border-primary);
    background: var(--surface-primary);
  }
  html[data-theme="light"] .wa-session-card {
    color: var(--text-primary);
    border-color: rgba(33, 103, 242, .22);
    background: linear-gradient(145deg, #ffffff, #eef5fc);
    box-shadow: var(--shadow-card);
  }
  html[data-theme="light"] .wa-session-identity strong,
  html[data-theme="light"] .wa-session-details dd,
  html[data-theme="light"] .wa-history-detail dd,
  html[data-theme="light"] .wa-recipient-list strong,
  html[data-theme="light"] .wa-provider-empty strong { color: var(--text-primary); }
  html[data-theme="light"] .wa-session-identity span:not(.wa-session-logo),
  html[data-theme="light"] .wa-session-pairing-note,
  html[data-theme="light"] .wa-session-details dt,
  html[data-theme="light"] .wa-history-detail dt,
  html[data-theme="light"] .wa-recipient-list small,
  html[data-theme="light"] .wa-provider-empty { color: var(--text-secondary); }
  html[data-theme="light"] .wa-session-button.edit { color: #26415f; background: #e7eef8; }
  html[data-theme="light"] .wa-session-button.restart { color: #9a5a00; background: var(--warning-soft); }
}

@media (max-width: 900px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
  .notification-bulk-toolbar { grid-template-columns: auto minmax(0, 1fr); }
  .notification-bulk-toolbar > div { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .notification-bulk-toolbar button { min-width: 0; justify-content: center; }
  .notification-card { grid-template-columns: auto minmax(0, 1fr); }
  .notification-item-actions { grid-column: 2; justify-content: flex-end; }
  .profile-layout, .profile-main-column, .profile-side-column { gap: 7px; }
  .profile-side-column { grid-template-columns: 1fr; }
  .profile-identity-row { align-items: flex-start; gap: 9px; }
  .profile-photo-frame { width: 58px; height: 58px; border-radius: 14px; font-size: 17px; }
  .profile-identity-row h2 { font-size: 16px; }
  .profile-photo-editor { align-items: stretch; }
  .profile-photo-editor .primary-button,
  .profile-photo-editor .soft-button { flex: 1 1 auto; justify-content: center; }
  .profile-photo-editor > small { flex-basis: 100%; }
  .profile-edit-grid { grid-template-columns: 1fr; }
  .profile-edit-footer, .profile-password-footer { align-items: stretch; flex-direction: column; }
  .profile-edit-footer > small, .profile-password-footer > small { max-width: none; }
  .profile-edit-footer .primary-button, .profile-password-footer .primary-button { width: 100%; justify-content: center; }
  .profile-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-crop-stage { width: min(100%, 320px); border-radius: 13px; }
  .profile-crop-help { align-items: stretch; flex-direction: column; }
  .profile-crop-help .soft-button { justify-content: center; }
  .profile-card-preview { justify-items: stretch; }
  .technician-id-card { width: 100%; max-width: 520px; }
  .technician-card-size { display: none; }
  .technician-print-option-grid { grid-template-columns: 1fr; }
  .technician-print-option-grid .primary-button { grid-column: auto; }
  .verification-public-card { padding: 15px; border-radius: 16px; }
  .verification-public-identity { grid-template-columns: 74px minmax(0, 1fr); gap: 11px; }
  .verification-public-photo { width: 74px; height: 86px; }
  .verification-public-identity h1 { font-size: 22px; }
  .technician-photo-input { align-items: flex-start; }
}

/* Technician command dashboard */
.app-view[data-role="technician"] { --sidebar-width: 242px; }
.app-view[data-role="technician"]:has(.technician-command-dashboard) { background: #020812; }
.app-view[data-role="technician"]:has(.technician-command-dashboard) .topbar { display: none; }
.app-view[data-role="technician"]:has(.technician-command-dashboard) .page-outlet {
  padding: 12px;
  background: radial-gradient(circle at 48% 0%, rgba(20, 120, 255, .08), transparent 32%), #020812;
}
.app-view[data-role="technician"] .sidebar {
  border-right-color: rgba(40, 120, 230, .28);
  background: linear-gradient(180deg, #06101f 0%, #040d1a 100%);
}
.app-view[data-role="technician"] .sidebar-head { height: 70px; padding: 0 13px; }
.app-view[data-role="technician"] .sidebar-head .brand-logo { width: 38px; height: 38px; }
.app-view[data-role="technician"] .sidebar-head .brand strong { font-size: 15px; letter-spacing: .02em; }
.app-view[data-role="technician"] .sidebar-head .brand small { margin-top: 2px; color: #91a8c6; font-size: 9px; letter-spacing: .12em; }
.app-view[data-role="technician"] .main-nav { padding: 8px 10px 10px; }
.app-view[data-role="technician"] .nav-group { margin-bottom: 5px; }
.app-view[data-role="technician"] .nav-group-header { min-height: 25px; padding: 4px 7px; color: #7387a3; font-size: 9px; letter-spacing: .09em; }
.app-view[data-role="technician"] .nav-item {
  min-height: 36px;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 11px;
}
.app-view[data-role="technician"] .nav-item.active {
  border-color: rgba(33, 117, 255, .6);
  background: linear-gradient(90deg, rgba(20, 120, 255, .48), rgba(18, 77, 178, .3));
  box-shadow: inset 2px 0 0 #4ba0ff, 0 0 16px rgba(20, 120, 255, .15);
}
.app-view[data-role="technician"] .nav-icon { width: 26px; height: 26px; }
.app-view[data-role="technician"] .nav-icon svg { width: 17px; height: 17px; }
.app-view[data-role="technician"] .sidebar-foot { gap: 7px; padding: 8px 10px 10px; }
.app-view[data-role="technician"] .sidebar-account-row { order: 1; grid-template-columns: minmax(0, 1fr) 34px; gap: 6px; }
.app-view[data-role="technician"] .system-mini { order: 2; min-height: 34px; padding: 5px 9px; }
.app-view[data-role="technician"] .sidebar-user {
  min-height: 54px;
  gap: 8px;
  padding: 6px 8px;
  border-color: rgba(45, 108, 192, .32);
  background: rgba(11, 28, 52, .86);
}
.app-view[data-role="technician"] .sidebar-user .avatar { width: 36px; height: 36px; }
.app-view[data-role="technician"] .sidebar-user strong { font-size: 11px; }
.app-view[data-role="technician"] .sidebar-user small { color: #9db0c9; font-size: 8.5px; }
.sidebar-user-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  color: #71a4e7;
  font-size: 7.5px;
  font-style: normal;
  white-space: nowrap;
}
.sidebar-user-meta i { width: 5px; height: 5px; border-radius: 50%; background: #10c878; box-shadow: 0 0 7px rgba(16, 200, 120, .8); }
.app-view[data-role="technician"] .logout-button { width: 34px; min-height: 54px; }

.technician-command-dashboard {
  --tech-background: #020812;
  --tech-panel: #071426;
  --tech-panel-deep: #051020;
  --tech-panel-soft: #0b1b31;
  --tech-border: rgba(30, 144, 255, .56);
  --tech-border-soft: rgba(84, 145, 218, .22);
  --tech-text: #f4f7ff;
  --tech-muted: #97a6bd;
  --tech-blue: #1478ff;
  --tech-blue-bright: #1e90ff;
  --tech-green: #10c878;
  --tech-yellow: #f5a623;
  --tech-red: #ff444f;
  width: 100%;
  max-width: 1720px;
  display: block;
  margin: 0 auto;
  color: var(--tech-text);
}
.technician-command-header {
  min-height: 86px;
  display: grid;
  grid-template-columns: minmax(300px, 1.35fr) minmax(130px, .55fr) minmax(190px, .78fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--tech-border-soft);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(7, 20, 38, .98), rgba(4, 14, 27, .98));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.technician-title-block, .technician-welcome, .technician-datetime, .technician-location, .technician-header-actions { min-width: 0; }
.technician-title-block { display: flex; align-items: center; gap: 10px; }
.technician-title-block h1 {
  margin: 0;
  overflow: hidden;
  color: var(--tech-text);
  font-size: clamp(24px, 2.15vw, 34px);
  line-height: 1;
  letter-spacing: -.04em;
  white-space: nowrap;
}
.technician-title-block h1 span { color: var(--tech-blue-bright); }
.tech-mobile-menu { display: none; }
.technician-welcome, .technician-datetime {
  min-height: 48px;
  display: grid;
  align-content: center;
  padding-left: 14px;
  border-left: 1px solid var(--tech-border-soft);
}
.technician-welcome small, .technician-datetime > span {
  overflow: hidden;
  color: var(--tech-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.technician-welcome strong { margin-top: 3px; overflow: hidden; color: var(--tech-text); font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.technician-datetime strong { margin-top: 4px; color: var(--tech-text); font-size: 18px; white-space: nowrap; }
.technician-datetime strong small { color: var(--tech-muted); font-size: 9px; }
.technician-location {
  min-height: 54px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  border-left: 1px solid var(--tech-border-soft);
}
.tech-location-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(20, 120, 255, .35);
  border-radius: 11px;
  color: #68b1ff;
  background: rgba(20, 120, 255, .14);
}
.tech-location-icon svg { width: 23px; height: 23px; }
.technician-location div { min-width: 0; }
.technician-location small, .technician-location strong, .technician-location em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.technician-location small { color: #76addd; font-size: 8.5px; font-weight: 800; letter-spacing: .08em; }
.technician-location strong { margin-top: 3px; color: var(--tech-text); font-size: 11px; }
.technician-location em { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--tech-muted); font-size: 9px; font-style: normal; }
.technician-location em.valid { color: var(--tech-green); }
.technician-location em svg { width: 11px; height: 11px; }
.technician-header-actions { display: flex; gap: 8px; }
.technician-header-actions button, .tech-mobile-menu {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--tech-border-soft);
  border-radius: 11px;
  color: #c7d6ea;
  background: rgba(7, 20, 38, .86);
}
.technician-header-actions button:hover, .tech-mobile-menu:hover { color: #fff; border-color: var(--tech-border); background: rgba(20, 120, 255, .16); }
.technician-header-actions button svg, .tech-mobile-menu svg { width: 19px; height: 19px; }
.technician-command-header .tech-mobile-menu { display: none; }
.technician-header-actions .technician-notification-button > span {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--tech-background);
  border-radius: 99px;
  color: #fff;
  background: var(--tech-red);
  font-size: 8px;
  font-weight: 800;
}
.technician-header-actions .technician-profile-shortcut { padding: 3px; border-color: color-mix(in srgb, var(--tech-blue-bright) 45%, var(--tech-border-soft)); }
.technician-profile-shortcut .avatar { position: static; width: 100%; height: 100%; border: 0; border-radius: 8px; font-size: 10px; }
.technician-profile-shortcut .avatar img { width: 100%; height: 100%; object-fit: cover; }
.technician-profile-shortcut::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 8px; height: 8px; border: 2px solid var(--tech-panel); border-radius: 50%; background: var(--tech-green); box-shadow: 0 0 7px rgba(16, 200, 120, .55); }
.technician-warning-bar {
  min-height: 50px;
  display: grid;
  grid-template-columns: 32px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 68, 79, .62);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(75, 9, 20, .58), rgba(30, 8, 16, .74));
  box-shadow: 0 0 18px rgba(255, 68, 79, .1);
}
.technician-warning-bar .warning-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--tech-red); }
.technician-warning-bar .warning-icon svg { width: 18px; height: 18px; }
.technician-warning-bar > strong { color: #ff6670; font-size: 11px; }
.technician-warning-bar p { margin: 0; color: #e5eaf3; font-size: 11px; }
.technician-warning-bar button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, .04);
  font-size: 10px;
  font-weight: 700;
}
.technician-warning-bar button svg { width: 13px; height: 13px; }
.technician-command-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1.08fr) minmax(390px, 1.42fr) minmax(300px, 1fr);
  grid-template-areas: "attendance active next" "quick progress activity";
  align-items: stretch;
  gap: 12px;
  margin-top: 12px;
}
.tech-command-card {
  min-width: 0;
  margin: 0;
  padding: 13px;
  overflow: hidden;
  border: 1px solid var(--tech-border);
  border-radius: 14px;
  color: var(--tech-text);
  background: linear-gradient(145deg, rgba(11, 27, 49, .98), rgba(5, 16, 32, .98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025), 0 10px 30px rgba(0, 0, 0, .16);
}
.tech-command-card:hover { transform: none; border-color: rgba(30, 144, 255, .72); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03), 0 12px 32px rgba(0, 0, 0, .2); }
.tech-attendance-card { grid-area: attendance; }
.tech-active-job-card { grid-area: active; }
.tech-next-jobs-card { grid-area: next; }
.tech-quick-card { grid-area: quick; }
.tech-progress-card { grid-area: progress; }
.tech-activity-card { grid-area: activity; align-self: start; }
.tech-active-job-card, .tech-next-jobs-card, .tech-progress-card { display: flex; flex-direction: column; }
.tech-active-job-card .tech-job-content, .tech-next-jobs-card .tech-next-job-list { flex: 1; }
.tech-attendance-card { min-height: 0; align-self: start; }
.tech-active-job-card, .tech-next-jobs-card { min-height: 350px; }
.tech-card-heading { min-height: 28px; display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.tech-card-heading > span:first-child {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(145deg, #1685ff, #1056d8);
  box-shadow: 0 0 12px rgba(20, 120, 255, .28);
  font-size: 11px;
  font-weight: 800;
}
.tech-card-heading h2 { min-width: 0; flex: 1; margin: 0; color: var(--tech-text); font-size: 13px; line-height: 1.2; letter-spacing: .01em; }
.tech-card-heading > button { flex: 0 0 auto; padding: 4px 0; border: 0; color: #47a4ff; background: transparent; font-size: 9px; font-weight: 700; }
.tech-card-heading > .badge { flex: 0 0 auto; }

.tech-attendance-overview { display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: center; gap: 12px; }
.tech-clock-ring {
  position: relative;
  width: 126px;
  height: 126px;
  display: grid;
  place-content: center;
  border: 4px solid rgba(20, 120, 255, .18);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 34, 67, .66) 0 56%, transparent 58%), conic-gradient(from -40deg, var(--tech-blue-bright) 0 28%, rgba(20, 120, 255, .12) 28% 100%);
  box-shadow: inset 0 0 18px rgba(20, 120, 255, .1), 0 0 18px rgba(20, 120, 255, .08);
  text-align: center;
}
.tech-clock-ring::after { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(115, 174, 237, .15); border-radius: 50%; }
.tech-clock-ring strong, .tech-clock-ring small { position: relative; z-index: 1; display: block; }
.tech-clock-ring strong { color: var(--tech-text); font-size: 21px; font-variant-numeric: tabular-nums; }
.tech-clock-ring small { margin-top: 5px; color: var(--tech-muted); font-size: 8px; }
.tech-attendance-state {
  min-height: 106px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 11px;
  border: 1px solid var(--tech-border-soft);
  border-radius: 11px;
  background: rgba(4, 15, 29, .55);
}
.tech-attendance-state strong { color: var(--tech-yellow); font-size: 13px; }
.tech-attendance-state.valid strong { color: var(--tech-green); }
.tech-attendance-state small { color: var(--tech-text); font-size: 9px; line-height: 1.45; }
.tech-attendance-state em { display: flex; align-items: center; gap: 5px; color: var(--tech-muted); font-size: 8px; font-style: normal; line-height: 1.35; }
.tech-attendance-state em svg { flex: 0 0 auto; width: 12px; height: 12px; }
.tech-attendance-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.tech-attendance-facts > div, .tech-job-metrics > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--tech-border-soft);
  border-radius: 9px;
  background: rgba(4, 15, 29, .46);
}
.tech-attendance-facts svg, .tech-job-metrics svg { width: 15px; height: 15px; color: #65aaff; }
.tech-attendance-facts small, .tech-attendance-facts b, .tech-job-metrics small, .tech-job-metrics b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tech-attendance-facts small, .tech-job-metrics small { color: #7790b0; font-size: 7.5px; }
.tech-attendance-facts b, .tech-job-metrics b { margin-top: 3px; color: var(--tech-text); font-size: 9px; }
.tech-job-metrics b.danger { color: #ff6973; }
.tech-attendance-main-action {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 11px;
  border: 1px solid rgba(70, 152, 255, .5);
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(110deg, #0879ee, #2f31e9);
  box-shadow: 0 8px 18px rgba(20, 120, 255, .18);
  font-size: 12px;
  font-weight: 800;
}
.tech-attendance-main-action.warning { border-color: rgba(245, 166, 35, .5); background: linear-gradient(110deg, #d78206, #f3a51f); }
.tech-attendance-main-action.complete { border-color: rgba(16, 200, 120, .5); background: linear-gradient(110deg, #078b59, #10b973); }
.tech-attendance-main-action svg { width: 19px; height: 19px; }
.tech-card-foot-link {
  width: 100%;
  min-height: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 5px;
  padding: 0;
  border: 0;
  color: var(--tech-muted);
  background: transparent;
  font-size: 8px;
}
.tech-card-foot-link:hover { color: #75b7ff; }
.tech-card-foot-link svg { width: 12px; height: 12px; }

.tech-priority {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid rgba(20, 120, 255, .24);
  border-radius: 6px;
  color: #4ca5ff;
  background: rgba(20, 120, 255, .11);
  font-size: 7.5px;
  font-weight: 800;
  text-transform: uppercase;
}
.tech-priority svg { width: 10px; height: 10px; }
.tech-priority-darurat { color: #ff6e78; border-color: rgba(255, 68, 79, .28); background: rgba(255, 68, 79, .12); }
.tech-priority-tinggi { color: #ffbd48; border-color: rgba(245, 166, 35, .28); background: rgba(245, 166, 35, .12); }
.tech-job-content { display: grid; gap: 9px; }
.tech-job-ticket small { color: #4fa7ff; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.tech-job-ticket > div { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.tech-job-ticket strong { color: var(--tech-text); font-size: 19px; letter-spacing: .015em; }
.tech-job-type { display: flex; align-items: center; gap: 8px; }
.tech-job-type h3 { margin: 0; color: var(--tech-text); font-size: 14px; }
.tech-job-type > span { padding: 3px 6px; border: 1px solid rgba(20, 120, 255, .4); border-radius: 5px; color: #4ba6ff; font-size: 8px; }
.tech-customer-block { display: grid; gap: 5px; padding: 9px 0; border-top: 1px solid var(--tech-border-soft); border-bottom: 1px solid var(--tech-border-soft); }
.tech-customer-block strong { color: var(--tech-text); font-size: 11px; }
.tech-customer-block span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--tech-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tech-customer-block span:last-child { color: #5ee3ab; }
.tech-customer-block svg { flex: 0 0 auto; width: 13px; height: 13px; }
.tech-job-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tech-job-metrics > div { grid-template-columns: 16px minmax(0, 1fr); padding: 7px 5px; }
.tech-job-actions { display: grid; grid-template-columns: minmax(130px, 1.4fr) minmax(90px, 1fr) minmax(80px, .85fr); gap: 7px; }
.tech-action-button {
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--tech-border-soft);
  border-radius: 8px;
  color: #d5deec;
  background: rgba(13, 31, 56, .82);
  font-size: 9px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.tech-action-button.primary { color: #fff; border-color: rgba(16, 200, 120, .5); background: linear-gradient(110deg, #078e59, #11b36f); }
.tech-action-button:hover { color: #fff; border-color: var(--tech-border); background: rgba(20, 120, 255, .22); }
.tech-action-button.primary:hover { background: linear-gradient(110deg, #079b61, #12c47a); }
.tech-action-button svg { flex: 0 0 auto; width: 15px; height: 15px; }
.tech-next-job-list { display: grid; gap: 7px; }
.tech-next-job {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--tech-border-soft);
  border-radius: 9px;
  color: var(--tech-text);
  background: rgba(4, 15, 29, .5);
  text-align: left;
}
.tech-next-job:hover { border-color: var(--tech-border); background: rgba(20, 120, 255, .09); }
.tech-next-job > div, .tech-next-job footer { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.tech-next-job time { color: #ffb535; font-size: 9px; font-weight: 800; }
.tech-next-job > strong { font-size: 11px; }
.tech-next-job > small, .tech-next-job p, .tech-next-job footer > span { overflow: hidden; color: var(--tech-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.tech-next-job p { display: flex; align-items: center; gap: 4px; margin: 0; }
.tech-next-job p svg { width: 10px; height: 10px; }
.tech-command-empty { min-height: 245px; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--tech-muted); text-align: center; }
.tech-command-empty.compact { min-height: 170px; }
.tech-command-empty > svg { width: 36px; height: 36px; color: #4c86cc; }
.tech-command-empty h3, .tech-command-empty p { margin: 0; }
.tech-command-empty h3 { color: var(--tech-text); font-size: 12px; }
.tech-command-empty p { max-width: 240px; font-size: 9px; line-height: 1.5; }
.tech-command-empty button { min-height: 32px; padding: 0 11px; border: 1px solid var(--tech-border); border-radius: 8px; color: #fff; background: rgba(20, 120, 255, .24); font-size: 9px; }

.tech-quick-card, .tech-progress-card, .tech-activity-card { min-height: 224px; }
.tech-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.tech-quick-action {
  min-width: 0;
  min-height: 79px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 7px;
  border: 1px solid var(--tech-border-soft);
  border-radius: 9px;
  color: var(--tech-text);
  background: rgba(4, 15, 29, .48);
  text-align: left;
  text-decoration: none;
}
.tech-quick-action:hover { color: var(--tech-text); border-color: var(--tech-border); background: rgba(20, 120, 255, .13); box-shadow: 0 0 14px rgba(20, 120, 255, .08); }
.tech-quick-action:disabled { cursor: not-allowed; opacity: .5; }
.tech-quick-action > svg {
  width: 30px;
  height: 30px;
  padding: 7px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, #1685ff, #144bcc);
}
.tech-quick-action span, .tech-quick-action b, .tech-quick-action small { min-width: 0; display: block; }
.tech-quick-action b {
  display: -webkit-box;
  overflow: hidden;
  font-size: 9px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.tech-quick-action small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--tech-muted);
  font-size: 7px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tech-progress-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; padding-top: 5px; }
.tech-progress-metrics > div { --progress-color: #7990ad; min-width: 0; display: grid; justify-items: center; gap: 6px; text-align: center; }
.tech-progress-metrics > div.success { --progress-color: var(--tech-green); }
.tech-progress-metrics > div.primary { --progress-color: var(--tech-blue-bright); }
.tech-progress-metrics > div.warning { --progress-color: var(--tech-yellow); }
.tech-progress-metrics > div.info { --progress-color: #22d3ee; }
.tech-progress-metrics strong {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid var(--progress-color);
  border-radius: 50%;
  color: var(--tech-text);
  box-shadow: inset 0 0 0 4px rgba(5, 16, 32, .9), 0 0 13px color-mix(in srgb, var(--progress-color) 17%, transparent);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tech-progress-metrics span { color: var(--tech-muted); font-size: 8px; }
.tech-progress-summary { display: grid; gap: 7px; margin-top: auto; padding-top: 17px; }
.tech-progress-summary > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--tech-muted); font-size: 8px; }
.tech-progress-summary strong { color: var(--tech-text); }
.tech-progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: rgba(79, 110, 151, .2); }
.tech-progress-track span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #0b62e7, #23a3ff); box-shadow: 0 0 12px rgba(20, 120, 255, .35); }
.tech-activity-list { display: grid; }
.tech-activity-list > button {
  min-width: 0;
  min-height: 43px;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid var(--tech-border-soft);
  color: var(--tech-text);
  background: transparent;
  text-align: left;
}
.tech-activity-list > button:last-child { border-bottom: 0; }
.tech-activity-list > button:hover { padding-right: 5px; padding-left: 5px; border-radius: 7px; background: rgba(20, 120, 255, .08); }
.tech-activity-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: #176ee0; }
.tech-activity-icon.activity-selesai, .tech-activity-icon.activity-attendance { background: #0da96c; }
.tech-activity-icon.activity-upload { background: #7a44ee; }
.tech-activity-icon svg { width: 15px; height: 15px; }
.tech-activity-list button > span:nth-child(2), .tech-activity-list strong, .tech-activity-list small { min-width: 0; display: block; }
.tech-activity-list strong, .tech-activity-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tech-activity-list strong { font-size: 9px; }
.tech-activity-list small, .tech-activity-list time { margin-top: 3px; color: var(--tech-muted); font-size: 7.5px; }

html[data-theme="light"] .app-view[data-role="technician"]:has(.technician-command-dashboard),
html[data-theme="light"] .app-view[data-role="technician"]:has(.technician-command-dashboard) .page-outlet {
  background: radial-gradient(circle at 48% 0%, rgba(20, 120, 255, .08), transparent 32%), #edf3fa;
}
html[data-theme="light"] .technician-command-dashboard {
  --tech-background: #edf3fa;
  --tech-panel: #ffffff;
  --tech-panel-deep: #f5f8fc;
  --tech-panel-soft: #eaf1f9;
  --tech-border: rgba(20, 120, 255, .4);
  --tech-border-soft: rgba(70, 111, 165, .2);
  --tech-text: #10223d;
  --tech-muted: #63758d;
}
html[data-theme="light"] .technician-command-header,
html[data-theme="light"] .tech-command-card { background: linear-gradient(145deg, #ffffff, #f3f7fc); box-shadow: 0 9px 25px rgba(37, 68, 112, .09); }
html[data-theme="light"] .technician-header-actions button,
html[data-theme="light"] .tech-mobile-menu,
html[data-theme="light"] .tech-attendance-state,
html[data-theme="light"] .tech-attendance-facts > div,
html[data-theme="light"] .tech-job-metrics > div,
html[data-theme="light"] .tech-next-job,
html[data-theme="light"] .tech-quick-action {
  color: var(--tech-text);
  border-color: var(--tech-border-soft);
  background: var(--tech-panel-deep);
}
html[data-theme="light"] .technician-header-actions button:hover,
html[data-theme="light"] .tech-mobile-menu:hover,
html[data-theme="light"] .tech-next-job:hover,
html[data-theme="light"] .tech-quick-action:hover { color: var(--tech-text); background: #e4eefb; }
html[data-theme="light"] .technician-warning-bar { background: linear-gradient(90deg, #fff0f2, #fff7f8); }
html[data-theme="light"] .technician-warning-bar p { color: #5d2930; }
html[data-theme="light"] .technician-warning-bar button { color: #9f2430; border-color: rgba(255, 68, 79, .24); background: #fff; }
html[data-theme="light"] .tech-action-button { color: #284361; background: #e7eef8; }
html[data-theme="light"] .tech-action-button:hover { color: #14365e; background: #d8e8fb; }
html[data-theme="light"] .tech-action-button.primary,
html[data-theme="light"] .tech-action-button.primary:hover { color: #fff; }
html[data-theme="light"] .tech-clock-ring {
  background: radial-gradient(circle, #fff 0 56%, transparent 58%), conic-gradient(from -40deg, var(--tech-blue-bright) 0 28%, rgba(20, 120, 255, .12) 28% 100%);
}
html[data-theme="light"] .tech-progress-metrics strong { box-shadow: inset 0 0 0 4px #f7faff, 0 0 13px color-mix(in srgb, var(--progress-color) 14%, transparent); }

@media (max-width: 1180px) {
  .technician-command-header {
    grid-template-columns: minmax(245px, 1.2fr) minmax(90px, .4fr) auto;
    gap: 10px;
    padding: 10px 12px;
  }
  .technician-title-block h1 { font-size: 24px; }
  .technician-datetime { display: none; }
  .technician-command-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "attendance active" "next quick" "progress activity";
  }
  .tech-attendance-card, .tech-active-job-card, .tech-next-jobs-card { min-height: 0; }
}

@media (max-width: 1023px) {
  .app-view[data-role="technician"] { --sidebar-width: 242px; }
  .app-view[data-role="technician"]:has(.technician-command-dashboard) .page-outlet { padding: 10px 10px calc(var(--mobile-nav-height) + 14px); }
  .technician-command-header .tech-mobile-menu { display: grid; }
  .technician-command-header { grid-template-columns: minmax(260px, 1fr) minmax(120px, .5fr) auto; }
}

@media (max-width: 760px) {
  .app-view[data-role="technician"]:has(.technician-command-dashboard) .page-outlet { padding: 7px 7px calc(var(--mobile-nav-height) + 12px); }
  .technician-command-header {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    padding: 10px;
    border-radius: 11px;
  }
  .technician-title-block h1 { font-size: clamp(18px, 6vw, 25px); }
  .technician-welcome {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    padding: 8px 0 0;
    border-top: 1px solid var(--tech-border-soft);
    border-left: 0;
  }
  .technician-welcome strong { font-size: 16px; }
  .technician-location {
    grid-column: 1 / -1;
    grid-row: 3;
    min-height: 0;
    padding: 8px 0 0;
    border-top: 1px solid var(--tech-border-soft);
    border-left: 0;
  }
  .technician-header-actions { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
  .technician-header-actions button { width: 36px; height: 36px; }
  .technician-warning-bar { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; padding: 8px; }
  .technician-warning-bar > strong { grid-column: 2; }
  .technician-warning-bar p { grid-column: 1 / -1; grid-row: 2; padding: 0 3px; }
  .technician-warning-bar button { grid-column: 3; grid-row: 1; }
  .technician-command-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "attendance" "active" "next" "quick" "progress" "activity";
    gap: 9px;
    margin-top: 9px;
  }
  .tech-command-card { padding: 11px; border-radius: 11px; }
  .tech-attendance-overview { grid-template-columns: 116px minmax(0, 1fr); gap: 9px; }
  .tech-clock-ring { width: 114px; height: 114px; }
  .tech-clock-ring strong { font-size: 18px; }
  .tech-job-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tech-job-actions { grid-template-columns: 1fr; }
  .tech-action-button { min-height: 41px; }
  .tech-next-job-list { gap: 8px; }
  .tech-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tech-progress-card { min-height: 0; }
}

@media (max-width: 420px) {
  .technician-title-block h1 { font-size: 18px; }
  .tech-mobile-menu { width: 34px; height: 34px; }
  .technician-location { grid-template-columns: 34px minmax(0, 1fr); }
  .tech-location-icon { width: 34px; height: 34px; }
  .technician-header-actions { gap: 5px; }
  .technician-header-actions button { width: 32px; height: 32px; }
  .technician-warning-bar button { padding: 0 8px; font-size: 8px; }
  .tech-attendance-overview { grid-template-columns: 1fr; justify-items: center; }
  .tech-attendance-state { width: 100%; min-height: 88px; }
  .tech-attendance-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tech-progress-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tech-progress-metrics strong { width: 48px; height: 48px; font-size: 12px; }
}

/* Automatic ticket routing, completion team confirmation, and WhatsApp routing */
.wa-job-routing {
  margin: 12px 0;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--primary) 38%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary-soft) 26%, var(--panel));
}
.wa-job-routing-heading { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.wa-job-routing-heading > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--primary);
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
}
.wa-job-routing-heading > span svg { width: 18px; height: 18px; }
.wa-job-routing-heading > div { display: grid; gap: 2px; }
.wa-job-routing-heading strong { font-size: 12px; }
.wa-job-routing-heading small { color: var(--muted); font-size: 10px; }
.wa-job-routing-heading em { padding: 5px 8px; color: var(--primary); border-radius: 999px; background: var(--primary-soft); font-size: 9px; font-style: normal; font-weight: 800; }
.wa-job-routing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 11px; }
.wa-route-column { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.wa-route-column-title { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wa-route-column-title > span { display: grid; place-items: center; width: 28px; height: 28px; color: var(--primary); border-radius: 8px; background: var(--primary-soft); }
.wa-route-column-title svg { width: 15px; height: 15px; }
.wa-route-column-title > div { display: grid; gap: 1px; }
.wa-route-column-title strong { font-size: 10px; }
.wa-route-column-title small { color: var(--muted); font-size: 9px; }
.wa-route-column-title .wa-inline-action { margin-left: auto; white-space: nowrap; }
.wa-route-sync-warning { margin: 0 0 8px; padding: 7px 8px; font-size: 9px; }
.wa-route-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.wa-route-option { position: relative; display: block; cursor: pointer; }
.wa-route-option > input { position: absolute; opacity: 0; pointer-events: none; }
.wa-route-option > span { display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: center; column-gap: 7px; min-height: 43px; padding: 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); transition: .18s ease; }
.wa-route-option > span > svg,
.wa-route-option > span > .avatar { grid-row: 1 / span 2; width: 25px; height: 25px; }
.wa-route-option > span > svg { padding: 5px; color: var(--muted); border-radius: 7px; background: var(--surface); }
.wa-route-option > span > .avatar { font-size: 8px; }
.wa-route-option > span b { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.wa-route-option > span small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.wa-route-option.featured { margin-bottom: 6px; }
.wa-route-option.featured > span { min-height: 46px; }
.wa-route-option input:checked + span { border-color: var(--success); background: color-mix(in srgb, var(--success) 10%, var(--panel)); box-shadow: inset 3px 0 var(--success); }
.wa-route-option input:checked + span > svg { color: var(--success); }
.wa-route-option.is-disabled { cursor: not-allowed; opacity: .48; }
.wa-job-routing-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.wa-job-routing-footer > span { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-size: 9px; font-weight: 700; }
.wa-job-routing-footer > span svg { width: 13px; height: 13px; }
.wa-job-routing-footer .primary-button { min-height: 37px; white-space: nowrap; }

.job-routing-summary { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-bottom: 11px; padding: 8px 9px; border: 1px solid color-mix(in srgb, var(--success) 30%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--success-soft) 34%, var(--surface)); }
.job-routing-summary > svg { width: 17px; height: 17px; color: var(--success); justify-self: center; }
.job-routing-summary > div { display: grid; gap: 1px; min-width: 0; }
.job-routing-summary strong { font-size: 10px; }
.job-routing-summary span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.job-routing-summary button { padding: 5px 7px; color: var(--primary); border: 0; background: transparent; font-size: 9px; font-weight: 800; cursor: pointer; }
.job-routing-summary > div small { color: var(--success); font-size: 9px; }
.job-routing-summary > em { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 9px; font-style: normal; font-weight: 700; white-space: nowrap; }
.job-routing-summary > em svg { width: 12px; height: 12px; }

.modal:has(.technician-report-form) .modal-head { padding: 8px 10px; }
.modal:has(.technician-report-form) .modal-body { padding: 8px 10px; }
.modal:has(.technician-report-form) .modal-footer { padding: 7px 10px; }
.technician-report-form .job-form-simple-grid { gap: 7px 8px; }
.technician-report-form .job-form-simple-grid textarea.form-control { min-height: 54px; height: 54px; }
.technician-report-form .form-group label { margin-bottom: 2px; font-size: 10px; }
.technician-report-form .form-control { min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
.technician-report-routing { grid-template-columns: 26px minmax(0, 1fr); margin-bottom: 7px; padding: 6px 8px; }
.technician-report-routing > svg { width: 15px; height: 15px; }
.technician-report-routing strong { font-size: 9px; }
.technician-report-routing span { font-size: 9px; }
.technician-report-status { display: grid; gap: 6px; padding: 7px; border: 1px solid var(--line); border-radius: 9px; background: color-mix(in srgb, var(--surface) 72%, transparent); }
.technician-report-status-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.technician-report-status-head strong { font-size: 10px; }
.technician-report-status-head small { color: var(--muted); font-size: 8px; }
.technician-report-status-options,
.technician-report-work-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.technician-report-status-options label,
.technician-report-work-mode label { position: relative; min-width: 0; cursor: pointer; }
.technician-report-status-options input,
.technician-report-work-mode input,
.technician-report-members input { position: absolute; opacity: 0; pointer-events: none; }
.technician-report-status-options label > span,
.technician-report-work-mode label > span { min-height: 34px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.technician-report-status-options svg,
.technician-report-work-mode svg { width: 14px; height: 14px; color: var(--muted); }
.technician-report-status-options b,
.technician-report-work-mode b { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.technician-report-status-options input:checked + span { color: var(--primary); border-color: var(--primary); background: color-mix(in srgb, var(--primary) 11%, var(--surface)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 12%, transparent); }
.technician-report-status-options input[value="completed"]:checked + span { color: var(--success); border-color: var(--success); background: color-mix(in srgb, var(--success) 11%, var(--surface)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--success) 12%, transparent); }
.technician-report-status-options input:checked + span svg { color: currentColor; }
.technician-report-team { display: grid; gap: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.technician-report-team-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.technician-report-team-head strong { font-size: 9px; }
.technician-report-team-head small { color: var(--muted); font-size: 8px; }
.technician-report-work-mode input:checked + span { color: var(--primary); border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.technician-report-work-mode input:checked + span svg { color: var(--primary); }
.technician-report-work-mode .is-disabled { cursor: not-allowed; opacity: .5; }
.technician-report-members { display: grid; gap: 5px; padding-top: 5px; border-top: 1px dashed var(--line); }
.technician-report-members > strong { font-size: 9px; }
.technician-report-members > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.technician-report-members label { position: relative; min-width: 0; cursor: pointer; }
.technician-report-members label > span { min-height: 34px; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 6px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.technician-report-members label .avatar { width: 24px; height: 24px; font-size: 8px; }
.technician-report-members label b { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.technician-report-members input:checked + span { border-color: var(--success); background: color-mix(in srgb, var(--success) 10%, var(--surface)); box-shadow: inset 2px 0 var(--success); }
.technician-report-validation { min-height: 12px; margin: 0; color: var(--warning); font-size: 8px; font-weight: 700; }
.technician-report-validation.success { color: var(--success); }

.wa-completion-route {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) minmax(270px, 430px);
  gap: 12px;
  align-items: center;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--success) 35%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--success-soft) 42%, var(--panel));
}
.wa-completion-route-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 14%, transparent);
  border-radius: 10px;
}
.wa-completion-route-icon svg { width: 18px; height: 18px; }
.wa-completion-route-copy { display: grid; gap: 3px; min-width: 0; }
.wa-completion-route-copy strong { font-size: 12px; color: var(--text); }
.wa-completion-route-copy small { font-size: 10px; line-height: 1.45; color: var(--muted); }
.wa-completion-route-copy span { font-size: 10px; font-weight: 700; color: var(--success); }
.wa-completion-route-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.wa-completion-route-control .form-control { min-width: 0; }
.wa-completion-route-control .primary-button { white-space: nowrap; min-height: 38px; }
.wa-completion-route-control > small { grid-column: 1 / -1; font-size: 9px; }

.completion-compact-form { display: grid; gap: 12px; }
.completion-compact-form .form-control { width: 100%; }
.completion-compact-summary { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.completion-compact-summary > span { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border-radius: 9px; color: var(--primary); background: var(--primary-soft); }
.completion-compact-summary > span svg { width: 16px; height: 16px; }
.completion-compact-summary > div { display: grid; gap: 2px; min-width: 0; }
.completion-compact-summary small { color: var(--muted); font-size: 9px; }
.completion-compact-summary strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.completion-compact-section { display: grid; gap: 8px; }
.completion-compact-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.completion-compact-heading > div { display: grid; gap: 1px; }
.completion-compact-heading strong { font-size: 12px; }
.completion-compact-heading small { color: var(--muted); font-size: 9px; }
.completion-compact-heading em { padding: 3px 7px; border-radius: 999px; color: var(--warning); background: var(--warning-soft); font-size: 8px; font-style: normal; font-weight: 800; }
.completion-compact-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.completion-compact-photo { position: relative; min-width: 0; cursor: pointer; }
.completion-compact-photo > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.completion-compact-photo-preview { display: grid; min-height: 118px; place-items: center; align-content: center; gap: 4px; overflow: hidden; border: 1px dashed var(--border-primary); border-radius: 11px; color: var(--text-secondary); background: var(--surface); text-align: center; transition: .18s ease; }
.completion-compact-photo:hover .completion-compact-photo-preview { border-color: var(--primary); background: var(--primary-soft); }
.completion-compact-photo-preview > svg { width: 24px; height: 24px; color: var(--primary); }
.completion-compact-photo-preview > b { font-size: 10px; }
.completion-compact-photo-preview > small { color: var(--muted); font-size: 9px; }
.completion-compact-photo-preview > img,
.completion-compact-photo-preview .preview-image,
.completion-compact-photo-preview .preview-image img { width: 100%; height: 118px; object-fit: cover; }
.completion-result-field { margin: 0; }
.completion-result-field textarea { min-height: 76px; resize: vertical; }
.completion-result-field > small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.completion-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.completion-details-grid .form-group { margin: 0; }
.completion-details-grid label small { color: var(--muted); font-size: 8px; font-weight: 500; }
.completion-compact-gps { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.completion-compact-gps .location-box { margin: 0; min-height: 42px; padding: 8px 10px; }
.completion-compact-gps .secondary-button { min-height: 42px; white-space: nowrap; }
.completion-compact-note { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--success); font-size: 9px; font-weight: 700; }
.completion-compact-note svg { width: 13px; height: 13px; flex: 0 0 13px; }
.completion-coin-preview > svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--info); }
.completion-coin-preview > div { display: grid; gap: 2px; min-width: 0; }
.completion-coin-preview strong { color: var(--text); }
.completion-coin-preview small { display: block; color: var(--muted); }
.completion-compact-form .completion-team-section { margin: 0; }

.completion-team-section {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 38%, var(--line));
  border-radius: 13px;
  background: color-mix(in srgb, var(--primary-soft) 30%, var(--panel));
}
.completion-team-heading,
.completion-team-leader { display: flex; align-items: center; gap: 10px; }
.completion-team-heading > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--primary);
  border-radius: 9px;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
}
.completion-team-heading > span svg { width: 17px; height: 17px; }
.completion-team-heading > div { display: grid; gap: 2px; min-width: 0; }
.completion-team-heading strong { font-size: 12px; }
.completion-team-heading small { font-size: 10px; color: var(--muted); }
.completion-team-heading em { margin-left: auto; padding: 4px 7px; border-radius: 999px; color: var(--warning); background: var(--warning-soft); font-size: 9px; font-style: normal; font-weight: 800; }
.completion-team-leader { margin-top: 11px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.completion-team-leader > div { display: grid; gap: 1px; }
.completion-team-leader small { color: var(--muted); font-size: 9px; }
.completion-team-leader strong { font-size: 11px; }
.completion-team-leader > span:last-child { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: var(--success); font-size: 9px; font-weight: 700; }
.completion-team-leader > span:last-child svg { width: 13px; height: 13px; }
.completion-work-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.completion-work-mode > label { position: relative; cursor: pointer; }
.completion-work-mode input { position: absolute; opacity: 0; pointer-events: none; }
.completion-work-mode label > span { display: grid; grid-template-columns: 25px minmax(0, 1fr); column-gap: 8px; align-items: center; min-height: 54px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); transition: .18s ease; }
.completion-work-mode label > span > svg { grid-row: 1 / span 2; width: 20px; height: 20px; color: var(--muted); }
.completion-work-mode label > span b { font-size: 11px; }
.completion-work-mode label > span small { font-size: 9px; color: var(--muted); }
.completion-work-mode input:checked + span { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 18%, transparent); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.completion-work-mode input:checked + span > svg { color: var(--primary); }
.completion-work-mode .is-disabled { cursor: not-allowed; opacity: .55; }
.completion-team-members { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.completion-team-members > strong { display: block; margin-bottom: 7px; font-size: 10px; }
.completion-team-members > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.completion-team-members label { cursor: pointer; }
.completion-team-members input { position: absolute; opacity: 0; }
.completion-team-members label > span { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; column-gap: 8px; min-height: 44px; padding: 7px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.completion-team-members label > span .avatar { grid-row: 1 / span 2; width: 28px; height: 28px; font-size: 9px; }
.completion-team-members label > span b { font-size: 10px; }
.completion-team-members label > span small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.completion-team-members input:checked + span { border-color: var(--success); background: color-mix(in srgb, var(--success) 10%, var(--surface)); box-shadow: inset 3px 0 var(--success); }
.completion-team-validation { margin: 9px 0 0; color: var(--warning); font-size: 9px; font-weight: 700; }
.completion-team-validation.success { color: var(--success); }

@media (max-width: 760px) {
  .completion-details-grid { grid-template-columns: minmax(0, 1fr); }
  .completion-compact-photos { gap: 7px; }
  .completion-compact-photo-preview,
  .completion-compact-photo-preview > img,
  .completion-compact-photo-preview .preview-image,
  .completion-compact-photo-preview .preview-image img { min-height: 98px; height: 98px; }
  .completion-compact-gps { grid-template-columns: minmax(0, 1fr); }
  .completion-compact-gps .secondary-button { width: 100%; }
  .wa-job-routing-heading { grid-template-columns: 34px minmax(0, 1fr); }
  .wa-job-routing-heading em { grid-column: 1 / -1; width: fit-content; }
  .wa-job-routing-grid { grid-template-columns: minmax(0, 1fr); }
  .wa-route-column-title { flex-wrap: wrap; }
  .wa-route-column-title .wa-inline-action { width: 100%; margin-left: 0; justify-content: center; }
  .wa-route-options { grid-template-columns: minmax(0, 1fr); }
  .wa-job-routing-footer { align-items: stretch; flex-direction: column; }
  .wa-job-routing-footer .primary-button { width: 100%; }
  .job-routing-summary { grid-template-columns: 26px minmax(0, 1fr); }
  .job-routing-summary button { grid-column: 1 / -1; width: 100%; padding-top: 7px; border-top: 1px solid var(--line); }
  .job-routing-summary > em { grid-column: 1 / -1; justify-self: center; }
  .modal-backdrop:has(.technician-report-form) { padding: 5px; }
  .modal:has(.technician-report-form) { max-height: calc(100dvh - 10px); }
  .modal:has(.technician-report-form) .modal-head { padding: 7px 8px; }
  .modal:has(.technician-report-form) .modal-head p { font-size: 8px; }
  .modal:has(.technician-report-form) .modal-body { padding: 6px 7px; }
  .modal:has(.technician-report-form) .modal-footer { padding: 6px 7px; }
  .technician-report-routing { grid-template-columns: 23px minmax(0, 1fr); margin-bottom: 6px; }
  .technician-report-form .job-form-simple-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 6px; }
  .technician-report-form .job-form-simple-grid .full-span { grid-column: 1 / -1; }
  .technician-report-form .job-form-simple-grid textarea.form-control { min-height: 46px; height: 46px; }
  .technician-report-form .form-control { min-height: 32px; padding: 5px 7px; font-size: 10px; }
  .technician-report-form .form-group label { font-size: 8px; }
  .technician-report-status { gap: 5px; padding: 6px; }
  .technician-report-status-head small,
  .technician-report-team-head small { display: none; }
  .technician-report-status-options label > span,
  .technician-report-work-mode label > span { min-height: 31px; padding: 5px 6px; }
  .technician-report-members label > span { min-height: 31px; }
  .wa-completion-route { grid-template-columns: 34px minmax(0, 1fr); align-items: start; }
  .wa-completion-route-control { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr); }
  .wa-completion-route-control .primary-button { width: 100%; }
  .completion-team-section { padding: 11px; }
  .completion-team-heading em { display: none; }
  .completion-work-mode,
  .completion-team-members > div { grid-template-columns: minmax(0, 1fr); }
  .completion-team-leader > span:last-child { max-width: 105px; text-align: right; }
}

/* Mobile-first premium polish.
   The application is used primarily from phones, so readability and touch
   comfort take precedence over reproducing desktop density at a smaller size. */
@media (max-width: 639px) {
  :root {
    --topbar-height: 56px;
    --mobile-nav-height: 66px;
    --card-padding-mobile: 10px;
    --grid-gap-mobile: 8px;
    --card-radius: 13px;
    --radius-sm: 8px;
    --radius-md: 11px;
    --radius-lg: 14px;
    --radius-xl: 18px;
  }

  body {
    font-size: 13px;
    background:
      radial-gradient(circle at 100% 0, color-mix(in srgb, var(--brand-primary) 7%, transparent), transparent 34%),
      var(--background-primary);
  }

  button,
  a,
  label,
  input,
  select,
  textarea { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

  .page-outlet {
    padding: 9px 8px calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 18px);
  }

  .topbar {
    height: var(--topbar-height);
    padding: 0 9px;
    border-bottom-color: color-mix(in srgb, var(--brand-primary) 16%, var(--border-primary));
    background: color-mix(in srgb, var(--background-primary) 90%, transparent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  }

  .menu-button,
  .notification-button,
  .topbar-profile {
    min-width: 40px;
    min-height: 40px;
    border-radius: 11px;
  }

  .topbar-title h1 { font-size: 16px; font-weight: 780; }
  .page-eyebrow { max-width: 190px; font-size: 10px; }
  .topbar-profile .avatar { width: 34px; height: 34px; border-radius: 10px; }
  .notification-badge { top: -2px; right: -2px; min-width: 18px; height: 18px; font-size: 9px; }

  .page-head {
    min-height: 48px;
    gap: 9px;
    margin-bottom: 9px;
    padding: 9px 10px;
    border-color: color-mix(in srgb, var(--brand-primary) 14%, var(--border-primary));
    border-radius: 14px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface-primary) 96%, var(--brand-primary) 4%), var(--surface-primary));
    box-shadow: 0 10px 24px rgba(0, 0, 0, .1);
  }

  .page-head h2 { font-size: 18px; letter-spacing: -.02em; }
  .page-actions { gap: 6px; }
  .page-head:has(.page-actions > :nth-child(2)) { align-items: stretch; flex-wrap: wrap; }
  .page-head:has(.page-actions > :nth-child(2)) > div:first-child { width: 100%; }
  .page-head:has(.page-actions > :nth-child(2)) .page-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head:has(.page-actions > :nth-child(2)) .page-actions > * { width: 100%; }
  .page-head:not(:has([data-action="calendar-prev"])):has(.page-actions > :nth-child(3)) .page-actions {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .page-head:not(:has([data-action="calendar-prev"])):has(.page-actions > :nth-child(3)) .page-actions::-webkit-scrollbar { display: none; }
  .page-head:not(:has([data-action="calendar-prev"])):has(.page-actions > :nth-child(3)) .page-actions > * {
    flex: 0 0 auto;
    width: max-content;
  }
  .page-actions .primary-button,
  .page-actions .soft-button,
  .page-actions .outline-button,
  .page-actions .secondary-button {
    min-width: 40px;
    min-height: 40px;
    padding: 0 10px;
    font-size: 10.5px;
  }

  .card {
    padding: var(--card-padding-mobile);
    border-color: color-mix(in srgb, var(--brand-primary) 11%, var(--border-primary));
    border-radius: var(--card-radius);
    background: linear-gradient(155deg, color-mix(in srgb, var(--surface-primary) 96%, var(--brand-primary) 4%), var(--surface-primary));
    box-shadow: 0 10px 26px rgba(0, 0, 0, .12), inset 0 1px rgba(255, 255, 255, .018);
  }

  .settings-view .card { padding: 9px; }

  .card-head { align-items: center; gap: 8px; margin-bottom: 8px; }
  .card-head h3 { font-size: 13px; letter-spacing: -.01em; }
  .card-head p,
  #pageOutlet small,
  #pageOutlet .table-secondary,
  #pageOutlet .kpi-trend,
  #pageOutlet .badge,
  #pageOutlet .status-badge { font-size: 10px; line-height: 1.4; }

  .grid { gap: var(--grid-gap-mobile); }
  .grid-4,
  .grid-5,
  .grid-3:has(> .kpi-card),
  .management-kpi-grid { gap: 7px; }

  .kpi-card { min-height: 78px; padding: 8px; border-radius: 12px; }
  .kpi-top { padding-right: 31px; }
  .kpi-label { font-size: 10px; line-height: 1.22; }
  .kpi-icon { top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 8px; }
  .kpi-icon svg { width: 14px; height: 14px; }
  .kpi-value,
  .kpi-value.value-long,
  .kpi-value.value-xlong { margin-top: 6px; font-size: 17px; line-height: 1.12; }

  .primary-button,
  .secondary-button,
  .outline-button,
  .soft-button,
  .success-button,
  .danger-button {
    min-height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 11.5px;
    font-weight: 720;
  }

  .primary-button {
    box-shadow: 0 9px 22px color-mix(in srgb, var(--brand-primary) 23%, transparent), inset 0 1px rgba(255, 255, 255, .18);
  }

  .action-dot { width: 38px; height: 38px; border-radius: 10px; }
  .card-link { min-height: 36px; padding: 5px 7px; font-size: 10.5px; }
  .tab-button { min-height: 40px; padding: 0 10px; font-size: 10.5px; }

  .form-group { margin-bottom: 9px; }
  .form-group > label,
  .form-group label,
  .settings-view .form-group label,
  .technician-report-form .form-group label { margin-bottom: 5px; font-size: 11px; line-height: 1.35; }

  .form-control,
  .search-input,
  .compact-select,
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  select,
  textarea {
    min-height: 44px;
    padding: 9px 11px;
    border-radius: 10px;
    font-size: 16px;
    line-height: 1.35;
  }

  textarea.form-control,
  .technician-report-form .job-form-simple-grid textarea.form-control { min-height: 86px; height: auto; }
  .filter-bar { gap: 7px; }
  .table-toolbar { gap: 8px; padding: 9px; }
  .table-actions { gap: 7px; }
  .jobs-table-toolbar { gap: 6px; padding: 7px 8px; }
  .jobs-table-toolbar .jobs-table-heading {
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 8px;
  }
  .jobs-table-toolbar .jobs-table-heading > span {
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .jobs-table-toolbar .table-actions {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 6px;
  }
  .jobs-table-toolbar .job-bulk-actions {
    grid-template-columns: minmax(68px, .7fr) minmax(104px, 1fr);
    gap: 5px;
  }
  .jobs-table-toolbar .job-bulk-actions:has(.soft-button.hidden) { grid-template-columns: minmax(0, 1fr); }
  .jobs-table-toolbar .search-input { min-height: 42px; height: 42px; }

  .settings-view .form-grid,
  #settingsForm > .grid:first-child > .card.span-2 .form-grid,
  .settings-view[data-settings-view="payroll"] [data-settings-group~="payroll"] .grid-3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }
  .settings-view .payroll-monthly-grid,
  .settings-view .payroll-technician-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .settings-view .form-group,
  .settings-view .form-group.full-span { grid-column: auto; }
  .settings-view textarea.form-control { min-height: 88px; }
  .settings-view .switch-row,
  .switch-row { min-height: 48px; padding: 8px 0; }

  .responsive-card-table .table-wrap { overflow: visible; }
  .responsive-card-table table,
  .responsive-card-table tbody { display: block; width: 100%; min-width: 0; }
  .responsive-card-table thead { display: none; }
  .responsive-card-table tbody { display: grid; gap: 8px; padding: 8px; }
  .responsive-card-table tbody tr {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 0;
    padding: 6px 10px;
    border: 1px solid color-mix(in srgb, var(--brand-primary) 13%, var(--border-primary));
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-secondary) 94%, var(--brand-primary) 6%);
    box-shadow: 0 7px 18px rgba(0, 0, 0, .08);
  }
  .responsive-card-table tbody tr.hidden { display: none; }
  .responsive-card-table tbody td {
    min-width: 0;
    min-height: 52px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 3px;
    padding: 7px 0;
    border: 0;
    border-bottom: 1px solid var(--border-secondary);
    font-size: 11.5px;
    overflow-wrap: anywhere;
  }
  .responsive-card-table tbody td:last-child { border-bottom: 0; }
  .responsive-card-table tbody td:not([colspan])::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.25;
  }
  .responsive-card-table tbody td > * { max-width: 100%; }
  .responsive-card-table tbody td > .table-avatar { width: 100%; }
  .responsive-card-table tbody td[colspan] { display: block; min-height: 0; grid-column: 1 / -1; }
  .responsive-card-table .table-avatar,
  .responsive-card-table .row-actions { min-width: 0; justify-content: flex-start; }
  .responsive-card-table .table-primary { font-size: 12px; }
  .responsive-card-table .pagination { padding: 8px; }
  .pagination button { min-width: 40px; min-height: 40px; border-radius: 10px; }

  .modal-backdrop { align-items: end; background: rgba(1, 5, 11, .78); backdrop-filter: blur(10px); }
  .modal,
  .modal-sm,
  .modal-lg {
    max-height: calc(100dvh - 8px);
    border-color: color-mix(in srgb, var(--brand-primary) 25%, var(--border-primary));
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -18px 50px rgba(0, 0, 0, .38);
  }
  .modal::before {
    content: "";
    width: 38px;
    height: 4px;
    flex: 0 0 4px;
    align-self: center;
    margin-top: 7px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--text-muted) 45%, transparent);
  }
  .modal-head { padding: 10px 11px; }
  .modal-head h3 { font-size: 16px; }
  .modal-head p,
  .modal:has(.technician-report-form) .modal-head p { font-size: 10px; }
  .modal-close { width: 40px; height: 40px; border-radius: 11px; }
  .modal-body,
  .modal:has(.technician-report-form) .modal-body { padding: 10px; }
  .modal-footer,
  .modal:has(.technician-report-form) .modal-footer { gap: 8px; padding: 9px 10px calc(9px + env(safe-area-inset-bottom)); }

  .mobile-bottom-nav {
    height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    align-items: start;
    gap: 4px;
    padding: 6px 6px calc(5px + env(safe-area-inset-bottom));
    border-top-color: color-mix(in srgb, var(--brand-primary) 24%, var(--border-primary));
    border-radius: 18px 18px 0 0;
    background: color-mix(in srgb, var(--background-sidebar) 94%, transparent);
    box-shadow: 0 -14px 34px rgba(0, 0, 0, .32), inset 0 1px rgba(255, 255, 255, .025);
    backdrop-filter: blur(20px);
  }
  .mobile-nav-item {
    height: 54px;
    gap: 3px;
    border-radius: 11px;
    font-size: 10px;
    font-weight: 620;
  }
  .mobile-nav-item svg { width: 18px; height: 18px; }
  .mobile-nav-item.active {
    color: #90c2ff;
    background: linear-gradient(145deg, rgba(33, 103, 242, .25), rgba(33, 103, 242, .1));
    box-shadow: inset 0 0 0 1px rgba(91, 159, 255, .12);
  }

  .toast-root { right: 8px; bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 10px); width: calc(100vw - 16px); }
  .toast { border-radius: 13px; }

  .app-view[data-role="technician"]:has(.technician-command-dashboard) .page-outlet {
    padding: 7px 7px calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 16px);
  }
  .technician-command-header {
    gap: 10px;
    padding: 12px;
    border-radius: 15px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--tech-panel) 94%, var(--tech-blue) 6%), var(--tech-panel));
    box-shadow: 0 14px 32px rgba(0, 0, 0, .16);
  }
  .technician-title-block h1 { font-size: 20px; letter-spacing: -.035em; }
  .tech-mobile-menu,
  .technician-header-actions button { width: 40px; height: 40px; border-radius: 11px; }
  .technician-header-actions button > span { min-width: 18px; height: 18px; font-size: 10px; }
  .technician-welcome { padding-top: 10px; }
  .technician-welcome small,
  .technician-location small,
  .technician-command-dashboard small,
  .technician-command-dashboard em,
  .technician-command-dashboard time { font-size: 10px; line-height: 1.4; }
  .technician-location { padding-top: 10px; }
  .technician-location strong { font-size: 12px; }
  .technician-warning-bar { border-radius: 13px; }
  .technician-command-grid { gap: 10px; margin-top: 10px; }
  .tech-command-card { padding: 13px; border-radius: 14px; box-shadow: 0 13px 30px rgba(0, 0, 0, .14); }
  .tech-card-heading { min-height: 32px; }
  .tech-card-heading > span { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
  .tech-card-heading h2 { font-size: 13px; letter-spacing: .01em; }
  .tech-card-heading button { min-height: 36px; padding: 0 7px; font-size: 10px; }
  .tech-clock-ring { width: 126px; height: 126px; }
  .tech-clock-ring strong { font-size: 20px; }
  .tech-attendance-overview { grid-template-columns: 126px minmax(0, 1fr); justify-items: stretch; }
  .tech-attendance-state { min-height: 96px; padding: 12px; border-radius: 12px; }
  .tech-attendance-state strong { font-size: 13px; }
  .tech-attendance-facts { gap: 7px; }
  .tech-attendance-facts > div,
  .tech-job-metrics > div { min-height: 55px; padding: 8px; border-radius: 11px; }
  .tech-attendance-facts b,
  .tech-job-metrics b { font-size: 10.5px; }
  .tech-attendance-main-action { min-height: 46px; border-radius: 11px; font-size: 12px; }
  .tech-card-foot-link { min-height: 38px; font-size: 10px; }
  .tech-job-ticket strong { font-size: 20px; }
  .tech-job-type h3 { font-size: 15px; }
  .tech-customer-block { padding: 10px 0; }
  .tech-customer-block span,
  .tech-job-type > span,
  .job-item-main > span { font-size: 10px; }
  .tech-action-button { min-height: 44px; border-radius: 10px; font-size: 11px; }
  .tech-next-job { min-height: 118px; padding: 11px; border-radius: 12px; }
  .tech-quick-grid { gap: 8px; }
  .tech-quick-action { min-height: 72px; gap: 9px; padding: 9px; border-radius: 12px; }
  .tech-quick-action > svg { width: 30px; height: 30px; padding: 7px; border-radius: 9px; }
  .tech-quick-action b { font-size: 11px; }
  .tech-progress-metrics strong { width: 52px; height: 52px; font-size: 13px; }
  .tech-activity-list button { min-height: 52px; padding: 7px 0; }

  .technician-job-list-card { padding: 10px; }
  .mobile-job-filter { grid-template-columns: minmax(0, 1fr) repeat(3, auto); gap: 6px; }
  .mobile-job-filter .form-control { grid-column: 1 / -1; }
  .mobile-job-filter .tab-button { width: 100%; }
  .technician-job-item { grid-template-columns: 4px minmax(0, 1fr) 92px; gap: 9px; min-height: 112px; padding: 10px; border-radius: 12px; }
  .job-item-main strong { font-size: 13px; }
  .job-item-side { min-width: 90px; }

  .gps-status-panel { gap: 7px; padding: 10px; }
  .gps-status-row { min-height: 52px; }
  .camera-frame { border-radius: 14px; }
  .attendance-mobile-page .attendance-confirm-card .primary-button,
  .attendance-mobile-page .attendance-confirm-card .outline-button {
    right: 8px;
    bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 7px);
    left: 8px;
    min-height: 46px;
    border-radius: 11px;
  }

  .technician-report-form .form-control { min-height: 44px; padding: 8px 10px; font-size: 16px; }
  .technician-report-status-options label > span,
  .technician-report-work-mode label > span,
  .technician-report-members label > span { min-height: 44px; padding: 8px; }
  .completion-work-mode label > span,
  .completion-team-members label > span { min-height: 48px; }

  .wa-settings-tabs button { min-height: 46px; }
  .wa-tab-copy strong,
  .wa-settings-tabs button { font-size: 10px; }
  .wa-tab-copy small { font-size: 10px; }
  .wa-session-button { min-height: 42px; font-size: 11px; }
  .wa-heading-actions button,
  .wa-webhook-banner button,
  .wa-inline-action { min-height: 40px; }
  .wa-session-button.delete { min-width: 40px; }
  .wa-history-toolbar input,
  .wa-history-toolbar select { min-height: 44px; font-size: 16px; }
  .reminder-accordion summary { min-height: 52px; }
  .reminder-save-bar { bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 5px); }

  .queue-card em,
  .compact-record-meta,
  .notification-copy p,
  .template-card p,
  .notification-template-card code,
  .notification-template-card dt,
  .finance-today-row span,
  .finance-today-row small { font-size: 10px; line-height: 1.4; }

  .calendar-status-bar b,
  .calendar-status-bar small,
  .calendar-weekdays span,
  .calendar-date-head b,
  .calendar-agenda .timeline-item b,
  .calendar-agenda .timeline-item > span:last-child,
  .calendar-agenda .form-section,
  .calendar-agenda .rule-row span,
  .calendar-agenda .rule-row b,
  .calendar-agenda .rule-row small { font-size: 10px; line-height: 1.35; }
  .calendar-legend span { font-size: 9px; }
  .page-head:has([data-action="calendar-prev"]) .soft-button { min-width: 40px; min-height: 40px; font-size: 10px; }
  .page-head:has(.page-actions > [data-action="calendar-prev"]) .page-actions {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }
  .page-head:has(.page-actions > [data-action="calendar-prev"]) {
    min-height: 0;
    gap: 5px;
    padding: 6px 8px;
  }
  .page-head:has(.page-actions > :nth-child(2)) {
    min-height: 0;
    gap: 5px;
    padding: 6px 8px;
  }
  .page-head:has(.page-actions > :nth-child(2)) h2 { font-size: 17px; line-height: 1.2; }

  #settingsForm.settings-view [data-settings-group="general"] > .card.span-2 .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #settingsForm.settings-view [data-settings-group="general"] > .card.span-2 .full-span {
    grid-column: 1 / -1;
  }
  #settingsForm.settings-view [data-settings-group="general"] textarea[name="companyAddress"] {
    min-height: 72px;
    height: 72px;
  }
  #settingsForm.settings-view [data-settings-group="general"] > .card:not(.span-2) .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #settingsForm.settings-view .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #settingsForm.settings-view .form-group.full-span,
  #settingsForm.settings-view .form-grid > .form-section,
  #settingsForm.settings-view .form-grid > .alert {
    grid-column: 1 / -1;
  }
  #settingsForm.settings-view .operations-schedule-card .form-group { margin-bottom: 4px; }
  #settingsForm.settings-view .operations-schedule-card .form-control { min-height: 38px; padding: 6px 9px; }
  #settingsForm.settings-view .operations-schedule-card textarea.form-control { min-height: 62px; height: 62px; }
  #settingsForm.settings-view .operations-schedule-card .form-grid { gap: 5px 8px; }
}

/* Premium treatment for card-like modules that use domain-specific class names. */
@media screen {
  :is(
    .login-card,
    .login-feature-grid article,
    .technician-job-item,
    .wa-delivery-panel,
    .wa-provider-summary article,
    .wa-reminder-metrics article,
    .wa-template-grid article,
    .wa-reminder-preview-list article,
    .wa-reminder-settings,
    .wa-history-list,
    .wa-send-guide article,
    .wa-console-kpis article,
    .reminder-kpi,
    .reminder-accordion,
    .template-toolbar,
    .template-pagination,
    .placeholder-panel
  ) {
    --card-accent: var(--brand-primary);
    position: relative;
    border-color: color-mix(in srgb, var(--card-accent) 14%, var(--border-primary));
    background-image:
      radial-gradient(circle at 98% -10%, color-mix(in srgb, var(--card-accent) 9%, transparent), transparent 36%),
      linear-gradient(150deg, #12243a, #0b1829 64%, #091522);
    box-shadow:
      0 12px 30px rgba(0, 0, 0, .18),
      0 2px 7px rgba(0, 0, 0, .1),
      inset 0 1px 0 rgba(255, 255, 255, .03);
    transition:
      transform var(--duration-fast) ease,
      border-color var(--duration-fast) ease,
      box-shadow var(--duration-fast) ease;
  }

  :is(
    .login-card,
    .login-feature-grid article,
    .technician-job-item,
    .wa-delivery-panel,
    .wa-provider-summary article,
    .wa-reminder-metrics article,
    .wa-template-grid article,
    .wa-reminder-preview-list article,
    .wa-reminder-settings,
    .wa-history-list,
    .wa-send-guide article,
    .wa-console-kpis article,
    .reminder-kpi,
    .reminder-accordion,
    .template-toolbar,
    .template-pagination,
    .placeholder-panel
  )::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    z-index: 3;
    height: 2px;
    border-radius: inherit;
    background: linear-gradient(
      90deg,
      color-mix(in srgb, var(--card-accent) 78%, var(--brand-cyan)),
      var(--card-accent) 44%,
      color-mix(in srgb, var(--card-accent) 62%, var(--brand-secondary)) 72%,
      transparent 96%
    );
    box-shadow: 0 2px 12px color-mix(in srgb, var(--card-accent) 13%, transparent);
    opacity: .62;
    pointer-events: none;
  }

  body[data-login-portal="management"] .login-card { --card-accent: var(--brand-secondary); }
  .wa-delivery-panel,
  .wa-provider-summary article,
  .wa-reminder-metrics article,
  .wa-template-grid article,
  .wa-reminder-preview-list article,
  .wa-reminder-settings,
  .wa-history-list,
  .wa-send-guide article,
  .wa-console-kpis article { --card-accent: var(--brand-cyan); }
  .reminder-kpi.success { --card-accent: var(--success); }
  .reminder-kpi.warning { --card-accent: var(--warning); }
  .reminder-kpi.danger { --card-accent: var(--danger); }
  .template-toolbar,
  .template-pagination { --card-accent: var(--purple); }

  @media (hover: hover) {
    .technician-job-item:hover,
    .wa-template-grid article:hover,
    .wa-reminder-preview-list article:hover {
      transform: translateY(-2px);
      border-color: color-mix(in srgb, var(--card-accent) 38%, var(--border-primary));
      background-image:
        radial-gradient(circle at 98% -10%, color-mix(in srgb, var(--card-accent) 13%, transparent), transparent 36%),
        linear-gradient(150deg, #162a43, #0e1d31 64%, #0a1726);
      box-shadow:
        0 16px 36px rgba(0, 0, 0, .22),
        0 4px 13px color-mix(in srgb, var(--card-accent) 8%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, .04);
    }

    html[data-theme="light"] :is(
      .technician-job-item,
      .wa-template-grid article,
      .wa-reminder-preview-list article
    ):hover {
      background-image:
        radial-gradient(circle at 96% -12%, color-mix(in srgb, var(--card-accent) 10%, transparent), transparent 36%),
        linear-gradient(150deg, #ffffff, #f2f7fd 64%, #eaf1f8);
    }
  }

  html[data-theme="light"] :is(
    .technician-job-item,
    .wa-delivery-panel,
    .wa-provider-summary article,
    .wa-reminder-metrics article,
    .wa-template-grid article,
    .wa-reminder-preview-list article,
    .wa-reminder-settings,
    .wa-history-list,
    .wa-send-guide article,
    .wa-console-kpis article,
    .reminder-kpi,
    .reminder-accordion,
    .template-toolbar,
    .template-pagination,
    .placeholder-panel
  ) {
    border-color: color-mix(in srgb, var(--card-accent) 12%, rgba(28, 50, 78, .18));
    color: var(--text-primary);
    background-image:
      radial-gradient(circle at 96% -12%, color-mix(in srgb, var(--card-accent) 7%, transparent), transparent 36%),
      linear-gradient(150deg, #ffffff, #f8fbff 62%, #f2f6fb);
    box-shadow:
      0 12px 30px rgba(36, 59, 91, .085),
      0 2px 7px rgba(36, 59, 91, .04),
      inset 0 1px 0 rgba(255, 255, 255, .9);
  }

  @media (max-width: 639px) {
    :is(
      .login-card,
      .technician-job-item,
      .wa-delivery-panel,
      .wa-provider-summary article,
      .wa-reminder-metrics article,
      .wa-template-grid article,
      .wa-reminder-preview-list article,
      .wa-reminder-settings,
      .wa-history-list,
      .wa-send-guide article,
      .wa-console-kpis article,
      .reminder-kpi,
      .reminder-accordion,
      .template-toolbar,
      .template-pagination,
      .placeholder-panel
    ) {
      box-shadow:
        0 10px 24px rgba(0, 0, 0, .14),
        0 2px 6px rgba(0, 0, 0, .07),
        inset 0 1px 0 rgba(255, 255, 255, .03);
    }

    html[data-theme="light"] :is(
      .technician-job-item,
      .wa-delivery-panel,
      .wa-provider-summary article,
      .wa-reminder-metrics article,
      .wa-template-grid article,
      .wa-reminder-preview-list article,
      .wa-reminder-settings,
      .wa-history-list,
      .wa-send-guide article,
      .wa-console-kpis article,
      .reminder-kpi,
      .reminder-accordion,
      .template-toolbar,
      .template-pagination,
      .placeholder-panel
    ) {
      box-shadow:
        0 10px 23px rgba(36, 59, 91, .075),
        0 2px 6px rgba(36, 59, 91, .03),
        inset 0 1px 0 rgba(255, 255, 255, .92);
    }
  }
}

@media (max-width: 430px) and (min-width: 360px) {
  .management-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 359px) {
  .page-outlet { padding-right: 6px; padding-left: 6px; }
  .page-head { padding: 8px; }
  .page-head h2 { font-size: 17px; }
  .grid-4,
  .grid-5,
  .grid-3:has(> .kpi-card),
  .management-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .technician-job-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tech-progress-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 11px; }
  .tech-progress-metrics > div { min-width: 0; }
  .technician-job-item { grid-template-columns: 4px minmax(0, 1fr); }
  .tech-attendance-overview { grid-template-columns: 108px minmax(0, 1fr); gap: 7px; }
  .tech-clock-ring { width: 108px; height: 108px; }
  .job-item-side { grid-column: 2; min-width: 0; align-items: center; justify-items: start; }
  .responsive-card-table tbody td { grid-template-columns: minmax(78px, .36fr) minmax(0, .64fr); gap: 7px; }
}

/* Unified premium card language.
   The thin spectral edge echoes the technician identity card while the
   layered surfaces keep dense operational screens calm and professional. */
@media screen {
  .card,
  .job-card,
  .notification-card,
  .reminder-card,
  .template-card,
  .queue-card,
  .tech-mini-card,
  .tech-daily-card,
  .template-summary-card,
  .notification-template-card,
  .reminder-master-card,
  .reminder-history-card,
  .wa-session-card {
    --card-accent: var(--brand-primary);
    position: relative;
    border-color: color-mix(in srgb, var(--card-accent) 13%, var(--border-primary));
    box-shadow:
      0 14px 34px rgba(0, 0, 0, .2),
      0 2px 7px rgba(0, 0, 0, .12),
      inset 0 1px 0 rgba(255, 255, 255, .035);
    transition:
      transform var(--duration-fast) ease,
      border-color var(--duration-fast) ease,
      background-color var(--duration-fast) ease,
      box-shadow var(--duration-fast) ease;
  }

  .card::before,
  .job-card::before,
  .notification-card::before,
  .reminder-card::before,
  .template-card::before,
  .queue-card::before,
  .tech-mini-card::before,
  .tech-daily-card::before,
  .template-summary-card::before,
  .reminder-master-card::before,
  .reminder-history-card::before,
  .wa-session-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    z-index: 3;
    height: 2px;
    border-radius: inherit;
    background: linear-gradient(
      90deg,
      color-mix(in srgb, var(--card-accent) 78%, var(--brand-cyan)) 0%,
      var(--card-accent) 44%,
      color-mix(in srgb, var(--card-accent) 62%, var(--brand-secondary)) 72%,
      transparent 96%
    );
    box-shadow: 0 2px 12px color-mix(in srgb, var(--card-accent) 14%, transparent);
    opacity: .68;
    pointer-events: none;
  }

  .card:not(.hero-card):not(.clock-card):not(.tech-command-card) {
    background:
      radial-gradient(circle at 96% -18%, color-mix(in srgb, var(--card-accent) 9%, transparent) 0, transparent 34%),
      linear-gradient(145deg, #0f1f34 0%, #0b1829 58%, #081522 100%);
  }

  .card.flat {
    background:
      radial-gradient(circle at 100% 0, color-mix(in srgb, var(--card-accent) 6%, transparent), transparent 36%),
      linear-gradient(145deg, #122238, #0d1b2d);
    box-shadow:
      0 9px 24px rgba(0, 0, 0, .15),
      inset 0 1px 0 rgba(255, 255, 255, .025);
  }

  .hero-card,
  .clock-card {
    --card-accent: var(--brand-cyan);
    box-shadow:
      0 18px 42px rgba(0, 0, 0, .25),
      0 4px 14px rgba(18, 91, 197, .09),
      inset 0 1px 0 rgba(255, 255, 255, .055);
  }

  .kpi-card { --card-accent: var(--kpi, var(--brand-primary)); }
  .kpi-card::before { display: block; }
  .kpi-card {
    background:
      radial-gradient(circle at 92% 4%, color-mix(in srgb, var(--kpi, var(--brand-primary)) 13%, transparent) 0, transparent 35%),
      linear-gradient(150deg, #12233a 0%, #0e1c30 56%, #0a1727 100%);
  }
  .kpi-icon {
    border: 1px solid color-mix(in srgb, var(--kpi, var(--brand-primary)) 72%, white);
    background: linear-gradient(
      145deg,
      color-mix(in srgb, var(--kpi, var(--brand-primary)) 82%, white),
      color-mix(in srgb, var(--kpi, var(--brand-primary)) 82%, #071321)
    );
    box-shadow:
      0 8px 20px color-mix(in srgb, var(--kpi, var(--brand-primary)) 27%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, .28);
  }
  .kpi-label { color: #a9bad0; letter-spacing: .015em; }
  .kpi-value { letter-spacing: -.025em; }

  .job-card { --card-accent: var(--job-accent, var(--brand-primary)); }
  .queue-card { --card-accent: var(--queue-accent, var(--info)); }
  .tech-mini-card { --card-accent: var(--mini-accent, var(--brand-primary)); }
  .tech-daily-card { --card-accent: var(--daily-accent, var(--success)); }
  .notification-template-card { --card-accent: var(--template-accent, var(--info)); }
  .notification-card.unread { --card-accent: var(--brand-cyan); }
  .reminder-master-card.active { --card-accent: var(--success); }
  .wa-session-card.success { --card-accent: var(--success); }
  .wa-session-card.danger { --card-accent: var(--danger); }

  .queue-card,
  .tech-mini-card,
  .tech-daily-card,
  .reminder-card,
  .template-card {
    background:
      radial-gradient(circle at 100% 0, color-mix(in srgb, var(--card-accent) 10%, transparent), transparent 38%),
      linear-gradient(145deg, #122239, #0c192b);
  }

  .tech-command-card {
    background:
      radial-gradient(circle at 100% 0, rgba(20, 120, 255, .12), transparent 36%),
      linear-gradient(145deg, rgba(12, 31, 55, .99), rgba(5, 16, 32, .99));
    box-shadow:
      0 17px 38px rgba(0, 0, 0, .22),
      0 3px 10px rgba(20, 120, 255, .07),
      inset 0 1px 0 rgba(255, 255, 255, .045);
  }

  .notification-card,
  .template-summary-card,
  .notification-template-card,
  .reminder-master-card,
  .reminder-history-card,
  .wa-session-card {
    background-image:
      radial-gradient(circle at 100% 0, color-mix(in srgb, var(--card-accent) 9%, transparent), transparent 36%),
      linear-gradient(150deg, #12243a, #0b1829 64%, #091522);
  }

  .form-panel,
  .placeholder-panel,
  .whatsapp-gateway-panel > .gateway-loading,
  .whatsapp-gateway-panel > .gateway-empty,
  .finance-today-row,
  .ops-item,
  .stage-row,
  .next-step,
  .quick-action,
  .responsive-card-table tbody tr,
  .mobile-card-table tbody tr {
    border-color: color-mix(in srgb, var(--brand-primary) 11%, var(--border-primary));
    background-color: var(--surface-secondary);
    background-image: linear-gradient(145deg, rgba(255, 255, 255, .018), transparent 55%);
    box-shadow:
      0 7px 18px rgba(0, 0, 0, .1),
      inset 0 1px 0 rgba(255, 255, 255, .025);
  }

  .card-head h3,
  .table-toolbar h3 { font-weight: 740; }

  @media (hover: hover) {
    .card:hover {
      border-color: color-mix(in srgb, var(--card-accent) 31%, var(--border-primary));
      box-shadow:
        0 18px 42px rgba(0, 0, 0, .24),
        0 4px 13px color-mix(in srgb, var(--card-accent) 7%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, .045);
    }

    .kpi-card:hover,
    .queue-card:hover,
    .job-card:hover,
    .reminder-card:hover,
    .template-card:hover,
    .template-summary-card:hover,
    .notification-template-card:hover {
      transform: translateY(-2px);
      border-color: color-mix(in srgb, var(--card-accent) 42%, var(--border-primary));
      box-shadow:
        0 17px 38px rgba(0, 0, 0, .24),
        0 5px 16px color-mix(in srgb, var(--card-accent) 10%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, .05);
    }
  }

  html[data-theme="light"] .card,
  html[data-theme="light"] .job-card,
  html[data-theme="light"] .notification-card,
  html[data-theme="light"] .reminder-card,
  html[data-theme="light"] .template-card,
  html[data-theme="light"] .queue-card,
  html[data-theme="light"] .tech-mini-card,
  html[data-theme="light"] .tech-daily-card,
  html[data-theme="light"] .template-summary-card,
  html[data-theme="light"] .notification-template-card,
  html[data-theme="light"] .reminder-master-card,
  html[data-theme="light"] .reminder-history-card,
  html[data-theme="light"] .wa-session-card {
    border-color: color-mix(in srgb, var(--card-accent) 12%, rgba(28, 50, 78, .18));
    box-shadow:
      0 14px 34px rgba(36, 59, 91, .1),
      0 2px 7px rgba(36, 59, 91, .05),
      inset 0 1px 0 rgba(255, 255, 255, .88);
  }

  html[data-theme="light"] .card:not(.hero-card):not(.clock-card):not(.tech-command-card),
  html[data-theme="light"] .queue-card,
  html[data-theme="light"] .tech-mini-card,
  html[data-theme="light"] .tech-daily-card,
  html[data-theme="light"] .notification-card,
  html[data-theme="light"] .reminder-card,
  html[data-theme="light"] .template-card,
  html[data-theme="light"] .template-summary-card,
  html[data-theme="light"] .notification-template-card,
  html[data-theme="light"] .reminder-master-card,
  html[data-theme="light"] .reminder-history-card,
  html[data-theme="light"] .wa-session-card {
    background-image:
      radial-gradient(circle at 96% -12%, color-mix(in srgb, var(--card-accent) 8%, transparent), transparent 35%),
      linear-gradient(150deg, #ffffff 0%, #f8fbff 60%, #f2f6fb 100%);
  }

  html[data-theme="light"] .card.flat {
    background-image:
      radial-gradient(circle at 100% 0, color-mix(in srgb, var(--card-accent) 5%, transparent), transparent 36%),
      linear-gradient(145deg, #fbfdff, #f3f7fb);
  }

  html[data-theme="light"] .hero-card,
  html[data-theme="light"] .clock-card,
  html[data-theme="light"] .tech-command-card {
    background-image:
      radial-gradient(circle at 100% 0, rgba(33, 103, 242, .09), transparent 38%),
      linear-gradient(145deg, #ffffff, #f2f7fd);
    box-shadow:
      0 16px 36px rgba(36, 59, 91, .11),
      0 3px 9px rgba(33, 103, 242, .05),
      inset 0 1px 0 #ffffff;
  }

  html[data-theme="light"] .kpi-card {
    background-image:
      radial-gradient(circle at 92% 2%, color-mix(in srgb, var(--kpi, var(--brand-primary)) 10%, transparent), transparent 36%),
      linear-gradient(150deg, #ffffff, #f7faff 62%, #f1f5fa);
  }
  html[data-theme="light"] .kpi-label { color: #667991; }

  html[data-theme="light"] .form-panel,
  html[data-theme="light"] .placeholder-panel,
  html[data-theme="light"] .whatsapp-gateway-panel > .gateway-loading,
  html[data-theme="light"] .whatsapp-gateway-panel > .gateway-empty,
  html[data-theme="light"] .finance-today-row,
  html[data-theme="light"] .ops-item,
  html[data-theme="light"] .stage-row,
  html[data-theme="light"] .next-step,
  html[data-theme="light"] .quick-action,
  html[data-theme="light"] .responsive-card-table tbody tr,
  html[data-theme="light"] .mobile-card-table tbody tr {
    border-color: rgba(28, 50, 78, .13);
    background-color: #f7faff;
    background-image: linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(235, 242, 250, .7));
    box-shadow:
      0 7px 18px rgba(36, 59, 91, .055),
      inset 0 1px 0 rgba(255, 255, 255, .95);
  }

  @media (max-width: 639px) {
    .card,
    .job-card,
    .notification-card,
    .reminder-card,
    .template-card,
    .queue-card,
    .tech-mini-card,
    .tech-daily-card,
    .template-summary-card,
    .notification-template-card,
    .reminder-master-card,
    .reminder-history-card,
    .wa-session-card {
      box-shadow:
        0 11px 26px rgba(0, 0, 0, .16),
        0 2px 6px rgba(0, 0, 0, .08),
        inset 0 1px 0 rgba(255, 255, 255, .03);
    }

    html[data-theme="light"] .card,
    html[data-theme="light"] .job-card,
    html[data-theme="light"] .notification-card,
    html[data-theme="light"] .reminder-card,
    html[data-theme="light"] .template-card,
    html[data-theme="light"] .queue-card,
    html[data-theme="light"] .tech-mini-card,
    html[data-theme="light"] .tech-daily-card,
    html[data-theme="light"] .template-summary-card,
    html[data-theme="light"] .notification-template-card,
    html[data-theme="light"] .reminder-master-card,
    html[data-theme="light"] .reminder-history-card,
    html[data-theme="light"] .wa-session-card {
      box-shadow:
        0 11px 25px rgba(36, 59, 91, .085),
        0 2px 6px rgba(36, 59, 91, .035),
        inset 0 1px 0 rgba(255, 255, 255, .9);
    }
  }
}

/* Premium login composition: compact branding, readable media, and distinct
   technician/management identities without covering the hero photograph. */
@media screen {
  body[data-login-portal="technician"] {
    --login-accent: #2378ff;
    --login-accent-secondary: #18bfd2;
    --login-accent-soft: rgba(35, 120, 255, .16);
  }

  body[data-login-portal="management"] {
    --login-accent: #6d4cf4;
    --login-accent-secondary: #3184ff;
    --login-accent-soft: rgba(109, 76, 244, .15);
  }

  .login-view {
    padding: 12px;
    background:
      radial-gradient(circle at 86% 8%, color-mix(in srgb, var(--login-accent, #2378ff) 14%, transparent), transparent 28%),
      #020712;
  }

  .login-visual {
    inset: 12px;
    min-height: calc(100vh - 24px);
    border-color: color-mix(in srgb, var(--login-accent, #2378ff) 30%, rgba(255, 255, 255, .08));
    border-radius: 28px;
    background-position: center 55%;
    box-shadow: 0 28px 80px rgba(1, 8, 20, .34), inset 0 1px rgba(255, 255, 255, .12);
  }

  .login-visual-overlay {
    background:
      radial-gradient(circle at 23% 42%, color-mix(in srgb, var(--login-accent, #2378ff) 13%, transparent), transparent 34%),
      linear-gradient(90deg, rgba(2, 10, 23, .36) 0%, rgba(2, 10, 23, .18) 46%, rgba(2, 8, 18, .72) 78%, rgba(2, 7, 16, .9) 100%),
      linear-gradient(0deg, rgba(2, 8, 18, .76), transparent 48%);
  }

  .login-brand {
    top: clamp(30px, 6vh, 64px);
    left: clamp(30px, 4vw, 66px);
    width: max-content;
    max-width: min(390px, calc(100% - 520px));
    gap: 12px;
    padding: 10px 15px 10px 11px;
    overflow: hidden;
    color: #f8fbff;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(7, 22, 43, .86), rgba(7, 18, 35, .7));
    box-shadow: 0 16px 38px rgba(0, 8, 24, .24), inset 0 1px rgba(255, 255, 255, .1);
    -webkit-backdrop-filter: blur(18px) saturate(1.18);
    backdrop-filter: blur(18px) saturate(1.18);
  }

  .login-brand::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, var(--login-accent-secondary, #18bfd2), var(--login-accent, #2378ff));
    box-shadow: 0 0 18px var(--login-accent, #2378ff);
  }

  .login-brand .brand-logo {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--login-accent, #2378ff) 28%, transparent));
  }

  .login-brand strong {
    color: #ffffff;
    font-size: clamp(21px, 2vw, 28px);
    font-style: italic;
    letter-spacing: -.035em;
  }

  .login-brand small {
    margin-top: 3px;
    color: #a9bdd5;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
  }

  .hero-copy {
    top: clamp(140px, 22vh, 210px);
    left: clamp(30px, 4vw, 66px);
    width: min(540px, calc(100% - 520px));
    max-width: none;
    padding: 22px 24px 24px;
    overflow: hidden;
    color: #f7fbff;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 22px;
    background-color: rgba(6, 20, 40, .78);
    background-image: linear-gradient(135deg, rgba(6, 20, 40, .82), rgba(5, 16, 32, .66));
    box-shadow: 0 20px 48px rgba(0, 8, 24, .26), inset 0 1px rgba(255, 255, 255, .09);
    -webkit-backdrop-filter: blur(18px) saturate(1.14);
    backdrop-filter: blur(18px) saturate(1.14);
  }

  .hero-copy::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, var(--login-accent-secondary, #18bfd2), var(--login-accent, #2378ff) 55%, transparent);
  }

  .hero-kicker {
    min-height: 24px;
    margin-bottom: 12px;
    padding: 5px 9px;
    color: #d5e8ff;
    border-color: color-mix(in srgb, var(--login-accent, #2378ff) 52%, rgba(255, 255, 255, .14));
    background: color-mix(in srgb, var(--login-accent, #2378ff) 16%, rgba(3, 13, 27, .42));
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .11em;
  }

  .hero-copy h1 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: clamp(28px, 2.8vw, 40px);
    font-weight: 760;
    line-height: 1.08;
    letter-spacing: -.035em;
    text-wrap: balance;
  }

  .hero-copy p {
    max-width: 490px;
    color: #c4d5e8;
    font-size: clamp(13px, 1.15vw, 16px);
    line-height: 1.6;
  }

  .login-feature-grid {
    left: clamp(26px, 3.4vw, 56px);
    bottom: clamp(24px, 4vh, 40px);
    width: min(720px, calc(100% - 500px));
    gap: 9px;
  }

  .login-feature-grid article {
    min-height: 78px;
    gap: 10px;
    padding: 12px 13px;
    border-color: rgba(255, 255, 255, .14);
    border-radius: 15px;
    background-color: rgba(6, 20, 39, .76);
    background-image: linear-gradient(145deg, rgba(11, 31, 57, .9), rgba(5, 17, 33, .72));
    box-shadow: 0 14px 30px rgba(0, 7, 20, .2), inset 0 1px rgba(255, 255, 255, .07);
    -webkit-backdrop-filter: blur(16px) saturate(1.12);
    backdrop-filter: blur(16px) saturate(1.12);
  }

  .login-feature-grid article > svg {
    width: 34px;
    height: 34px;
    padding: 8px;
    color: #d7eaff;
    border: 1px solid color-mix(in srgb, var(--login-accent, #2378ff) 42%, rgba(255, 255, 255, .08));
    border-radius: 10px;
    background: var(--login-accent-soft, rgba(35, 120, 255, .16));
  }

  .login-feature-grid b { color: #f6faff; font-size: 11px; font-weight: 760; }
  .login-feature-grid small { color: #91a7c1; font-size: 9px; line-height: 1.35; }

  .login-panel {
    width: 440px;
    margin-right: clamp(22px, 4.4vw, 76px);
  }

  .login-card {
    --card-accent: var(--login-accent, var(--brand-primary));
    position: relative;
    isolation: isolate;
    width: min(100%, 408px);
    padding: 24px;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 30px 78px rgba(0, 6, 20, .42), 0 6px 20px color-mix(in srgb, var(--login-accent, #2378ff) 12%, transparent), inset 0 1px rgba(255, 255, 255, .06);
  }

  .login-card::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--login-accent-secondary, #18bfd2), var(--login-accent, #2378ff) 58%, transparent 92%);
  }

  .login-card::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: -96px;
    right: -82px;
    width: 210px;
    height: 210px;
    border: 1px solid color-mix(in srgb, var(--login-accent, #2378ff) 12%, transparent);
    border-radius: 50%;
    box-shadow: 0 0 0 34px color-mix(in srgb, var(--login-accent, #2378ff) 3%, transparent);
    pointer-events: none;
  }

  .login-card > * { position: relative; z-index: 1; }

  .login-portal-heading {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 13px;
    margin-bottom: 17px;
    padding-bottom: 17px;
    border-bottom: 1px solid color-mix(in srgb, var(--login-accent, #2378ff) 14%, var(--border-secondary));
  }

  .login-portal-icon {
    width: 48px;
    height: 48px;
    color: color-mix(in srgb, var(--login-accent, #2378ff) 70%, white);
    border-color: color-mix(in srgb, var(--login-accent, #2378ff) 34%, transparent);
    border-radius: 14px;
    background: linear-gradient(145deg, var(--login-accent-soft, rgba(35, 120, 255, .16)), rgba(9, 27, 52, .22));
    box-shadow: 0 9px 22px color-mix(in srgb, var(--login-accent, #2378ff) 13%, transparent), inset 0 1px rgba(255, 255, 255, .1);
  }

  .login-portal-icon svg { width: 23px; height: 23px; }
  .login-heading .eyebrow { color: var(--login-accent, #2378ff); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
  .login-heading h2 { margin: 5px 0; font-size: 25px; font-weight: 760; letter-spacing: -.025em; }
  .login-subtitle { max-width: 300px; font-size: 11px; line-height: 1.5; }
  #loginForm .field-label:first-child { margin-top: 0; }
  .field-label { margin-top: 14px; color: color-mix(in srgb, var(--text-secondary) 92%, var(--text-primary)); font-size: 11px; font-weight: 700; }
  .input-shell { min-height: 46px; border-radius: 12px; box-shadow: inset 0 1px rgba(255, 255, 255, .035); }
  .input-shell:hover { border-color: color-mix(in srgb, var(--login-accent, #2378ff) 28%, var(--border-primary)); }
  .input-shell input { height: 44px; }
  .input-shell:focus-within { border-color: color-mix(in srgb, var(--login-accent, #2378ff) 70%, white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--login-accent, #2378ff) 13%, transparent); }
  #loginSubmit { min-height: 46px; border-radius: 12px; background: linear-gradient(115deg, var(--login-accent, #2378ff), var(--login-accent-secondary, #18bfd2)); box-shadow: 0 12px 28px color-mix(in srgb, var(--login-accent, #2378ff) 26%, transparent); }
  #loginSubmit:hover { transform: translateY(-1px); box-shadow: 0 16px 34px color-mix(in srgb, var(--login-accent, #2378ff) 30%, transparent); }
  body[data-login-portal="management"] #loginSubmit { background: linear-gradient(115deg, var(--login-accent-secondary), var(--login-accent)); }
  .form-message:empty { display: none; }
  .form-message:not(:empty) { min-height: 0; margin-top: 10px; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--danger) 24%, transparent); border-radius: 9px; background: color-mix(in srgb, var(--danger) 8%, transparent); }
  .form-message.is-success:not(:empty) { border-color: color-mix(in srgb, var(--success) 24%, transparent); background: color-mix(in srgb, var(--success) 8%, transparent); }
  .login-footer { padding: 5px 10px; border: 1px solid color-mix(in srgb, var(--login-accent, #2378ff) 10%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--background-primary) 38%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

  html[data-theme="light"] .login-view {
    background:
      radial-gradient(circle at 86% 7%, color-mix(in srgb, var(--login-accent, #2378ff) 10%, transparent), transparent 30%),
      linear-gradient(145deg, #eaf1f8, #f8fbff 60%, #edf2f8);
  }

  html[data-theme="light"] .login-visual-overlay {
    background:
      radial-gradient(circle at 22% 40%, color-mix(in srgb, var(--login-accent, #2378ff) 10%, transparent), transparent 34%),
      linear-gradient(90deg, rgba(4, 17, 34, .2) 0%, rgba(4, 17, 34, .08) 48%, rgba(238, 245, 251, .48) 72%, #f1f6fb 88%, #f1f6fb 100%),
      linear-gradient(0deg, rgba(4, 17, 34, .18), transparent 45%);
  }

  html[data-theme="light"] .login-brand.brand-light {
    color: #f8fbff;
    border-color: rgba(255, 255, 255, .2);
    background: linear-gradient(135deg, rgba(7, 24, 47, .88), rgba(6, 19, 37, .76));
    box-shadow: 0 16px 40px rgba(12, 35, 63, .22), inset 0 1px rgba(255, 255, 255, .12);
  }

  html[data-theme="light"] .login-brand.brand-light strong { color: #ffffff; }
  html[data-theme="light"] .login-brand.brand-light small { color: #aec2da; }

  html[data-theme="light"] .hero-copy {
    color: #f7fbff;
    border-color: rgba(255, 255, 255, .2);
    background-color: rgba(6, 22, 43, .82);
    background-image: linear-gradient(135deg, rgba(6, 22, 43, .84), rgba(5, 18, 36, .72));
    box-shadow: 0 20px 48px rgba(12, 35, 63, .22), inset 0 1px rgba(255, 255, 255, .11);
  }

  html[data-theme="light"] .hero-copy h1 { color: #ffffff; }
  html[data-theme="light"] .hero-copy p { color: #c7d8ea; }
  html[data-theme="light"] .hero-kicker { color: #d8e9fc; background: color-mix(in srgb, var(--login-accent, #2378ff) 17%, rgba(3, 14, 29, .5)); }

  html[data-theme="light"] .login-feature-grid article {
    color: #102033;
    border-color: rgba(255, 255, 255, .76);
    background-color: rgba(247, 251, 255, .88);
    background-image: linear-gradient(145deg, rgba(255, 255, 255, .95), rgba(231, 240, 249, .88));
    box-shadow: 0 14px 30px rgba(25, 57, 94, .14), inset 0 1px #ffffff;
  }

  html[data-theme="light"] .login-feature-grid article > svg {
    color: var(--login-accent, #2378ff);
    border-color: color-mix(in srgb, var(--login-accent, #2378ff) 22%, transparent);
    background: var(--login-accent-soft, rgba(35, 120, 255, .12));
  }

  html[data-theme="light"] .login-feature-grid b { color: #12263e; }
  html[data-theme="light"] .login-feature-grid small { color: #60758d; }

  html[data-theme="light"] .login-card,
  html[data-theme="light"] body[data-login-portal="management"] .login-card {
    border-color: color-mix(in srgb, var(--login-accent, #2378ff) 18%, rgba(32, 70, 117, .18));
    background-color: #ffffff;
    background-image:
      radial-gradient(circle at 100% -10%, color-mix(in srgb, var(--login-accent, #2378ff) 11%, transparent), transparent 38%),
      linear-gradient(155deg, #ffffff, #f7faff 68%, #edf3f9);
    box-shadow: 0 30px 74px rgba(25, 50, 84, .22), 0 6px 18px color-mix(in srgb, var(--login-accent, #2378ff) 8%, transparent), inset 0 1px #ffffff;
  }

  html[data-theme="light"] .login-portal-icon,
  html[data-theme="light"] body[data-login-portal="management"] .login-portal-icon {
    color: var(--login-accent, #2378ff);
    border-color: color-mix(in srgb, var(--login-accent, #2378ff) 22%, transparent);
    background: linear-gradient(145deg, color-mix(in srgb, var(--login-accent, #2378ff) 9%, white), #edf3fa);
  }

  @media (max-width: 1180px) {
    .login-panel { width: 418px; margin-right: 22px; }
    .login-brand, .hero-copy { left: 30px; }
    .login-feature-grid { left: 24px; width: min(560px, calc(100% - 460px)); grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  @media (max-height: 620px) and (min-width: 961px) {
    .login-brand { top: 22px; padding: 9px 14px 9px 10px; }
    .login-brand .brand-logo { width: 44px; height: 44px; }
    .hero-copy { top: 114px; padding: 15px 19px 17px; }
    .hero-kicker { margin-bottom: 8px; }
    .hero-copy h1 { font-size: clamp(24px, 2.4vw, 32px); }
    .hero-copy p { font-size: 12px; }
    .login-feature-grid { display: none; }
    .login-card { padding: 18px; }
    .login-portal-heading { margin-bottom: 11px; padding-bottom: 12px; }
    .field-label { margin-top: 10px; }
  }

  @media (max-width: 960px) {
    .login-view { min-height: 100svh; padding: 0; overflow-x: clip; overflow-y: auto; }
    .login-visual { inset: 0 0 auto; width: 100%; height: 310px; min-height: 0; border: 0; border-radius: 0; background-position: center 62%; }
    .login-visual-overlay { background: linear-gradient(180deg, rgba(3, 12, 27, .24), rgba(3, 12, 27, .42) 50%, #07111f 100%); }
    .login-brand, .login-feature-grid { display: none; }
    .hero-copy {
      top: 30px;
      right: auto;
      left: 50%;
      width: min(600px, calc(100% - 40px));
      padding: 17px 20px 19px;
      text-align: center;
      transform: translateX(-50%);
    }
    .hero-copy p { max-width: 520px; margin-right: auto; margin-left: auto; }
    .login-panel { position: relative; width: 100%; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; margin: 0; padding: 190px 20px 22px; }
    .login-card { flex: 0 0 auto; width: min(100%, 440px); }
  }

  @media (min-width: 640px) and (max-width: 960px) and (max-height: 620px) {
    .login-view { padding: 8px; }
    .login-visual { inset: 8px; width: auto; height: calc(100vh - 16px); min-height: 400px; border: 1px solid color-mix(in srgb, var(--login-accent) 28%, rgba(255, 255, 255, .08)); border-radius: 22px; }
    .login-visual-overlay { background: linear-gradient(90deg, rgba(3, 12, 27, .28), rgba(3, 12, 27, .16) 42%, rgba(3, 10, 23, .8) 76%, #030a17 100%); }
    .hero-copy { top: 34px; left: 28px; width: calc(100% - 468px); min-width: 280px; max-width: 420px; padding: 17px 19px 18px; text-align: left; transform: none; }
    .hero-copy h1 { font-size: clamp(24px, 3.4vw, 31px); }
    .hero-copy p { display: block; margin-left: 0; font-size: 12px; }
    .login-panel { position: relative; z-index: 2; width: 420px; min-height: calc(100vh - 16px); display: grid; place-items: center; align-content: center; margin: 0 14px 0 auto; padding: 10px 0; }
    .login-card { width: min(100%, 390px); padding: 15px 17px; }
    .login-portal-heading { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
    .login-portal-icon { width: 40px; height: 40px; }
    .login-heading h2 { font-size: 20px; }
    .field-label { margin-top: 9px; }
    .input-shell { min-height: 40px; }
    .input-shell input { height: 38px; }
    .login-row { margin: 10px 0 12px; }
    .login-footer { display: none; }
  }

  @media (max-width: 639px) {
    .login-visual { height: 244px; background-position: center 67%; }
    .login-visual-overlay { background: linear-gradient(180deg, rgba(3, 12, 27, .25), rgba(3, 12, 27, .48) 54%, #07111f 100%); }
    .hero-copy {
      top: 22px;
      width: calc(100% - 24px);
      padding: 10px 13px 12px;
      border-radius: 16px;
    }
    .hero-kicker { min-height: 20px; margin-bottom: 6px; padding: 4px 7px; font-size: 7px; }
    .hero-copy h1 { margin: 0; font-size: clamp(17px, 5.1vw, 20px); line-height: 1.18; }
    .hero-copy p { display: none; }
    .login-panel { padding: 132px max(12px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
    .login-card { width: min(100%, 430px); padding: 17px; border-radius: 22px; }
    .mobile-brand { margin-bottom: 13px; }
    .login-portal-heading { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; margin-bottom: 11px; }
    .login-portal-icon { width: 40px; height: 40px; border-radius: 12px; }
    .login-heading h2 { font-size: clamp(19px, 5.4vw, 22px); }
    .login-portal-heading { padding-bottom: 12px; }
    html[data-theme="light"] .hero-copy { border-radius: 16px; background-color: rgba(6, 22, 43, .84); background-image: linear-gradient(135deg, rgba(6, 22, 43, .86), rgba(5, 18, 36, .75)); box-shadow: 0 12px 32px rgba(12, 35, 63, .22), inset 0 1px rgba(255, 255, 255, .1); }
    html[data-theme="light"] .login-visual-overlay { background: linear-gradient(180deg, rgba(4, 17, 34, .18), rgba(4, 17, 34, .34) 50%, #eff5fa 100%); }
  }

  @media (max-width: 389px) {
    .login-panel { padding-top: 124px; padding-right: 8px; padding-left: 8px; }
    .login-visual { height: 226px; }
    .hero-copy { top: 16px; }
    .login-card { padding: 14px; }
  }
}

/* Final daylight token/state enforcement. This follows feature-specific
   rules so dark-first component declarations cannot wash out light states. */
@media screen {
  html[data-theme="light"] {
    --surface-secondary: #f3f6fa;
    --surface-tertiary: #e7edf4;
    --surface-hover: #e3edf8;
    --surface-active: #d9e6fb;
    --border-primary: rgba(28, 50, 78, .24);
    --border-secondary: rgba(28, 50, 78, .14);
    --text-secondary: #40536b;
    --text-muted: #5f7086;
    --success: #0b7a45;
    --warning: #925800;
    --danger: #b42335;
    --info: #146f9b;
    --purple: #6340bd;
    --nav-blue: #1766c2;
    --nav-cyan: #087a94;
    --nav-teal: #087b72;
    --nav-emerald: #14784b;
    --nav-green: #337a26;
    --nav-yellow: #756000;
    --nav-amber: #895800;
    --nav-orange: #a9470c;
    --nav-rose: #ae2a4d;
    --nav-pink: #a62d6d;
    --nav-purple: #6742b8;
    --nav-violet: #5059bd;
    --nav-slate: #536477;
  }

  html[data-theme="light"] .success-button {
    color: #0b6b3b;
    border-color: #94d0af;
    background: #e1f4e9;
  }
  html[data-theme="light"] .success-button:hover {
    color: #07572f;
    border-color: #68b98c;
    background: #d2eddd;
  }
  html[data-theme="light"] .danger-button,
  html[data-theme="light"] .soft-button.danger {
    color: #a11d31;
    border-color: #e6a7b1;
    background: #fde9ec;
  }
  html[data-theme="light"] .secondary-button {
    color: #174fad;
    border-color: #a9c4ef;
    background: #e7f0ff;
  }

  html[data-theme="light"] button:disabled,
  html[data-theme="light"] [role="button"][aria-disabled="true"],
  html[data-theme="light"] .tech-action-button[aria-disabled="true"] {
    color: #66768a;
    border-color: #bdc9d6;
    background: #e8edf3;
    background-image: none;
    box-shadow: inset 0 1px rgba(255, 255, 255, .82);
    filter: none;
    opacity: 1 !important;
    transform: none;
  }

  html[data-theme="light"] :is(input, textarea)::placeholder,
  html[data-theme="light"] .input-shell input::placeholder,
  html[data-theme="light"] .global-search-wrap input::placeholder,
  html[data-theme="light"] :is(.search-input, .form-control)::placeholder {
    color: #65768a;
    opacity: 1;
  }
  html[data-theme="light"] :is(.form-control, .search-input, .compact-select):disabled,
  html[data-theme="light"] .input-shell:has(input:disabled) {
    color: #5d6d80;
    border-color: #c0cad5;
    background: #e7ecf2;
    opacity: 1;
  }

  html[data-theme="light"] .wa-settings-tabs button.active {
    color: #174fad;
    background: #e4edfc;
    box-shadow: inset 0 -3px #2167f2;
  }
  html[data-theme="light"] .wa-settings-tabs button.active .wa-tab-copy small { color: #536a86; }
  html[data-theme="light"] .template-badges span {
    color: #52657b;
    border-color: #b9c6d3;
    background: #e8edf3;
  }
  html[data-theme="light"] .template-badges .tone-success {
    color: #0b6b3b;
    border-color: #9bcfb2;
    background: #e0f4e9;
  }
  html[data-theme="light"] .template-badges .tone-warning {
    color: #845000;
    border-color: #dfbd76;
    background: #fff2d5;
  }
  html[data-theme="light"] .template-badges .tone-danger {
    color: #a11d31;
    border-color: #e9aab4;
    background: #fde9ec;
  }

  /* Shared button families, including hover and ghost actions. */
  html[data-theme="light"] .secondary-button:hover {
    color: #103f8f;
    border-color: #7da6e5;
    background: #d9e7fb;
  }
  html[data-theme="light"] .outline-button {
    color: #28415e;
    border-color: #b8c6d6;
    background: rgba(255, 255, 255, .76);
  }
  html[data-theme="light"] .soft-button {
    color: #354a62;
    border-color: #b8c6d6;
    background: #f5f7fa;
  }
  html[data-theme="light"] :is(.outline-button, .soft-button):hover {
    color: #143c70;
    border-color: #8eadd2;
    background: #e5eef9;
  }
  html[data-theme="light"] :is(.danger-button, .soft-button.danger):hover {
    color: #861426;
    border-color: #d77f8d;
    background: #f9d9df;
  }
  html[data-theme="light"] :is(.card-link, .text-button, .tech-card-heading > button) { color: #1559ae; }
  html[data-theme="light"] :is(.card-link, .text-button, .tech-card-heading > button):hover { color: #0d3f80; }

  /* Active technician action: prevent the ordinary light action rule from
     replacing the green primary gradient with a pale secondary surface. */
  html[data-theme="light"] .tech-action-button.primary:not(:disabled) {
    color: #fff;
    border-color: #087343;
    background: linear-gradient(110deg, #087343, #0a8551);
    box-shadow: 0 8px 18px rgba(8, 115, 67, .24), inset 0 1px rgba(255, 255, 255, .18);
  }
  html[data-theme="light"] .tech-action-button.primary:not(:disabled):hover {
    color: #fff;
    border-color: #075f38;
    background: linear-gradient(110deg, #075f38, #087847);
    box-shadow: 0 10px 22px rgba(8, 115, 67, .3), inset 0 1px rgba(255, 255, 255, .2);
  }
  html[data-theme="light"] .tech-action-button:not(.primary) {
    color: #284361;
    border-color: #b7c7da;
    background: #e9eff7;
    box-shadow: inset 0 1px #fff;
  }
  html[data-theme="light"] .tech-action-button:not(.primary):hover {
    color: #123d72;
    border-color: #89a9cf;
    background: #dbe8f7;
  }

  html[data-theme="light"] :is(.icon-button, .action-dot, .logout-button, .template-more summary, .placeholder-list article button) {
    color: #40566f;
    border-color: #b9c7d7;
    background: #f6f8fb;
  }
  html[data-theme="light"] :is(.icon-button, .action-dot, .logout-button, .template-more summary, .placeholder-list article button):hover {
    color: #174fad;
    border-color: #8baad0;
    background: #e4edf8;
  }

  /* Selected navigation and paging states. */
  html[data-theme="light"] .tabs {
    border-color: #b9c7d7;
    background: #e9eef5;
  }
  html[data-theme="light"] .tab-button { color: #40536b; }
  html[data-theme="light"] .tab-button:not(.active):hover {
    color: #143c70;
    background: #dce7f4;
  }
  html[data-theme="light"] .tab-button.active {
    color: #174fad;
    background: #d8e6fb;
    box-shadow: inset 0 0 0 1px #aac4ec, inset 0 -3px 0 #2167f2;
  }
  html[data-theme="light"] .pagination button {
    color: #40536b;
    border-color: #b9c7d7;
    background: #f5f7fa;
  }
  html[data-theme="light"] .pagination button.active {
    color: #fff;
    border-color: #194fae;
    background: #245fce;
    box-shadow: 0 4px 10px rgba(36, 95, 206, .2);
  }
  html[data-theme="light"] .mobile-nav-item.active {
    color: #174fad;
    background: #dce8fa;
    box-shadow: inset 0 0 0 1px #afc7e8;
  }

  /* Inputs stay visually separate from white cards. */
  html[data-theme="light"] :is(.search-input, .form-control, .compact-select, .input-shell, .global-search-wrap) {
    border-color: #b8c6d6;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(28, 50, 78, .045);
  }
  html[data-theme="light"] :is(.search-input, .form-control, .compact-select):hover,
  html[data-theme="light"] .input-shell:hover { border-color: #91a8c4; }
  html[data-theme="light"] :is(.search-input, .form-control, .compact-select):focus,
  html[data-theme="light"] .input-shell:focus-within {
    border-color: #2167f2;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(33, 103, 242, .16);
  }

  /* Semantic badges and compact delivery statuses. */
  html[data-theme="light"] :is(.badge-primary, .badge-info) {
    color: #174fad;
    border-color: #abc4eb;
    background: #e5efff;
  }
  html[data-theme="light"] .badge-success {
    color: #0b6b3b;
    border-color: #9bcfb2;
    background: #e0f4e9;
  }
  html[data-theme="light"] .badge-warning {
    color: #845000;
    border-color: #dfbd76;
    background: #fff2d5;
  }
  html[data-theme="light"] .badge-danger {
    color: #a11d31;
    border-color: #e9aab4;
    background: #fde9ec;
  }
  html[data-theme="light"] .badge-purple {
    color: #5e3bb0;
    border-color: #c5b3e8;
    background: #f0eafd;
  }
  html[data-theme="light"] .badge-muted {
    color: #52657b;
    border-color: #b9c6d3;
    background: #e8edf3;
  }
  html[data-theme="light"] :is(.gateway-status, .wa-connection-badge, .reminder-status) {
    color: #52657b;
    border-color: #b9c6d3;
    background: #e8edf3;
  }
  html[data-theme="light"] :is(.gateway-status.success, .wa-connection-badge.success, .reminder-status.delivered, .reminder-status.read) {
    color: #0b6b3b;
    border-color: #9bcfb2;
    background: #e0f4e9;
  }
  html[data-theme="light"] :is(.gateway-status.warning, .wa-connection-badge.warning, .reminder-status.accepted, .reminder-status.sent) {
    color: #845000;
    border-color: #dfbd76;
    background: #fff2d5;
  }
  html[data-theme="light"] :is(.gateway-status.danger, .wa-connection-badge.danger, .reminder-status.failed) {
    color: #a11d31;
    border-color: #e9aab4;
    background: #fde9ec;
  }
  html[data-theme="light"] :is(.reminder-status.queued, .reminder-status.processing, .reminder-status.waiting_provider) {
    color: #174fad;
    background: #e5efff;
  }
  html[data-theme="light"] .reminder-status.quiet_hours {
    color: #5e3bb0;
    background: #f0eafd;
  }

  html[data-theme="light"] .tech-priority {
    color: #1458a6;
    border-color: #a8c4e8;
    background: #e4efff;
  }
  html[data-theme="light"] .tech-priority-darurat {
    color: #a11d31;
    border-color: #e9aab4;
    background: #fde9ec;
  }
  html[data-theme="light"] .tech-priority-tinggi {
    color: #845000;
    border-color: #dfbd76;
    background: #fff2d5;
  }
  html[data-theme="light"] :is(.tech-job-ticket small, .tech-job-type > span) { color: #1458a6; }
  html[data-theme="light"] .tech-customer-block span:last-child { color: #0b6b3b; }
  html[data-theme="light"] :is(.tech-attendance-facts, .tech-job-metrics) svg { color: #1765bd; }
  html[data-theme="light"] :is(.tech-attendance-facts, .tech-job-metrics) small { color: #5f7086; }

  /* Informational controls that previously retained pastel dark-theme text. */
  html[data-theme="light"] .alert-info {
    color: #145f89;
    border-color: #9cc9dc;
    background: #e5f4fa;
  }
  html[data-theme="light"] .alert-warning,
  html[data-theme="light"] .template-provider-alert {
    color: #7b4b00;
    border-color: #dfbd76;
    background: #fff2d5;
  }
  html[data-theme="light"] .alert-danger {
    color: #a11d31;
    border-color: #e9aab4;
    background: #fde9ec;
  }
  html[data-theme="light"] .pairing-code-result strong { color: #153a69; }
  html[data-theme="light"] .wa-inline-action,
  html[data-theme="light"] .wa-history-actions .wa-inline-action:not(.danger) {
    color: #2949a3;
    border-color: #aab8e8;
    background: #e9edff;
  }
  html[data-theme="light"] .wa-history-actions .wa-inline-action.danger {
    color: #a11d31;
    border-color: #e9aab4;
    background: #fde9ec;
  }
  html[data-theme="light"] .wa-placeholder-buttons button {
    color: #12627a;
    border-color: #9cc9d7;
    background: #e8f5f8;
  }
  html[data-theme="light"] .reminder-day-selector span {
    color: #40536b;
    border-color: #b9c7d7;
    background: #f5f7fa;
  }
  html[data-theme="light"] .reminder-day-selector input:checked + span {
    color: #174fad;
    border-color: #789ee5;
    background: #dce7ff;
    box-shadow: inset 0 -2px #2167f2;
  }

  html[data-theme="light"] .wa-history-toolbar label {
    color: #40536b;
    border-color: #b8c6d6;
    background: #fff;
  }
  html[data-theme="light"] .wa-history-toolbar input,
  html[data-theme="light"] .wa-history-toolbar select {
    color: #28415e;
    border-color: #b8c6d6;
    background: #fff;
    color-scheme: light;
  }
  html[data-theme="light"] .wa-history-toolbar input { border: 0; background: transparent; }
  html[data-theme="light"] .wa-history-toolbar input::placeholder { color: #65768a; opacity: 1; }
  html[data-theme="light"] .wa-history-toolbar label:focus-within,
  html[data-theme="light"] .wa-history-toolbar select:focus {
    border-color: #2167f2;
    box-shadow: 0 0 0 3px rgba(33, 103, 242, .16);
  }

  html[data-theme="light"] :is(button, a, summary, [role="button"]):focus-visible {
    outline: 3px solid rgba(33, 103, 242, .3);
    outline-offset: 2px;
  }
}

/* Final responsive density pass: keep long content reachable without oversized cards. */
@media (max-width: 760px) {
  .modal-backdrop:has(.template-editor-layout) {
    align-items: end;
    padding: 8px 6px 0;
  }
  .modal:has(.template-editor-layout) {
    height: auto;
    max-height: 92dvh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }
  .modal:has(.template-editor-layout) .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 639px) {
  #settingsForm.settings-view[data-settings-view="general"] [data-settings-group="general"] > .card.span-2 .form-grid {
    gap: 5px;
  }
  #settingsForm.settings-view[data-settings-view="general"] [data-settings-group="general"] textarea[name="companyAddress"] {
    min-height: 58px;
    height: 58px;
  }

  #reportTableContainer .responsive-card-table tbody {
    gap: 6px;
    padding: 6px;
  }
  #reportTableContainer .responsive-card-table tbody tr {
    column-gap: 9px;
    padding: 5px 8px;
  }
  #reportTableContainer .responsive-card-table tbody td {
    min-height: 43px;
    gap: 1px;
    padding: 5px 0;
    font-size: 10.5px;
    line-height: 1.3;
  }
  #reportTableContainer .responsive-card-table tbody td:not([colspan])::before {
    font-size: 9px;
    line-height: 1.2;
  }

  .profile-account-card { padding: 10px; }
  .profile-photo-editor {
    display: grid;
    grid-template-columns: minmax(120px, .9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    padding: 7px;
  }
  .profile-photo-editor .primary-button,
  .profile-photo-editor .soft-button {
    min-width: 0;
    width: 100%;
    justify-content: center;
  }
  .profile-photo-editor:not(:has(.soft-button)) > small { grid-column: 2; }
  .profile-photo-editor:has(.soft-button) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-photo-editor:has(.soft-button) > small { grid-column: 1 / -1; }
  .profile-photo-editor > small {
    min-width: 0;
    font-size: 8.5px;
  }
  .profile-edit-form {
    margin-top: 8px;
    padding-top: 8px;
  }
  .profile-edit-heading { margin-bottom: 6px; }
  .profile-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .profile-edit-grid .form-group:first-child { grid-column: 1 / -1; }
  .profile-edit-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    padding-top: 8px;
  }
  .profile-edit-footer > small {
    min-width: 0;
    font-size: 8px;
  }
  .profile-edit-footer .primary-button {
    width: auto;
    min-width: 0;
  }
  .profile-details {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-top: 8px;
  }
  .profile-details .detail-box { padding: 7px; }
}

@media (min-width: 640px) {
  #reportDataTable td {
    padding-top: 5px;
    padding-bottom: 5px;
  }
}

/* Admin/Owner controls for technician login and active attendance sessions. */
.technician-management-table .table-toolbar > div:first-child { min-width: 0; }
.technician-management-table .table-toolbar p { margin: 2px 0 0; color: var(--text-muted); font-size: 9px; }
.technician-session-panel { margin-top: 10px; }
.technician-session-list { display: grid; gap: 8px; }
.technician-session-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(170px, .9fr) minmax(270px, auto);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--warning) 24%, var(--border-primary));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--warning) 5%, var(--surface-secondary));
}
.technician-session-person { min-width: 0; display: flex; align-items: center; gap: 9px; }
.technician-session-person > div { min-width: 0; }
.technician-session-person strong,
.technician-session-person span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.technician-session-person strong { font-size: 12px; }
.technician-session-person span { margin-top: 2px; color: var(--text-muted); font-size: 9px; }
.technician-session-state { min-width: 0; display: grid; justify-items: start; gap: 4px; }
.technician-session-pill { display: inline-flex; align-items: center; gap: 5px; color: var(--text-secondary); font-size: 9px; font-weight: 800; }
.technician-session-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-muted) 12%, transparent); }
.technician-session-pill.is-attendance-active { color: var(--warning); }
.technician-session-pill.is-attendance-active i { background: var(--warning); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 14%, transparent); }
.technician-session-pill.is-attendance-clear { color: var(--success); }
.technician-session-pill.is-attendance-clear i { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 14%, transparent); }
.technician-session-state small { display: flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: 9px; }
.technician-session-state small svg { width: 13px; height: 13px; }
.technician-session-state small.is-ended { color: var(--danger); }
.technician-session-state small.is-online { color: var(--success); }
.technician-session-state em { color: var(--text-muted); font-size: 8px; font-style: normal; }
.technician-session-actions { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.session-action-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--warning) 32%, var(--border-primary));
  border-radius: var(--radius-sm);
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 9%, var(--surface-secondary));
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}
.session-action-button:hover { border-color: var(--warning); background: color-mix(in srgb, var(--warning) 15%, var(--surface-secondary)); }
.session-action-button.is-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 32%, var(--border-primary)); background: color-mix(in srgb, var(--danger) 9%, var(--surface-secondary)); }
.session-action-button.is-danger:hover { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 15%, var(--surface-secondary)); }
.session-action-button svg { flex: 0 0 auto; width: 14px; height: 14px; }
.technician-session-no-action { color: var(--text-muted); font-size: 9px; }
.technician-session-empty,
.attendance-logout-lock,
.technician-session-confirmation { min-width: 0; display: flex; align-items: flex-start; gap: 10px; }
.technician-session-empty { padding: 12px; border: 1px dashed var(--border-primary); border-radius: var(--radius-sm); background: var(--surface-secondary); }
.technician-session-empty > svg { width: 20px; height: 20px; color: var(--success); }
.technician-session-empty strong { display: block; font-size: 11px; }
.technician-session-empty p { margin: 3px 0 0; color: var(--text-muted); font-size: 9px; }
.technician-session-confirmation,
.attendance-logout-lock { padding: 11px; border: 1px solid color-mix(in srgb, var(--danger) 25%, var(--border-primary)); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--danger) 8%, var(--surface-secondary)); }
.technician-session-confirmation > span,
.attendance-logout-lock > span { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--danger); background: color-mix(in srgb, var(--danger) 13%, transparent); }
.technician-session-confirmation > span svg,
.attendance-logout-lock > span svg { width: 18px; height: 18px; }
.technician-session-confirmation strong,
.attendance-logout-lock strong { display: block; font-size: 11px; }
.technician-session-confirmation p,
.attendance-logout-lock p { margin: 3px 0 0; color: var(--text-secondary); font-size: 10px; line-height: 1.5; }
.technician-session-reason { margin-top: 12px; }
.technician-session-reason textarea { min-height: 84px; resize: vertical; }
.technician-session-reason small { color: var(--text-muted); font-size: 9px; }
.logout-button.is-attendance-locked { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 35%, var(--border-secondary)); background: color-mix(in srgb, var(--warning) 9%, transparent); }

@media (max-width: 767px) {
  .technician-session-card { grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 10px; }
  .technician-session-actions { width: 100%; }
}

@media (max-width: 420px) {
  .technician-session-actions { grid-template-columns: minmax(0, 1fr); }
  .session-action-button { min-height: 42px; }
  .technician-session-confirmation,
  .attendance-logout-lock { padding: 10px; }
}
