:root {
  color-scheme: light;
  --ink: #18201d;
  --muted: #667169;
  --line: #ded8ca;
  --soft: #f7f3ea;
  --paper: #fffdf8;
  --accent: #0b6157;
  --accent-strong: #073f39;
  --gold: #c99a45;
  --gold-soft: #f4ead6;
  --danger: #a43b3b;
  --shadow: 0 18px 52px rgba(34, 36, 30, 0.18);
  --card-shadow: 0 10px 30px rgba(46, 43, 34, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #efe4d0 0, var(--soft) 235px),
    var(--soft);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.is-testing-mode {
  --ink: #1c1532;
  --muted: #6d5a86;
  --line: #f2bbff;
  --soft: #fff2fd;
  --paper: #fffaff;
  --accent: #7a1fff;
  --accent-strong: #4b008e;
  --gold: #ff8a00;
  --gold-soft: #ffe2f8;
  --shadow: 0 20px 58px rgba(122, 31, 255, 0.24);
  --card-shadow: 0 12px 34px rgba(122, 31, 255, 0.14);
  background:
    linear-gradient(180deg, #ffcf3f 0, #fff2fd 245px),
    var(--soft);
}

body.is-testing-mode::before {
  content: "TESTING MODE";
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 120;
  transform: translateX(-50%);
  border: 2px solid rgba(75, 0, 142, 0.35);
  border-radius: 999px;
  background: linear-gradient(135deg, #4b008e, #ff2fb3);
  color: white;
  box-shadow: 0 10px 28px rgba(75, 0, 142, 0.26);
  padding: 6px 14px;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  pointer-events: none;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 14px 96px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #10211e;
}

.topbar > div {
  min-width: 0;
  flex: 1;
}

.app-title-area {
  border-radius: 14px;
  cursor: pointer;
}

.app-title-area:focus-visible {
  outline: 3px solid rgba(126, 27, 255, 0.35);
  outline-offset: 4px;
}

.app-title-area:active {
  opacity: 0.78;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 2.05rem;
  line-height: 1;
  font-weight: 900;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(7, 63, 57, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--accent-strong);
  font-size: 1.35rem;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
}

.source-strip {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  border-left: 3px solid var(--gold);
  color: #5f5d51;
  font-size: 0.82rem;
  padding-left: 10px;
}

.source-strip span {
  white-space: nowrap;
}


#resultCount {
  color: var(--accent-strong);
  font-weight: 850;
}

.controls {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid rgba(222, 216, 202, 0.8);
  border-radius: 12px;
  background: rgba(247, 243, 234, 0.88);
  padding: 10px;
  box-shadow: 0 10px 30px rgba(46, 43, 34, 0.08);
  backdrop-filter: blur(16px);
}

.search-field,
.filter-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.smart-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: stretch;
}

.smart-search-button,
.voice-search-button {
  min-width: 86px;
  min-height: 44px;
  border: 1px solid rgba(138, 28, 246, 0.26);
  border-radius: 8px;
  background: linear-gradient(135deg, #4b008f, #8a1cf6);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(138, 28, 246, 0.18);
}

.voice-search-button {
  min-width: 48px;
  width: 48px;
  border-radius: 999px;
  background: #fffdf8;
  color: #4b008f;
  font-size: 1.05rem;
}

.voice-search-button.is-listening {
  background: #ff3b30;
  color: #ffffff;
  border-color: rgba(255, 59, 48, 0.3);
  box-shadow: 0 0 0 5px rgba(255, 59, 48, 0.14), 0 8px 18px rgba(255, 59, 48, 0.24);
}

.smart-search-button[hidden],
.voice-search-button[hidden] {
  display: none;
}

.range-filter {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.range-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.range-pair label {
  display: grid;
  gap: 4px;
}

.range-pair small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.toggle-filter {
  min-height: 42px;
  border: 1px solid rgba(222, 216, 202, 0.85);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.78);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
}

.toggle-filter input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--accent-strong);
}

.toggle-filter strong {
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 900;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.94);
  color: var(--ink);
  padding: 10px 12px;
  box-shadow: 0 1px 0 rgba(46, 43, 34, 0.04);
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(0, 108, 103, 0.18);
  outline-offset: 2px;
}

.quick-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.multi-filter {
  position: relative;
}

.multi-filter-button {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.96);
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
  box-shadow: 0 1px 0 rgba(46, 43, 34, 0.04);
}

.multi-filter-button span,
.multi-filter-button strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-filter-button span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.multi-filter-button strong {
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 950;
  margin-top: 4px;
}

.multi-filter-panel {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  width: calc(300% + 20px);
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 18px 44px rgba(46, 43, 34, 0.22);
  padding: 8px;
}

.multi-filter:nth-child(2) .multi-filter-panel {
  left: calc(-100% - 10px);
}

.multi-filter:nth-child(3) .multi-filter-panel {
  left: calc(-200% - 20px);
}

.sidebar-view-filter {
  min-width: 0;
}

.sidebar-view-filter .multi-filter-panel {
  left: 0;
  right: 0;
  width: auto;
  max-height: min(420px, 58vh);
}

.sidebar-view-filter .multi-filter-button {
  min-height: 64px;
}

.sidebar-view-filter .multi-filter-option {
  min-height: 48px;
}

.multi-filter-clear,
.multi-filter-option {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 8px;
  font-size: 0.86rem;
  font-weight: 850;
  text-align: left;
}

.multi-filter-clear {
  background: rgba(7, 63, 57, 0.08);
  justify-content: center;
}

.multi-filter-option input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 auto;
}

.mobile-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.active-chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.active-chips::-webkit-scrollbar {
  display: none;
}

.active-chip {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid rgba(7, 63, 57, 0.14);
  border-radius: 999px;
  background: var(--paper);
  color: var(--accent-strong);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 850;
}

.active-chip-count {
  display: inline-flex;
  align-items: center;
  background: var(--accent-strong);
  color: white;
}

.advanced-filters {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.86);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.advanced-filters summary {
  min-height: 44px;
  padding: 12px;
  color: var(--accent-strong);
  font-weight: 800;
  cursor: pointer;
}

.advanced-grid {
  display: grid;
  gap: 10px;
}

.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.menu-panel.is-open {
  pointer-events: auto;
}

.menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 24, 22, 0.42);
  opacity: 0;
  transition: opacity 160ms ease;
}

.menu-panel.is-open .menu-backdrop {
  opacity: 1;
}

.menu-drawer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(340px, 88vw);
  overflow: auto;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, #fff7e9 0, var(--paper) 150px),
    var(--paper);
  box-shadow: var(--shadow);
  padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  transform: translateX(-100%);
  transition: transform 180ms ease;
}

.menu-panel.is-open .menu-drawer {
  transform: translateX(0);
}

.menu-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.menu-header h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.1;
}

.drawer-section {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.drawer-title {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.drawer-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.menu-actions {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.drawer-button {
  min-height: 46px;
  border: 1px solid var(--accent-strong);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: white;
  font-weight: 850;
}

.testing-mode-button {
  border-color: rgba(255, 47, 179, 0.45);
  background: linear-gradient(135deg, #4b008e, #ff2fb3);
  color: #fff;
}

.testing-mode-button.drawer-button-secondary {
  background: rgba(255, 250, 255, 0.94);
  color: var(--accent-strong);
}

.drawer-button-secondary {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.94);
  color: var(--accent-strong);
}

.drawer-nav .drawer-button {
  text-align: center;
}

.favorite-list,
.alert-list {
  display: grid;
  gap: 8px;
}

.mini-action {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 850;
  text-align: left;
  padding: 8px 10px;
}

.mini-action-muted {
  color: var(--danger);
}

.mini-action-danger {
  border-color: color-mix(in srgb, var(--danger), white 58%);
  background: color-mix(in srgb, var(--danger), white 90%);
  color: var(--danger);
}

.mini-action.is-active {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #ffffff;
}

.status {
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--danger), white 70%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--danger), white 91%);
  color: var(--danger);
}

.admin-update-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--gold), white 40%);
  border-left: 5px solid var(--gold);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff8df, #fffefa);
  box-shadow: var(--card-shadow);
  color: var(--accent-strong);
}

.admin-update-banner[hidden] {
  display: none;
}

.admin-update-banner strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-update-banner span {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 750;
}

.admin-update-banner button {
  min-height: 38px;
  border: 1px solid color-mix(in srgb, var(--accent), white 62%);
  border-radius: 999px;
  background: var(--paper);
  color: var(--accent-strong);
  padding: 8px 12px;
  font-weight: 900;
}

.unit-list {
  display: grid;
  gap: 10px;
}

.compare-bar {
  position: sticky;
  top: 10px;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--accent), white 68%);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--card-shadow);
  padding: 10px;
}

.compare-bar span {
  color: var(--accent-strong);
  font-weight: 950;
}

.compare-bar .drawer-button {
  width: auto;
  min-height: 38px;
  padding: 8px 12px;
}

.unit-card {
  position: relative;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 13px;
  text-align: left;
  box-shadow: var(--card-shadow);
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.unit-card:active {
  transform: scale(0.992);
}

.unit-card:hover {
  border-color: rgba(11, 97, 87, 0.28);
  box-shadow: 0 14px 34px rgba(46, 43, 34, 0.11);
}

.unit-card.is-compared {
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(11, 97, 87, 0.14);
}

.unit-card.is-shortlisted {
  background: linear-gradient(135deg, rgba(244, 234, 214, 0.4), var(--paper) 48%);
}

.shortlist-toggle,
.compare-toggle {
  position: absolute;
  bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 950;
  padding: 6px 9px;
}

.shortlist-toggle {
  right: 94px;
}

.compare-toggle {
  right: 10px;
}

.shortlist-toggle.is-selected {
  border-color: #d39b27;
  background: var(--gold-soft);
  color: #6d4b0e;
}

.compare-toggle.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent), white 84%);
}

