.account-editor {
  display: grid;
  gap: 20px;
}

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

.account-line {
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px solid #d7e6e0;
  border-radius: 10px;
  background: var(--brand-pale);
  color: #3f5c53;
  line-height: 1.7;
}

fieldset {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}

legend {
  padding: 0 8px;
  color: var(--brand-strong);
  font-weight: 850;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekdays {
  margin: 20px 0 8px;
  color: var(--muted);
  text-align: center;
  font-size: 0.84rem;
  font-weight: 800;
}

.calendar-day {
  position: relative;
  overflow: hidden;
  min-height: 78px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms var(--ease);
}

.calendar-day:hover {
  border-color: #9dc7b8;
  background: var(--brand-pale);
  transform: translateY(-1px);
}

.calendar-day span {
  display: block;
  font-size: 1rem;
  font-weight: 850;
}

.calendar-day small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.calendar-day.has-booking {
  border-color: #efc46c;
  background: var(--warning-soft);
}

.calendar-day.has-booking::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
}

.calendar-day.selected {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.36);
}

.calendar-day.selected::before {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.78rem;
  font-weight: 900;
}

.calendar-day.selected small {
  color: #d8f8ed;
}

.calendar-day.blank {
  border: 0;
  background: transparent;
  cursor: default;
  transform: none;
}

.calendar-day:disabled,
.calendar-day.unavailable {
  border-color: transparent;
  background: #f1f4f3;
  color: #9aa7a3;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.calendar-day:disabled small,
.calendar-day.unavailable small {
  color: #9aa7a3;
}

.calendar-day:disabled::after,
.calendar-day.unavailable::after {
  display: none;
}

.dashboard-layout,
.booking-calendar-layout {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.72fr);
  align-items: start;
  gap: 18px;
}

.dashboard-layout > .card,
.booking-calendar-layout > .card,
.booking-calendar-layout > aside {
  box-shadow: none;
}

.bar-chart {
  height: 240px;
  padding: 18px 2px 2px;
  display: flex;
  align-items: flex-end;
  gap: 9px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background-image: linear-gradient(to top, rgba(216, 228, 223, 0.54) 1px, transparent 1px);
  background-size: 100% 25%;
}

