
:root {
  --brand: #374151;
  --brandHover: #1f2937;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --bd: #e5e7eb;
  --shadow: 0 2px 10px rgba(0,0,0,.06);
  --r: 16px;
  --h: 40px;

  --content-max: 1320px;

  --fs-body: 20px;
  --fs-header: 30px;
  --fs-tab: 20px;
  --fs-h3: 26px;
  --fs-h4: 22px;
  --fs-muted: 20px;
  --fs-table: 20px;
  --fs-input: 20px;
  --fs-btn: 16px;
  --fs-modal-title: 22px;
  --fs-modal-sub: 20px;
  --fs-modal-small: 20px;
}

html[data-text-size="small"] {
  --fs-body: 14px;
  --fs-header: 21px;
  --fs-tab: 14px;
  --fs-h3: 20px;
  --fs-h4: 17px;
  --fs-muted: 14px;
  --fs-table: 14px;
  --fs-input: 14px;
  --fs-btn: 13px;
  --fs-modal-title: 18px;
  --fs-modal-sub: 14px;
  --fs-modal-small: 13px;
}

html[data-text-size="medium"] {
  --fs-body: 16px;
  --fs-header: 24px;
  --fs-tab: 16px;
  --fs-h3: 22px;
  --fs-h4: 19px;
  --fs-muted: 16px;
  --fs-table: 16px;
  --fs-input: 16px;
  --fs-btn: 14px;
  --fs-modal-title: 20px;
  --fs-modal-sub: 16px;
  --fs-modal-small: 15px;
}

html[data-text-size="large"] {
  --fs-body: 20px;
  --fs-header: 30px;
  --fs-tab: 20px;
  --fs-h3: 26px;
  --fs-h4: 22px;
  --fs-muted: 20px;
  --fs-table: 20px;
  --fs-input: 20px;
  --fs-btn: 16px;
  --fs-modal-title: 22px;
  --fs-modal-sub: 20px;
  --fs-modal-small: 20px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 0;
}

body {
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  background: var(--bg);
  font-size: var(--fs-body);
  color: var(--text);
  line-height: 1.3;
  width: 100%;
  overflow-x: hidden;
}

.header {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  color: #fff;
  padding: 16px 20px;
  font-size: var(--fs-header);
  font-weight: 900;
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.header-inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  min-width: 0;
}

.header-left {
  display: flex;
  align-items: center;
  min-width: 220px;
  flex: 1 1 auto;
  overflow: hidden;
}

.header-title {
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  letter-spacing: .01em;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-title:hover {
  opacity: .92;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
  min-width: 0;
  flex: 1 1 auto;
  position: relative;
  z-index: 2100;
}

.search-toggle-btn {
  height: 48px;
  width: 48px;
  min-width: 48px;
  padding: 0 !important;
  border-radius: 14px !important;
  border: 2px solid rgba(255,255,255,.14) !important;
  background: rgba(255,255,255,.02) !important;
  color: #fff !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.search-toggle-btn:hover {
  background: rgba(255,255,255,.08) !important;
}
/* ===== CHAT MAIL ICON ===== */

.mail-wrap {
  position: relative;
  z-index: 2200;
}

.mail-btn {
  position: relative;
  height: 48px;
  width: 48px;
  min-width: 48px;
  padding: 0 !important;
  border-radius: 14px !important;
  border: 2px solid rgba(255,255,255,.14) !important;
  background: rgba(255,255,255,.02) !important;
  color: #fff !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.mail-btn:hover {
  background: rgba(255,255,255,.08) !important;
}

.mail-btn.has-unread {
  border-color: rgba(239,68,68,.95) !important;
}

.mail-btn.mail-pulse {
  animation: mailPulse 1.1s infinite;
}

@keyframes mailPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.mail-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  display: none;
  align-items: center;
  justify-content: center;
}

.mail-badge.show {
  display: inline-flex;
}

.mail-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 340px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(0,0,0,.16);
  padding: 10px;
  display: none;
  z-index: 999999;
}

.mail-menu.open {
  display: block;
}

.mail-item {
  display: block;
  padding: 10px;
  border-radius: 12px;
  text-decoration: none;
  color: #111827;
  border: 1px solid #eee;
}

.mail-item:hover {
  background: #f9fafb;
}

.mail-empty {
  padding: 12px;
  color: #6b7280;
  font-size: 14px;
}

.mail-item-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:4px;
}

.mail-item-job {
  font-weight:900;
  font-size:14px;
  color:#111827;
}

.mail-item-pill {
  min-width:22px;
  height:22px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  font-size:12px;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 6px;
}

.mail-item-author {
  font-size:12px;
  color:#6b7280;
  margin-bottom:4px;
}