.unit-card .unit-meta {
  padding-right: 154px;
}

.codes-view {
  display: grid;
  gap: 14px;
}

.codes-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.88);
  padding: 14px;
  box-shadow: var(--card-shadow);
}

.codes-toolbar h2 {
  margin: 0;
  font-size: 1.25rem;
}

.codes-toolbar .drawer-button {
  min-width: 142px;
}

.new-codes {
  border: 1px solid rgba(201, 154, 69, 0.5);
  border-radius: 10px;
  background: var(--gold-soft);
  padding: 12px;
}

.new-codes p {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-weight: 900;
}

.new-codes div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.new-codes span {
  border: 1px solid rgba(7, 63, 57, 0.14);
  border-radius: 999px;
  background: var(--paper);
  color: var(--accent-strong);
  font-weight: 900;
  padding: 7px 10px;
}

.codes-list {
  display: grid;
  gap: 10px;
  overflow: hidden;
}

.dashboard-view {
  display: grid;
  gap: 14px;
}

.summary-view {
  display: grid;
  gap: 14px;
}

.useful-links-view {
  display: grid;
  gap: 14px;
}

.useful-links-list {
  display: grid;
  gap: 10px;
}

.useful-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(247, 243, 234, 0.92));
  box-shadow: var(--card-shadow);
  color: var(--accent-strong);
  padding: 14px;
  text-align: left;
}

.useful-link-actions {
  display: grid;
  flex: 0 0 120px;
  gap: 7px;
}

.useful-link-card strong {
  display: block;
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 950;
}

.useful-link-card small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  margin-top: 3px;
}

.useful-link-pill {
  border: 0;
  border-radius: 999px;
  background: rgba(7, 63, 57, 0.08);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 950;
  padding: 8px 10px;
  text-align: center;
}

.useful-link-pill-primary {
  background: var(--accent-strong);
  color: #fff;
}

@media (max-width: 540px) {
  .useful-link-card {
    align-items: flex-start;
  }

  .useful-link-actions {
    flex-basis: 96px;
  }
}

.compare-view {
  display: grid;
  gap: 14px;
}

.payment-plan-view {
  display: grid;
  min-height: calc(100vh - 150px);
  place-items: start center;
}

.payment-plan-workbench {
  display: grid;
  gap: 14px;
  width: min(760px, 100%);
}

.payment-plan-builder {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--card-shadow);
  padding: 14px;
}

.payment-plan-page-result {
  display: grid;
  gap: 12px;
}

.payment-plan-page-result .payment-plan-section {
  margin-top: 0;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.summary-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.88);
  padding: 14px;
  box-shadow: var(--card-shadow);
}

.summary-toolbar h2 {
  margin: 0;
  font-size: 1.25rem;
}

.summary-toolbar p:last-child {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: right;
}

.summary-toolbar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: min(260px, 100%);
}

.summary-list {
  display: grid;
  gap: 12px;
}

.compare-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--card-shadow);
}

.compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  border-bottom: 1px solid rgba(222, 216, 202, 0.72);
  border-right: 1px solid rgba(222, 216, 202, 0.55);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.compare-table thead th {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, rgba(244, 234, 214, 0.9), rgba(255, 253, 248, 0.98));
  color: var(--accent-strong);
  z-index: 1;
}

.compare-table tbody th {
  width: 132px;
  background: rgba(244, 234, 214, 0.38);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
}

.compare-table td {
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 800;
  min-width: 150px;
}

.compare-table thead strong,
.compare-table thead small {
  display: block;
}

.compare-table thead small {
  color: var(--muted);
  font-size: 0.74rem;
  margin-top: 3px;
}

.compare-remove {
  float: right;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--danger), white 88%);
  color: var(--danger);
  font-weight: 950;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.summary-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(244, 234, 214, 0.72), rgba(255, 253, 248, 0.96));
  padding: 13px;
}

.summary-card-header h3 {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-size: 1.02rem;
}

.summary-card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.summary-card-header strong {
  flex: 0 0 auto;
  color: var(--accent-strong);
  font-size: 0.98rem;
  font-weight: 950;
  text-align: right;
}

.summary-unit-grid {
  display: grid;
}

.summary-unit-row {
  display: grid;
  grid-template-columns: minmax(62px, 0.7fr) minmax(0, 1.5fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-bottom: 1px solid rgba(222, 216, 202, 0.72);
  background: transparent;
  color: inherit;
  padding: 10px 13px;
  text-align: left;
}

.summary-unit-row:last-child {
  border-bottom: 0;
}

.summary-unit-row:active {
  background: var(--gold-soft);
}

.summary-unit-row:hover {
  background: rgba(244, 234, 214, 0.45);
}

.summary-size {
  color: var(--accent-strong);
  font-weight: 950;
}

.summary-unit-row strong {
  display: block;
  color: var(--ink);
  font-size: 0.93rem;
}

.summary-unit-row small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.summary-count {
  min-width: 34px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #7a5319;
  font-size: 0.78rem;
  font-weight: 950;
  padding: 6px 9px;
  text-align: center;
}

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

.dashboard-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--card-shadow);
  padding: 14px;
}

.dashboard-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  margin-bottom: 8px;
}

.dashboard-card strong {
  color: var(--accent-strong);
  font-size: 1.35rem;
  font-weight: 950;
}

.missing-layout-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 420px;
  overflow: auto;
  padding-right: 2px;
}

.missing-layout-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(222, 216, 202, 0.8);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.72);
  padding: 10px;
}

.missing-layout-row > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.missing-layout-row strong,
.missing-layout-row em {
  color: var(--accent-strong);
  font-weight: 950;
}

.missing-layout-row span,
.missing-layout-row small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.missing-layout-row em {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-style: normal;
}

.missing-layout-actions {
  display: grid;
  gap: 6px;
  justify-items: end;
  flex: 0 0 118px;
}

.missing-layout-actions .mini-action {
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  text-align: center;
}

.settings-view {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 18px;
}

.admin-settings-view {
  display: grid;
  gap: 14px;
}

.settings-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(24, 32, 29, 0.5);
  backdrop-filter: blur(8px);
}

.settings-card {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--card-shadow);
  padding: 16px;
}

.settings-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.settings-card h2 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.6rem;
}

.settings-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.settings-group {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  border-top: 1px solid rgba(222, 216, 202, 0.8);
  padding-top: 16px;
}

.settings-group h3 {
  margin: 0;
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 950;
}

.admin-settings-tools {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: 10px;
}

.handover-settings-list {
  display: grid;
  gap: 10px;
  max-height: 66vh;
  overflow: auto;
  padding-right: 2px;
}

.handover-settings-row {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--card-shadow);
  padding: 12px;
}

.handover-settings-row.is-missing {
  border-color: color-mix(in srgb, var(--danger), white 45%);
  background: color-mix(in srgb, var(--danger), white 94%);
}

.handover-settings-meta {
  display: grid;
  gap: 3px;
}

.handover-settings-meta strong {
  color: var(--accent-strong);
  font-size: 0.98rem;
  font-weight: 950;
}

.handover-settings-meta span,
.handover-settings-meta small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.handover-settings-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
}

.handover-settings-edit input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  padding: 9px 10px;
}

.currency-quick,
.language-options,
.segmented-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.language-options,
.segmented-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.is-rtl .source-strip,
body.is-rtl .topbar,
body.is-rtl .unit-card,
body.is-rtl .detail-card,
body.is-rtl .menu-drawer {
  text-align: right;
}

.dashboard-wide {
  grid-column: 1 / -1;
}

.handover-alerts p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  margin: 8px 0 0;
}

.subscription-alert-card p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  margin: 8px 0 0;
}

.pdf-usage-alert-card {
  position: relative;
  overflow: hidden;
}

.pdf-usage-alert-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
}

.pdf-usage-alert-card.is-clear {
  border-color: rgba(11, 97, 87, 0.22);
}

.pdf-usage-alert-card.is-clear::before {
  background: var(--accent);
}

.pdf-usage-alert-card.is-warning {
  border-color: rgba(201, 154, 69, 0.65);
  background:
    linear-gradient(135deg, rgba(244, 234, 214, 0.98), rgba(255, 253, 248, 0.96));
  box-shadow: 0 18px 42px rgba(201, 154, 69, 0.22);
}

.pdf-usage-alert-card.is-warning::before {
  background: var(--gold);
}

.pdf-usage-alert-card.is-critical {
  border-color: rgba(164, 59, 59, 0.7);
  background:
    linear-gradient(135deg, rgba(164, 59, 59, 0.14), rgba(255, 253, 248, 0.98));
  box-shadow: 0 18px 46px rgba(164, 59, 59, 0.24);
}

.pdf-usage-alert-card.is-critical::before {
  background: var(--danger);
}

.pdf-usage-alert-card p {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.45;
  margin: 8px 0 0;
}

.pdf-usage-alert-card.is-critical > strong {
  color: var(--danger);
}

.pdf-usage-alert-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.pdf-usage-alert-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 11px 12px;
  background: rgba(255, 253, 248, 0.88);
}

.pdf-usage-alert-row.is-warning {
  border-color: rgba(201, 154, 69, 0.58);
}

