/* Biz1 Showcase — Field Service shared styles */
:root {
  color-scheme: light;
  --brand: #1d60a2;
  --brand-deep: #16487c;
  --primary: #1d60a2;
  --primary-hover: #16487c;
  --primary-soft: color-mix(in srgb, var(--primary) 10%, transparent);
  --success: #2e8a63;
  --success-deep: #246e4f;
  --success-soft: #e6f4ec;
  --warn: #bd8324;
  --danger: #c0392b;
  --danger-soft: #fbeeed;
  --bg-app: #e6e8ec;
  --bg-screen: #eef0f3;
  --bg-card: #ffffff;
  --bg-muted: #f7f9fc;
  --bg-hero: linear-gradient(165deg, #1d60a2 0%, #16223a 100%);
  --bg-frame: #0f1828;
  --bg-status: #16223a;
  --text: #1f2a3a;
  --text-secondary: #46505f;
  --text-muted: #8a93a3;
  --border: #dde2ea;
  --border-soft: #e4e8ee;
  --border-row: #f0f2f5;
  --input-bg: #ffffff;
  --shadow-soft: 0 1px 3px rgba(0, 0, 0, .05);
  --shadow-card: 0 8px 28px rgba(15, 24, 40, .12);
  --shadow-frame: 0 24px 60px rgba(15, 24, 40, .34);
  --nav-bg: #ffffff;
  --overlay: rgba(31, 42, 58, .45);
  --wa-bg: #eafaf0;
  --wa-border: #c8ecd6;
  --wa-text: #25b35e;
  --filter-active-bg: #eaf2fb;
  --filter-active-border: #c9ddf2;
  --filter-active-text: #1d60a2;
}

[data-theme="dark"] {
  color-scheme: dark;
  --brand: #4d9de0;
  --brand-deep: #2e78b8;
  --primary: #4d9de0;
  --primary-hover: #2e78b8;
  --primary-soft: color-mix(in srgb, var(--primary) 16%, transparent);
  --success: #34c77b;
  --success-deep: #24965c;
  --success-soft: #143528;
  --warn: #e0a84a;
  --danger: #ef6b5e;
  --danger-soft: #3a1c1a;
  --bg-app: #0b1018;
  --bg-screen: #121826;
  --bg-card: #1a2233;
  --bg-muted: #1e2738;
  --bg-hero: linear-gradient(165deg, #1a4f86 0%, #0d1420 100%);
  --bg-frame: #060a12;
  --bg-status: #0d1420;
  --text: #f2f5fa;
  --text-secondary: #c2cad6;
  --text-muted: #8b95a5;
  --border: #2a3448;
  --border-soft: #243044;
  --border-row: #243044;
  --input-bg: #151d2c;
  --shadow-soft: 0 1px 3px rgba(0, 0, 0, .28);
  --shadow-card: 0 8px 28px rgba(0, 0, 0, .35);
  --shadow-frame: 0 24px 60px rgba(0, 0, 0, .5);
  --nav-bg: #151d2c;
  --overlay: rgba(2, 6, 23, .65);
  --wa-bg: #143528;
  --wa-border: #1f4a35;
  --wa-text: #34c77b;
  --filter-active-bg: #1a2f48;
  --filter-active-border: #2a5080;
  --filter-active-text: #7eb6e8;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  font-family: 'Heebo', sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--bg-app);
  color: var(--text);
}
button, input, select, textarea { font-family: 'Heebo', sans-serif; color: inherit; }
.ds-input::placeholder { color: var(--text-muted); }
.dc-scroll { scrollbar-width: none; }
.dc-scroll::-webkit-scrollbar { width: 0; }
.hidden { display: none !important; }
.btn:disabled { opacity: .65; cursor: wait; }

.phone-outer {
  position: relative;
  width: 392px;
  max-width: 100%;
  background: var(--bg-frame);
  border-radius: 34px;
  padding: 9px;
  box-shadow: var(--shadow-frame);
}
.phone-inner {
  background: var(--bg-screen);
  border-radius: 26px;
  overflow: hidden;
  position: relative;
  height: 812px;
  display: flex;
  flex-direction: column;
  color: var(--text);
}

.page-wrap {
  min-height: 100vh;
  background: var(--bg-app);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 26px 16px;
}

.app-view.hidden {
  display: none !important;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 22px 4px;
  font-size: 13px;
  font-weight: 700;
  flex: none;
  user-select: none;
}
.status-bar-light {
  background: #fff;
  color: #1f2a3a;
}
.status-bar-dark {
  background: #16223a;
  color: #fff;
}
.status-clock {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .2px;
}
.status-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-translator-btn {
  background: #f0f3f7;
  border: 1px solid #d0d7e2;
  color: #1f2a3a;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.lang-translator-btn--dark {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.3);
  color: #fff;
}
.status-icon-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: #f0f3f7;
  color: #1f2a3a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.status-icon-btn--dark {
  background: rgba(255,255,255,.14);
  color: #fff;
}
.status-icon-btn .btn-profile-avatar,
.status-icon-btn.btn-profile {
  width: 28px;
  height: 28px;
  font-size: 10px;
}
.status-bar-light .btn-profile,
.status-bar-light .status-icon-btn.btn-profile {
  background: #1d60a2;
  border: 1.5px solid #1d60a2;
  color: #fff;
}
.status-bar-dark .btn-profile,
.status-bar-dark .status-icon-btn.btn-profile {
  background: #1d60a2;
  border: 1.5px solid rgba(255, 255, 255, .35);
  color: #fff;
}
.status-bar-light .btn-profile-avatar,
.status-bar-dark .btn-profile-avatar {
  color: #fff;
}
[data-theme="dark"] .status-bar-light {
  background: var(--bg-card);
  color: var(--text);
}
[data-theme="dark"] .lang-translator-btn,
[data-theme="dark"] .status-icon-btn:not(.btn-profile) {
  background: var(--bg-muted);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="dark"] .profile-sheet {
  background: var(--bg-card);
}
[data-theme="dark"] .profile-close {
  background: var(--bg-muted);
  color: var(--text-muted);
}

.lang-bar {
  display: none;
}

.lang-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 6px;
  flex: none;
  background: var(--bg-status);
  gap: 8px;
}
.lang-bar-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.lang-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}
.theme-toggle {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  flex: none;
  transition: background .2s ease, transform .15s ease;
}
.theme-toggle:active { transform: scale(.94); }
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
.status-icon-btn .icon-moon { display: none; }
.status-icon-btn .icon-sun { display: block; }
[data-theme="dark"] .status-icon-btn .icon-moon { display: block; }
[data-theme="dark"] .status-icon-btn .icon-sun { display: none; }

