@import url("/fonts.css");
:root {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: #142d43;
  background: #f3f6fa;
  font-size: 16px;
  --navy: #102e46;
  --blue: #185ef0;
  --line: #dce4ed;
  --muted: #607386;
  --green: #097a64;
  --app-zoom: 1;
  --app-layout-width: 100%;
  --app-viewport-height: 100vh;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: var(--app-viewport-height);
  width: var(--app-layout-width);
  zoom: var(--app-zoom);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  padding: 11px 17px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}
button:hover {
  filter: brightness(0.94);
  transform: translateY(-1px);
}
button:active {
  transform: translateY(0);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
  transform: none;
}
button.secondary {
  background: #edf2f8;
  color: var(--navy);
}
button.danger {
  background: #fff0f0;
  color: #b62633;
}
a {
  color: var(--blue);
}
.shell {
  display: grid;
  grid-template-columns: 235px 1fr;
  min-height: var(--app-viewport-height);
}
.sidebar {
  background: var(--navy);
  color: white;
  padding: 28px 18px;
  position: sticky;
  top: 0;
  height: var(--app-viewport-height);
  display: flex;
  flex-direction: column;
}
.brand {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -1px;
  padding: 0 12px 30px;
}
.brand b {
  color: #62dfbf;
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
.sidebar nav button {
  text-align: left;
  background: transparent;
  color: #bdcbd8;
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 13px;
  transition: all 0.2s ease;
}
.sidebar nav button:hover:not(.active) {
  background: rgba(37, 71, 95, 0.5);
  color: white;
  transform: translateX(2px);
}
.sidebar nav button.active {
  background: #25475f;
  color: white;
}
.sidebar small {
  color: #a6bece;
  display: block;
  line-height: 1.6;
}
.sidebar .foot {
  margin-top: auto;
  padding: 18px 12px 0;
  border-top: 1px solid #355064;
}
.main {
  padding: 0 38px 40px;
  min-width: 0;
}
.mobile-nav,
.mobile-nav-backdrop {
  display: none;
}
.topbar {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.topbar span {
  font-size: 14px;
  color: var(--muted);
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.zoom-controls {
  align-items: center;
  background: #edf2f8;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: inline-flex;
  flex: 0 0 auto;
  overflow: hidden;
}
.zoom-controls button {
  border-radius: 0;
  font-size: 18px;
  line-height: 1;
  min-height: 36px;
  min-width: 38px;
  padding: 7px 10px;
}
.zoom-controls button:disabled {
  cursor: not-allowed;
}
.zoom-controls output {
  color: var(--navy);
  font-size: 12px;
  font-weight: 750;
  min-width: 46px;
  text-align: center;
}
.avatar {
  height: 34px;
  width: 34px;
  background: #dfeafc;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 32px 0 24px;
  gap: 14px;
}
.eyebrow {
  text-transform: uppercase;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin: 0 0 6px;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.8px;
  margin: 0;
}
h2 {
  font-size: 18px;
  margin: 0 0 20px;
}
h3 {
  font-size: 16px;
  margin: 0 0 12px;
}
p {
  line-height: 1.6;
}
.muted {
  color: var(--muted);
  font-size: 14px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.overview-finance {
  margin-bottom: 24px;
}

.overview-finance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.overview-finance-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid #d79500;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(16, 46, 70, 0.06);
  min-width: 0;
  overflow: hidden;
}

.overview-finance-card.is-debt {
  border-top-color: #c93747;
}

.overview-finance-card.is-refund {
  border-top-color: #185ef0;
}

.overview-finance-card > header {
  align-items: flex-start;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 18px;
}

.overview-finance-card h3,
.overview-finance-card p {
  margin: 0;
}

.overview-finance-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin-top: 5px;
}

.overview-finance-count {
  align-items: center;
  background: #fff4d6;
  border-radius: 999px;
  color: #805500;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-height: 30px;
  min-width: 30px;
  padding: 0 9px;
}

.is-debt .overview-finance-count {
  background: #fff0f0;
  color: #a12634;
}

.is-refund .overview-finance-count {
  background: #eaf1ff;
  color: #174fbe;
}

.overview-finance-list {
  padding: 0 18px;
}

.overview-finance-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 15px 0;
}

.overview-finance-row:last-child {
  border-bottom: 0;
}

.overview-finance-row small {
  color: var(--muted);
  display: block;
  line-height: 1.4;
  margin-top: 3px;
}

.overview-finance-action {
  align-items: flex-end;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 7px;
}

.overview-finance-action button {
  font-size: 12px;
  padding: 7px 10px;
}

.is-debt .overview-finance-action > strong {
  color: #b62633;
}

.is-refund .overview-finance-action > strong {
  color: #185ef0;
}

.overview-finance-empty {
  padding: 18px 0;
}

.booking-filter-toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.booking-filter-toolbar > input {
  max-width: 460px;
  width: 100%;
}

.booking-quick-filters {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}

.booking-filter-chip {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  flex: 0 0 auto;
  gap: 9px;
  min-height: 42px;
  padding: 8px 10px 8px 15px;
}

.booking-filter-chip:hover {
  border-color: var(--brand);
}

.booking-filter-chip strong {
  align-items: center;
  background: #edf3f6;
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  justify-content: center;
  min-height: 25px;
  min-width: 25px;
  padding: 0 7px;
}

.booking-filter-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(9, 99, 91, 0.2);
}