.pdf-usage-alert-row.is-critical {
  border-color: rgba(164, 59, 59, 0.58);
  background: rgba(164, 59, 59, 0.08);
}

.pdf-usage-alert-row div {
  min-width: 0;
}

.pdf-usage-alert-row b,
.pdf-usage-alert-row small,
.pdf-usage-alert-row em {
  display: block;
}

.pdf-usage-alert-row b {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 950;
}

.pdf-usage-alert-row small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  margin-top: 3px;
}

.pdf-usage-alert-row em {
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 850;
  margin-top: 4px;
}

.pdf-usage-alert-row > strong {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 0.86rem;
  font-weight: 950;
  padding: 8px 10px;
}

.pdf-usage-alert-row.is-warning > strong {
  background: var(--gold-soft);
  color: #7a5319;
}

.pdf-usage-alert-row.is-critical > strong {
  background: var(--danger);
  color: white;
}

.subscription-alert-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.subscription-alert-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px;
}

.subscription-alert-row div {
  min-width: 0;
}

.subscription-alert-row b,
.subscription-alert-row small {
  display: block;
}

.subscription-alert-row b {
  color: var(--ink);
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-alert-row small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  margin-top: 3px;
}

.subscription-alert-row > strong {
  color: #b54708;
  flex: 0 0 auto;
  font-size: 0.84rem;
  font-weight: 950;
}

.handover-alert-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.handover-alert-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px;
}

.handover-alert-meta {
  min-width: 0;
}

.handover-alert-meta b,
.handover-alert-meta small {
  display: block;
}

.handover-alert-meta b {
  color: var(--ink);
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.handover-alert-meta small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  margin-top: 3px;
}

.handover-add-button {
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  color: white;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 950;
  padding: 9px 12px;
}

.activity-card > strong {
  display: block;
  margin-bottom: 12px;
}

.activity-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.activity-metrics div,
.activity-metrics button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.92);
  color: inherit;
  padding: 10px;
  text-align: left;
}

.activity-metrics b,
.activity-metrics small {
  display: block;
}

.activity-metrics b {
  color: var(--accent-strong);
  font-size: 1.2rem;
  font-weight: 950;
}

.activity-metrics small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

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

.activity-details-toolbar {
  display: grid;
  gap: 10px;
}

.activity-details-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.activity-mode-active {
  background: var(--accent-strong);
  color: #fff;
}

.activity-details-list {
  max-height: none;
}

.activity-group-list {
  display: grid;
  gap: 12px;
}

.activity-group-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.92);
  padding: 12px;
}

.activity-group-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.activity-group-card header b,
.activity-group-card header small {
  display: block;
}

.activity-group-card header b {
  color: var(--accent-strong);
  font-size: 0.98rem;
  font-weight: 950;
}

.activity-group-card header small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  margin-top: 2px;
}

.activity-group-card header .mini-action {
  flex: 0 0 auto;
  width: auto;
  min-height: 34px;
  padding: 7px 10px;
  white-space: nowrap;
}

.dashboard-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.dashboard-action-button {
  margin-top: 12px;
  text-align: center;
}

.dashboard-subpage {
  display: grid;
  gap: 12px;
}

.dashboard-empty {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
  margin: 0;
}

.projects-view {
  display: grid;
  gap: 16px;
}

.projects-grid {
  display: grid;
  gap: 14px;
}

.project-page-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.project-page-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}

.project-page-card h2 {
  margin: 2px 0 0;
  color: var(--accent-strong);
  font-size: 1.24rem;
  line-height: 1.08;
}

.project-page-card header strong {
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
}

.project-page-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}

.project-page-metrics span {
  border: 1px solid rgba(7, 63, 57, 0.12);
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  padding: 7px 9px;
}

.project-open-button {
  margin: 12px 16px 16px;
  width: calc(100% - 32px);
}

.activity-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(222, 216, 202, 0.72);
  padding-top: 8px;
}

.activity-row-button {
  width: 100%;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.activity-row-button:hover {
  background: rgba(7, 63, 57, 0.045);
}

.activity-row b,
.activity-row small,
.activity-row em {
  display: block;
}

.activity-row b {
  color: var(--ink);
  font-size: 0.86rem;
}

.activity-row small,
.activity-row em,
.activity-row time,
.activity-list p {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.activity-row em {
  margin-top: 3px;
  color: var(--accent-strong);
  font-style: normal;
  opacity: 0.82;
}

.activity-row time {
  flex: 0 0 auto;
  text-align: right;
}

.smart-alert-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.smart-alert-list section {
  border-top: 1px solid rgba(222, 216, 202, 0.72);
  padding-top: 10px;
}

.smart-alert-list h3 {
  color: var(--accent-strong);
  font-size: 0.92rem;
  margin: 0 0 8px;
}

.smart-alert-row {
  display: grid;
  grid-template-columns: minmax(72px, 0.8fr) minmax(0, 1.3fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
}

.smart-alert-row-button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: rgba(7, 63, 57, 0.06);
  text-align: left;
}

.smart-alert-row b {
  color: var(--ink);
  font-size: 0.84rem;
}

.smart-alert-row span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.smart-alert-row em {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 950;
  text-align: right;
}

.contact-alert-card p {
  color: var(--muted);
  font-weight: 800;
  margin: 8px 0 0;
}

.contact-message-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.contact-message-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(222, 216, 202, 0.72);
  padding-top: 10px;
}

.contact-message-row b,
.contact-message-row small {
  display: block;
}

.contact-message-row b {
  color: var(--ink);
  font-size: 0.9rem;
}

.contact-message-row small,
.contact-message-row time {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.contact-message-row p {
  color: var(--ink);
  margin: 6px 0 0;
}

.contact-archive-button {
  margin-top: 8px;
}

.code-row {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.code-swipe-delete {
  position: absolute;
  inset: 0 0 0 auto;
  width: 86px;
  border: 0;
  background: var(--danger);
  color: white;
  font-weight: 900;
}

.code-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--card-shadow);
  padding: 13px;
  transition: transform 160ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.code-row.is-swiping-delete .code-card,
.code-card:hover {
  border-color: color-mix(in srgb, var(--danger), white 70%);
}

.code-card-summary {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.code-card-summary span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.code-card-summary small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-card-header,
.code-card-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.code-card-header strong,
.code-card-summary strong {
  color: var(--accent-strong);
  font-size: 1.04rem;
  letter-spacing: 0.05em;
}

.code-status {
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 5px 9px;
  text-transform: uppercase;
}

.code-status.is-new {
  background: rgba(11, 97, 87, 0.12);
  color: var(--accent-strong);
}

.code-status.is-used {
  background: var(--gold-soft);
  color: #7a5319;
}

.code-status.is-revoked {
  background: color-mix(in srgb, var(--danger), white 88%);
  color: var(--danger);
}

.code-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.code-card dl div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
}

.code-card dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.code-card dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.code-details {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.code-details h3 {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 0.95rem;
}

.code-details p {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 750;
}

.code-details dl div {
  grid-template-columns: 86px minmax(0, 1fr);
}

.code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.code-actions .drawer-button {
  width: auto;
  min-width: 118px;
}

.drawer-button-danger {
  border-color: color-mix(in srgb, var(--danger), white 45%);
  background: var(--danger);
  color: white;
}

.drawer-button-danger:hover {
  background: color-mix(in srgb, var(--danger), black 12%);
}

.load-more {
  min-height: 46px;
  border: 1px solid var(--accent-strong);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: white;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(7, 63, 57, 0.22);
}

.unit-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.unit-title {
  margin: 0 0 4px;
  font-size: 1.02rem;
  font-weight: 850;
}

.unit-subtitle,
.unit-meta,
.unit-price {
  margin: 0;
}

.unit-subtitle {
  color: var(--muted);
  font-size: 0.86rem;
}

.unit-price {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.96rem;
  font-weight: 900;
  white-space: nowrap;
}

.unit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.unit-meta span {
  border-radius: 999px;
  background: var(--gold-soft);
  color: #59451e;
  padding: 5px 8px;
  font-size: 0.78rem;
  font-weight: 800;
}

.detail-panel {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.detail-panel.is-open {
  pointer-events: auto;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 24, 22, 0.48);
  opacity: 0;
  transition: opacity 160ms ease;
}

.detail-panel.is-open .detail-backdrop {
  opacity: 1;
}

.detail-card {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: 88vh;
  overflow: auto;
  border-radius: 14px 14px 0 0;
  background:
    linear-gradient(180deg, #fff7e9 0, var(--paper) 108px),
    var(--paper);
  padding: 10px 16px max(18px, env(safe-area-inset-bottom));
  box-shadow: var(--shadow);
  transform: translateY(100%);
  transition: transform 180ms ease;
}

.detail-panel.is-open .detail-card {
  transform: translateY(0);
}

body.modal-open {
  overflow: hidden;
}

.form-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: end center;
  pointer-events: none;
  visibility: hidden;
}

.form-modal.is-open {
  pointer-events: auto;
  visibility: visible;
}

.form-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 24, 22, 0.52);
  opacity: 0;
  transition: opacity 160ms ease;
}

.form-modal.is-open .form-modal-backdrop {
  opacity: 1;
}

.form-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  max-height: 88vh;
  overflow: auto;
  border-radius: 18px 18px 0 0;
  border: 1px solid rgba(222, 216, 202, 0.9);
  background:
    linear-gradient(180deg, #fff7e9 0, var(--paper) 120px),
    var(--paper);
  box-shadow: var(--shadow);
  padding: 16px max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  transform: translateY(100%);
  transition: transform 180ms ease;
}

.form-modal.is-open .form-modal-card {
  transform: translateY(0);
}

.form-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.form-modal-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.8rem;
}