.mail-item-preview {
  font-size:13px;
  color:#111827;
  line-height:1.35;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.mail-item-time {
  margin-top:6px;
  font-size:11px;
  color:#9ca3af;
}

.search-panel {
  display: none;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: 760px;
  min-width: 180px;
  flex: 1 1 360px;
}

.search-panel.open {
  display: flex;
}

.search-input {
  width: 100%;
  min-width: 0;
  border-radius: 16px !important;
  border: 2px solid rgba(255,255,255,.14) !important;
  padding: 10px 12px !important;
  font-size: 18px !important;
  height: 48px !important;
  box-sizing: border-box;
  background: #fff !important;
  color: #111827 !important;
}

.search-input::placeholder {
  color: #6b7280;
}

.tabs {
  background: linear-gradient(180deg, #0b1220 0%, #0b1324 100%);
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: relative;
  overflow: visible;
  z-index: 2000;
}

.tabs-inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  position: relative;
  overflow: visible;
  z-index: 2001;
  min-width: 0;
}

.tabs-scroll {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.tabs-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.tabs-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  position: relative;
  z-index: 2002;
}

.tab {
  color: #cbd5e1;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,.10);
  font-size: var(--fs-tab);
  font-weight: 900;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.tab:hover {
  color: #fff;
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.16);
}

.tab.active {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
}

.container {
  width: 100%;
  padding: 20px;
}

.page-shell {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  min-width: 0;
}

.page-shell.full-width {
  max-width: none;
  margin: 0 auto;
}

.card {
  width: 100%;
  min-width: 0;
  background: var(--card);
  padding: 20px;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  border: 1px solid var(--bd);
  overflow-x: visible;
}

.card.no-pad {
  padding: 0;
}

h3 {
  font-size: var(--fs-h3);
  margin: 0 0 12px 0;
}

h4 {
  font-size: var(--fs-h4);
  margin: 16px 0 10px 0;
}

.muted {
  font-size: var(--fs-muted);
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--bd);
  font-size: var(--fs-table);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
  font-weight: 900;
  font-size: var(--fs-table);
}

input, select, textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--bd);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: var(--fs-input);
  background: #fff;
}

input, select {
  height: var(--h);
}

textarea {
  min-height: 120px;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.col {
  flex: 1 1 280px;
  min-width: 0;
}

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

button, .btnlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--h);
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  background: var(--brand);
  color: #fff !important;
  font-weight: 900;
  font-size: var(--fs-btn);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

button:hover, .btnlink:hover {
  background: var(--brandHover);
}

.btnlink.gray,
.btn-secondary {
  background: #fff !important;
  color: var(--text) !important;
  border: 1px solid var(--bd) !important;
}

.btnlink.gray:hover,
.btn-secondary:hover {
  background: #f3f4f6 !important;
}

.btn-danger,
.btn-danger-sm,
button.btn-danger,
a.btn-danger,
a.btnlink.btn-danger {
  background: #dc2626 !important;
  color: #fff !important;
  border-color: #dc2626 !important;
}

.btn-danger:hover,
.btn-danger-sm:hover,
button.btn-danger:hover,
a.btn-danger:hover,
a.btnlink.btn-danger:hover {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
}

.btn-danger-sm,
.btn-plus-sm {
  height: 38px;
  padding: 0 10px;
  font-size: 14px;
  border-radius: 12px;
}

.btn-plus {
  background: #f3f4f6 !important;
  color: #111827 !important;
  border: 1px solid #e5e7eb !important;
}

.btn-plus:hover {
  background: #e5e7eb !important;
}

tr.rowclick {
  cursor: pointer;
}

tr.rowclick:hover td {
  background: #f8fafc;
}

table.calgrid {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #d1d5db;
  table-layout: fixed;
}

table.calgrid th,
table.calgrid td {
  border: 1px solid #d1d5db;
  padding: 12px;
  vertical-align: top;
  box-sizing: border-box;
}

table.calgrid thead th {
  background: #f3f4f6;
  font-weight: 900;
  font-size: var(--fs-table);
}

table.calgrid tbody th {
  background: #fcfcfd;
  font-weight: 900;
  width: 160px;
  white-space: nowrap;
  font-size: var(--fs-table);
}

table.calgrid td {
  height: 160px;
  overflow: hidden;
}

.calcell {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

td.calclick {
  cursor: pointer;
}

td.calclick:hover {
  background: #f8fafc;
}

table.calgrid tbody td,
table.calgrid tbody td * {
  font-size: 0.97em !important;
}

#dash_map, #map {
  height: 460px;
  min-height: 460px;
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--bd);
  display: block;
  position: relative;
  z-index: 1;
}