.btn-logout-top {
  border: 1.5px solid rgba(255, 255, 255, .28);
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  flex: none;
  white-space: nowrap;
}
.btn-logout-top:hover {
  background: rgba(255, 255, 255, .22);
}

.btn-profile {
  border: 1.5px solid #1d60a2;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #1d60a2;
  color: #fff;
  flex: none;
  font-family: inherit;
  overflow: hidden;
}
.btn-profile:hover {
  background: #16487c;
}
.btn-profile-avatar,
[data-profile-initials].profile-avatar-lg,
.profile-avatar-lg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  user-select: none;
  color: #fff;
}
.btn-profile-avatar {
  width: 100%;
  height: 100%;
  font-size: 11px;
  color: #fff;
  line-height: 1;
}

.profile-overlay {
  position: absolute;
  inset: 9px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 26px;
  overflow: hidden;
  padding: 24px 16px 28px;
  box-sizing: border-box;
}
.profile-overlay.hidden { display: none; }
.profile-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, .45);
  cursor: pointer;
}
.profile-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  padding: 18px 18px 20px;
  box-shadow: 0 16px 40px rgba(15, 24, 40, .22);
  box-sizing: border-box;
}
.profile-sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.profile-sheet-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text, #16223a);
}
.profile-close {
  border: none;
  background: #eef1f5;
  color: #5a6473;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  flex: none;
}
.profile-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 6px 0 16px;
}
.profile-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 0 8px;
  background: #1d60a2;
  color: #fff;
  font-size: 22px;
  display: flex;
}
.profile-name {
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--text, #16223a);
  margin: 0;
  word-break: break-word;
}
.profile-rows {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}
.profile-row {
  background: var(--bg-muted, #f3f5f8);
  border-radius: 12px;
  padding: 11px 13px;
}
.profile-row-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted, #8a93a3);
  margin-bottom: 3px;
}
.profile-row-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #1f2a3a);
  word-break: break-word;
}
.profile-logout-btn {
  width: 100%;
  margin: 0;
}