.admin-user-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.admin-user-form textarea {
  width: 100%;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.form-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.form-modal-error {
  margin: 0;
  border: 1px solid rgba(169, 51, 51, 0.22);
  border-radius: 10px;
  background: rgba(169, 51, 51, 0.08);
  color: var(--danger);
  font-size: 0.86rem;
  font-weight: 850;
  padding: 10px 12px;
}

.detail-handle {
  width: 42px;
  height: 4px;
  margin: 2px auto 14px;
  border-radius: 999px;
  background: #c8d2d5;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-header p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 750;
}

.detail-header h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
}

.detail-price {
  margin: 14px 0;
  color: var(--accent);
  font-size: 1.45rem;
  font-weight: 950;
}

.detail-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.detail-grid,
.all-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.all-details {
  grid-template-columns: 1fr;
  margin-top: 14px;
}

.payment-plan-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent), white 94%);
  margin: 14px 0 0;
  padding: 12px;
}

.payment-plan-section header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.payment-plan-section p {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  margin: 0 0 3px;
}

.payment-plan-section h3 {
  font-size: 1rem;
  margin: 0;
}

.payment-plan-list {
  display: grid;
  gap: 8px;
}

.payment-plan-item {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 10px;
}

.payment-plan-item.is-editable {
  cursor: pointer;
}

.payment-plan-item.is-editable:hover {
  border-color: color-mix(in srgb, var(--accent), white 45%);
}

.payment-plan-item b,
.payment-plan-item small {
  display: block;
}

.payment-plan-item b {
  font-size: 0.88rem;
}

.payment-plan-item small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  margin-top: 2px;
}

.payment-plan-item strong {
  color: var(--accent-strong);
  font-size: 0.9rem;
}

.payment-plan-item span {
  font-size: 0.84rem;
  font-weight: 950;
  text-align: end;
}


.payment-plan-hint,
.payment-plan-editor {
  grid-column: 1 / -1;
}

.payment-plan-hint {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.payment-plan-editor {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.payment-plan-editor label {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.payment-plan-editor label span,
.payment-plan-editor output,
.payment-plan-editor small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.payment-plan-editor select {
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-weight: 900;
  padding: 9px 10px;
}

.detail-cell,
.all-detail-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 253, 248, 0.92);
}

.detail-cell dt,
.all-detail-row dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.detail-cell dd,
.all-detail-row dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.unit-layout-section,
.unit-master-plan-section,
.project-highlight-section,
.pdf-section-options {
  margin: 14px 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.94);
  padding: 10px;
}

.pdf-section-options:has(details[open]) {
  border-radius: 10px;
}

.unit-layout-section header,
.unit-master-plan-section header,
.project-highlight-section header,
.pdf-section-options header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.project-highlight-section header {
  align-items: center;
}

.project-highlight-section header > div:first-child {
  min-width: 0;
}

.unit-layout-section p,
.unit-layout-section h3,
.unit-layout-section figure,
.unit-master-plan-section p,
.unit-master-plan-section h3,
.unit-master-plan-section figure,
.project-highlight-section p,
.project-highlight-section h3,
.project-highlight-section details,
.pdf-section-options p,
.pdf-section-options h3 {
  margin: 0;
}

.unit-layout-section p,
.unit-master-plan-section p,
.project-highlight-section p,
.pdf-section-options p {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.unit-layout-section h3,
.unit-master-plan-section h3,
.project-highlight-section h3,
.pdf-section-options h3 {
  color: var(--accent-strong);
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.pdf-section-options details {
  margin: 0;
}

.pdf-section-options summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  cursor: pointer;
  list-style: none;
  padding: 8px 12px;
}

.pdf-section-options summary::-webkit-details-marker {
  display: none;
}

.pdf-section-options summary span {
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 950;
}

.pdf-section-options summary small {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(7, 63, 57, 0.08);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 5px 8px;
}

.pdf-section-options details[open] summary {
  padding: 0 0 10px;
}

.unit-layout-section a,
.unit-master-plan-section a,
.project-highlight-section a {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

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

.layout-3d-button {
  border: 1px solid rgba(2, 56, 50, 0.18);
  border-radius: 999px;
  background: var(--accent-strong);
  color: white;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 950;
  padding: 8px 10px;
}

.layout-3d-button-secondary {
  background: rgba(255, 253, 248, 0.95);
  color: var(--accent-strong);
}

.unit-layout-section figure {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.unit-layout-section img {
  display: block;
  width: 100%;
  min-width: 360px;
  height: auto;
}

.pdf-section-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.pdf-section-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(7, 63, 57, 0.12);
  border-radius: 9px;
  background: rgba(255, 253, 248, 0.95);
  color: var(--accent-strong);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.1;
  padding: 8px;
}

.pdf-section-option[draggable="true"] {
  cursor: grab;
  touch-action: none;
}

.pdf-section-option[draggable="true"]:active {
  cursor: grabbing;
}

.pdf-section-option.is-dragging {
  opacity: 0.55;
  transform: scale(0.98);
}

.pdf-section-option.is-drag-over {
  border-color: rgba(126, 28, 255, 0.58);
  background: rgba(126, 28, 255, 0.1);
  box-shadow: inset 0 0 0 2px rgba(126, 28, 255, 0.18);
}

.pdf-section-option > span:not(.pdf-section-drag-handle) {
  flex: 1 1 auto;
}

.pdf-section-drag-handle {
  flex: 0 0 auto;
  color: rgba(86, 0, 138, 0.55);
  cursor: grab;
  font-size: 0.9rem;
  font-weight: 950;
  letter-spacing: -0.18em;
  line-height: 1;
  padding-right: 3px;
}

.pdf-section-option input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--accent-strong);
}

.pdf-section-option span {
  min-width: 0;
}

.project-highlight-section summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 950;
  border: 1px solid rgba(7, 63, 57, 0.12);
  border-radius: 8px;
  background: rgba(7, 63, 57, 0.04);
  list-style: none;
  padding: 9px 10px;
}

.project-highlight-section summary::-webkit-details-marker {
  display: none;
}

.project-highlight-section details[open] summary {
  margin-bottom: 10px;
}

.project-highlight-viewer {
  height: min(520px, 72vh);
  margin-top: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.project-highlight-viewer iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 520px;
  border: 0;
}

.project-highlight-viewer img {
  display: block;
  width: 100%;
  min-width: 520px;
  height: auto;
}

.master-plan-note {
  margin-bottom: 10px !important;
}

.master-plan-frame {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.master-plan-canvas {
  position: relative;
  width: 100%;
  min-width: 720px;
}

.master-plan-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.master-plan-marker {
  position: absolute;
  z-index: 2;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 999px;
  background: #ff2f2f;
  box-shadow:
    0 0 0 4px rgba(255, 47, 47, 0.34),
    0 10px 22px rgba(80, 0, 0, 0.32);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 950;
}

.master-plan-marker::after {
  content: "";
  position: absolute;
  inset: -11px;
  border: 2px solid rgba(255, 47, 47, 0.54);
  border-radius: inherit;
}

.master-plan-marker span {
  line-height: 1;
}

.master-plan-mapper-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  padding: 16px;
}

.master-plan-mapper-modal.is-open {
  display: grid;
  place-items: center;
}

.master-plan-mapper-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 18, 0.62);
  backdrop-filter: blur(8px);
}

.master-plan-mapper-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1240px, 96vw);
  height: min(900px, 90vh);
  overflow: hidden;
  border: 1px solid rgba(222, 216, 202, 0.86);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.3);
}

.master-plan-mapper-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #fffdf8 0%, #edf5f2 100%);
}

.master-plan-mapper-header h2,
.master-plan-mapper-header p {
  margin: 0;
}

.master-plan-mapper-header h2 {
  color: var(--accent-strong);
  font-size: 1.2rem;
  font-weight: 950;
}

.master-plan-mapper-header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 850;
}

.master-plan-mapper-body {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  padding: 12px;
}

.master-plan-mapper-side {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(247, 243, 234, 0.9);
  padding: 14px;
}