.leaflet-container,
.leaflet-pane,
.leaflet-top,
.leaflet-bottom,
.leaflet-control {
  z-index: 1 !important;
}

.mm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 14px;
}

.mm-card {
  width: min(560px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 22px 70px rgba(0,0,0,.25);
  overflow: hidden;
}

.mm-head {
  padding: 16px 18px 10px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.mm-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.mm-title {
  font-size: var(--fs-modal-title);
  font-weight: 900;
  color: #111827;
  line-height: 1.2;
  margin: 0;
}

.mm-sub {
  margin: 6px 0 0 0;
  font-size: var(--fs-modal-sub);
  color: rgba(17,24,39,.70);
  line-height: 1.35;
  word-break: break-word;
}

.mm-body {
  padding: 0 18px 16px 18px;
}

.mm-kv {
  background: #f9fafb;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  padding: 12px 12px;
  font-size: var(--fs-modal-sub);
  color: #111827;
}

.mm-actions {
  padding: 14px 18px 18px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #eef2f7;
  background: #fff;
  flex-wrap: wrap;
}

.mm-btn {
  appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 110px;
  height: 48px !important;
  padding: 0 16px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0,0,0,.10) !important;
  background: #ffffff !important;
  color: #111827 !important;
  font-weight: 900 !important;
  font-size: var(--fs-btn) !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  cursor: pointer;
  box-sizing: border-box;
}

.mm-btn:hover {
  background: #f9fafb !important;
  color: #111827 !important;
}

.mm-btn-primary {
  background: var(--brand) !important;
  color: #ffffff !important;
  border-color: var(--brand) !important;
}

.mm-btn-primary:hover {
  background: var(--brandHover) !important;
  color: #ffffff !important;
  border-color: var(--brandHover) !important;
}

.mm-btn-danger {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
}

.mm-btn-danger:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
}

.mm-small {
  font-size: var(--fs-modal-small);
  color: rgba(17,24,39,.60);
  margin-top: 10px;
}

.phoneLink {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.phoneLink:hover {
  opacity: .85;
}

.wm-wrap {
  position: relative;
  z-index: 2003;
}

.wm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,.10);
  background: transparent;
  color: #cbd5e1;
  font-weight: 900;
  font-size: var(--fs-tab);
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.wm-btn:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
  border-color: rgba(255,255,255,.16);
}

.wm-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 300px;
  max-width: min(300px, calc(100vw - 20px));
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(0,0,0,.16);
  padding: 10px;
  display: none;
  z-index: 999999;
  overflow-x: hidden;
}

.wm-menu.open {
  display: block;
}

.wm-title {
  font-size: 13px;
  font-weight: 900;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 6px 8px 8px 8px;
}

.wm-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  gap: 8px;
  text-decoration: none;
  color: #111827;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.wm-link:hover {
  background: #f8fafc;
  border-color: #e5e7eb;
}

.wm-link span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wm-sep {
  height: 1px;
  background: #eef2f7;
  margin: 8px 0;
}

.wm-size-row {
  display: flex;
  gap: 8px;
  padding: 6px 4px 2px 4px;
  min-width: 0;
  flex-wrap: wrap;
}

.wm-size-btn {
  flex: 1 1 0;
  height: 38px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #fff !important;
  color: #111827 !important;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.wm-size-btn:hover {
  background: #f3f4f6 !important;
  color: #111827 !important;
}

.wm-size-btn.active {
  background: #111827 !important;
  color: #fff !important;
  border-color: #111827 !important;
}

button.wm-size-btn {
  color: #111827 !important;
}

button.wm-size-btn.active {
  color: #fff !important;
}

@media (max-width: 1280px) {
  :root {
    --content-max: 100%;
  }
}