.bar-column {
  min-width: 50px;
  height: 100%;
  flex: 1;
  display: grid;
  grid-template-rows: minmax(20px, 1fr) auto;
  justify-items: center;
  align-items: end;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.bar-column:hover .bar,
.bar-column:focus-visible .bar { background: var(--brand-strong); }

.bar {
  width: min(32px, 70%);
  min-height: 4px;
  border-radius: 7px 7px 2px 2px;
  background: var(--brand);
  box-shadow: inset 0 -8px 12px rgba(4, 65, 51, 0.12);
  transform-origin: bottom;
  animation: bar-grow 520ms var(--ease) both;
}

.chart-card { margin-top: 20px; }

.segmented { display: flex; gap: 6px; }

.line-chart {
  min-height: 240px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.line-chart svg { width: 100%; min-width: 680px; height: 240px; }
.chart-axis { stroke: var(--line); stroke-width: 2; }
.chart-line { fill: none; stroke: var(--brand); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.chart-point { fill: #fff; stroke: var(--brand); stroke-width: 5; }

.chart-drill-nav {
  display: grid;
  grid-template-columns: repeat(12,minmax(48px,1fr));
  gap: 6px;
  margin-top: 12px;
  overflow-x: auto;
}

.chart-drill-nav button {
  min-width: 48px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.chart-drill-nav button b { display: block; color: var(--ink); }
.chart-drill-nav button.active { border-color: var(--brand); background: var(--brand-pale); color: var(--brand-strong); }

.calendar-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; color: var(--muted); font-size: .82rem; }
.calendar-legend span { display: flex; align-items: center; gap: 6px; }
.calendar-legend i { width: 14px; height: 14px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.calendar-legend .legend-busy { border-color: #efc46c; background: var(--warning-soft); }
.calendar-legend .legend-disabled { background: #f1f4f3; }

.requester-response { margin-top: 12px; padding: 13px 15px; border-radius: 10px; background: #e1f4ed; color: #075d49; line-height: 1.65; }
.danger-notice { padding: 14px; border: 1px solid #efb3ad; border-radius: 10px; background: #fff0ee; color: #8b241b; line-height: 1.65; }
.settings-intro { padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.settings-intro h2 { margin-bottom: 4px; }
.settings-section { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--brand-pale); color: var(--brand-strong); }

.survey-reminder-inline {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #b9dcca;
  border-radius: 14px;
  background: var(--brand-pale);
}

.survey-reminder-inline b,
.survey-reminder-inline span { display: block; }
.survey-reminder-inline span { color: var(--muted); }

.capacity-warning {
  margin-top: 7px;
  padding: 9px 11px;
  display: block;
  border: 1px solid #efb3ad;
  border-radius: 9px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.45;
}

.capacity-warning[hidden] { display: none; }

.survey-form { max-width: 900px; margin: 0 auto; display: grid; gap: 22px; }
.rating-field { padding: 18px; }
.rating-options { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; }
.rating-options label { min-width: 0; cursor: pointer; }
.rating-options input { position: absolute; opacity: 0; pointer-events: none; }
.rating-options span {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--brand-strong);
  font-size: 1.35rem;
  font-weight: 900;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}
.rating-options small { display: block; margin-top: 5px; color: var(--muted); text-align: center; font-size: .7rem; }
.rating-options input:checked ~ span,
.rating-options label:hover span { border-color: var(--brand); background: var(--brand); color: #fff; }
.rating-options input:focus-visible ~ span { outline: 3px solid rgba(16,160,120,.3); outline-offset: 2px; }

.survey-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin-bottom: 20px; }
.survey-filters label { min-width: 220px; flex: 1; }
.survey-kpis { grid-template-columns: repeat(4,minmax(0,1fr)); }
.survey-kpis small { color: var(--muted); font-size: .9rem; }

.survey-bars { min-height: 210px; display: flex; align-items: end; gap: 8px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.survey-bars button { min-width: 72px; min-height: 190px; flex: 1; display: grid; grid-template-rows: 1fr auto auto auto; place-items: end center; gap: 5px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.survey-bars button span { width: min(36px,70%); min-height: 5px; border-radius: 8px 8px 2px 2px; background: var(--brand); }
.survey-bars button.active span { background: var(--warning); }
.survey-bars button b { color: var(--ink); }
.survey-bars button em { font-size: .72rem; font-style: normal; }

.survey-summary { margin-top: 20px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.score-row { display: grid; grid-template-columns: 130px minmax(80px,1fr) 42px; align-items: center; gap: 10px; margin: 12px 0; }
.score-row > div { height: 10px; overflow: hidden; border-radius: 99px; background: #e6eeeb; }
.score-row i { height: 100%; display: block; border-radius: inherit; background: var(--brand); }
.feedback-section { margin-top: 20px; }
.feedback-row { width: 100%; padding: 15px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.feedback-row span small { display: block; color: var(--muted); }
.feedback-row strong { color: var(--brand); font-size: 1.2rem; }
.feedback-row p { grid-column: 1 / -1; margin: 4px 0 0; color: var(--muted); }
.survey-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.survey-detail-grid span { padding: 10px; border-radius: 9px; background: var(--brand-pale); }

.room-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.room-stat,
.detail-row {
  width: 100%;
  min-height: 64px;
  padding: 13px 15px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms var(--ease);
}

.room-stat {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.room-stat b {
  grid-row: 1 / 3;
  grid-column: 2;
  color: var(--brand);
  font-size: 1.65rem;
}

.room-stat:hover,
.detail-row:hover {
  border-color: #95c2b2;
  background: var(--brand-pale);
  transform: translateY(-1px);
}

.detail-row {
  position: relative;
  padding-right: 34px;
}

.detail-row::after {
  content: "›";
  position: absolute;
  top: 50%;
  right: 15px;
  color: var(--brand);
  font-size: 1.4rem;
  transform: translateY(-50%);
}

.busy-row {
  min-height: 44px;
  padding: 9px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

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

.chip.available {
  border-color: #a9d9c8;
  background: #e1f4ed;
  color: #075d49;
}

.compact {
  gap: 8px;
}

@keyframes bar-grow {
  from { opacity: 0; transform: scaleY(0.08); }
  to { opacity: 1; transform: scaleY(1); }
}

@media (max-width: 900px) {
  .account-workspace,
  .account-editor-grid,
  .dashboard-layout,
  .booking-calendar-layout {
    grid-template-columns: 1fr;
  }

  .survey-kpis,
  .survey-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }

  .calendar-day {
    min-height: 66px;
    padding: 6px;
  }

  .calendar-day small {
    font-size: 0.65rem;
  }

  .bar-column {
    min-width: 44px;
  }
}

.account-workspace { display:grid; grid-template-columns:minmax(260px,320px) minmax(0,1fr); gap:18px; align-items:start; }
.account-directory,.account-detail { min-width:0; padding:20px; }
.account-directory { position:sticky; top:92px; }
.account-directory h2,.account-detail h2 { margin:0; }
.account-directory-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.account-directory-head .btn { min-height:40px; padding:8px 11px; white-space:nowrap; }
.account-create-head { margin-bottom:16px; }
.account-create-head h2 { margin:5px 0; }
.account-search { margin:18px 0 12px; }
#accountDirectoryList { display:grid; gap:7px; max-height:68vh; overflow:auto; }
.account-directory-row,.account-history-row { width:100%; display:grid; border:1px solid transparent; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.account-directory-row { grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:10px; padding:10px; border-radius:12px; }
.account-directory-row:hover,.account-directory-row.active { background:var(--brand-pale); }
.account-directory-row.active { border-color:#9ccdbb; }
.account-directory-copy { min-width:0; }
.account-directory-copy b,.account-directory-copy small { overflow-wrap:anywhere; }
.account-directory-row small,.account-history-row small { display:block; color:var(--muted); line-height:1.45; }
.account-state-dot { width:10px; height:10px; border-radius:50%; background:#b35b5b; box-shadow:0 0 0 4px rgba(179,91,91,.1); }
.account-state-dot.is-active { background:#248262; box-shadow:0 0 0 4px rgba(36,130,98,.1); }
.account-avatar { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; background:#dcefe8; color:var(--brand); font-weight:800; }
.account-avatar.large { width:54px; height:54px; font-size:1.25rem; }
.account-detail-head { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.account-detail-head > div:first-child { display:flex; align-items:center; gap:12px; }
.account-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:18px 0; }
.account-summary > div { padding:13px; border:1px solid var(--line); border-radius:12px; background:#fbfdfc; }
.account-summary span { display:block; color:var(--muted); font-size:.78rem; }
.account-summary b { display:block; margin-top:3px; font-size:1.35rem; }
.account-summary .small-value { font-size:.92rem; }
.account-detail-form { margin-top:16px; }
.account-security { margin-top:18px; padding:16px; border:1px solid var(--line); border-radius:14px; background:#fbfdfc; }
.account-security .actions { margin-top:10px; }
.account-history-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:18px; }
.section-title { margin:0 0 10px; font-size:1rem; }
.account-history-row { grid-template-columns:auto minmax(0,1fr); align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); }
.account-history-row:hover b { color:var(--brand); }
.account-score { min-width:46px; color:var(--brand); font-size:1rem; }
.compact-empty { min-height:80px; padding:20px; }
@media (max-width:900px) {
  .account-workspace { grid-template-columns:minmax(0,1fr); }
  .account-directory { position:static; }
  #accountDirectoryList { display:flex; max-height:none; overflow-x:auto; overflow-y:hidden; padding:2px 2px 10px; scroll-snap-type:x mandatory; scrollbar-width:thin; }
  .account-directory-row { flex:0 0 min(310px,calc(100vw - 76px)); scroll-snap-align:start; border-color:var(--line); background:#fbfdfc; }
  .account-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .account-history-grid { grid-template-columns:1fr; }
}
@media (max-width:520px) {
  .account-workspace { gap:12px; }
  .account-directory,.account-detail { padding:15px; }
  .account-directory-head { align-items:center; }
  .account-directory-head .muted { margin-bottom:0; }
  .account-directory-head .btn { min-height:44px; }
  .account-search { margin:14px 0 10px; }
  .account-directory-row { flex-basis:calc(100vw - 64px); min-height:72px; }
  .account-detail-head { display:grid; grid-template-columns:54px minmax(0,1fr); align-items:center; }
  .account-detail-head > div:first-child { grid-row:1 / span 2; }
  .account-detail-head > div:nth-child(2) { min-width:0; }
  .account-detail-head > div:nth-child(2) p { margin-bottom:0; overflow-wrap:anywhere; }
  .account-detail-head > .status { grid-column:2; width:max-content; }
  .account-summary { grid-template-columns:1fr 1fr; }
  .account-summary > div { min-width:0; padding:11px; }
  .account-summary b { font-size:1.15rem; overflow-wrap:anywhere; }
  .account-detail-form > span:empty { display:none; }
  .account-detail-form .actions { align-items:stretch; flex-direction:column; }
  .account-detail-form .actions .btn,.account-detail-form > .btn.full { width:100%; min-height:46px; }
  .account-security .actions { align-items:stretch; flex-direction:column; }
  .account-security .actions .btn { width:100%; min-height:46px; }
  .account-history-row { grid-template-columns:1fr; gap:6px; min-height:62px; }
  .account-history-row > .status,.account-score { width:max-content; }
}

@media (max-width: 520px) {
  .calendar-weekdays,
  .calendar-grid {
    gap: 3px;
  }

  .calendar-day {
    min-height: 58px;
    padding: 5px;
    border-radius: 8px;
  }

  .calendar-day span {
    font-size: 0.9rem;
  }

  .calendar-day small {
    font-size: 0.58rem;
  }

  .calendar-day.selected::before {
    display: none;
  }

  fieldset {
    padding: 15px;
  }

  .survey-reminder-inline { align-items: stretch; flex-direction: column; }
  .rating-options { grid-template-columns: 1fr; direction: ltr; }
  .rating-options label { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 10px; }
  .rating-options small { margin: 0; text-align: left; }
  .survey-kpis,
  .survey-summary { grid-template-columns: 1fr; }
  .score-row { grid-template-columns: 105px minmax(60px,1fr) 36px; }
}