.master-plan-mapper-side span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.master-plan-mapper-side strong {
  color: var(--accent-strong);
  font-size: 1.55rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.master-plan-mapper-side small {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.45;
}

.master-plan-mapper-actions {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.master-plan-mapper-map {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.master-plan-mapper-map.is-panning {
  cursor: grabbing;
}

.master-plan-mapper-tools {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(222, 216, 202, 0.86);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 12px 34px rgba(18, 24, 22, 0.16);
  padding: 6px;
  backdrop-filter: blur(12px);
}

.master-plan-mapper-tools button,
.master-plan-mapper-tools span {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 950;
}

.master-plan-mapper-tools button {
  background: rgba(7, 63, 57, 0.08);
  cursor: pointer;
}

.master-plan-mapper-tools button:hover {
  background: rgba(7, 63, 57, 0.14);
}

.master-plan-mapper-tools span {
  min-width: 56px;
  color: var(--muted);
  font-size: 0.78rem;
}

.master-plan-mapper-canvas {
  position: relative;
  width: max-content;
  min-width: 980px;
  cursor: crosshair;
  transform-origin: 0 0;
  will-change: transform;
}

.master-plan-mapper-canvas img {
  display: block;
  width: min(1600px, calc(96vw - 340px));
  min-width: 980px;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.master-plan-mapper-cursor {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 999px;
  background: #de2f2f;
  box-shadow:
    0 0 0 5px rgba(222, 47, 47, 0.24),
    0 12px 28px rgba(80, 0, 0, 0.28);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 950;
  pointer-events: none;
}

.master-plan-mapper-cursor.is-saved {
  background: var(--accent-strong);
  box-shadow:
    0 0 0 5px rgba(7, 63, 57, 0.2),
    0 12px 28px rgba(0, 28, 24, 0.24);
}

.master-plan-mapper-cursor.is-pending {
  background: #ff2f2f;
  animation: markerPulse 1.2s ease-in-out infinite;
}

@keyframes markerPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 5px rgba(255, 47, 47, 0.22),
      0 12px 28px rgba(80, 0, 0, 0.28);
  }
  50% {
    box-shadow:
      0 0 0 12px rgba(255, 47, 47, 0.12),
      0 12px 28px rgba(80, 0, 0, 0.28);
  }
}

@media (max-width: 760px) {
  .master-plan-mapper-modal {
    padding: 0;
  }

  .master-plan-mapper-panel {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .master-plan-mapper-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .master-plan-mapper-side {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .master-plan-mapper-actions {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .master-plan-mapper-canvas,
  .master-plan-mapper-canvas img {
    min-width: 980px;
    width: 1180px;
  }
}

.layout-3d-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.layout-3d-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.layout-3d-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 13, 0.76);
  backdrop-filter: blur(10px);
}

.layout-3d-panel {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(1180px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
  border: 1px solid rgba(218, 202, 169, 0.35);
  border-radius: 20px;
  background: linear-gradient(145deg, #fffdf8, #ece8dc);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  padding: 16px;
}

.layout-3d-panel-advanced {
  background:
    radial-gradient(circle at 20% 0%, rgba(210, 168, 94, 0.18), transparent 28%),
    linear-gradient(145deg, #fffdf8, #ebe5d6);
}

.layout-3d-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.layout-3d-header p,
.layout-3d-header h2 {
  margin: 0;
}

.layout-3d-header p {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.layout-3d-header h2 {
  color: var(--ink);
  font-size: clamp(1.25rem, 4vw, 2rem);
  line-height: 1.05;
}

.layout-3d-header span,
.layout-3d-note,
.layout-3d-engine-stats {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.layout-3d-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.layout-3d-summary span {
  border: 1px solid rgba(222, 216, 202, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 7px 10px;
}

.layout-3d-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  border: 1px solid rgba(222, 216, 202, 0.72);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.72);
  padding: 10px;
}

.layout-3d-toolbar label {
  display: grid;
  gap: 5px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.layout-3d-toolbar input[type="range"] {
  width: 100%;
  accent-color: var(--accent-strong);
}

.layout-3d-three-wrap,
.layout-3d-canvas-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #dfe9e5;
  min-height: 560px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.layout-3d-three-stage,
.layout-3d-canvas {
  display: block;
  width: 100%;
  min-height: 560px;
  cursor: grab;
  touch-action: none;
}

.layout-3d-three-stage:active,
.layout-3d-canvas:active {
  cursor: grabbing;
}


.layout-3d-three-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.layout-3d-note code {
  border-radius: 5px;
  background: rgba(2, 56, 50, 0.08);
  color: var(--accent-strong);
  padding: 1px 5px;
}

.layout-3d-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(248, 244, 235, 0.78);
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 950;
  text-align: center;
  padding: 20px;
}

.layout-3d-loading[hidden] {
  display: none;
}

.layout-3d-panel-render {
  max-width: min(980px, calc(100vw - 28px));
}

.layout-3d-render-frame {
  margin: 14px 0 0;
  border: 1px solid rgba(222, 216, 202, 0.9);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.96), rgba(248, 244, 235, 0.86) 55%, rgba(239, 232, 216, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 22px 65px rgba(29, 26, 18, 0.16);
  overflow: hidden;
  padding: clamp(10px, 1.8vw, 18px);
}

.layout-3d-render-image {
  display: block;
  width: 100%;
  max-height: min(76vh, 920px);
  object-fit: contain;
  border-radius: 16px;
  background: #fbfaf7;
}

.layout-3d-render-fallback {
  display: grid;
  gap: 12px;
  min-height: 420px;
  place-items: center;
  color: var(--accent-strong);
  font-size: 1.05rem;
  font-weight: 900;
  text-align: center;
  padding: clamp(18px, 3vw, 32px);
}

.layout-3d-render-fallback strong {
  display: block;
  max-width: 620px;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
}

.layout-3d-render-fallback span {
  display: block;
  max-width: 720px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.45;
}

.layout-3d-render-fallback img {
  display: block;
  width: min(100%, 820px);
  max-height: 58vh;
  object-fit: contain;
  border: 1px solid rgba(222, 216, 202, 0.9);
  border-radius: 16px;
  background: #fbfaf7;
  box-shadow: 0 16px 44px rgba(29, 26, 18, 0.12);
}

.layout-3d-engine-stats {
  border-left: 4px solid var(--gold);
  padding-left: 10px;
}

@media (max-width: 720px) {
  .layout-3d-modal {
    padding: 8px;
  }

  .layout-3d-panel {
    max-height: 94vh;
    border-radius: 16px;
    padding: 12px;
  }

  .layout-3d-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layout-3d-canvas-wrap,
  .layout-3d-three-stage,
.layout-3d-canvas {
    min-height: 430px;
  }
}

.public-share-shell {
  min-height: 100vh;
  padding: 18px;
}

.public-share-card {
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(244, 234, 214, 0.82), rgba(255, 253, 248, 0.98) 210px),
    var(--paper);
  box-shadow: var(--shadow);
  padding: 22px;
}

.public-share-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.public-share-header h1 {
  margin: 4px 0 6px;
  font-size: clamp(1.7rem, 5vw, 2.45rem);
}

.public-share-header p {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

.public-share-header strong {
  color: var(--accent);
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  white-space: nowrap;
}

.public-share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.public-share-grid article,
.public-payment-list article {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.95);
  padding: 12px;
}

.public-share-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.public-share-grid b {
  color: var(--ink);
  font-size: 0.98rem;
}

.public-share-section {
  margin-top: 22px;
}

.public-share-section-title {
  margin-bottom: 10px;
}

.public-share-section-title h2 {
  margin: 3px 0 0;
  font-size: 1.2rem;
}

.public-share-layout {
  display: block;
  width: 100%;
  max-height: 720px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.public-payment-list {
  display: grid;
  gap: 8px;
}

.public-payment-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
}

.public-payment-list b,
.public-payment-list span {
  display: block;
}

.public-payment-list span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  margin-top: 2px;
}

.public-payment-list strong {
  color: var(--accent-strong);
  font-size: 1.02rem;
}

.public-payment-list em {
  color: var(--ink);
  font-style: normal;
  font-weight: 950;
  text-align: right;
}

.public-share-footer {
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

@media (max-width: 560px) {
  .admin-settings-tools,
  .handover-settings-edit {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 720px) {
  .app-shell {
    padding-top: 28px;
  }

  .multi-filter-panel {
    left: 0;
    right: 0;
    width: auto;
  }

  .multi-filter:nth-child(2) .multi-filter-panel,
  .multi-filter:nth-child(3) .multi-filter-panel {
    left: 0;
  }

  .quick-filters,
  .advanced-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .payment-plan-builder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-card {
    left: auto;
    width: min(480px, 100%);
    height: 100vh;
    max-height: none;
    border-radius: 0;
    transform: translateX(100%);
  }

  .detail-panel.is-open .detail-card {
    transform: translateX(0);
  }

  .form-modal {
    place-items: center;
  }

  .form-modal-card {
    border-radius: 18px;
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  .form-modal.is-open .form-modal-card {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

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

  .form-field-wide,
  .form-modal-actions {
    grid-column: 1 / -1;
  }
}

.master-plan-browser-view {
  display: grid;
  gap: 14px;
}

.master-plan-browser-shell {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.master-plan-browser-sidebar {
  display: grid;
  gap: 12px;
  max-height: min(76vh, 900px);
  overflow: hidden;
}

.master-plan-browser-summary {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  padding: 14px;
  box-shadow: var(--card-shadow);
}

.master-plan-browser-summary strong {
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 950;
}

.master-plan-browser-summary span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.master-plan-browser-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}

.master-plan-browser-unit {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.96);
  color: var(--ink);
  padding: 12px;
  text-align: left;
  box-shadow: 0 6px 18px rgba(46, 43, 34, 0.05);
}

.master-plan-browser-unit strong {
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 950;
}

.master-plan-browser-unit span,
.master-plan-browser-unit small,
.master-plan-browser-unit em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.master-plan-browser-unit em {
  color: var(--gold-deep);
}

.master-plan-browser-unit.is-selected {
  border-color: rgba(112, 31, 255, 0.7);
  background: linear-gradient(135deg, rgba(255, 246, 226, 0.98), rgba(255, 249, 238, 0.98));
  box-shadow: 0 0 0 3px rgba(173, 78, 255, 0.16), var(--card-shadow);
}

.master-plan-browser-map {
  position: sticky;
  top: 10px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--card-shadow);
  overflow: auto;
  max-height: min(76vh, 900px);
  padding: 12px;
}

.master-plan-browser-canvas {
  position: relative;
  min-width: 880px;
  width: 100%;
}

.master-plan-browser-canvas img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.master-plan-browser-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.master-plan-browser-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: rgba(7, 63, 57, 0.9);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 6px 14px rgba(18, 15, 8, 0.28);
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.master-plan-browser-marker span {
  display: block;
  width: 100%;
  max-width: 21px;
  overflow: hidden;
  text-align: center;
  font-size: 0.52rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  transform: translateY(0.5px);
}

.master-plan-browser-marker.is-medium-label span {
  font-size: 0.48rem;
  letter-spacing: -0.055em;
}

.master-plan-browser-marker.is-long-label span {
  font-size: 0.42rem;
  letter-spacing: -0.075em;
}

.master-plan-browser-marker:hover,
.master-plan-browser-marker.is-selected {
  z-index: 5;
  transform: translate(-50%, -50%) scale(1.35);
  background: linear-gradient(135deg, #5f00a8, #ff2bc2);
  box-shadow: 0 0 0 7px rgba(255, 43, 194, 0.18), 0 10px 22px rgba(18, 15, 8, 0.32);
}

@media (max-width: 860px) {
  .master-plan-browser-shell {
    grid-template-columns: 1fr;
  }

  .master-plan-browser-sidebar {
    max-height: none;
  }

  .master-plan-browser-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .master-plan-browser-unit {
    min-width: 230px;
  }

  .master-plan-browser-map {
    position: relative;
    top: auto;
    max-height: 70vh;
  }

  .master-plan-browser-canvas {
    min-width: 920px;
  }
}

@media (max-width: 860px) {
  .master-plan-browser-view {
    gap: 10px;
  }

  .master-plan-browser-shell {
    display: flex;
    flex-direction: column-reverse;
    min-height: calc(100vh - 150px);
  }

  .master-plan-browser-map {
    flex: 1 1 auto;
    min-height: 58vh;
    max-height: 68vh;
    margin-bottom: 0;
    border-radius: 18px 18px 8px 8px;
  }

  .master-plan-browser-sidebar {
    position: sticky;
    bottom: 0;
    z-index: 8;
    max-height: 34vh;
    border: 1px solid rgba(222, 216, 202, 0.95);
    border-radius: 22px 22px 0 0;
    background: rgba(255, 253, 248, 0.98);
    box-shadow: 0 -14px 34px rgba(46, 43, 34, 0.16);
    padding: 12px;
    overflow: hidden;
  }

  .master-plan-browser-sidebar::before {
    content: "";
    width: 48px;
    height: 5px;
    border-radius: 999px;
    background: rgba(7, 63, 57, 0.22);
    justify-self: center;
    margin-bottom: 2px;
  }

  .master-plan-browser-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 8px 10px;
    border-radius: 14px;
    box-shadow: none;
  }

  .master-plan-browser-summary strong {
    width: 100%;
    font-size: 0.9rem;
  }

  .master-plan-browser-summary span {
    font-size: 0.72rem;
  }

  .master-plan-browser-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .master-plan-browser-unit {
    min-width: min(76vw, 290px);
    scroll-snap-align: center;
    padding: 10px;
  }

  .master-plan-browser-unit strong {
    font-size: 0.92rem;
  }

  .master-plan-browser-unit span,
  .master-plan-browser-unit small,
  .master-plan-browser-unit em {
    font-size: 0.72rem;
  }
}

body.is-client-mode {
  --accent: #2057ff;
  --accent-strong: #1436a8;
  --gold: #dbe7ff;
  --gold-deep: #1f5fff;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.22), transparent 34%),
    linear-gradient(180deg, #eef5ff 0%, #fffaf0 52%, #f8fbff 100%);
}

.global-client-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(32, 87, 255, 0.96), rgba(20, 54, 168, 0.96));
  color: #ffffff;
  padding: 10px 12px;
  box-shadow: 0 16px 34px rgba(32, 87, 255, 0.22);
  margin-bottom: 12px;
}

.global-client-mode-bar span {
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.25;
}

.global-client-mode-bar .drawer-button {
  min-height: 38px;
  background: rgba(255, 255, 255, 0.94);
  color: #1436a8;
  border-color: rgba(255, 255, 255, 0.75);
}

.leads-view {
  display: grid;
  gap: 14px;
}

.client-mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 18px;
  background: rgba(239, 246, 255, 0.96);
  padding: 14px;
  box-shadow: var(--card-shadow);
}

.client-mode-banner div {
  display: grid;
  gap: 3px;
}

.client-mode-banner strong {
  color: #1436a8;
  font-size: 1rem;
  font-weight: 950;
}

.client-mode-banner span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.leads-shell {
  display: grid;
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.leads-sidebar,
.lead-detail-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--card-shadow);
  padding: 14px;
}

.leads-sidebar {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 10px;
  max-height: 78vh;
  overflow: hidden;
}

.leads-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 3px;
}

.lead-view-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lead-view-toggle button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--muted);
  font-weight: 950;
  padding: 10px 12px;
}

.lead-view-toggle button.is-active {
  border-color: rgba(7, 63, 57, 0.26);
  background: var(--accent-strong);
  color: white;
}

.lead-list-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  text-align: left;
  padding: 12px;
}