@media (max-width: 1100px) {
  :root {
    --h: 42px;
  }

html[data-text-size="small"] {
  --fs-body: 13px;
  --fs-header: 18px;
  --fs-tab: 13px;
  --fs-h3: 18px;
  --fs-h4: 16px;
  --fs-muted: 13px;
  --fs-table: 13px;
  --fs-input: 13px;
  --fs-btn: 12px;
  --fs-modal-title: 17px;
  --fs-modal-sub: 13px;
  --fs-modal-small: 12px;
}

html[data-text-size="medium"] {
  --fs-body: 14px;
  --fs-header: 20px;
  --fs-tab: 14px;
  --fs-h3: 20px;
  --fs-h4: 17px;
  --fs-muted: 14px;
  --fs-table: 14px;
  --fs-input: 14px;
  --fs-btn: 13px;
  --fs-modal-title: 18px;
  --fs-modal-sub: 14px;
  --fs-modal-small: 13px;
}

html[data-text-size="large"] {
  --fs-body: 15px;
  --fs-header: 22px;
  --fs-tab: 15px;
  --fs-h3: 21px;
  --fs-h4: 18px;
  --fs-muted: 14px;
  --fs-table: 14px;
  --fs-input: 14px;
  --fs-btn: 13px;
  --fs-modal-title: 18px;
  --fs-modal-sub: 14px;
  --fs-modal-small: 13px;
}

  .header {
    padding: 12px 14px;
  }

  .header-inner {
    gap: 10px;
  }

  .container {
    padding: 12px;
  }

  .card {
    padding: 14px;
    border-radius: 14px;
  }

  .card.no-pad {
    padding: 0;
  }

  .tabs-inner {
    gap: 8px;
    padding: 8px 10px;
  }

  .tabs-scroll {
    gap: 8px;
  }

  .tabs-left {
    gap: 8px;
  }

  .tab {
    padding: 8px 12px;
    border-radius: 12px;
  }

  th, td {
    padding: 9px 8px;
  }

  input, select, textarea {
    border-radius: 12px;
    padding: 8px 10px;
  }

  button, .btnlink {
    padding: 0 12px;
    border-radius: 12px;
  }

  .wm-btn {
    height: 42px;
    font-size: var(--fs-tab);
    padding: 0 12px;
  }

  .search-toggle-btn {
    height: 42px;
    width: 42px;
    min-width: 42px;
  }

  .search-input {
    height: 42px !important;
    font-size: 14px !important;
  }

  .wm-menu {
    right: 0;
    left: auto;
  }

  table.calgrid thead th {
    font-size: 13px;
  }

  table.calgrid tbody th {
    width: 88px;
    font-size: 12px;
    padding: 8px 6px;
  }

  table.calgrid td {
    height: 94px;
    padding: 6px;
  }

  table.calgrid tbody td,
  table.calgrid tbody td * {
    font-size: 11px !important;
    line-height: 1.15 !important;
  }

  #dash_map, #map {
    height: 300px;
    min-height: 300px;
  }

  .header {
    padding: 10px 14px;
  }

  .header-inner {
    gap: 10px;
    flex-wrap: nowrap;
  }

  .header-left {
    min-width: 180px;
    flex: 1 1 auto;
  }

  .header-right {
    gap: 8px;
    flex: 0 0 auto;
  }

  .header-title {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .search-toggle-btn,
  .mail-btn {
    height: 42px;
    width: 42px;
    min-width: 42px;
  }

  .search-input {
    height: 42px !important;
    font-size: 14px !important;
  }
}

@media (max-width: 980px) {
  .header {
    padding: 12px 14px;
  }

  .container {
    padding: 10px;
  }

  .card {
    padding: 12px;
    border-radius: 12px;
  }

  .card.no-pad {
    padding: 0;
  }

  .col {
    flex: 1 1 100%;
  }

  table.calgrid tbody th {
    width: 84px;
    font-size: 12px;
  }

  table.calgrid td {
    height: 88px;
  }
}

@media (max-width: 820px) {
  .tabs-inner {
    gap: 8px;
    padding: 8px 10px;
  }

  .container {
    padding: 8px;
  }

  .card {
    padding: 10px;
    border-radius: 12px;
  }

  .card.no-pad {
    padding: 0;
  }

  th, td {
    padding: 8px 6px;
  }

  button, .btnlink {
    padding: 0 10px;
  }

  .btn-danger-sm,
  .btn-plus-sm {
    font-size: 12px;
  }

  #dash_map, #map {
    height: 280px;
    min-height: 280px;
  }

  .wm-menu {
    position: fixed;
    top: 72px;
    right: 10px;
    left: auto;
    width: min(300px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    z-index: 999999;
  }

  .mm-card {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .mm-head {
    padding: 14px 14px 10px 14px;
  }

  .mm-body {
    padding: 0 14px 14px 14px;
  }

  .mm-actions {
    padding: 12px 14px 14px 14px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    gap: 10px;
    flex-wrap: wrap;
  }

  .header-left {
    width: 100%;
    min-width: 0;
  }

  .header-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .header-right {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
  }

  .search-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 1 0 100%;
    order: 10;
  }

  .tabs-inner {
    gap: 8px;
    padding: 8px 10px;
  }

  .tabs-right {
    margin-left: 0;
  }

  .container {
    padding: 8px;
  }

  .card {
    padding: 10px;
    border-radius: 12px;
  }

  .card.no-pad {
    padding: 0;
  }

  th, td {
    padding: 8px 6px;
  }

  button, .btnlink {
    padding: 0 10px;
  }

  .btn-danger-sm,
  .btn-plus-sm {
    font-size: 12px;
  }

  #dash_map, #map {
    height: 260px;
    min-height: 260px;
  }

  table.calgrid tbody th {
    width: 78px;
    font-size: 11px;
  }

  table.calgrid td {
    height: 84px;
    padding: 4px;
  }

  table.calgrid tbody td,
  table.calgrid tbody td * {
    font-size: 10px !important;
    line-height: 1.1 !important;
  }

  .wm-menu {
    position: fixed;
    top: 118px;
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
  }

  .wm-btn {
    max-width: calc(100vw - 20px);
  }
}
      
