:root {
  --ink: #0b2d3b;
  --muted: #4d6875;
  --teal: #087f8c;
  --teal-dark: #05636e;
  --teal-soft: #daf2ef;
  --cream: #f5efe3;
  --white: #ffffff;
  --line: #d8e2e3;
  --danger: #a43b3b;
  --warning-bg: #fff3dc;
  --warning-line: #e8c77f;
  --shadow: 0 22px 65px rgba(11, 45, 59, 0.13);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 10%, rgba(8, 127, 140, .12), transparent 28rem),
    linear-gradient(145deg, #f9f6ef 0%, #edf8f6 100%);
  font-family: "DM Sans", system-ui, sans-serif;
}
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.eyebrow {
  margin: 0 0 9px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.dashboard-page { min-height: 100vh; }
.dashboard-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.dashboard-brand img { width: 62px; height: 62px; object-fit: contain; }
.dashboard-brand span { display: grid; line-height: 1.1; }
.dashboard-brand strong { font-size: 18px; }
.dashboard-brand small { margin-top: 5px; color: var(--muted); }

.login-shell {
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
  padding: 38px 20px;
}
.login-card {
  width: min(100%, 480px);
  padding: 42px;
  border: 1px solid rgba(8, 127, 140, .2);
  border-radius: 28px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
}
.login-card h1,
.dashboard-topbar h1,
.dashboard-card h2 {
  margin: 0;
  font-family: "Libre Franklin", sans-serif;
  letter-spacing: -.045em;
}
.login-card h1 { font-size: clamp(34px, 6vw, 48px); }
.login-intro { margin: 18px 0 28px; color: var(--muted); line-height: 1.65; }
.login-card form { display: grid; gap: 18px; }
.login-card label { display: grid; gap: 8px; font-weight: 700; }
.login-card input,
.search-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--ink);
  outline: none;
}
.login-card input { padding: 14px 15px; }
.login-card input:focus,
.search-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 140, .13); }
.primary-button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  background: var(--teal);
  color: white;
  font-weight: 800;
  cursor: pointer;
}
.primary-button:hover { background: var(--teal-dark); }
.primary-button:disabled { opacity: .6; cursor: wait; }
.form-error,
.dashboard-status {
  border: 1px solid #e6a6a6;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff0f0;
  color: var(--danger);
  font-weight: 700;
}
.back-link { display: inline-block; margin-top: 24px; color: var(--muted); text-decoration: none; }

.dashboard-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.dashboard-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  background: var(--ink);
  color: white;
}
.sidebar-brand { color: white; padding: 0 8px; }
.sidebar-brand small { color: rgba(255,255,255,.66); }
.dashboard-nav { display: grid; gap: 7px; margin-top: 44px; }
.nav-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 12px;
  padding: 13px 14px;
  background: transparent;
  color: rgba(255,255,255,.78);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.nav-button:hover,
.nav-button.active { background: rgba(218, 242, 239, .14); color: white; }
.nav-button span {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f0b95e;
  color: var(--ink);
  font-size: 12px;
  text-align: center;
}
.sidebar-footer { margin-top: auto; display: grid; gap: 12px; padding: 0 8px; }
.read-only-badge {
  width: fit-content;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 700;
}
.text-button { border: 0; padding: 0; background: transparent; color: var(--teal); font-weight: 800; cursor: pointer; }
.sidebar-footer .text-button { color: white; text-align: left; }

.dashboard-main { min-width: 0; padding: 34px clamp(22px, 4vw, 58px) 64px; }
.dashboard-topbar { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 28px; }
.dashboard-topbar h1 { font-size: clamp(32px, 4vw, 48px); }
.account-summary { display: grid; text-align: right; }
.account-summary span { font-weight: 800; }
.account-summary small { margin-top: 3px; color: var(--muted); text-transform: capitalize; }
.dashboard-status { margin-bottom: 18px; }
.dashboard-status.success { border-color: #8bc9b0; background: #eefaf4; color: #1c6a4e; }

.dashboard-panel { display: grid; gap: 22px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric-card,
.dashboard-card {
  border: 1px solid rgba(8, 127, 140, .15);
  border-radius: 20px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 10px 32px rgba(11, 45, 59, .07);
}
.metric-card { padding: 22px; }
.metric-card small { color: var(--muted); font-weight: 700; }
.metric-card strong { display: block; margin-top: 10px; font-size: clamp(26px, 3vw, 38px); line-height: 1; }
.metric-card span { display: block; margin-top: 9px; color: var(--muted); font-size: 13px; }
.dashboard-card { padding: 26px; }
.dashboard-card h2 { font-size: clamp(23px, 3vw, 32px); }
.dashboard-card p { color: var(--muted); line-height: 1.6; }
.card-heading { margin-bottom: 20px; }
.split-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr); gap: 22px; }