.lang-switch {
  display: flex;
  background: rgba(255, 255, 255, .08);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.lang-switch button {
  border: none;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  background: transparent;
  color: #fff;
  font-weight: 600;
}
.lang-switch button[data-set-lang].active,
.lang-switch button[aria-pressed="true"] {
  background: rgba(255, 255, 255, .22);
  font-weight: 800;
}

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .18);
}
.live-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa3b0;
}
.live-chip.live-on .dot {
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(46, 138, 99, .55);
  animation: livePulse 1.6s infinite;
}
.live-chip.live-off .dot { background: var(--danger); }
.live-chip.live-on { color: #d8f5e6; }
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 138, 99, .45); }
  70% { box-shadow: 0 0 0 8px rgba(46, 138, 99, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 138, 99, 0); }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 99px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
}
.status-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
  color: var(--text);
}

.btn-primary {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #1d60a2, #16487c);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 6px 16px rgba(29, 96, 162, .28);
}
.btn-green {
  background: linear-gradient(135deg, var(--success), var(--success-deep));
  box-shadow: 0 6px 16px rgba(46, 138, 99, .28);
}
.btn-ghost {
  background: var(--bg-card);
  border: 1.5px solid var(--border-soft);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-row);
  cursor: pointer;
  color: var(--text);
}
.check-row:last-child { border-bottom: none; }
.check-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: var(--bg-card);
}
.check-row.done .check-box {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.check-row.done .check-label {
  text-decoration: line-through;
  color: var(--text-muted);
}

.sig-canvas-wrap {
  background: var(--bg-card);
  border: 1.5px dashed var(--border);
  border-radius: 14px;
  overflow: hidden;
  touch-action: none;
}
.sig-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 160px;
  background: var(--bg-muted);
  cursor: crosshair;
}

.photo-slot {
  position: relative;
  border: 1.5px dashed var(--border);
  border-radius: 14px;
  min-height: 110px;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}
.photo-slot img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}
.photo-slot input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.bottom-nav {
  background: var(--nav-bg);
  border-top: 1px solid var(--border-soft);
  padding: 9px 6px 20px;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  flex: none;
  direction: ltr;
}
.bottom-nav a {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  flex: 1;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}
.bottom-nav a.active { color: var(--success); font-weight: 700; }
.bottom-nav a.active svg { stroke: var(--success); }

.success-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: flex-end;
  z-index: 20;
}
.success-sheet {
  width: 100%;
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  padding: 28px 22px 36px;
  text-align: center;
  color: var(--text);
}

.map-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  overflow: hidden;
}
.map-overlay.hidden { display: none !important; }
.map-overlay-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-status);
  flex: none;
}
.map-overlay-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.map-overlay-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-overlay iframe,
.map-overlay #fieldMapCanvas {
  flex: 1;
  width: 100%;
  border: none;
  background: var(--bg-screen);
  min-height: 0;
}
.map-overlay #fieldMapLoading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-screen);
}
.map-overlay #fieldMapLoading.hidden { display: none !important; }
.leaflet-container { font-family: 'Heebo', sans-serif; }
.route-line { stroke: #c0392b; }

/* ── Login (Mineral phone mockup) ── */
.login-status-icons {
  display: none;
}

.login-screen {
  background: #eef0f3;
}

.brand-hero {
  background: linear-gradient(165deg, #1d60a2 0%, #16223a 100%);
  padding: 0 22px 42px;
  flex: none;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.status-bar-on-hero {
  background: transparent;
  color: #fff;
  padding: 11px 0 8px;
  position: relative;
  z-index: 2;
}
.status-bar-on-hero .lang-translator-btn {
  background: rgba(255, 255, 255, .15);
  border-color: rgba(255, 255, 255, .3);
  color: #fff;
}
.brand-blob {
  position: absolute;
  border-radius: 50%;
}
.brand-blob--tr {
  top: -40px;
  right: -30px;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, .06);
}
.brand-blob--bl {
  bottom: -50px;
  left: -20px;
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, .04);
}
.brand-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .14);
  margin: 12px auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.brand-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.4px;
  position: relative;
}
.brand-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, .78);
  margin-top: 8px;
  font-weight: 600;
  position: relative;
}