.lead-list-item strong {
  color: var(--accent-strong);
  font-size: 0.98rem;
  font-weight: 950;
}

.lead-list-item span,
.lead-list-item small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.lead-list-item.is-selected {
  border-color: rgba(32, 87, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(32, 87, 255, 0.12);
}

.lead-list-item.is-pinned {
  border-color: rgba(184, 134, 11, 0.42);
  background: linear-gradient(135deg, #fffdf8, #fff6dc);
}


.lead-empty-state {
  color: var(--muted);
  font-weight: 850;
  padding: 18px;
  text-align: center;
}

.lead-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.lead-detail-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 950;
}

.lead-detail-header span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  margin-top: 4px;
}

.lead-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.lead-info-grid,
.lead-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.lead-form-full {
  grid-column: 1 / -1;
}

.lead-info-grid div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(247, 243, 234, 0.5);
  padding: 10px;
}

.lead-info-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.lead-info-grid strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.25;
}

.lead-units-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lead-unit-table {
  display: grid;
  gap: 8px;
  align-content: start;
}

.lead-unit-table h3 {
  margin: 0;
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 950;
}

.lead-unit-table h3 span {
  color: var(--muted);
}

.lead-unit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
  padding: 8px;
}

.lead-unit-row > button:first-child {
  display: grid;
  gap: 3px;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  padding: 0;
}

.lead-unit-row strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
}

.lead-unit-row span,
.lead-unit-row small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.lead-form {
  display: grid;
  gap: 12px;
}

.lead-form textarea {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  resize: vertical;
  outline: none;
}




@media (max-width: 860px) {
  .global-client-mode-bar,
  .client-mode-banner,
  .lead-detail-header {
    align-items: stretch;
    flex-direction: column;
  }

  .leads-shell {
    grid-template-columns: 1fr;
  }

  .leads-sidebar {
    position: relative;
    top: auto;
    max-height: none;
  }

  .leads-list {
    display: flex;
    overflow-x: auto;
  }

  .lead-list-item {
    min-width: 240px;
  }

  .lead-info-grid,
  .lead-form-grid,
  .lead-units-grid {
    grid-template-columns: 1fr;
  }

  .lead-actions {
    justify-content: stretch;
  }

  .lead-actions .drawer-button {
    width: 100%;
  }
}

.requests-menu-button {
  position: relative;
  overflow: visible;
}

.requests-menu-button span {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 2;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8a1cf6, #f02aa5);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 950;
  padding: 0 7px;
  border: 1.5px solid #fffdf8;
  box-shadow: 0 8px 18px rgba(138, 28, 246, 0.32);
  line-height: 1;
}

.requests-menu-button span[hidden] {
  display: none;
}

.requests-inbox {
  display: grid;
  gap: 18px;
}

.requests-inbox section {
  display: grid;
  gap: 10px;
}

.requests-inbox h3 {
  margin: 0;
  color: var(--accent-strong);
  font-size: 1.05rem;
  font-weight: 950;
}

.requests-inbox h3 span {
  color: var(--muted);
}

.request-row .mini-action {
  margin-top: 8px;
}

.alerts-menu-button {
  position: relative;
}

#alertsBadge {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #c7392f;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 950;
  padding: 0 7px;
  margin-left: 8px;
  box-shadow: 0 6px 14px rgba(199, 57, 47, 0.25);
}

.alert-popup {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 90;
  width: min(420px, calc(100vw - 28px));
  border: 1px solid rgba(199, 57, 47, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 214, 102, 0.3), transparent 42%),
    linear-gradient(145deg, rgba(255, 253, 248, 0.98), rgba(255, 247, 237, 0.98));
  box-shadow: 0 24px 60px rgba(46, 43, 34, 0.22);
  padding: 16px;
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.alert-popup.is-visible {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.alert-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.alert-popup-header h2 {
  margin: 2px 0 0;
  color: var(--accent-strong);
  font-size: 1.28rem;
  line-height: 1.1;
}

.alert-popup-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--accent-strong);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.alert-popup-list {
  display: grid;
  gap: 8px;
}

.alert-popup-item {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(222, 216, 202, 0.9);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.82);
  padding: 10px 12px;
}

.alert-popup-item span {
  color: var(--danger);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.alert-popup-item strong {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 950;
}

.alert-popup-item small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.alert-popup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.alert-popup-actions .drawer-button {
  min-height: 46px;
  font-size: 0.88rem;
}

.alerts-view,
.alerts-list {
  display: grid;
  gap: 14px;
}

.alerts-editor {
  display: none;
}

.alerts-editor.is-open {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: block;
}

body.alert-editor-open {
  overflow: hidden;
}

.alert-editor-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 31, 29, 0.42);
  backdrop-filter: blur(6px);
}