.booking-filter-chip.active strong {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

@media (max-width: 1100px) {
  .overview-finance-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .overview-finance-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-finance-action {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }
}
.stat,
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 23px;
  box-shadow: 0 4px 12px rgba(20, 45, 67, 0.03);
}
.stat strong {
  display: block;
  font-size: 32px;
  margin: 13px 0 5px;
  letter-spacing: -1px;
}
.stat span {
  color: var(--muted);
  font-size: 14px;
}
.panel {
  margin-bottom: 22px;
}
.panelhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}
.panelhead h2 {
  margin: 0;
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.tablewrap {
  box-sizing: border-box;
  contain: inline-size;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

@media (max-width: 700px) {
  .main,
  #page,
  .panel,
  .tablewrap {
    min-width: 0;
    max-width: 100%;
  }

  #resourceTable table {
    min-width: 620px;
  }

  #resourceTable {
    box-sizing: border-box;
    overflow: hidden;
    width: 100%;
  }
}
th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 13px 12px;
  background: #f7f9fc;
}
td {
  padding: 17px 12px;
  border-bottom: 1px solid #edf1f5;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
td strong {
  display: block;
  margin-bottom: 4px;
}
td small {
  color: var(--muted);
}
td button {
  padding: 7px 11px;
}
.badge {
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  padding: 5px 8px;
  background: #eaf1fd;
  color: #275bb5;
  white-space: nowrap;
}
.badge.confirmed,
.badge.available {
  background: #e0f5ec;
  color: #096c50;
}
.badge.pending_payment {
  background: #fff4d7;
  color: #8a640c;
}
.badge.cancelled,
.badge.damaged {
  background: #ffe9ed;
  color: #ac3447;
}
.badge.completed {
  background: #e0f5ec;
  color: #096c50;
}


.badge.service {
  background: #fff2df;
  color: #925f1a;
}
.payment-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.payment-paid {
  background: #e0f5ec;
  color: #096c50;
}
.payment-partially_paid {
  background: #fff4d7;
  color: #8a640c;
}
.payment-unpaid {
  background: #ffe9ed;
  color: #ac3447;
}
.payment-refund_due {
  background: #eee8ff;
  color: #6536a5;
}
.booking-mobile-payment {
  display: none;
}
@media (max-width: 700px) {
  .booking-mobile-payment {
    display: block;
    margin-top: 8px;
  }
  .booking-mobile-payment small {
    margin-top: 4px;
  }
  .booking-payment-column {
    display: none;
  }
}
.empty {
  text-align: center;
  padding: 42px 20px;
  color: var(--muted);
}
.empty h3 {
  color: var(--navy);
  font-size: 19px;
}
.notice {
  padding: 13px 17px;
  background: #e8f0ff;
  color: #234f8e;
  border-radius: 9px;
  margin-top: 18px;
  font-size: 14px;
}
.notice.warn {
  background: #fff1d8;
  color: #785314;
}
.resource-icon {
  width: 42px;
  height: 42px;
  background: #eff4fb;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 22px;
}
.resource-name {
  display: flex;
  align-items: center;
  gap: 14px;
}
input,
select,
textarea {
  border: 1px solid #ccd7e2;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--navy);
  width: 100%;
  min-width: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(24, 94, 240, 0.15);
}
textarea {
  min-height: 90px;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
label {
  display: grid;
  gap: 7px;
  font-size: 14px;
  color: #40596e;
  margin-bottom: 16px;
}
.search {
  max-width: 280px;
}
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filters select {
  width: auto;
  min-width: 150px;
}
.filters input {
  width: auto;
}
.dialog {
  border: 0;
  border-radius: 15px;
  padding: 0;
  width: min(760px, 94vw);
  max-height: 90vh;
  box-shadow: 0 25px 90px #06283a44;
}
.dialog::backdrop {
  background: #08233988;
}
.dialog header {
  padding: 23px 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
}
.dialog header h2 {
  margin: 0;
}
.dialog .content {
  padding: 25px 28px;
}
.dialog footer {
  border-top: 1px solid var(--line);
  padding: 17px 28px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fafc;
}
.dialog h3 {
  margin-top: 15px;
}
.close {
  background: transparent;
  color: var(--navy);
  padding: 5px 10px;
  font-size: 23px;
}
.fieldrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.full {
  grid-column: 1/-1;
}
.line-picker {
  max-height: 230px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 12px 0;
}
.pick {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.pick:last-child {
  border: 0;
}
.pick .name {
  flex: 1;
}
.pick input[type="number"] {
  width: 70px;
}
.multi-resource-picker {
  border: 1px solid var(--line);
  border-radius: 9px;
  margin: 12px 0;
  padding: 10px;
}
.multi-resource-picker legend {
  color: var(--navy);
  font-weight: 700;
  padding: 0 6px;
}
.multi-resource-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.multi-resource-actions button {
  padding: 7px 11px;
}
.multi-resource-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.multi-resource-list .pick small {
  display: block;
}
.total {
  background: #eef5fc;
  border-radius: 9px;
  padding: 17px;
  margin: 17px 0;
}
.total strong {
  font-size: 23px;
}
.totals-row {
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.error {
  color: #a6243b;
  background: #ffedf0;
  padding: 12px;
  border-radius: 8px;
  margin: 15px 0;
}
.error:empty {
  display: none;
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: var(--navy);
  color: white;
  border-radius: 10px;
  padding: 16px 22px;
  z-index: 20;
  max-width: 400px;
  box-shadow: 0 10px 30px #102e4633;
}
#toast:empty {
  display: none;
}
.calendar td {
  padding: 6px;
  min-width: 76px;
  height: 58px;
  text-align: center;
  border-left: 1px solid #edf1f4;
}
.calendar .resource {
  min-width: 170px;
  position: sticky;
  left: 0;
  background: white;
}
.calendar-events {
  display: grid;
  gap: 4px;
}
.calendar-event {
  border: 1px solid;
  border-radius: 8px;
  min-height: 50px;
  padding: 5px;
  text-align: center;
  width: 100%;
}
.calendar-event.reserved {
  background: #fff2d8;
  border-color: #efd18b;
  color: #75520b;
}
.calendar-event.hired {
  background: #dfeafe;
  border-color: #b9d0f2;
  color: #174f9a;
}
.calendar-event span {
  display: block;
  font-size: 11px;
  font-weight: 800;
}
.calendar-event small,
.calendar th small {
  display: block;
  font-size: 10px;
  font-weight: 600;
}
.calendar-event i {
  display: flex;
  gap: 3px;
  justify-content: center;
  margin-top: 3px;
}
.event-marker,
.legend-marker {
  align-items: center;
  background: #1d7657;
  border-radius: 50%;
  color: white;
  display: inline-flex;
  font-size: 9px;
  font-style: normal;
  height: 17px;
  justify-content: center;
  width: 17px;
}
.event-marker.return,
.legend-marker.return { background: #b35135; }
.calendar .today {
  background: #fff8e8;
}
.calendar .closed {
  background: #f3f4f5;
}
.calendar th em {
  color: #8c4b41;
  display: block;
  font-size: 9px;
  font-style: normal;
  margin-top: 2px;
  text-transform: uppercase;
}
.calendar-closed {
  color: #8a5550;
  display: block;
  font-size: 10px;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.calendar th strong {
  display: block;
  font-size: 17px;
  margin-top: 2px;
}
.calendar-free {
  color: #2c7a58;
  font-size: 12px;
  font-weight: 700;
}
.calendar-toolbar {
  align-items: center;
  background: linear-gradient(135deg, #12364b, #194b5c);
  border-radius: 12px;
  color: white;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 18px 20px;
}
.calendar-toolbar p {
  color: #c9dce3;
  margin: 4px 0 0;
}
.calendar-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.calendar-controls input {
  width: auto;
}
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 12px 2px 16px;
  color: var(--muted);
  font-size: 13px;
}
.calendar-legend span {
  align-items: center;
  display: flex;
  gap: 6px;
}
.calendar-legend i {
  border-radius: 50%;
  display: inline-block;
  height: 10px;
  width: 10px;
}
.legend-free { background: #2c9a69; }
.legend-reserved { background: #d9a735; }
.legend-hired { background: #4b82cc; }
.legend-closed { background: #9da5aa; }
.legend-today { background: #e6b94f; }
.calendar-panel {
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.form-intro {
  background: #eef5f7;
  border-left: 4px solid #1d7181;
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 14px 16px;
}
.form-intro p {
  color: var(--muted);
  margin: 5px 0 0;
}
.customer-cell { align-items:center; display:flex; gap:10px; }
.customer-report-tools { align-items:end; background:linear-gradient(135deg,#112d42,#174765); border-radius:12px; color:#fff; display:grid; gap:12px; grid-template-columns:minmax(240px,1fr) 150px 150px auto auto; margin-bottom:16px; padding:18px; }
.customer-report-tools strong { font-size:16px; }
.customer-report-tools p { color:#d7e5ec; font-size:12px; margin:4px 0 0; }
.customer-report-tools label { color:#d7e5ec; font-size:11px; font-weight:700; margin:0; text-transform:uppercase; }
.customer-report-tools input { background:#fff; color:#1f2937; margin-top:5px; }
.customer-report-tools button { white-space:nowrap; }
.report-section-picker { display:grid; gap:9px; margin:14px 0; }
.report-section-picker label { align-items:center; background:#f4f7f9; border:1px solid var(--line); border-radius:9px; display:flex; gap:10px; margin:0; padding:12px; }
.report-section-picker input { width:auto; }
@media(max-width:900px){.customer-report-tools{grid-template-columns:1fr 1fr}.customer-report-tools>div{grid-column:1/-1}.customer-report-tools button{width:100%}}
@media(max-width:600px){.customer-report-tools{grid-template-columns:1fr}.customer-report-tools>div{grid-column:auto}}
.customer-row { cursor:pointer; transition:background .15s ease, box-shadow .15s ease; }
.customer-row:hover,.customer-row:focus-visible { background:#f2f8fa; box-shadow:inset 4px 0 0 var(--blue); outline:none; }
.customer-cell > img,.customer-cell > span {
  border-radius:50%; height:40px; object-fit:cover; width:40px;
}
.customer-cell > span { background:#dce9ed; display:grid; font-weight:800; place-items:center; }
.customer-cell small { color:var(--muted); display:block; font-size:11px; margin-top:3px; }
.customer-blacklisted { background:#fff5f4; }
.customer-photo-input { background:#f4f7f9; border:1px dashed #9fb2bf; border-radius:10px; padding:14px; }
.customer-photo-input input { margin-top:8px; }
.customer-preferences { display:flex; flex-wrap:wrap; gap:10px; margin:15px 0; }
.customer-preferences label { align-items:center; background:#f2f6f8; border-radius:8px; display:flex; gap:7px; margin:0; padding:10px; }
.customer-preferences input { width:auto; }
.customer-preferences .blacklist-option { background:#fff0ef; color:#a62e26; }
.customer-profile-head { align-items:center; display:flex; gap:14px; margin-bottom:18px; }
.customer-profile-head > img,.customer-profile-head > span { border-radius:50%; height:62px; object-fit:cover; width:62px; }
.customer-profile-head > span { background:#dce9ed; display:grid; font-size:24px; font-weight:800; place-items:center; }
.customer-profile-head div { flex:1; }
.customer-profile-head p { margin:4px 0; }
.customer-profile-head .button { background:var(--blue); border-radius:8px; color:white; padding:10px 13px; text-decoration:none; }
.customer-metrics { display:grid; gap:8px; grid-template-columns:repeat(4,1fr); margin-bottom:18px; }
.customer-metrics div { background:#f1f6f8; border-radius:9px; padding:12px; }
.customer-metrics span,.customer-metrics strong { display:block; }
.customer-metrics span { color:var(--muted); font-size:11px; }
.customer-metrics strong { font-size:18px; margin-top:4px; }
.danger-text { color:#b62633; }
.customer-history { border-top:1px solid var(--line); margin-top:22px; padding-top:18px; }
.customer-history article { display:grid; gap:10px; grid-template-columns:1fr auto; padding:13px 0; border-bottom:1px solid var(--line); }
.customer-history article small { color:var(--muted); display:block; margin-top:5px; }
.customer-history article p { grid-column:1/-1; margin:0; background:#f6f8fa; padding:9px; }
.customer-history-invoices { display:flex; flex-wrap:wrap; gap:7px; margin-top:9px; }
.customer-history-invoices .button { align-items:center; display:inline-flex; font-size:12px; gap:5px; padding:7px 9px; text-decoration:none; }
.customer-id-pictures { border-top:1px solid var(--line); margin-top:22px; padding-top:18px; }
.customer-id-pictures h3 { margin:0; }
.customer-id-gallery { display:grid; gap:10px; grid-template-columns:repeat(5,minmax(0,1fr)); margin:14px 0; }
.customer-id-gallery article { background:#f5f8fa; border:1px solid var(--line); border-radius:9px; display:grid; gap:7px; min-width:0; padding:8px; }
.customer-id-gallery img { aspect-ratio:4/3; border-radius:6px; object-fit:cover; width:100%; }
.customer-id-gallery small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.customer-id-gallery button { padding:7px; width:100%; }
.customer-id-upload { background:#f8fafc; border-radius:9px; margin-top:12px; padding:14px; }
@media(max-width:700px){.customer-id-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.customer-metrics{grid-template-columns:1fr 1fr}.customer-profile-head{align-items:flex-start;flex-wrap:wrap}.customer-history article{grid-template-columns:1fr}}
@media (max-width: 760px) {
  .calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }
  .calendar-controls input {
    flex: 1;
    min-width: 140px;
  }
}
.gallery {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.gallery img {
  width: 90px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
}
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
}
.auth-story {
  background: var(--navy);
  padding: 64px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-story .brand {
  padding: 0;
}
.auth-story h1 {
  font-size: 48px;
  line-height: 1.12;
  margin: 50px 0 20px;
  max-width: 500px;
}
.auth-story p {
  color: #b6cbdc;
  max-width: 440px;
  font-size: 18px;
}
.auth-form {
  max-width: 440px;
  width: 100%;
  padding: 40px 25px;
  margin: auto;
}
.auth-form h2 {
  font-size: 28px;
}
.auth-form button.primary {
  width: 100%;
  margin-top: 10px;
}
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 27px;
}
.auth-tabs button {
  flex: 1;
}
.auth-form .muted {
  margin-bottom: 25px;
}
.auth-tags {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}
.auth-tags span {
  border: 1px solid #4b657b;
  padding: 10px 14px;
  border-radius: 8px;
}
.plan {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  background: var(--surface);
}
.plan.selected {
  border: 2px solid var(--blue);
}
.subscription-intro {
  margin: 34px auto 24px;
  max-width: 720px;
  text-align: center;
}
.subscription-intro h2 { font-size: clamp(25px, 3vw, 38px); margin: 5px 0 10px; }
.subscription-intro p:last-child { color: var(--muted); }
.subscription-plans { align-items: stretch; }
.plan.popular { border: 2px solid var(--blue); box-shadow: 0 12px 30px rgba(17, 86, 166, .12); }
.plan-badge {
  background: var(--blue); border-radius: 999px; color: white; font-size: 12px;
  font-weight: 800; padding: 6px 11px; position: absolute; right: 18px; top: 18px;
}
.plan-tagline { color: var(--muted); min-height: 44px; }
.plan-price { align-items: baseline; display: flex; gap: 6px; margin: 22px 0 2px; }
.plan-price strong { font-size: 42px; letter-spacing: -1px; }
.plan-price span, .plan-annual { color: var(--muted); }
.plan-annual { font-size: 13px; min-height: 40px; }
.plan-features { display: grid; gap: 11px; list-style: none; margin: 22px 0; padding: 0; }
.plan-features li { line-height: 1.35; padding-left: 24px; position: relative; }
.plan-features li::before { color: var(--green); content: "✓"; font-weight: 900; left: 0; position: absolute; }
.plan-actions { display: grid; gap: 9px; margin-top: auto; }
.subscription-plans .plan { display: flex; flex-direction: column; }
code {
  word-break: break-all;
  font-size: 13px;
}
.subnav {
  margin-bottom: 20px;
}
.form-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
@media (max-width: 1100px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .grid3 {
    grid-template-columns: 1fr;
  }
  .main {
    padding: 0 22px 30px;
  }
  .shell {
    grid-template-columns: 200px 1fr;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    bottom: 0;
    box-shadow: 18px 0 45px #07172455;
    height: var(--app-viewport-height);
    left: 0;
    max-width: 310px;
    overflow-y: auto;
    padding: 22px 16px 100px;
    position: fixed;
    top: 0;
    transform: translateX(-105%);
    transition: transform .2s ease;
    width: 86vw;
    z-index: 110;
  }
  .sidebar .brand {
    padding: 0 0 15px;
    font-size: 22px;
  }
  .sidebar nav {
    display: grid;
    gap: 5px;
  }
  .sidebar nav button {
    padding: 13px;
  }
  .sidebar .foot {
    display: none;
  }
  .main {
    padding: 0 16px calc(92px + env(safe-area-inset-bottom));
  }
  .mobile-nav {
    align-items: stretch;
    background: #fff;
    border-top: 1px solid var(--line);
    bottom: 0;
    box-shadow: 0 -8px 24px #102b3d18;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    left: 0;
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    z-index: 100;
  }
  .mobile-nav button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: #64748b;
    display: flex;
    flex-direction: column;
    font: inherit;
    gap: 3px;
    justify-content: center;
    min-height: 52px;
    padding: 5px 2px;
  }
  .mobile-nav button.active {
    background: #e9f3f5;
    color: var(--navy);
  }
  .mobile-nav small {
    font-size: 10px;
    font-weight: 800;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-nav-backdrop {
    background: #07172488;
    border: 0;
    bottom: 0;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 105;
  }
  .mobile-menu-open .sidebar {
    transform: translateX(0);
  }
  .mobile-menu-open .mobile-nav-backdrop {
    display: block;
  }
  .topbar {
    height: 65px;
  }
  .topbar > span {
    display: none;
  }
  .pagehead {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 24px;
  }

  .pagehead > button {
    width: 100%;
  }
  h1 {
    font-size: 26px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .stat strong {
    font-size: 27px;
  }
  .grid2,
  .fieldrow {
    grid-template-columns: 1fr;
  }
  .auth-page {
    display: block;
  }
  .auth-story {
    padding: 25px;
  }
  .auth-story h1 {
    font-size: 29px;
    margin: 20px 0 10px;
  }
  .auth-story p,
  .auth-tags {
    display: none;
  }
  .dialog .content {
    padding: 20px;
  }
  .grid3 {
    grid-template-columns: 1fr;
  }
  .account {
    font-size: 14px;
    gap: 6px;
    margin-left: auto;
  }
  .zoom-controls button {
    min-height: 34px;
    min-width: 34px;
    padding: 6px 8px;
  }
  .zoom-controls output {
    min-width: 42px;
  }
  .account .avatar {
    display: none;
  }
  .account > strong {
    max-width: 95px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #logout {
    padding: 9px 10px;
  }
}
.price-option-editor {
  border: 1px solid #ced9e3;
  border-radius: 8px;
  padding: 18px;
  margin: 0 0 18px;
}
.price-option-editor legend {
  font-weight: 650;
  padding: 0 8px;
}
.price-option-editor input,
.price-option-editor select {
  min-width: 0;
}
.resource-billing {
  color: #173b4c;
}
.billing-header {
  align-items: flex-start;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}
.billing-heading {
  max-width: 620px;
}
.billing-heading > span {
  color: #d9652c;
  display: block;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .13em;
  margin-bottom: 4px;
}
.billing-heading h3 {
  font-size: 21px;
  margin: 0 0 5px;
}
.billing-heading p {
  color: #62767e;
  line-height: 1.5;
  margin: 0;
}
.resource-billing .billing-size {
  background: #f2f6f6;
  border: 1px solid #d7e2e3;
  border-radius: 10px;
  flex: 0 0 210px;
  margin: 0;
  padding: 12px;
}
.resource-billing label > span {
  display: block;
  margin-bottom: 6px;
}
.resource-billing label small,
.billing-grid label small {
  color: #7b8c92;
  display: block;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
  margin-top: 5px;
}
.billing-guide {
  background: #f7f9f9;
  border: 1px solid #dbe5e7;
  border-radius: 11px;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 0;
  overflow: hidden;
}
.billing-guide > div {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
  padding: 13px 15px;
}
.billing-guide > div + div {
  border-left: 1px solid #dbe5e7;
}
.billing-guide b {
  align-items: center;
  background: #dcebec;
  border-radius: 50%;
  color: #173f4e;
  display: flex;
  flex: 0 0 27px;
  font-size: 11px;
  height: 27px;
  justify-content: center;
}
.billing-guide span,
.billing-guide small {
  display: block;
}
.billing-guide strong {
  font-size: 12px;
}
.billing-guide small {
  color: #73868d;
  font-size: 10px;
  margin-top: 2px;
}
.billing-rows {
  display: grid;
  gap: 12px;
}
.billing-row {
  background: #fbfcfc;
  border: 1px solid #d3dfe2;
  border-radius: 12px;
  margin: 0;
  padding: 16px;
}
.billing-row:focus-within {
  border-color: #7caaaf;
  box-shadow: 0 0 0 3px rgba(44, 116, 123, .09);
}
.billing-row legend {
  align-items: baseline;
  display: flex;
  gap: 9px;
  padding: 0 7px;
}
.billing-row legend span {
  color: #173f4e;
  font-size: 13px;
  font-weight: 800;
}
.billing-row legend small {
  color: #7a8b91;
  font-size: 10px;
}
.billing-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: .72fr 1.55fr 1.15fr .9fr;
}
.billing-row-summary {
  align-items: center;
  background: #edf5f3;
  border-radius: 8px;
  display: flex;
  gap: 9px;
  margin-top: 13px;
  padding: 10px 12px;
}
.billing-row-summary span {
  color: #62787b;
  font-size: 11px;
  font-weight: 700;
}
.billing-resolved {
  color: #17655f;
  font-size: 14px;
  margin-left: auto;
}
.billing-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 10px;
}
.billing-adjust {
  flex: 1;
}
.billing-adjust summary,
.billing-help summary {
  color: #315a62;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  padding: 5px 0;
}
.billing-adjust-fields {
  align-items: end;
  background: #f0f4f5;
  border-radius: 9px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1.25fr auto;
  margin-top: 7px;
  padding: 11px;
}
.billing-adjust-fields label {
  margin: 0;
}
.billing-remove {
  color: #9b3f35;
  white-space: nowrap;
}
.billing-footer {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: auto 1fr;
  margin-top: 14px;
}
.billing-footer > button {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  justify-content: center;
}
.billing-total {
  align-items: center;
  background: #173f4e;
  border-radius: 10px;
  color: white;
  display: grid;
  grid-template-columns: 1fr auto;
  margin: 0;
  padding: 10px 14px;
}
.billing-total span {
  color: #c9dcdf;
  font-size: 11px;
  font-weight: 700;
}
.billing-total strong {
  color: white;
  font-size: 17px;
}
.billing-total small {
  color: #aec4c8;
  font-size: 9px;
  grid-column: 1 / -1;
  margin-top: 2px;
}
.billing-help {
  border-top: 1px solid #dde6e8;
  margin-top: 14px;
  padding-top: 8px;
}
.billing-help p {
  color: #657980;
  font-size: 11px;
  line-height: 1.55;
  margin: 5px 0 0;
}
.import-guidance {
  background: #f3f7f7;
  border: 1px solid #d7e3e4;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 0;
  padding: 14px;
}
.import-guidance p {
  color: #60767d;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}
.import-guidance b {
  color: #173f4e;
}
.featured-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 10px 0 24px;
}
.featured-choice {
  position: relative;
  margin: 0;
}
.featured-choice > input {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  width: 20px;
  height: 20px;
}
.featured-choice > span {
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto auto;
  gap: 1px 10px;
  align-items: center;
  min-height: 74px;
  padding: 10px 10px 10px 40px;
  border: 1px solid #ccd9e7;
  border-radius: 9px;
  background: #fff;
}
.featured-choice input:checked + span {
  border-color: #2964d7;
  background: #eef4ff;
  box-shadow: inset 0 0 0 1px #2964d7;
}
.featured-choice img,
.featured-placeholder {
  grid-row: 1 / 3;
  width: 52px;
  height: 52px;
  border-radius: 7px;
  object-fit: contain;
  background: #edf2f7;
}
.featured-placeholder {
  display: grid;
  place-items: center;
}
.featured-choice strong,
.featured-choice small {
  grid-column: 2;
}

/* Clear, professional resource editor */
.dialog:has(.resource-editor-form) {
  background: #f2f5f6;
  max-width: 1060px;
  width: min(1060px, 96vw);
}
.dialog:has(.resource-editor-form) > header {
  background: #12384a;
  border: 0;
  color: white;
}
.dialog:has(.resource-editor-form) > header h2 { color: white; }
.dialog:has(.resource-editor-form) > header .close {
  background: rgba(255,255,255,.12);
  color: white;
}
.dialog:has(.resource-editor-form) .content {
  padding: 0 24px 24px;
}
.resource-editor-intro {
  align-items: center;
  background: linear-gradient(135deg, #12384a, #1a5660);
  color: white;
  display: flex;
  gap: 15px;
  margin: 0 -24px 20px;
  padding: 23px 24px;
}
.resource-editor-mark {
  align-items: center;
  background: #e87538;
  border-radius: 10px;
  display: flex;
  flex: 0 0 44px;
  font-size: 22px;
  height: 44px;
  justify-content: center;
}
.resource-editor-intro span {
  color: #f1b37d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}
.resource-editor-intro h2 {
  color: white;
  font-size: 22px;
  margin: 2px 0;
}
.resource-editor-intro p {
  color: #c9dce1;
  margin: 0;
}
.resource-editor-section {
  background: white;
  border: 1px solid #d9e3e6;
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(18,56,74,.045);
  margin-bottom: 14px;
  padding: 20px;
}
.resource-editor-section > header {
  align-items: center;
  background: transparent !important;
  border: 0 !important;
  display: flex;
  gap: 11px;
  margin-bottom: 18px;
  padding: 0 !important;
  position: static !important;
}
.resource-editor-section > header b {
  align-items: center;
  background: #173f4e;
  border-radius: 8px;
  color: white;
  display: flex;
  font-size: 12px;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.resource-editor-section > header h3 {
  color: #173b4c;
  font-size: 17px;
  margin: 0;
}
.resource-editor-section > header p {
  color: #708087;
  font-size: 12px;
  margin: 2px 0 0;
}
.resource-editor-basics > .fieldrow {
  gap: 13px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.resource-editor-form label {
  color: #385461;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 13px;
}
.resource-editor-form input,
.resource-editor-form select,
.resource-editor-form textarea,
.resource-editor-form .rich-editor {
  border-color: #ccdadd;
  border-radius: 9px;
  font-weight: 400;
}
.resource-editor-form input[readonly] {
  background: #edf1f2;
  color: #66777d;
}
.resource-editor-form .rich-toolbar {
  background: #eef3f4;
  border: 1px solid #d3dfe2;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  padding: 7px;
}
.resource-editor-form .rich-editor {
  border-radius: 0 0 9px 9px;
  min-height: 130px;
}
.resource-editor-media input[type="file"] {
  background: #f7f9f9;
  border: 1px dashed #9eb2b8;
  padding: 16px;
}
.resource-editor-media .gallery {
  background: #f4f7f7;
  border-radius: 10px;
  margin-bottom: 15px;
  padding: 10px;
}
.resource-editor-media > .actions {
  border-top: 1px solid #dbe4e6;
  margin-top: 18px;
  padding-top: 16px;
}
.resource-editor-media > .actions .danger { margin-left: auto; }
.resource-editor-form > footer {
  bottom: 0;
  box-shadow: 0 -8px 24px rgba(18,56,74,.08);
  margin: 18px -24px 0;
  position: sticky;
  z-index: 4;
}
.resource-editor-form > footer button {
  background: #e87538;
  min-width: 190px;
  padding: 12px 18px;
}
@media (max-width: 800px) {
  .resource-editor-basics > .fieldrow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .billing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .dialog:has(.resource-editor-form) .content { padding: 0 12px 18px; }
  .resource-editor-intro {
    margin-left: -12px;
    margin-right: -12px;
    padding: 18px 14px;
  }
  .resource-editor-basics > .fieldrow { grid-template-columns: 1fr; }
  .billing-header { display: block; }
  .resource-billing .billing-size { margin-top: 14px; }
  .billing-guide { grid-template-columns: 1fr; }
  .billing-guide > div + div {
    border-left: 0;
    border-top: 1px solid #dbe5e7;
  }
  .billing-grid,
  .billing-footer { grid-template-columns: 1fr; }
  .import-guidance { grid-template-columns: 1fr; }
  .billing-adjust-fields { grid-template-columns: 1fr; }
  .billing-actions { align-items: flex-end; }
  .resource-editor-section { padding: 15px; }
  .resource-editor-form > footer {
    margin-left: -12px;
    margin-right: -12px;
    padding: 12px;
  }
}

.delivery-settings-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.strategy-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  background: white;
  transition: all 0.2s ease;
  margin: 0;
}
.radio-card:has(input:checked) {
  border-color: var(--blue);
  background: #f0f5ff;
}
.radio-card input {
  margin-top: 4px;
  width: auto;
}
.radio-card strong {
  display: block;
  font-size: 15px;
  color: var(--navy);
  margin-bottom: 4px;
}
.radio-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.strategy-section {
  display: none;
}
.strategy-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.zone-row, .option-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  background: #f8fafc;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.zone-row > label, .option-row > label {
  margin: 0;
  flex: 1;
  min-width: 150px;
}
.zone-row button, .option-row button {
  margin-bottom: 4px;
}
.delivery-calc-preview {
  margin-top: 15px;
}

/* Booking Dialog Specific Styling */
.dialog:has(.booking-dialog-header) {
  max-width: 1040px;
  width: min(1040px, calc(100vw - 32px));
}
.email-status {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 9px;
  margin-bottom: 24px;
}
.email-status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}
.email-pending .email-status-indicator { background: #f59e0b; }
.email-sending .email-status-indicator { background: #3b82f6; }
.email-sent .email-status-indicator { background: #10b981; }
.email-failed .email-status-indicator { background: #ef4444; }

.email-status > div { display: flex; flex-direction: column; gap: 2px; }
.email-status strong { font-size: 14px; color: var(--navy); }
.email-status small { font-size: 12px; color: var(--muted); }
.email-error { color: #ef4444; font-size: 12px; margin-top: 4px; font-weight: 600; }

.booking-dialog-header {
  align-items: flex-start;
}
.booking-dialog-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.booking-location {
  text-align: right;
  background: #f1f5f9;
  padding: 6px 10px;
  border-radius: 6px;
}
.booking-location small { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.booking-location strong { font-size: 13px; color: var(--navy); }

.booking-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.info-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 9px;
}
.info-card small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.info-card strong { font-size: 14px; color: var(--navy); }
.info-card.notice {
  background: #fff8f1;
  border-color: #fce7d2;
}

.financials {
  padding: 20px;
  border: 2px solid transparent;
}
.finance-owes {
  background: #fef2f2;
  border-color: #fecaca;
}
.finance-owes .balance-row strong {
  color: #b91c1c;
  font-size: 26px;
}
.finance-refund {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.finance-refund .refund-row strong {
  color: #1d4ed8;
  font-size: 26px;
}
.finance-settled {
  background: #f8fafc;
  border-color: var(--line);
}

.booking-history {
  margin-top: 32px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.booking-history summary {
  padding: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.booking-history summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  margin-left: auto;
  margin-right: 12px;
}
.booking-history summary::-webkit-details-marker {
  display: none;
}
.booking-history summary::after {
  content: "›";
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 20px;
  color: var(--muted);
}
.booking-history[open] summary::after {
  transform: rotate(90deg);
}

.history-list {
  border-top: 1px solid var(--line);
  padding: 0 16px;
  max-height: 300px;
  overflow-y: auto;
}
.history-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.history-item:last-child {
  border-bottom: none;
}
.history-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.history-action {
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
}
.history-details {
  font-size: 13px;
  color: #475569;
  background: #f1f5f9;
  padding: 8px;
  border-radius: 6px;
  margin-top: 8px;
  font-family: monospace;
  white-space: pre-wrap;
  word-break: break-all;
}
.history-empty {
  border-top: 1px solid var(--line);
  color: var(--muted);
  margin: 0;
  padding: 16px;
}

.booking-major-actions {
  background: #f8fafc;
  padding: 16px;
  border-radius: 9px;
  border: 1px solid var(--line);
  margin: 24px 0;
}
@media (max-width: 640px) {
  .dialog:has(.booking-dialog-header) {
    width: calc(100vw - 16px);
  }
  .booking-dialog-header {
    gap: 14px;
  }
  .booking-dialog-badges {
    align-items: flex-start;
  }
  .financials {
    padding: 16px;
  }
  .finance-owes .balance-row strong,
  .finance-refund .refund-row strong {
    font-size: 22px;
  }
  .booking-major-actions button {
    flex: 1 1 100%;
  }
}

/* --- NEW SETTINGS CSS --- */
.settings-overview {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
}
.grid4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1000px) {
  .grid4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid4 { grid-template-columns: 1fr; }
}

.settings-status-card {
  padding: 18px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(16, 46, 70, 0.03);
}
.settings-status-card .status-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.settings-status-card strong {
  font-size: 15px;
  color: var(--navy);
}
.settings-status-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.settings-status-card.needs-attention {
  background: #fffbeb;
  border-color: #f3d48b;
}

.settings-status-card.needs-attention .status-head > strong {
  color: #7c4a03;
}

.settings-status-card.is-complete {
  border-color: #c8e8dd;
}

.settings-layout {
  display: flex;
  flex-direction: column;
  gap: 36px;
  max-width: 860px;
}
.settings-category-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 14px 4px;
}
.settings-category-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-dropdown {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.settings-dropdown:hover {
  border-color: #cbd5e1;
}
.settings-dropdown[open] {
  border-color: #cbd5e1;
  box-shadow: 0 4px 24px rgba(16, 46, 70, 0.05);
}
.settings-dropdown summary {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
}
.settings-dropdown summary::-webkit-details-marker { display: none; }
.settings-summary-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.settings-summary-text strong {
  font-size: 16px;
  color: var(--navy);
}
.settings-summary-text p {
  margin: 0;
  font-size: 13px;
}
.settings-state {
  background: #f1f5f9;
  color: #475569;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  white-space: nowrap;
}
.settings-dropdown.is-complete .settings-state {
  background: #f0fdf4;
  color: #0f766e;
}
.settings-arrow {
  color: #94a3b8;
  font-size: 20px;
  font-family: monospace;
  transition: transform 0.2s ease;
  width: 16px;
  text-align: center;
}
.settings-dropdown[open] .settings-arrow {
  transform: rotate(90deg);
}
.settings-dropdown-body {
  border-top: 1px solid var(--line);
  padding: 24px;
  background: #fafcff;
}

.settings-list-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.settings-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.settings-list-item strong {
  display: block;
  margin-bottom: 4px;
}
.settings-list-item p {
  margin: 0;
}

.danger-zone-content {
  background: #fffafa;
  border: 1px solid #fecdd3;
  padding: 24px;
  border-radius: 8px;
}

.website-editor-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 850px) {
  .website-editor-layout {
    grid-template-columns: 1fr;
  }

  .website-editor-nav {
    position: static;
    top: auto;
    flex-direction: row;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .website-editor-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}
.website-editor-nav {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.website-editor-nav a {
  padding: 10px 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s;
}
.website-editor-nav a:hover {
  background: #f1f5f9;
  color: var(--navy);
}
.website-editor-nav a.active {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(16, 46, 70, 0.05);
  border: 1px solid var(--line);
}
.website-section-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: 0 4px 12px rgba(20, 45, 67, 0.02);
}
.website-section-card h3 {
  font-size: 19px;
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.website-section-card h4 {
  font-size: 16px;
  margin: 24px 0 12px;
  color: var(--navy);
}

@media (max-width: 850px) {
  .website-editor-nav {
    position: static;
    top: auto;
    flex-direction: row;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .website-editor-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 700px) {
  #resourceTable {
    overflow: hidden;
  }

  #resourceTable .tablewrap {
    contain: none;
    overflow: visible;
  }

  #resourceTable table,
  #resourceTable tbody,
  #resourceTable tr,
  #resourceTable td {
    box-sizing: border-box;
    display: block;
    min-width: 0;
    width: 100%;
  }

  #resourceTable table {
    min-width: 0;
  }

  #resourceTable thead {
    display: none;
  }

  #resourceTable tbody {
    display: grid;
    gap: 12px;
  }

  #resourceTable tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
  }

  #resourceTable td {
    align-items: center;
    border: 0;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 0;
  }

  #resourceTable td::before {
    color: var(--muted);
    content: "";
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  #resourceTable td:nth-child(2)::before {
    content: "Type";
  }

  #resourceTable td:nth-child(3)::before {
    content: "Rate";
  }

  #resourceTable td:nth-child(4)::before {
    content: "Stock";
  }

  #resourceTable td:nth-child(5)::before {
    content: "Status";
  }

  #resourceTable td:first-child,
  #resourceTable td:last-child {
    display: block;
  }

  #resourceTable td:first-child {
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
  }

  #resourceTable td:last-child {
    padding-top: 12px;
  }

  #resourceTable td:last-child .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #resourceTable td:last-child button {
    width: 100%;
  }
}

details.settings-dropdown > summary > span {
  display: inline-block;
}
/* --- END NEW SETTINGS CSS --- */

/* --- Resources Redesign --- */

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

@media (max-width: 760px) {
  .resources-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .resources-actions button {
    width: 100%;
  }
  .resources-actions .maintenance-btn {
    grid-column: 1 / -1;
  }
  .resources-actions button:last-child {
    grid-column: 1 / -1;
  }
}

.maintenance-btn {
  background: #d97706; /* Tool-hire industrial amber */
  color: white;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
  font-weight: 700;
  transition: all 0.2s;
}

.maintenance-btn:hover {
  background: #b45309;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.resources-toolbar {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.resources-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 360px;
}

.search-wrapper svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.search-wrapper input.search {
  width: 100%;
  max-width: 100%;
  padding-left: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}

.search-wrapper input.search:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(24, 94, 240, 0.15);
}

.type-filter {
  flex: 0 0 220px;
  min-width: 160px;
  width: 220px;
  background-color: #f8fafc;
  font-weight: 500;
  border-color: #cbd5e1;
}

.resources-panel {
  padding: 0;
  overflow: hidden;
  border-color: #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

.tablewrap-dense table {
  width: 100%;
}

.tablewrap-dense th {
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  font-size: 11px;
  padding: 12px 16px;
  letter-spacing: 0.8px;
  border-bottom: 2px solid #e2e8f0;
}

.tablewrap-dense th.col-actions {
  text-align: right;
}

.resources-table tbody tr {
  transition: background-color 0.15s ease;
}

.resources-table tbody tr:hover {
  background-color: #f8fafc;
}

.resources-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.resources-table tr:last-child td {
  border-bottom: 0;
}

.resource-thumbnail {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.resource-icon {
  width: 48px;
  height: 48px;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  font-size: 24px;
}

.resource-name {
  display: flex;
  align-items: center;
  gap: 16px;
}

.resource-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.resource-title {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.2;
}

.resource-id {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.resource-id .sku {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.resource-id .category {
  color: #64748b;
}

.type-badge {
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.type-equipment { background: #e0e7ff; color: #1e40af; }
.type-vehicle { background: #fce7f3; color: #3730a3; }
.type-accommodation { background: #f3e8ff; color: #86198f; }
.type-other { background: #f1f5f9; color: #475569; }

.rate-value {
  font-weight: 700;
  color: #0f172a;
  font-size: 14px;
}

.rate-unit {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

.stock-in {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.stock-out {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.service-required-marker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #b45309;
  font-size: 11px;
  font-weight: 700;
  margin-top: 6px;
  background: #fef3c7;
  padding: 3px 6px;
  border-radius: 4px;
}

.action-group {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.resources-table tbody tr:hover .action-group {
  opacity: 1;
}

.btn-reserve {
  background: #0f172a;
  color: white;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  font-weight: 600;
}

.btn-reserve:hover {
  background: #1e293b;
}

.btn-ghost {
  background: transparent;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  font-weight: 600;
}

.btn-ghost:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

@media (max-width: 1024px) {
  .resources-table th.col-type, .resources-table td.cell-type {
    display: none;
  }
}

@media (max-width: 760px) {
  .resources-table th.col-stock, .resources-table td.cell-stock {
    display: none;
  }
  .resources-table th.col-rate, .resources-table td.cell-rate {
    display: none;
  }
  .search-wrapper {
    max-width: 100%;
  }
  .type-filter {
    flex: 1;
    width: 100%;
  }
  .action-group {
    flex-direction: row;
    align-items: center;
  }
}