.login-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 20px;
  margin-top: -18px;
  position: relative;
  background: #eef0f3;
}
.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 22px 18px 20px;
  box-shadow: 0 8px 28px rgba(15, 24, 40, .12);
  border: none;
  color: #16223a;
}
.login-title {
  font-size: 18px;
  font-weight: 800;
  color: #16223a;
  margin-bottom: 6px;
}
.login-domain {
  font-size: 12.5px;
  color: #8a93a3;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: start;
}
.login-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 16px;
}
.error-box {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: var(--danger-soft);
  border: 1px solid color-mix(in srgb, var(--danger) 28%, transparent);
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 16px;
}
.error-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--danger);
  line-height: 1.45;
}
.field { margin-bottom: 14px; }
.field--tight { margin-bottom: 8px; }
.field-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: #46505f;
  font-weight: 600;
  margin-bottom: 7px;
}
.req { color: var(--danger); }
.input {
  width: 100%;
  padding: 13px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  font-size: 14.5px;
  color: var(--text);
  background: var(--input-bg);
}
.input--ltr {
  direction: ltr;
  text-align: left;
}
html[dir="rtl"] .login-screen .ds-input:not(.input--otp) {
  direction: rtl;
  text-align: right;
}
.input--pass {
  padding: 13px 46px 13px 13px;
}
.input--otp {
  text-align: center;
  letter-spacing: 3px;
}
.pass-wrap { position: relative; }
.pass-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
html[dir="rtl"] .input--pass {
  padding: 13px 13px 13px 46px;
}
html[dir="rtl"] .pass-toggle {
  right: auto;
  left: 8px;
}
.otp-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 6px;
  text-align: center;
}
.otp-resend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 20px;
}
.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.remember input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}
.remember span {
  font-size: 13px;
  font-weight: 600;
  color: #5a6473;
}
.biz1-tag {
  font-size: 12px;
  font-weight: 600;
  color: #9aa3b0;
}
.btn-login {
  width: 100%;
  font-size: 16px;
}
.demo-users {
  margin-top: 18px;
  background: #eaf2fb;
  border: 1px solid #c9ddf2;
  border-radius: 16px;
  padding: 16px 16px 14px;
}
.demo-users-title {
  font-size: 13px;
  font-weight: 800;
  color: #1d60a2;
  margin-bottom: 12px;
  text-align: start;
}
.demo-users-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.demo-user-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
}
.demo-user-creds {
  min-width: 0;
  flex: 1;
  color: #1d60a2;
  font-size: 14px;
  font-weight: 600;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-user-btn {
  width: auto;
  flex: none;
  flex-shrink: 0;
  margin: 0;
  text-align: center;
  padding: 9px 14px;
  border-radius: 99px;
  border: none;
  background: #1d60a2;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
  font-family: inherit;
  white-space: nowrap;
}
.demo-user-btn:hover {
  background: #16487c;
}
.footer-note {
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  color: #9aa3b0;
  font-weight: 600;
}

.login-screen .input,
.login-screen .ds-input {
  background: #fff;
  color: #1f2a3a;
  border: 1.5px solid #dde2ea;
}
.login-screen .req { color: #c0392b; }

/* ── Schedule (mobile/tablet base) ── */
.schedule-top {
  padding: 10px 18px 12px;
  flex: none;
}
.schedule-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.schedule-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
}
.schedule-heading-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: none;
}
.schedule-period-filters {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 168px;
}
.schedule-search-bar {
  margin-top: 12px;
}
.schedule-search-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  font-size: 14px;
  color: var(--text);
  background: var(--input-bg);
}
.schedule-stats {
  display: flex;
  gap: 9px;
  margin-top: 14px;
}
.schedule-stat-card {
  flex: 1;
  padding: 11px 12px;
}
.schedule-route-btn {
  margin-top: 12px;
  padding: 13px;
}
.schedule-filters {
  display: flex;
  gap: 7px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.schedule-ticket-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.schedule-ticket-list {
  flex: none;
  overflow: visible;
  padding: 2px 16px 8px;
}
.schedule-empty {
  padding: 24px 18px;
  text-align: center;
}
.schedule-ticket-card {
  margin-bottom: 12px;
}

/* ── Mineral-style tickets list ── */
.tickets-top {
  padding: 6px 16px 8px;
  flex: none;
}
.tickets-title-row {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.tickets-title-spacer {
  width: 40px;
  height: 40px;
}
.tickets-page-title {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.tickets-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  color: var(--text);
  position: relative;
}
.tickets-icon-btn.has-filter::after {
  content: '';
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c0392b;
  border: 1.5px solid #fff;
}
.tickets-icon-btn svg {
  stroke: var(--text);
}
.tickets-mark-all {
  border: none;
  background: none;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  padding: 8px 4px;
  white-space: nowrap;
}
.tickets-mark-all.is-on {
  color: var(--danger);
}
.tickets-mark-all--inline {
  font-size: 12.5px;
  padding: 0;
}
.ticket-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.ticket-section-head .ticket-section-title {
  margin-bottom: 0;
}
.tickets-search-open {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tickets-search-input {
  flex: 1;
  border: none;
  background: var(--bg-card);
  border-radius: 99px;
  padding: 10px 16px;
  font-size: 14px;
  box-shadow: var(--shadow-soft);
  text-align: start;
  color: var(--text);
}
.tickets-search-cancel {
  border: none;
  background: none;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  flex: none;
}
.tickets-pills {
  display: flex;
  gap: 9px;
  padding: 10px 0 4px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tickets-pills::-webkit-scrollbar {
  display: none;
}
.tickets-pills.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.tickets-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1.6px solid var(--border-soft);
  border-radius: 99px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  font-family: inherit;
  flex: none;
  -webkit-user-select: none;
  user-select: none;
}
.tickets-pill.active {
  background: #1d60a2;
  border-color: #1d60a2;
  color: #fff;
}
.tickets-pill.active svg {
  stroke: #fff;
}
.tickets-new-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: none;
  border-radius: 99px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  background: #1d60a2;
  font-family: inherit;
  white-space: nowrap;
  text-decoration: none;
}
.tickets-new-btn.is-on {
  background: #c0392b;
}
.tickets-section-row--bar {
  flex: none;
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0 12px;
  padding: 4px 16px 8px;
  justify-content: space-between;
  gap: 12px;
}
.tickets-wait-legend {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 4px 2px 8px;
  flex-wrap: wrap;
}
.tickets-wait-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}
.tickets-wait-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.tickets-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.tickets-dot--late { background: #c0392b; }
.tickets-dot--mid { background: #e0a13c; }
.tickets-dot--ok { background: #2e8a63; }

.tickets-dash {
  display: flex;
  gap: 8px;
  padding: 2px 0 8px;
}
.tickets-dash-card {
  flex: 1;
  min-width: 0;
  border: 1px solid #e4e8ee;
  background: #fff;
  border-radius: 14px;
  padding: 11px 8px 10px;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(15, 24, 40, .05);
}
.tickets-dash-num {
  font-size: 22px;
  font-weight: 900;
  color: #16223a;
  letter-spacing: -.4px;
  line-height: 1.1;
}
.tickets-dash-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #8a93a3;
  margin-top: 4px;
  line-height: 1.25;
}
.tickets-dash-card--open .tickets-dash-num { color: #1d60a2; }
.tickets-dash-card--mine .tickets-dash-num { color: #1a7a96; }
.tickets-dash-card--closed .tickets-dash-num { color: #2e8a63; }
.tickets-dash-card.is-active {
  border-color: #1d60a2;
  background: #eaf2fb;
  box-shadow: 0 0 0 1px #1d60a2;
}
.tickets-dash-card--mine.is-active {
  border-color: #1a7a96;
  background: #e8f6fb;
  box-shadow: 0 0 0 1px #1a7a96;
}
.tickets-dash-card--closed.is-active {
  border-color: #2e8a63;
  background: #e6f4ec;
  box-shadow: 0 0 0 1px #2e8a63;
}
[data-theme="dark"] .tickets-dash-card {
  background: var(--bg-card);
  border-color: var(--border-soft);
}
[data-theme="dark"] .tickets-dash-num { color: var(--text); }
[data-theme="dark"] .tickets-dash-label { color: var(--text-muted); }
[data-theme="dark"] .tickets-dash-card.is-active {
  background: var(--filter-active-bg);
  border-color: var(--filter-active-border);
  box-shadow: none;
}

.tickets-pager {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px 18px;
  background: transparent;
  position: static;
}
.tickets-pager.hidden { display: none !important; }
.tickets-pager-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.tickets-pager-btn:disabled {
  opacity: .35;
  cursor: default;
}
html[dir="rtl"] .tickets-pager-btn svg {
  transform: scaleX(-1);
}
.tickets-pager-label {
  min-width: 64px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.tickets-section-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 2px 2px 4px;
  gap: 8px;
}
.tickets-section-row.tickets-section-row--bar {
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0 12px;
  padding: 4px 16px 8px;
  justify-content: space-between;
  gap: 12px;
}
.tickets-section-row--bar .tickets-section-label {
  flex: 1;
  min-width: 0;
}
.tickets-section-row--bar .tickets-new-btn {
  flex: none;
  margin-inline-start: auto;
}
.tickets-section-label {
  font-size: 15px;
  color: #16223a;
  font-weight: 800;
  letter-spacing: -.2px;
}
[data-theme="dark"] .tickets-section-label {
  color: var(--text-muted);
}
.tickets-count-chip {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--primary);
  background: var(--filter-active-bg);
  border-radius: 99px;
  padding: 4px 10px;
}
.schedule-ticket-card.mineral-ticket {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 11px;
  box-shadow: var(--shadow-soft);
  border: none;
  border-inline-end: 4px solid #2e8a63;
  cursor: pointer;
}
.schedule-ticket-card.mineral-ticket.is-marked {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.mineral-ticket-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.mineral-ticket-check {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.6px solid var(--border);
  background: var(--bg-card);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: 1px;
}
.mineral-ticket-check.is-on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.mineral-ticket-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.mineral-ticket-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.mineral-ticket-subject {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 9px;
  line-height: 1.5;
  background: var(--bg-muted);
  border-radius: 9px;
  padding: 9px 11px;
}
.mineral-ticket-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
  flex: none;
}
.mineral-ticket-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}
.mineral-ticket-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 7px;
}
.mineral-ticket-row {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.mineral-ticket-addr {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: #7b8595;
}
.mineral-ticket-actions {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  margin-top: 12px;
}
.mineral-ticket-actions .mineral-btn-details,
.mineral-ticket-actions .mineral-btn-call {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.mineral-btn-details {
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: #5a6473;
}
.mineral-btn-call {
  border: 1.5px solid #bcd3ef;
  background: #eaf2fb;
  color: #1d60a2;
}

.mb-inline-loader {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 20px 16px;
  gap: 12px;
}
.mb-page-loader__spin {
  width: 28px;
  height: 28px;
  border: 3px solid #d7dde6;
  border-top-color: #1d60a2;
  border-radius: 50%;
  animation: mb-spin .7s linear infinite;
}
.mb-page-loader__label {
  font-size: 13.5px;
  font-weight: 700;
  color: #8a93a3;
}
@keyframes mb-spin {
  to { transform: rotate(360deg); }
}
.svc-calls-empty {
  text-align: center;
  padding: 36px 16px 8px;
  color: #9aa3b0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
}

.mineral-bottom-nav {
  background: #fff;
  border-top: 1px solid #eceef1;
  padding: 9px 6px 20px;
  justify-content: space-around;
}
.mineral-bottom-nav a {
  color: #9aa3b0;
  font-weight: 600;
}
.mineral-bottom-nav a svg {
  stroke: #9aa3b0;
}
.mineral-bottom-nav a.active {
  color: #2e8a63;
  font-weight: 700;
}
.mineral-bottom-nav a.active svg {
  stroke: #2e8a63;
}
.mineral-bottom-nav a.nav-disabled {
  pointer-events: none;
  opacity: .55;
}
.mineral-bottom-nav--home {
  justify-content: center;
}
.mineral-bottom-nav--home a {
  flex: none;
  min-width: 72px;
}
[data-theme="dark"] .mineral-bottom-nav {
  background: var(--nav-bg);
  border-top-color: var(--border-soft);
}

.ticket-header {
  background: #16223a;
  padding: 13px 18px 16px;
  flex: none;
}
.ticket-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ticket-header-round {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex: none;
}
.ticket-header-round--spacer {
  background: transparent;
}
.ticket-header-mid {
  text-align: center;
}
.ticket-header-title {
  font-size: 17.5px;
  font-weight: 800;
  color: #fff;
}
.ticket-header-sub {
  font-size: 11.5px;
  color: #9fb0c8;
  margin-top: 1px;
}
.ticket-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 20px;
}
.ticket-layout {
  display: block;
}
.ticket-panel--client {
  margin-bottom: 12px;
}
.ticket-work-tools {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.ticket-actions {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
}
.ticket-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  text-align: center;
  flex: 1;
  min-width: 0;
  width: auto;
  box-sizing: border-box;
  padding: 10px 8px;
  font-size: 12px;
  line-height: 1.25;
  white-space: normal;
}
.ticket-action-btn--wa {
  background: var(--wa-bg);
  border-color: var(--wa-border);
  color: var(--wa-text);
}
.ticket-action-btn--primary {
  text-decoration: none;
}
.ticket-action-btn--complete {
  flex: 1.35;
}
.ticket-action-btn--complete span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ticket-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.ticket-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}
.ticket-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-top: 4px;
}
.ticket-value--sm {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.check-label {
  font-size: 14px;
  font-weight: 700;
  color: #1f2a3a;
  flex: 1;
}
.empty-inline {
  font-size: 13px;
  font-weight: 700;
  color: #8a93a3;
  padding: 8px 0;
}
.history-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.history-row:last-child {
  border-bottom: none;
}
.history-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
}
.history-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 3px;
}
.completed-field {
  margin-top: 14px;
}
.completed-summary {
  margin-top: 5px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  white-space: pre-wrap;
}
.completed-part-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.completed-part-row:last-child {
  border-bottom: none;
}
.completed-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 7px;
}
.completed-media {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-muted);
}
.completed-media img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}
.completed-media figcaption {
  padding: 7px 9px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.completed-signature {
  display: block;
  width: 100%;
  max-height: 180px;
  margin-top: 7px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.complete-layout {
  max-width: 720px;
  margin: 0 auto;
}
.complete-product-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.complete-spares-list {
  margin-top: 4px;
}
.spare-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.spare-row:last-child {
  border-bottom: none;
}
.spare-remove {
  padding: 6px 10px;
  font-size: 12px;
  flex: none;
}
.photo-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.photo-slot {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  padding: 12px;
}
.photo-slot.has-photo span {
  display: none;
}
.photo-slot img.hidden {
  display: none;
}
.photo-slot.has-photo img {
  display: block;
}
.sig-canvas-wrap img#ticketSignaturePreview:not(.hidden) {
  display: block;
}
.sig-canvas-wrap canvas.hidden {
  display: none;
}

/* Phone mockup stays 392px on every viewport — same as Mineral login.html */
/* Theme-aware text helpers (for inline HTML / JS cards) */
.text-main { color: var(--text) !important; }
.text-muted-tone { color: var(--text-muted) !important; }
.text-secondary-tone { color: var(--text-secondary) !important; }
.bg-screen-tone { background: var(--bg-screen) !important; }
.schedule-top { background: transparent; }
[data-view="schedule"] .schedule-top { color: var(--text); }

[data-theme="dark"] [data-view="schedule"] .schedule-top {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-soft);
}
[data-theme="dark"] [data-view="login"].login-screen {
  background: #eef0f3;
}
[data-theme="dark"] .ds-input,
[data-theme="dark"] select.ds-input,
[data-theme="dark"] textarea.ds-input {
  background: var(--input-bg);
  color: var(--text);
  border-color: var(--border);
}
[data-theme="dark"] .login-screen .ds-input,
[data-theme="dark"] .login-screen select.ds-input,
[data-theme="dark"] .login-screen textarea.ds-input {
  background: #fff;
  color: #1f2a3a;
  border-color: #dde2ea;
}
[data-theme="dark"] .schedule-ticket-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.sched-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.sched-card-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}
.sched-card-subject {
  font-size: 13px;
  color: var(--text);
  font-weight: 700;
  margin-top: 6px;
}
.sched-card-address {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 6px;
}
.sched-card-time {
  font-size: 15px;
  font-weight: 800;
}
.sched-open-btn {
  background: var(--filter-active-bg) !important;
  border-color: var(--filter-active-border) !important;
  color: var(--filter-active-text) !important;
}
.ticket-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 4px;
}
.ticket-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.ticket-value--sm {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.ticket-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.ticket-action-btn--wa {
  background: var(--wa-bg);
  border-color: var(--wa-border);
  color: var(--wa-text);
}