.alert-editor-panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(580px, 100%);
  overflow: auto;
  border-left: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(255, 214, 102, 0.18), transparent 34%),
    var(--background);
  box-shadow: -22px 0 54px rgba(18, 31, 29, 0.22);
  padding: max(18px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
}

.alert-editor-panel .inventory-alert-form {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--card-shadow);
  padding: 16px;
}

.inventory-alert-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--card-shadow);
  padding: 16px;
}

.inventory-alert-card.is-archived {
  opacity: 0.72;
}

.alerts-dashboard-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(247, 243, 234, 0.94));
  box-shadow: var(--card-shadow);
  padding: 16px;
}

.alert-command-card {
  display: grid;
  gap: 14px;
}

.alert-command-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.alert-command-row input {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.96);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  padding: 0 14px;
}

.alerts-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.alerts-dashboard-card {
  min-height: 78px;
  border: 1px solid rgba(7, 63, 57, 0.14);
  border-radius: 14px;
  background: var(--paper);
  color: var(--accent-strong);
  padding: 12px;
  text-align: left;
}

.alerts-dashboard-card strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 950;
}

.alerts-dashboard-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.alerts-dashboard-card.is-active {
  background: linear-gradient(135deg, var(--accent-strong), #087569);
  color: white;
}

.alerts-dashboard-card.is-active span {
  color: rgba(255, 255, 255, 0.82);
}

.inventory-alert-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.alert-digest-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.broadcast-alert-card {
  border-color: rgba(126, 34, 206, 0.22);
  background: linear-gradient(135deg, rgba(250, 245, 255, 0.98), rgba(255, 253, 248, 0.98));
}

.priority-urgent {
  border-color: rgba(239, 68, 68, 0.42);
}

.priority-urgent .eyebrow,
.priority-urgent h2 {
  color: #b91c1c;
}

.priority-low {
  border-color: rgba(34, 197, 94, 0.24);
}

.reminder-alert-card.is-due {
  border-color: rgba(199, 57, 47, 0.32);
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255, 253, 248, 0.98));
  box-shadow: 0 14px 32px rgba(199, 57, 47, 0.12);
}

.follow-up-alert-card {
  border-color: rgba(7, 63, 57, 0.22);
  background:
    linear-gradient(135deg, rgba(240, 253, 244, 0.95), rgba(255, 253, 248, 0.98));
}

.tower-detail-section {
  border-color: rgba(7, 63, 57, 0.18);
}

.inventory-alert-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inventory-alert-actions .drawer-button {
  min-height: 42px;
  padding: 8px 12px;
  font-size: 0.88rem;
}

@media (max-width: 720px) {
  .alerts-dashboard-grid,
  .inventory-alert-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .inventory-alert-toolbar .drawer-button:first-child {
    grid-column: 1 / -1;
  }

  .alert-command-row {
    grid-template-columns: 1fr;
  }
}

.inventory-alert-units {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.inventory-alert-unit-row {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid rgba(222, 216, 202, 0.92);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.92);
  padding: 11px 12px;
  text-align: left;
}

.inventory-alert-unit-row.is-new {
  border-color: rgba(199, 57, 47, 0.35);
  box-shadow: 0 0 0 3px rgba(199, 57, 47, 0.09);
}

.inventory-alert-unit-row strong {
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 950;
}

.inventory-alert-unit-row span,
.inventory-alert-unit-row small {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 820;
}

body.is-broker-lead-mode {
  --accent: #7a3414;
  --accent-strong: #4f1d0b;
  --gold: #fed7aa;
  --gold-deep: #c2410c;
  background:
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.24), transparent 34%),
    linear-gradient(180deg, #fff7ed 0%, #fffdf8 48%, #fff7ed 100%);
}

.broker-leads-view {
  display: grid;
  gap: 14px;
}

.broker-command-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  border: 1px solid rgba(122, 52, 20, 0.14);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--card-shadow);
  padding: 12px;
}

.broker-command-search {
  margin: 0;
}

.broker-command-bar .voice-search-button {
  align-self: stretch;
  min-width: 58px;
}

.broker-leads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  align-items: stretch;
  max-height: min(74vh, 820px);
  overflow-y: auto;
  padding: 2px 2px 10px;
}

.broker-lead-toolbar {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(122, 52, 20, 0.2);
  border-radius: 16px;
  background: rgba(255, 247, 237, 0.88);
  padding: 10px;
}

.broker-lead-toolbar strong {
  display: block;
  color: var(--accent-strong);
  font-weight: 950;
}

.broker-lead-toolbar span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.broker-lead-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.broker-lead-card,
.broker-request-row {
  border: 1px solid rgba(222, 216, 202, 0.95);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--card-shadow);
  color: var(--ink);
}

.broker-lead-card {
  position: relative;
  overflow: visible;
  min-height: 176px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  gap: 8px;
  padding: 16px;
  text-align: left;
}

.broker-lead-main {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  min-height: 0;
}

.broker-lead-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.broker-chip,
.broker-icon-action {
  min-height: 30px;
  border: 1px solid rgba(122, 52, 20, 0.16);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.9);
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 900;
  padding: 5px 9px;
}

.broker-icon-action {
  min-width: 31px;
  padding: 5px 7px;
}

.broker-chip.is-active,
.broker-icon-action.is-active {
  background: var(--accent-strong);
  color: #ffffff;
}

.broker-lead-card.is-pinned,
.broker-request-row.is-pinned {
  border-color: rgba(194, 65, 12, 0.38);
}

.broker-lead-card.is-starred,
.broker-request-row.is-starred {
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.16), var(--card-shadow);
}

.broker-lead-card strong,
.broker-request-row strong {
  color: var(--accent-strong);
  font-size: 1.04rem;
  font-weight: 950;
  line-height: 1.15;
}

.broker-lead-card span,
.broker-lead-card small,
.broker-request-row span,
.broker-request-row small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
}

.broker-card-badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
  align-self: end;
  margin-top: 8px;
}

.broker-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(122, 52, 20, 0.08);
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 950;
  padding: 5px 9px;
  line-height: 1;
}

.broker-card-request-badge {
  position: absolute;
  top: -11px;
  right: -11px;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #ff3b30;
  color: #ffffff;
  border: 1.5px solid #fffdf8;
  box-shadow: 0 8px 18px rgba(255, 59, 48, 0.32);
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
  padding: 0 7px;
}

.broker-lead-card .broker-card-request-badge {
  color: #ffffff;
}

.broker-add-card {
  border-color: rgba(122, 52, 20, 0.28);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.98), rgba(254, 215, 170, 0.52));
}

.broker-all-requests-card {
  border-color: rgba(7, 63, 57, 0.22);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(209, 250, 229, 0.62));
}

.broker-card-theme {
  border-color: rgba(20, 83, 45, 0.18);
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.98), rgba(220, 252, 231, 0.72));
}

.broker-request-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
}

.broker-request-row > button[data-request-open] {
  display: grid;
  gap: 5px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
}

.broker-request-row.is-active {
  border-color: rgba(194, 65, 12, 0.45);
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.16), var(--card-shadow);
}

.broker-leads-detail {
  display: grid;
  gap: 12px;
}

.broker-request-detail-card {
  padding: 16px;
}