/* ===== INVOICE DECISION NOTIFICATION ===== */
.invoice-notify-wrap {
  position: relative;
  z-index: 2200;
}

.invoice-notify-btn {
  position: relative;
  height: 48px;
  width: 48px;
  min-width: 48px;
  padding: 0 !important;
  border-radius: 14px !important;
  border: 2px solid rgba(255,255,255,.14) !important;
  background: rgba(255,255,255,.02) !important;
  color: #fff !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  vertical-align: middle;
}

.invoice-notify-icon {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.invoice-notify-btn:hover {
  background: rgba(255,255,255,.08) !important;
}

.invoice-notify-btn.has-decision {
  border-color: rgba(14,165,233,.95) !important;
  background: rgba(14,165,233,.14) !important;
  box-shadow: 0 0 0 3px rgba(14,165,233,.20), inset 0 1px 0 rgba(255,255,255,.04);
}

.invoice-notify-btn.decision-pulse {
  animation: invoiceDecisionPulse 1.15s infinite;
}

@keyframes invoiceDecisionPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.invoice-notify-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 2px solid #070b18;
  box-shadow: 0 6px 16px rgba(0,0,0,.22);
}

.invoice-notify-badge.show {
  display: inline-flex;
}

.invoice-notify-menu {
  position: fixed;
  top: 74px;
  right: 18px;
  width: min(380px, calc(100vw - 28px));
  max-height: min(520px, calc(100vh - 94px));
  overflow: auto;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 20px 55px rgba(0,0,0,.24);
  padding: 12px;
  display: none;
  z-index: 999999;
}

.invoice-notify-menu.open {
  display: block;
}

.invoice-notify-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 72px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-left: 1px solid #e5e7eb;
  border-top: 1px solid #e5e7eb;
  transform: rotate(45deg);
}

.invoice-notify-menu-title {
  position: relative;
  z-index: 1;
  padding: 4px 4px 10px 4px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.invoice-decision-empty {
  padding: 14px 12px;
  color: #6b7280;
  font-weight: 800;
  font-size: 13px;
}

.invoice-decision-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  border-radius: 14px;
  text-decoration: none;
  color: #111827;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  margin-bottom: 9px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.invoice-decision-item:last-child {
  margin-bottom: 0;
}

.invoice-decision-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.invoice-decision-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.invoice-decision-title {
  font-weight: 900;
  font-size: 14px;
}

.invoice-decision-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
}

.invoice-decision-pill.approved {
  background: #16a34a;
}

.invoice-decision-pill.declined {
  background: #dc2626;
}

.invoice-decision-client,
.invoice-decision-time {
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}


.invoice-decision-main{
  flex:1 1 auto;
  min-width:0;
}

.invoice-decision-client{
  font-size:14px;
  font-weight:800;
  color:#111827;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.invoice-decision-time{
  flex:0 0 auto;
  font-size:11px;
}

.invoice-decision-meta{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:4px;
}

.invoice-decision-job{
  font-size:12px;
  font-weight:700;
  color:#6b7280;
}

.invoice-decision-icon{
  flex:0 0 56px;
}

.invoice-decision-dot{
  flex:0 0 auto;
  margin-left:auto;
}


@media (max-width: 640px) {
  .invoice-notify-btn {
    height: 42px;
    width: 42px;
    min-width: 42px;
    border-radius: 12px !important;
  }

  .invoice-notify-icon {
    width: 20px;
    height: 20px;
  }

  .invoice-notify-menu {
    top: 66px;
    right: 10px;
    width: min(340px, calc(100vw - 20px));
  }

  .invoice-notify-menu::before {
    right: 88px;
  }
}