.trip-highlight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 22px;
  border-radius: 16px;
  background: var(--teal-soft);
}
.trip-highlight h3,
.trip-row h3,
.customer-row h3,
.request-row h3 { margin: 0; font-size: 18px; }
.trip-highlight p { margin: 7px 0 0; }
.trip-highlight .trip-time { font-size: 25px; font-weight: 800; text-align: right; }
.trip-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.detail-tile { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.detail-tile small { display: block; color: var(--muted); }
.detail-tile strong { display: block; margin-top: 5px; }

.stack-list,
.trip-list,
.customer-list,
.request-list,
.calendar-list { display: grid; gap: 12px; }
.trip-row,
.customer-row,
.request-row,
.calendar-entry {
  display: grid;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
}
.trip-row { grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; }
.trip-date { font-weight: 800; }
.trip-date small { display: block; margin-top: 4px; color: var(--muted); font-weight: 500; }
.trip-meta,
.customer-meta,
.request-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 7px; color: var(--muted); font-size: 14px; }
.money-summary { text-align: right; }
.money-summary strong { display: block; }
.money-summary small { color: var(--muted); }
.status-chip {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e7f5f3;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}
.status-chip.warning { background: var(--warning-bg); color: #8a5a0b; }
.status-chip.cancelled { background: #f4e8e8; color: #8c3a3a; }
.empty-state { padding: 24px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }

.attention-item { padding: 15px; border-left: 4px solid #e7b550; border-radius: 10px; background: var(--warning-bg); }
.attention-item strong { display: block; }
.attention-item small { display: block; margin-top: 5px; color: #73531c; }

.calendar-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.filter-button.active { border-color: var(--teal); background: var(--teal); color: white; }
.calendar-day { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 18px; }
.calendar-day-label { padding-top: 15px; font-weight: 800; }
.calendar-day-label small { display: block; margin-top: 4px; color: var(--muted); font-weight: 500; }
.calendar-day-entries { display: grid; gap: 10px; }
.calendar-entry { grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; }
.calendar-entry.block { background: #fff9ed; border-color: var(--warning-line); }
.calendar-time { font-weight: 800; }
.calendar-time small { display: block; margin-top: 4px; color: var(--muted); font-weight: 500; }

.search-input { max-width: 310px; padding: 10px 13px; }
.customer-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.customer-stats { display: flex; gap: 24px; text-align: right; }
.customer-stats div { display: grid; }
.customer-stats strong { font-size: 19px; }
.customer-stats small { color: var(--muted); }
.request-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.request-age { color: var(--muted); text-align: right; }
.more-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
.detail-list { display: grid; gap: 0; margin-top: 20px; }
.detail-list div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.detail-list span { color: var(--muted); }

@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .dashboard-shell { grid-template-columns: 1fr; }
  .dashboard-sidebar { position: static; height: auto; padding: 16px; }
  .sidebar-brand { display: none; }
  .dashboard-nav { display: flex; overflow-x: auto; margin: 0; padding-bottom: 3px; }
  .nav-button { flex: 0 0 auto; }
  .sidebar-footer { display: none; }
  .dashboard-main { padding: 24px 16px 48px; }
  .dashboard-topbar { align-items: flex-start; }
  .account-summary { display: none; }
  .split-heading { align-items: flex-start; flex-direction: column; }
  .search-input { max-width: none; }
  .trip-row,
  .calendar-entry,
  .customer-row,
  .request-row { grid-template-columns: 1fr; }
  .money-summary,
  .customer-stats,
  .request-age { text-align: left; }
  .calendar-day { grid-template-columns: 1fr; gap: 8px; }
  .calendar-day-label { padding-top: 0; }
  .more-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .login-card { padding: 30px 22px; border-radius: 22px; }
  .metric-grid { grid-template-columns: 1fr; }
  .dashboard-topbar h1 { font-size: 31px; }
  .dashboard-card { padding: 20px; }
  .trip-highlight { grid-template-columns: 1fr; }
  .trip-highlight .trip-time { text-align: left; }
  .trip-detail-grid { grid-template-columns: 1fr; }
}

/* V29: manual phone booking */
body.modal-open { overflow: hidden; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.compact-button { padding: 12px 18px; white-space: nowrap; }
.secondary-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  background: white;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}
.secondary-button:hover { border-color: var(--teal); color: var(--teal-dark); }
.secondary-button:disabled { opacity: .55; cursor: wait; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(6, 35, 47, .72);
  backdrop-filter: blur(5px);
}
.operation-modal {
  width: min(100%, 850px);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border: 1px solid rgba(8, 127, 140, .2);
  border-radius: 25px;
  background: var(--white);
  box-shadow: 0 35px 100px rgba(0, 0, 0, .3);
}
.operation-modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px 23px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.97);
}
.operation-modal-header h2,
.manual-success h3 {
  margin: 0;
  font-family: "Libre Franklin", sans-serif;
  letter-spacing: -.04em;
}
.operation-modal-header h2 { font-size: clamp(27px, 4vw, 38px); }
.operation-modal-header p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); }
.modal-close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
.operation-form { display: grid; }
#manual-booking-fields { padding: 24px 30px 0; }
.form-section {
  margin: 0 0 20px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fbfdfd;
}
.form-section legend {
  padding: 0 8px;
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.form-grid { display: grid; gap: 15px; }
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-section label { display: grid; gap: 7px; color: var(--ink); font-weight: 700; }
.form-section input,
.form-section select,
.form-section textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 13px;
  background: white;
  color: var(--ink);
  outline: none;
  font: inherit;
}
.form-section textarea { resize: vertical; min-height: 90px; }
.form-section input:focus,
.form-section select:focus,
.form-section textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 140, .12); }
.field-help { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.form-section > .secondary-button { margin-top: 17px; }
.slot-results { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.slot-results > .field-help { grid-column: 1 / -1; }
.slot-button {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px 14px;
  background: white;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.slot-button:hover,
.slot-button.selected { border-color: var(--teal); background: var(--teal-soft); }
.slot-button span,
.slot-button small { color: var(--muted); }
.slot-button small { font-weight: 700; }
.slot-button.unavailable { background: #f6f6f6; opacity: .68; cursor: not-allowed; }
.selected-slot-summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 17px;
  padding: 15px;
  border-radius: 13px;
  background: var(--teal-soft);
}
.selected-slot-summary div { display: grid; gap: 4px; }
.selected-slot-summary span { color: var(--muted); font-size: 14px; }
.selected-slot-summary > strong { font-size: 21px; }
.balance-preview {
  align-self: end;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  min-height: 49px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--teal-soft);
}
.balance-preview span { color: var(--muted); font-weight: 700; }
.balance-preview strong { font-size: 19px; }
.operation-form > .form-error { margin: 0 30px 20px; }
.operation-modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 11px;
  padding: 18px 30px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.97);
}
.manual-success {
  margin: 28px 30px;
  padding: 28px;
  border: 1px solid #8bc9b0;
  border-radius: 18px;
  background: #eefaf4;
}
.manual-success h3 { font-size: 32px; }
.manual-success p { color: #315f50; line-height: 1.6; }
.success-money { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 17px; }
.success-money span { padding: 8px 10px; border-radius: 999px; background: white; font-weight: 800; }

@media (max-width: 780px) {
  .topbar-actions { align-items: flex-end; }
  .account-summary { display: none; }
  .modal-backdrop { padding: 0; place-items: stretch; }
  .operation-modal { width: 100%; max-height: 100vh; border-radius: 0; }
  .operation-modal-header { padding: 22px 18px 18px; }
  #manual-booking-fields { padding: 18px 16px 0; }
  .operation-form > .form-error { margin: 0 16px 18px; }
  .manual-success { margin: 22px 16px; }
  .operation-modal-footer { padding: 15px 16px; }
}

@media (max-width: 560px) {
  .dashboard-topbar { display: grid; }
  .topbar-actions { justify-content: stretch; }
  .compact-button { width: 100%; }
  .form-grid.two-columns,
  .slot-results { grid-template-columns: 1fr; }
  .selected-slot-summary { align-items: flex-start; flex-direction: column; }
  .operation-modal-footer { display: grid; grid-template-columns: 1fr; }
  .operation-modal-footer button { width: 100%; }
}


/* V30: calendar blocking */
.compact-operation-modal { width: min(100%, 760px); }
.calendar-block-fields { padding: 24px 30px 0; }
.checkbox-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 11px !important;
  margin-bottom: 17px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  cursor: pointer;
}
.checkbox-row input { width: 18px !important; height: 18px; margin-top: 2px; padding: 0 !important; }
.checkbox-row span { display: grid; gap: 3px; }
.checkbox-row small { color: var(--muted); font-weight: 500; line-height: 1.4; }
.selected-block-scope {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 14px 15px;
  border-radius: 13px;
  background: var(--teal-soft);
}
.selected-block-scope span { color: var(--muted); font-weight: 700; }
.calendar-entry-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; }
.danger-text { color: var(--danger); }
.danger-text:hover { color: #7f2525; }

@media (max-width: 780px) {
  .calendar-block-fields { padding: 18px 16px 0; }
  .calendar-entry-actions { justify-content: flex-start; }
}

/* V31: full monthly calendar */
.calendar-card-heading { margin-bottom: 16px; }
.calendar-toolbar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) minmax(240px, auto);
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}
.calendar-navigation { display: flex; align-items: center; gap: 8px; }
.calendar-nav-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}
.calendar-nav-button:hover { border-color: var(--teal); color: var(--teal-dark); }
.calendar-today-button { padding: 10px 15px; }
.calendar-month-label {
  margin: 0;
  font-family: "Libre Franklin", sans-serif;
  font-size: clamp(23px, 3vw, 31px);
  letter-spacing: -.04em;
  text-align: center;
}
.calendar-help {
  margin: 0 !important;
  font-size: 13px;
  line-height: 1.45 !important;
  text-align: right;
}
.calendar-range-bar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(8, 127, 140, .28);
  border-radius: 14px;
  background: var(--teal-soft);
}
.calendar-range-bar > div:first-child { display: grid; gap: 3px; }
.calendar-range-bar small { color: var(--muted); font-weight: 700; }
.calendar-range-bar strong { font-size: 16px; }
.calendar-range-actions { display: flex; align-items: center; gap: 14px; }
.month-calendar-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  -webkit-overflow-scrolling: touch;
}
.month-calendar {
  min-width: 780px;
  user-select: none;
  -webkit-user-select: none;
}
.calendar-weekday-row,
.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-weekday {
  padding: 11px 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f4f8f8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
}
.calendar-weekday:last-child { border-right: 0; }
.month-day-cell {
  position: relative;
  min-height: 138px;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: white;
  cursor: pointer;
  outline: none;
}
.month-day-cell:nth-child(7n) { border-right: 0; }
.month-day-cell:nth-last-child(-n + 7) { border-bottom: 0; }
.month-day-cell:hover,
.month-day-cell:focus-visible { background: #f6fbfa; box-shadow: inset 0 0 0 2px rgba(8, 127, 140, .42); }
.month-day-cell.outside-month { background: #f7f8f8; }
.month-day-cell.outside-month .month-day-number,
.month-day-cell.outside-month .month-event { opacity: .55; }
.month-day-cell.past-day { background-image: linear-gradient(rgba(245, 247, 247, .42), rgba(245, 247, 247, .42)); }
.month-day-cell.today { box-shadow: inset 0 0 0 2px var(--teal); }
.month-day-cell.selected-day { background: #eef9f7; box-shadow: inset 0 0 0 3px var(--teal); }
.month-day-cell.in-selected-range { background: #e6f5f2; }
.month-day-cell.range-start,
.month-day-cell.range-end { box-shadow: inset 0 0 0 3px var(--teal-dark); }
.month-day-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.month-day-number {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}
.month-day-cell.today .month-day-number { background: var(--teal); color: white; }
.month-day-count {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.month-day-events { display: grid; gap: 5px; }
.month-event {
  display: block;
  overflow: hidden;
  padding: 5px 7px;
  border-radius: 7px;
  background: #e7f5f3;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.month-event.pending { background: var(--warning-bg); color: #7c560f; }
.month-event.block { border: 1px solid var(--warning-line); background: #fff9ed; color: #7d5612; }
.month-event.more { background: #edf1f2; color: var(--muted); text-align: center; }
.selected-day-panel {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.selected-day-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}
.selected-day-heading h3 {
  margin: 0;
  font-family: "Libre Franklin", sans-serif;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -.04em;
}
.selected-day-heading .eyebrow { margin-bottom: 5px; }

@media (max-width: 980px) {
  .calendar-toolbar { grid-template-columns: auto 1fr; }
  .calendar-help { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 700px) {
  .calendar-toolbar { display: flex; flex-direction: column; align-items: stretch; }
  .calendar-navigation { justify-content: space-between; }
  .calendar-month-label { order: -1; text-align: left; }
  .calendar-help { grid-column: auto; }
  .calendar-range-bar,
  .selected-day-heading { align-items: stretch; flex-direction: column; }
  .calendar-range-actions { justify-content: space-between; }
  .selected-day-heading .secondary-button { width: 100%; }
}


/* V33: booking management */
.booking-management-modal { width: min(100%, 1040px); }
.booking-management-body { display: grid; gap: 20px; padding: 24px 30px 8px; }
.booking-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.booking-overview-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfdfd;
}
.booking-overview-card small,
.booking-overview-card span { display: block; color: var(--muted); }
.booking-overview-card strong { display: block; margin-top: 6px; overflow-wrap: anywhere; }
.booking-overview-card span { margin-top: 5px; font-size: 13px; }
.booking-management-section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfdfd;
}
.booking-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}
.booking-section-heading h3 { margin: 0; font-family: "Libre Franklin", sans-serif; letter-spacing: -.035em; }
.booking-section-heading > small { max-width: 330px; color: var(--muted); text-align: right; }
.booking-management-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.booking-item-list { display: grid; gap: 10px; }
.booking-item-button {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.booking-item-button:hover,
.booking-item-button.selected { border-color: var(--teal); background: var(--teal-soft); }
.booking-item-button:disabled { cursor: default; opacity: .72; }
.booking-item-button strong,
.booking-item-button span,
.booking-item-button small { display: block; }
.booking-item-button small { margin-top: 4px; color: var(--muted); }
.booking-item-button .status-chip { justify-self: end; }
.booking-field { display: grid; gap: 7px; color: var(--ink); font-weight: 700; }
.booking-field input,
.booking-field select,
.booking-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 13px;
  background: white;
  color: var(--ink);
  outline: none;
  font: inherit;
}
.booking-field textarea { resize: vertical; }
.booking-field input:focus,
.booking-field select:focus,
.booking-field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 140, .12); }
.booking-management-section > .secondary-button,
.booking-management-section > .primary-button { margin-top: 14px; }
.booking-balance-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px 15px;
  border-radius: 13px;
  background: var(--teal-soft);
}
.booking-balance-card span { color: var(--muted); font-weight: 700; }
.booking-balance-card strong { font-size: 22px; }
.booking-payment-history { display: grid; gap: 8px; margin-top: 17px; }
.booking-payment-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.booking-payment-row span,
.booking-payment-row small { display: block; }
.booking-payment-row small { margin-top: 3px; color: var(--muted); }
.booking-reschedule-slots { margin-bottom: 14px; }
.booking-status-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.booking-status-actions > div { display: grid; align-content: start; gap: 12px; }
.booking-cancel-panel {
  padding: 16px;
  border: 1px solid #e8b1b1;
  border-radius: 14px;
  background: #fff5f5;
}
.booking-cancel-panel > small { color: #7f4a4a; line-height: 1.45; }
.danger-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--danger);
  color: white;
  font-weight: 800;
  cursor: pointer;
}
.danger-button:hover { background: #7f2525; }
.danger-button:disabled { opacity: .55; cursor: wait; }
.booking-management-error { margin: 12px 30px 20px; }
.trip-row[data-open-booking],
.calendar-entry[data-open-booking] { cursor: pointer; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.trip-row[data-open-booking]:hover,
.calendar-entry[data-open-booking]:hover { transform: translateY(-1px); border-color: rgba(8, 127, 140, .45); box-shadow: 0 8px 20px rgba(11,45,59,.07); }
.month-event.booking-button {
  width: 100%;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.month-event.booking-button:hover { filter: brightness(.96); }
.booking-management-disabled { opacity: .58; pointer-events: none; }

@media (max-width: 900px) {
  .booking-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .booking-management-columns,
  .booking-status-actions { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .booking-management-body { padding: 18px 16px 6px; }
  .booking-management-error { margin-inline: 16px; }
  .booking-item-button { grid-template-columns: 1fr; }
  .booking-item-button .status-chip { justify-self: start; }
  .booking-section-heading { flex-direction: column; }
  .booking-section-heading > small { max-width: none; text-align: left; }
}

@media (max-width: 520px) {
  .booking-overview-grid { grid-template-columns: 1fr; }
  .booking-management-section { padding: 16px; }
}

/* V40: referral partners, analytics, and booking outcomes */
.partner-list,
.partner-commission-list { display: grid; gap: 12px; }
.partner-row,
.commission-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 20px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}
.partner-heading { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.partner-heading h3,
.commission-row h3 { margin: 0; font-size: 18px; }
.partner-meta { display: flex; flex-wrap: wrap; gap: 7px 15px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.partner-stats { display: flex; gap: 22px; text-align: right; }
.partner-stats div { display: grid; }
.partner-stats strong { font-size: 18px; }
.partner-stats small { color: var(--muted); }
.partner-actions { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.commission-row { grid-template-columns: minmax(0, 1fr) auto minmax(145px, auto); }
.commission-amount { font-size: 21px; }
.commission-status-control { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.commission-status-control select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: white;
  color: var(--ink);
  font: inherit;
  text-transform: capitalize;
}
.referral-link-modal { width: min(100%, 560px); }
.referral-link-body { display: grid; justify-items: center; gap: 18px; padding: 28px 30px 32px; }
.referral-link-body canvas { width: min(280px, 100%); height: auto; border: 1px solid var(--line); border-radius: 16px; background: white; }
.referral-link-body label { display: grid; gap: 8px; width: 100%; font-weight: 800; }
.referral-link-body input { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #f8fbfa; }
.referral-link-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.full-width-field { grid-column: 1 / -1; }
.funnel-summary,
.source-summary { display: grid; gap: 13px; margin-top: 20px; }
.funnel-row { display: grid; gap: 7px; }
.funnel-row > div:first-child,
.source-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.funnel-row span,
.source-row span { color: var(--muted); }
.funnel-track { height: 9px; border-radius: 999px; background: #e9f0ef; overflow: hidden; }
.funnel-track span { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.source-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.source-row:last-child { border-bottom: 0; }
.booking-outcome-panel { padding: 16px; border: 1px solid #b6d8cf; border-radius: 14px; background: #f2faf7; }
.booking-outcome-buttons { display: flex; flex-wrap: wrap; gap: 9px; }

@media (max-width: 1050px) {
  .partner-row { grid-template-columns: 1fr auto; }
  .partner-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 780px) {
  .partner-row,
  .commission-row { grid-template-columns: 1fr; }
  .partner-stats { text-align: left; }
  .partner-actions { grid-column: auto; }
  .commission-status-control { width: 100%; }
  .referral-link-body { padding: 22px 16px 26px; }
}

@media (max-width: 520px) {
  .partner-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .partner-actions,
  .referral-link-actions,
  .booking-outcome-buttons { display: grid; grid-template-columns: 1fr; width: 100%; }
  .partner-actions button,
  .referral-link-actions button,
  .booking-outcome-buttons button { width: 100%; }
}
.attention-button { width: 100%; border-top: 0; border-right: 0; border-bottom: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.attention-button:hover { filter: brightness(.985); }

/* V42: Charter Success Intelligence */
.success-overview-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 4%, rgba(8, 127, 140, .12), transparent 24rem),
    rgba(255,255,255,.97);
}
.success-overview-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 20px;
}
.success-overview-heading h2 { font-size: clamp(31px, 4vw, 46px); }
.success-overview-heading p:not(.eyebrow) { max-width: 760px; margin: 10px 0 0; }
.success-overview-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: end;
}
.success-overview-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.success-overview-controls select {
  min-width: 205px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 15px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
}
.success-chart-shell {
  width: 100%;
  min-height: 330px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdfd, #fff);
}
.success-line-chart { display: block; min-width: 720px; width: 100%; height: auto; }
.success-chart-grid { stroke: #e3ebec; stroke-width: 1; }
.success-chart-axis-label { fill: #6b8089; font: 11px "DM Sans", sans-serif; }
.success-chart-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.success-chart-line.actual { stroke: var(--teal); }
.success-chart-line.target { stroke: #d28a24; stroke-dasharray: 8 7; stroke-width: 2.5; }
.success-chart-line.benchmark { stroke: #6c63a8; stroke-dasharray: 3 6; stroke-width: 2.5; }
.success-chart-dot { fill: white; stroke: var(--teal); stroke-width: 3; }
.success-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.success-chart-legend span { display: inline-flex; align-items: center; gap: 8px; }
.success-chart-legend i { width: 28px; height: 3px; border-radius: 999px; background: var(--teal); }
.success-chart-legend i.target { background: repeating-linear-gradient(90deg, #d28a24 0 7px, transparent 7px 11px); }
.success-chart-legend i.benchmark { background: repeating-linear-gradient(90deg, #6c63a8 0 3px, transparent 3px 7px); }
.success-chart-note { margin: 10px 0 0 !important; font-size: 13px; }
.success-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.success-metric-grid .metric-card strong { font-size: clamp(23px, 2.7vw, 34px); }
.metric-card .metric-change { margin-top: 8px; font-size: 12px; font-weight: 800; }
.metric-change.positive { color: #1c6a4e; }
.metric-change.negative { color: var(--danger); }
.metric-change.neutral { color: var(--muted); }
.recommendations-card { border-color: rgba(8,127,140,.28); }
.data-confidence {
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}
.recommendation-list { display: grid; gap: 13px; }
.success-recommendation {
  display: grid;
  grid-template-columns: 40px minmax(0,1fr) auto;
  gap: 15px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}
.success-recommendation-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-weight: 900;
}
.success-recommendation h3 { margin: 0; font-size: 18px; }
.success-recommendation p { margin: 6px 0 0; line-height: 1.5; }
.success-recommendation-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.success-recommendation-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f2f6f6;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.success-two-column-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
.success-insight-list { display: grid; gap: 11px; }
.success-insight-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.success-insight-row:last-child { border-bottom: 0; }
.success-insight-row strong, .success-insight-row small { display: block; }
.success-insight-row small { margin-top: 4px; color: var(--muted); }
.success-insight-value { text-align: right; }
.success-insight-value strong { font-size: 19px; }
.success-insight-value span { display: block; color: var(--muted); font-size: 12px; }
.benchmark-placeholder {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 15px;
  background: #fafcfc;
}
.benchmark-placeholder strong { display: block; }
.benchmark-placeholder p { margin-bottom: 0; }
.self-comparison-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.self-comparison-grid div { padding: 13px; border-radius: 13px; background: #f5f9f8; }
.self-comparison-grid span, .self-comparison-grid strong { display: block; }
.self-comparison-grid span { color: var(--muted); font-size: 12px; }
.self-comparison-grid strong { margin-top: 4px; }
.growth-readiness-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbfa;
}
.growth-readiness-panel.positive { border-color: #8bc9b0; background: #eefaf4; }
.growth-readiness-panel.warning { border-color: var(--warning-line); background: var(--warning-bg); }
.growth-readiness-panel strong { display: block; font-size: 20px; }
.growth-readiness-panel p { margin: 7px 0 0; }
.growth-calculator { margin-top: 14px; border: 1px solid var(--line); border-radius: 15px; background: white; overflow: hidden; }
.growth-calculator summary { padding: 15px 17px; cursor: pointer; font-weight: 800; }
.growth-calculator[open] summary { border-bottom: 1px solid var(--line); }
.growth-calculator-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 17px; }
.growth-calculator-fields label { display: grid; gap: 6px; color: var(--ink); font-size: 13px; font-weight: 700; }
.growth-calculator-fields input, .growth-calculator-fields select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.growth-calculator > .secondary-button { margin: 0 17px 17px; }
.growth-result { margin: 0 17px 17px; }
.growth-result-card { padding: 16px; border-radius: 14px; background: var(--teal-soft); }
.growth-result-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 12px; }
.growth-result-grid span, .growth-result-grid strong { display: block; }
.growth-result-grid span { color: var(--muted); font-size: 11px; }
.growth-result-grid strong { margin-top: 4px; }
.section-divider-heading { padding: 12px 2px 0; }
.section-divider-heading h2 { margin: 0; font-family: "Libre Franklin", sans-serif; font-size: clamp(27px,3vw,38px); letter-spacing: -.04em; }
.wide-more-card { grid-column: 1 / -1; }
.business-input-list { display: grid; gap: 10px; }
.business-input-row {
  display: grid;
  grid-template-columns: minmax(0,1.2fr) minmax(150px,.7fr) minmax(150px,.7fr) auto;
  gap: 14px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.business-input-row strong, .business-input-row small { display: block; }
.business-input-row small { margin-top: 4px; color: var(--muted); }
.business-input-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.business-input-row select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.attribution-class {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f2f6f6;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
}
.attribution-class.proven, .attribution-class.strong { background: #e8f7ef; color: #1c6a4e; }
.attribution-class.assisted { background: #eef0fb; color: #514b87; }
.attribution-class.unattributed, .attribution-class.excluded { background: #f3eeee; color: #7f4a4a; }
.commission-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.commission-editor label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.commission-editor input { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 9px; padding: 8px; font: inherit; }
.form-grid .full-width-field { grid-column: 1 / -1; }
.success-setup-card .detail-list { margin-top: 4px; }

@media (max-width: 1200px) {
  .success-metric-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .growth-calculator-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .success-overview-heading { flex-direction: column; }
  .success-overview-controls { justify-content: flex-start; }
  .success-two-column-grid { grid-template-columns: 1fr; }
  .business-input-row { grid-template-columns: 1fr 1fr; }
  .business-input-row-actions { justify-content: flex-start; }
}
@media (max-width: 650px) {
  .success-metric-grid { grid-template-columns: 1fr; }
  .success-overview-controls { width: 100%; }
  .success-overview-controls label, .success-overview-controls select, .success-overview-controls button { width: 100%; }
  .success-recommendation { grid-template-columns: 36px minmax(0,1fr); }
  .success-recommendation > button { grid-column: 1 / -1; width: 100%; }
  .self-comparison-grid, .growth-calculator-fields, .growth-result-grid, .business-input-row, .commission-editor { grid-template-columns: 1fr; }
  .commission-editor input { grid-column: auto; }
  .success-insight-row { grid-template-columns: 1fr; }
  .success-insight-value { text-align: left; }
}
.feedback-comment-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.feedback-comment-list blockquote {
  margin: 0;
  padding: 15px 17px;
  border-left: 4px solid var(--teal);
  border-radius: 0 13px 13px 0;
  background: #f5f9f8;
}
.feedback-comment-list blockquote p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}
.feedback-comment-list blockquote small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-weight: 700;
}

/* Photo library */
.photo-library-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.photo-library-heading h2 { margin: 3px 0 8px; }
.photo-library-heading p:last-child { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.55; }
.photo-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.photo-summary-card {
  display: grid;
  gap: 4px;
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  box-shadow: var(--shadow-soft);
}
.photo-summary-card span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.photo-summary-card strong { color: var(--ink); font-size: 30px; }
.photo-summary-card small { color: var(--muted); }
.photo-setup-notice {
  grid-column: 1 / -1;
  padding: 18px 20px;
  border: 1px solid #e8c785;
  border-radius: 15px;
  background: #fff8e8;
}
.photo-setup-notice strong { display: block; color: #78561b; }
.photo-setup-notice p { margin: 5px 0 0; color: #765f35; }
.photo-setup-notice code { font-size: 12px; }
.photo-manager-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  padding: 5px;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f3f7f7;
}
.photo-manager-tab {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.photo-manager-tab.active { color: var(--teal-dark); background: white; box-shadow: 0 3px 12px rgba(5, 53, 62, .08); }
.photo-subpanel[hidden] { display: none; }
.photo-upload-card { overflow: visible; }
.photo-default-category { display: grid; gap: 6px; min-width: 220px; color: var(--muted); font-size: 12px; font-weight: 800; }
.photo-default-category select,
.photo-library-filter,
.photo-review-form select,
.photo-review-form textarea,
.photo-queue-copy select,
.photo-queue-copy input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 11px;
  color: var(--ink);
  background: white;
  font: inherit;
}
.photo-dropzone {
  display: grid;
  place-items: center;
  gap: 7px;
  width: 100%;
  min-height: 220px;
  padding: 30px;
  border: 2px dashed #a9c9c9;
  border-radius: 20px;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fcfc, #f3f8f8);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.photo-dropzone:hover,
.photo-dropzone.drag-active { border-color: var(--teal); background: #eef8f7; transform: translateY(-1px); }
.photo-dropzone-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: white; background: var(--teal); font-size: 30px; }
.photo-dropzone strong { font-size: 18px; }
.photo-dropzone small { color: var(--muted); }
.photo-upload-queue { display: grid; gap: 12px; margin-top: 18px; }
.photo-queue-card {
  position: relative;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 34px;
  gap: 15px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdfd;
}
.photo-queue-card > img { width: 128px; height: 112px; border-radius: 12px; object-fit: cover; background: #e7eeee; }
.photo-queue-copy { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(200px, 1.2fr); gap: 7px 12px; align-content: start; }
.photo-queue-copy > strong,
.photo-queue-copy > small,
.photo-queue-warning { grid-column: 1 / -1; }
.photo-queue-copy > small { color: var(--muted); }
.photo-queue-copy label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 800; }
.photo-queue-warning { margin: 0; color: #90611d; font-size: 12px; }
.photo-queue-remove { align-self: start; width: 30px; height: 30px; border: 0; border-radius: 50%; color: var(--muted); background: #edf2f2; font-size: 21px; cursor: pointer; }
.photo-upload-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 18px; }
.photo-upload-progress { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: #eef7f6; }
.photo-upload-progress > div { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 9px; }
.photo-upload-progress progress { width: 100%; height: 10px; accent-color: var(--teal); }
.photo-library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.photo-library-grid > .empty-state { grid-column: 1 / -1; }
.photo-library-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; }
.photo-library-card > img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e6eeee; }
.photo-review-form,
.published-photo-copy { display: grid; gap: 11px; padding: 15px; }
.photo-review-form label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 800; }
.photo-review-form textarea { resize: vertical; min-height: 64px; }
.photo-card-status { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.photo-card-status span { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #835c1a; background: #fff4d9; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.published-photo-card .photo-card-status span { color: #1e6a4f; background: #e6f6ee; }
.photo-card-status small { color: var(--muted); text-align: right; line-height: 1.35; }
.photo-permission-check { padding: 10px; border-radius: 12px; background: #f5f8f8; }
.photo-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.published-photo-copy p { margin: 0; color: var(--ink); line-height: 1.5; }
.published-photo-copy > small { color: var(--muted); }
#photo-review-count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 999px;
  color: #06343e;
  background: #d9f1ed;
  font-size: 11px;
  font-weight: 900;
}
#photo-review-count-badge[hidden] { display: none; }

@media (max-width: 1100px) {
  .photo-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .photo-library-heading,
  .photo-upload-card .split-heading { flex-direction: column; }
  .photo-summary-grid { grid-template-columns: 1fr; }
  .photo-default-category { width: 100%; }
  .photo-queue-card { grid-template-columns: 96px minmax(0, 1fr) 30px; }
  .photo-queue-card > img { width: 96px; height: 96px; }
  .photo-queue-copy { grid-template-columns: 1fr; }
  .photo-queue-copy > strong,
  .photo-queue-copy > small,
  .photo-queue-warning { grid-column: auto; }
}
@media (max-width: 620px) {
  .photo-manager-tabs { width: 100%; overflow-x: auto; }
  .photo-manager-tab { flex: 1 0 auto; }
  .photo-library-grid { grid-template-columns: 1fr; }
  .photo-queue-card { grid-template-columns: 82px minmax(0, 1fr) 28px; gap: 10px; }
  .photo-queue-card > img { width: 82px; height: 82px; }
  .photo-upload-actions { align-items: stretch; flex-direction: column-reverse; }
  .photo-upload-actions button { width: 100%; }
}


/* V45 Local Partner Network */
.partner-row{grid-template-columns:minmax(0,1fr) auto auto}.partner-row .partner-meta span:last-child{font-weight:800;color:var(--teal-dark)}.partner-payout-warning{padding:12px 14px;border-radius:12px;background:#fff5df;color:#7d560f}.commission-row>span:last-child{max-width:160px;overflow-wrap:anywhere;color:var(--muted);font-size:11px}@media(max-width:1050px){.partner-row{grid-template-columns:1fr}.partner-stats{text-align:left}.partner-actions{grid-column:auto}}

/* V45.6: referral-partner setup invitations */
.partner-invite-body {
  display: grid;
  gap: 18px;
  padding: 28px 30px 32px;
}
.partner-invite-body > label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}
.partner-invite-body input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #f8fbfa;
}
.partner-invite-recipient {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 14px;
  background: var(--teal-soft);
}
.partner-invite-recipient span,
.partner-invite-recipient small { color: var(--muted); }
.partner-invite-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
@media (max-width: 780px) {
  .partner-invite-body { padding: 22px 16px 26px; }
}