.broker-lead-mode-exit-menu {
  background: linear-gradient(135deg, #7a3414, #f97316);
  color: #ffffff;
}

@media (min-width: 1000px) {
  .broker-leads-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  body:has(#brokerLeadsView:not([hidden])) .app-shell {
    width: min(1480px, 100%);
    padding-inline: clamp(18px, 2.4vw, 36px);
  }

  body:has(#brokerLeadsView:not([hidden])) .topbar,
  body:has(#brokerLeadsView:not([hidden])) .source-strip,
  body:has(#brokerLeadsView:not([hidden])) .broker-leads-view {
    width: 100%;
  }

  body:has(#brokerLeadsView:not([hidden])) .broker-leads-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
    max-height: min(78vh, 980px);
    padding: 4px 4px 16px;
  }

  body:has(#brokerLeadsView:not([hidden])) .broker-command-bar,
  body:has(#brokerLeadsView:not([hidden])) .broker-lead-toolbar {
    padding: 16px;
    border-radius: 20px;
  }

  body:has(#brokerLeadsView:not([hidden])) .broker-lead-card {
    min-height: 220px;
    padding: 22px;
    border-radius: 22px;
  }

  body:has(#brokerLeadsView:not([hidden])) .broker-request-row {
    min-height: 240px;
    padding: 20px;
    border-radius: 22px;
  }

  body:has(#brokerLeadsView:not([hidden])) .broker-lead-card strong,
  body:has(#brokerLeadsView:not([hidden])) .broker-request-row strong {
    font-size: 1.22rem;
  }

  body:has(#brokerLeadsView:not([hidden])) .broker-lead-card span,
  body:has(#brokerLeadsView:not([hidden])) .broker-lead-card small,
  body:has(#brokerLeadsView:not([hidden])) .broker-request-row span,
  body:has(#brokerLeadsView:not([hidden])) .broker-request-row small {
    font-size: 0.92rem;
  }

  body:has(#brokerLeadsView:not([hidden])) .broker-card-badge {
    align-self: start;
    font-size: 0.86rem;
    min-height: 34px;
    padding-inline: 12px;
  }
}

@media (max-width: 720px) {
  .broker-command-bar {
    grid-template-columns: 1fr;
  }

  .broker-command-bar .voice-search-button {
    width: 100%;
  }

  .broker-leads-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .broker-lead-toolbar {
    display: grid;
  }

  .broker-lead-toolbar-actions {
    justify-content: stretch;
  }

  .broker-lead-toolbar-actions .mini-action {
    flex: 1 1 140px;
    text-align: center;
  }

  .broker-lead-card {
    min-height: 148px;
    padding: 12px;
  }
}

.reminder-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.reminder-time-grid select {
  min-width: 0;
  width: 100%;
}

.testing-nav-shell {
  position: sticky;
  top: max(10px, env(safe-area-inset-top));
  z-index: 25;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid rgba(231, 135, 255, 0.72);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 238, 252, 0.9)),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 45px rgba(92, 0, 137, 0.18);
  backdrop-filter: blur(18px);
}

.testing-nav-shell p,
.testing-layout-header p {
  margin: 0;
  color: #6800a8;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.testing-nav-shell strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.testing-nav-shell span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.testing-nav-button,
.testing-nav-close {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(104, 0, 168, 0.22);
  border-radius: 50%;
  background: #ffffff;
  color: #4b0082;
  font-size: 1.5rem;
  font-weight: 950;
  box-shadow: 0 8px 24px rgba(77, 0, 118, 0.12);
}

.testing-nav-button:disabled {
  opacity: 0.35;
}

.testing-nav-close {
  font-size: 1.15rem;
}

body.has-testing-nav-screen .app-shell {
  border-radius: 28px;
  box-shadow: 0 28px 90px rgba(92, 0, 137, 0.12);
}

body.testing-screen-enter .app-shell {
  animation: testingScreenPush 260ms ease both;
}

@keyframes testingScreenPush {
  from {
    opacity: 0.7;
    transform: translateX(34px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.testing-layout-screen {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.testing-layout-screen.is-open {
  opacity: 1;
  pointer-events: auto;
}

.testing-layout-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 8, 28, 0.58);
  backdrop-filter: blur(14px);
}

.testing-layout-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1120px, 96vw);
  height: min(900px, 92vh);
  overflow: hidden;
  border: 1px solid rgba(231, 135, 255, 0.55);
  border-radius: 28px;
  background: linear-gradient(135deg, #fffdf8, #fff4ff);
  box-shadow: 0 35px 95px rgba(20, 0, 35, 0.34);
  transform: translateY(22px) scale(0.98);
  transition: transform 180ms ease;
}

.testing-layout-screen.is-open .testing-layout-card {
  transform: translateY(0) scale(1);
}

.testing-layout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(222, 216, 202, 0.8);
}

.testing-layout-header h2 {
  margin: 2px 0;
  color: var(--ink);
  font-size: clamp(1.3rem, 4vw, 2.1rem);
}

.testing-layout-header span,
.testing-layout-footer {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.testing-layout-figure {
  display: grid;
  place-items: center;
  min-height: 0;
  margin: 0;
  padding: 18px;
  overflow: auto;
}

.testing-layout-figure img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(43, 35, 22, 0.16);
}

.testing-layout-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(222, 216, 202, 0.8);
}

.testing-layout-footer a {
  color: #6800a8;
  font-weight: 950;
  text-decoration: none;
}

@media (max-width: 720px) {
  .testing-nav-shell {
    grid-template-columns: auto minmax(0, 1fr) auto;
    border-radius: 18px;
  }

  #testingNavForwardButton {
    display: none;
  }

  .testing-nav-shell span {
    white-space: normal;
  }

  .testing-layout-card {
    width: 100%;
    height: 92vh;
    border-radius: 22px;
  }
}

.pdf-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  overscroll-behavior: contain;
}

.pdf-editor-modal.is-open {
  display: grid;
  place-items: stretch;
}

.pdf-editor-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 23, 0.58);
  backdrop-filter: blur(10px);
}

.pdf-editor-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(1180px, calc(100vw - 28px));
  height: min(94vh, 980px);
  margin: auto;
  border: 1px solid rgba(222, 216, 202, 0.95);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(247, 243, 234, 0.98));
  box-shadow: 0 34px 90px rgba(12, 33, 31, 0.28);
  overflow: hidden;
}

.pdf-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(222, 216, 202, 0.92);
  background: rgba(255, 253, 248, 0.92);
}

.pdf-editor-eyebrow {
  display: block;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pdf-editor-header h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 950;
}

.pdf-editor-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-weight: 800;
}

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

.pdf-editor-close {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--accent-strong);
  font-size: 1.8rem;
  font-weight: 800;
}

.pdf-editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(222, 216, 202, 0.92);
  background: rgba(247, 243, 234, 0.96);
  overflow-x: auto;
}

.pdf-editor-toolbar[hidden] {
  display: none;
}

.pdf-editor-toolbar label {
  display: grid;
  gap: 3px;
  min-width: 120px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.pdf-editor-toolbar input[type="color"] {
  width: 54px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.pdf-editor-toolbar input[type="range"] {
  accent-color: var(--accent-strong);
}

.pdf-editor-tool-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.pdf-editor-toolbar .mini-action {
  text-align: center;
  white-space: nowrap;
}

.pdf-editor-toolbar .mini-action.is-active {
  background: var(--accent-strong);
  color: white;
}

.pdf-editor-stage {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 18px;
  min-height: 0;
  padding: 18px;
  overflow: auto;
  overscroll-behavior: contain;
  contain: layout paint;
  touch-action: pan-x pan-y pinch-zoom;
  user-select: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(218, 181, 94, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(241, 235, 221, 0.8), rgba(255, 253, 248, 0.95));
}

.pdf-editor-page {
  position: relative;
  flex: 0 0 auto;
  transform-origin: top left;
  contain: layout paint;
  border-radius: 10px;
  background: white;
  box-shadow: 0 16px 45px rgba(20, 34, 32, 0.18);
  overflow: hidden;
}

.pdf-editor-zoom-shell {
  position: relative;
  display: grid;
  justify-items: center;
}

.pdf-editor-document {
  display: grid;
  justify-items: center;
  gap: 18px;
  transform-origin: top left;
  will-change: transform;
}

.pdf-editor-page canvas {
  position: absolute;
  inset: 0;
  display: block;
}

.pdf-editor-page canvas:first-child {
  position: relative;
}

.pdf-editor-page canvas:last-child {
  pointer-events: none;
  touch-action: pan-x pan-y pinch-zoom;
  cursor: default;
}

.pdf-editor-modal.is-editing .pdf-editor-page canvas:last-child {
  pointer-events: auto;
  touch-action: none;
  cursor: crosshair;
}

.pdf-editor-loading,
.pdf-editor-error {
  align-self: center;
  max-width: 520px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--accent-strong);
  padding: 20px;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 720px) {
  .pdf-editor-modal.is-open {
    place-items: stretch;
  }

  .pdf-editor-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .pdf-editor-header {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: calc(18px + env(safe-area-inset-top)) 12px 10px;
    gap: 8px;
    box-shadow: 0 10px 24px rgba(20, 34, 32, 0.08);
  }

  .pdf-editor-eyebrow,
  .pdf-editor-header p {
    display: none;
  }

  .pdf-editor-header h2 {
    margin: 0;
    font-size: 1.06rem;
    line-height: 1.05;
  }

  .pdf-editor-actions {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 6px;
    flex: none;
  }

  .pdf-editor-actions .drawer-button {
    min-height: 38px;
    border-radius: 12px;
    padding: 7px 10px;
    font-size: 0.82rem;
  }

  .pdf-editor-close {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 1.35rem;
  }

  .pdf-editor-stage {
    order: 2;
    justify-items: start;
    gap: 12px;
    padding: 10px 10px 96px;
    overscroll-behavior: contain;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .pdf-editor-page {
    max-width: none;
    justify-self: center;
  }

  .pdf-editor-zoom-shell {
    justify-self: start;
  }

  .pdf-editor-document {
    gap: 12px;
  }

  .pdf-editor-toolbar {
    position: sticky;
    order: 3;
    top: auto;
    bottom: 0;
    z-index: 5;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: center;
    gap: 8px;
    max-height: 92px;
    padding: 8px 10px calc(18px + env(safe-area-inset-bottom));
    box-shadow: 0 -14px 34px rgba(20, 34, 32, 0.18);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .pdf-editor-toolbar label {
    min-width: 96px;
    font-size: 0.68rem;
  }

  .pdf-editor-toolbar input[type="range"] {
    width: 92px;
  }

  .pdf-editor-toolbar input[type="color"] {
    width: 44px;
    height: 34px;
  }

  .pdf-editor-toolbar .mini-action {
    min-height: 36px;
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  .pdf-editor-tool-group {
    gap: 5px;
  }
}

@supports not (height: 100dvh) {
  @media (max-width: 720px) {
    .pdf-editor-panel {
      height: 100vh;
      max-height: 100vh;
    }
  }
}

@media (max-width: 720px) {
  .alerts-editor.is-open {
    display: flex;
    align-items: flex-end;
  }

  .alert-editor-backdrop {
    position: fixed;
  }

  .alert-editor-panel {
    position: relative;
    inset: auto;
    width: 100%;
    max-height: min(88dvh, 820px);
    border-top: 1px solid var(--line);
    border-left: 0;
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -22px 54px rgba(18, 31, 29, 0.24);
    padding: 12px 12px max(18px, env(safe-area-inset-bottom));
  }

  .alert-editor-panel::before {
    content: "";
    display: block;
    width: 48px;
    height: 5px;
    margin: 0 auto 10px;
    border-radius: 999px;
    background: rgba(7, 63, 57, 0.22);
  }

  .alert-editor-panel .inventory-alert-form {
    border-radius: 20px;
    padding: 14px;
  }
}