/* STEP29 METEOR MODAL KIND COLORS */
.mm-overlay .mm-ico { color:#111827; }
.mm-overlay.mm-kind-success .mm-ico { color:#047857; background:#ecfdf5; border-color:#a7f3d0; }
.mm-overlay.mm-kind-error .mm-ico { color:#b91c1c; background:#fef2f2; border-color:#fecaca; }
.mm-overlay.mm-kind-warning .mm-ico { color:#92400e; background:#fffbeb; border-color:#fde68a; }
.mm-overlay.mm-kind-confirm .mm-ico,
.mm-overlay.mm-kind-info .mm-ico { color:#111827; }

/* STEP 39.4 — Work Menu opens full height, no internal scroll */
.wm-wrap,
.tabs-right {
  overflow: visible !important;
}

.wm-menu,
.wm-menu.open {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
}

/* Dashboard map route repair */
.dash-marker-wrapper {
  background: transparent !important;
  border: 0 !important;
}
.dash-route-list-title {
  margin: 14px 0 8px;
  font-weight: 800;
  font-size: 16px;
}
.dash-route-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}
.dash-route-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--bd);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.dash-route-row:hover {
  background: #f8fafc;
  text-decoration: none;
}
.dash-route-num {
  width: 28px;
  min-width: 28px;
  height: 28px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}
.dash-route-main {
  min-width: 0;
  flex: 1;
}
.dash-route-top {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-weight: 800;
}
.dash-route-time {
  color: #111827;
}
.dash-route-client {
  color: #111827;
}
.dash-route-job {
  color: #6b7280;
  font-size: 12px;
}
.dash-route-address {
  margin-top: 3px;
  color: #374151;
  word-break: break-word;
}
.dash-route-meta {
  margin-top: 3px;
  color: #6b7280;
  font-size: 12px;
}
.dash-route-empty {
  margin: 12px 0 18px;
  padding: 12px;
  border: 1px solid var(--bd);
  border-radius: 14px;
  background: #fff;
  color: #6b7280;
}

/* Dashboard route by technician repair */
.dash-route-tech-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 2px;
  font-weight: 900;
  color: #111827;
}
.dash-route-tech-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 2px #ffffff, 0 1px 4px rgba(0,0,0,.18);
}

/* =========================================================
   CLIENT DECISIONS DROPDOWN DESIGN REPAIR
   UI-only repair: keeps existing JS/API logic unchanged.
   ========================================================= */
.invoice-notify-wrap {
  position: relative !important;
}

.invoice-notify-menu {
  position: absolute !important;
  top: calc(100% + 12px) !important;
  right: 0 !important;
  width: min(390px, calc(100vw - 24px)) !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, .98) !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .22) !important;
  z-index: 999999 !important;
}

.invoice-notify-menu::before {
  top: -7px !important;
  right: 16px !important;
  width: 14px !important;
  height: 14px !important;
  background: #ffffff !important;
  border-left: 1px solid rgba(226, 232, 240, .98) !important;
  border-top: 1px solid rgba(226, 232, 240, .98) !important;
}

.invoice-notify-menu-title {
  display: flex !important;
  align-items: center !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 12px 16px !important;
  border-bottom: 1px solid #eef2f7 !important;
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  letter-spacing: .01em !important;
}

#invoiceDecisionList {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 12px !important;
}

.invoice-decision-empty {
  margin: 0 !important;
  padding: 16px 14px !important;
  border: 1px dashed #cbd5e1 !important;
  border-radius: 14px !important;
  background: #f8fafc !important;
  color: #64748b !important;
  text-align: center !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.invoice-decision-item {
  margin: 0 !important;
  padding: 12px 13px !important;
  border-radius: 14px !important;
  border: 1px solid #e2e8f0 !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05) !important;
  transition: background .14s ease, border-color .14s ease, transform .14s ease, box-shadow .14s ease !important;
}

.invoice-decision-item:hover {
  background: #f8fafc !important;
  border-color: #bfdbfe !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .10) !important;
}

.invoice-decision-top {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 0 7px 0 !important;
}

.invoice-decision-title {
  min-width: 0 !important;
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  line-height: 1.2 !important;
}

.invoice-decision-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 24px !important;
  padding: 4px 9px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.invoice-decision-client {
  color: #334155 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
}

.invoice-decision-time {
  margin-top: 3px !important;
  color: #94a3b8 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

@media (max-width: 640px) {
  .invoice-notify-menu {
    right: 0 !important;
    width: min(350px, calc(100vw - 18px)) !important;
  }

  #invoiceDecisionList {
    padding: 10px !important;
    gap: 9px !important;
  }
}

/* =========================================================
   CLIENT DECISIONS + INTERNAL CHAT MESSAGE CARD REPAIR
   UI-only: no API, DB, permission, or notification logic changes.
   ========================================================= */
#invoiceDecisionList,
#mailList {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.invoice-decision-item,
.mail-item {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr) 10px !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 102px !important;
  margin: 0 !important;
  padding: 14px 14px 14px 16px !important;
  overflow: hidden !important;
  border-radius: 16px !important;
  border: 1px solid #e2e8f0 !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  color: #0f172a !important;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06) !important;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease !important;
}

.invoice-decision-item::before,
.mail-item::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 5px !important;
  background: #2563eb !important;
}

.invoice-decision-item.approved::before { background: #16a34a !important; }
.invoice-decision-item.declined::before { background: #ef4444 !important; }

.invoice-decision-item:hover,
.mail-item:hover {
  transform: translateY(-1px) !important;
  background: #ffffff !important;
  border-color: #bfdbfe !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12) !important;
}

.invoice-decision-icon,
.mail-item-icon {
  width: 52px !important;
  height: 52px !important;
  border-radius: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 30px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  background: #dbeafe !important;
  color: #2563eb !important;
}

.invoice-decision-item.approved .invoice-decision-icon {
  background: #dcfce7 !important;
  color: #15803d !important;
}

.invoice-decision-item.declined .invoice-decision-icon {
  background: #fee2e2 !important;
  color: #dc2626 !important;
}

.invoice-decision-main,
.mail-item-main {
  min-width: 0 !important;
}

.invoice-decision-top,
.mail-item-top {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 10px !important;
  margin: 0 0 5px 0 !important;
}

.invoice-decision-title,
.mail-item-top strong {
  min-width: 0 !important;
  color: #0f172a !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.invoice-decision-time,
.mail-item-top span {
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  text-align: right !important;
  white-space: nowrap !important;
}

.invoice-decision-client,
.mail-item-author {
  margin: 0 0 5px 0 !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.mail-item-preview {
  margin: 0 0 8px 0 !important;
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.invoice-decision-meta,
.mail-item-meta {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.invoice-decision-job,
.mail-item-meta span {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 22px !important;
  padding: 3px 8px !important;
  border-radius: 999px !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.invoice-decision-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 22px !important;
  padding: 3px 8px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.invoice-decision-pill.approved {
  background: #dcfce7 !important;
  color: #15803d !important;
}

.invoice-decision-pill.declined {
  background: #fee2e2 !important;
  color: #dc2626 !important;
}

.invoice-decision-dot,
.mail-item-dot {
  width: 10px !important;
  height: 10px !important;
  border-radius: 999px !important;
  background: #2563eb !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12) !important;
}

.invoice-decision-item.approved .invoice-decision-dot {
  background: #16a34a !important;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .13) !important;
}

.invoice-decision-item.declined .invoice-decision-dot {
  background: #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .13) !important;
}

.mail-item-meta span:last-child {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
}

@media (max-width: 640px) {
  .invoice-decision-item,
  .mail-item {
    grid-template-columns: 46px minmax(0, 1fr) 8px !important;
    gap: 10px !important;
    min-height: 94px !important;
    padding: 12px 12px 12px 14px !important;
    border-radius: 15px !important;
  }

  .invoice-decision-icon,
  .mail-item-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 13px !important;
    font-size: 25px !important;
  }

  .invoice-decision-title,
  .mail-item-top strong {
    font-size: 14px !important;
  }
}


/* CLIENT DECISIONS COMPACT TITLE FIX
   Fix only: remove title row space after JS no longer renders "Client decision". */
#invoiceDecisionList .invoice-decision-top {
  align-items: center !important;
  margin: 0 0 8px 0 !important;
}
#invoiceDecisionList .invoice-decision-top .invoice-decision-client {
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}
#invoiceDecisionList .invoice-decision-main {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}
/* Notification history: read/opened items stay visible but dimmed. */
.invoice-decision-item.seen,
.mail-item.read,
.meteor-notif-item.read {
  opacity: 0.55;
  filter: grayscale(0.25);
}
.invoice-decision-item.seen .invoice-decision-dot,
.mail-item.read .mail-item-dot {
  opacity: 0.18;
}


/* ===== iPhone PWA safe-area fix ===== */
html,
body {
  padding-top: env(safe-area-inset-top);
}

.header {
  padding-top: max(16px, env(safe-area-inset-top));
}

@supports (padding: max(0px)) {
  .header {
    padding-top: max(16px, env(safe-area-inset-top));
  }
}
/* ===== end iPhone PWA safe-area fix ===== */

/* Invoice edit owner approval request in header invoice bell */
.invoice-decision-pill.edit-request {
  background: #eef2ff !important;
  color: #4338ca !important;
  border: 1px solid #818cf8 !important;
}
.invoice-decision-item.edit-request::before { background: #818cf8 !important; }
.invoice-decision-item.edit-request .invoice-decision-icon {
  background: #eef2ff !important;
  color: #4338ca !important;
  border-color: #818cf8 !important;
}

/* Deposit workflow hard-fix: equal-size action buttons */
.deposit-action-row {
  align-items: flex-start !important;
}
.deposit-action-row .deposit-action-details,
.deposit-action-row .deposit-action-form {
  width: 180px !important;
  min-width: 180px !important;
  max-width: 180px !important;
  flex: 0 0 180px !important;
  margin: 0 !important;
}
.deposit-action-row .deposit-action-btn,
.deposit-action-row .deposit-action-summary {
  box-sizing: border-box !important;
  width: 180px !important;
  min-width: 180px !important;
  max-width: 180px !important;
  height: 46px !important;
  min-height: 46px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 12px !important;
  white-space: nowrap !important;
  text-align: center !important;
  line-height: 1 !important;
}
.deposit-action-row .deposit-action-summary::-webkit-details-marker { display: none !important; }
.deposit-action-row .deposit-action-summary::marker { content: '' !important; }

/* Header bell: Deposit Paid must be its own green money event, not Declined. */
.invoice-decision-item.deposit-paid::before { background: #16a34a !important; }
.invoice-decision-item.deposit-paid .invoice-decision-icon {
  background: #dcfce7 !important;
  color: #15803d !important;
}
.invoice-decision-pill.deposit-paid {
  background: #dcfce7 !important;
  color: #166534 !important;
}

/* HARD FIX 2026-06-27: deposit action buttons must be equal even if hotfix CSS is cached. */
.deposit-action-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 560px !important;
  align-items: start !important;
  box-sizing: border-box !important;
}
.deposit-action-row .deposit-action-details,
.deposit-action-row .deposit-action-form {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  flex: none !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
.deposit-action-row .deposit-action-btn,
.deposit-action-row .deposit-action-summary,
.deposit-action-row form.deposit-action-form > button.deposit-action-btn {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 52px !important;
  min-height: 52px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 12px !important;
  white-space: nowrap !important;
  text-align: center !important;
  line-height: 1 !important;
  font-weight: 1000 !important;
}
.deposit-action-row .deposit-action-summary::-webkit-details-marker { display: none !important; }
.deposit-action-row .deposit-action-summary::marker { content: '' !important; }

/* FINAL HARD FIX 2026-06-27: Deposit buttons must be exactly equal size on tablet/PWA. */
.deposit-action-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 370px !important;
  align-items: flex-start !important;
  box-sizing: border-box !important;
}
.deposit-action-row .deposit-action-details,
.deposit-action-row .deposit-action-form {
  width: 180px !important;
  min-width: 180px !important;
  max-width: 180px !important;
  flex: 0 0 180px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
.deposit-action-row .deposit-action-btn,
.deposit-action-row .deposit-action-summary,
.deposit-action-row form.deposit-action-form > button.deposit-action-btn {
  width: 180px !important;
  min-width: 180px !important;
  max-width: 180px !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  flex: 0 0 180px !important;
}

/* EXACT FIX 2026-06-27: Make Take Deposit exactly match Send Deposit dimensions. */
.deposit-action-row{display:flex!important;flex-wrap:nowrap!important;gap:10px!important;align-items:flex-start!important;width:100%!important;max-width:370px!important;box-sizing:border-box!important;}
.deposit-action-row .deposit-action-details,.deposit-action-row .deposit-action-form{display:block!important;width:180px!important;min-width:180px!important;max-width:180px!important;flex:0 0 180px!important;margin:0!important;box-sizing:border-box!important;}
.deposit-action-row .deposit-action-summary,.deposit-action-row .deposit-action-btn,.deposit-action-row form.deposit-action-form>button.deposit-action-btn{box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important;width:180px!important;min-width:180px!important;max-width:180px!important;height:52px!important;min-height:52px!important;max-height:52px!important;flex:0 0 180px!important;padding:0 12px!important;margin:0!important;border:0!important;border-radius:12px!important;font-size:16px!important;line-height:1!important;text-align:center!important;white-space:nowrap!important;appearance:none!important;-webkit-appearance:none!important;overflow:hidden!important;}
.deposit-action-row .deposit-action-summary::-webkit-details-marker{display:none!important;}
.deposit-action-row .deposit-action-summary::marker{content:''!important;font-size:0!important;}


/* Bell: unlimited invoice/office review list with internal scroll */
.invoice-notify-menu {
  max-height: min(78vh, 720px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
}
#invoiceDecisionList {
  max-height: none !important;
  overflow: visible !important;
}
.invoice-decision-item.office-review .invoice-decision-icon,
.invoice-decision-pill.office-review {
  background: #f3e8ff !important;
  color: #6d28d9 !important;
  border-color: #c084fc !important;
}

/* Fast bell interaction: icon is a button but should keep old icon design. */
.invoice-decision-icon {
  border: 0 !important;
  padding: 0 !important;
  cursor: pointer !important;
  font-family: inherit !important;
  line-height: 1 !important;
}
.invoice-decision-icon:active {
  transform: scale(.96);
}
.invoice-decision-item.seen {
  opacity: .72;
}
