:root {
  --navy: #132f56;
  --navy2: #1d426e;
  --blue: #174e9b;
  --ink: #162b44;
  --text: #34485d;
  --muted: #516579;
  --line: #d9e0e6;
  --paper: #fff;
  --bg: #f5f7f9;
  --pale: #e9f1fb;
  --ochre: #87530b;
  --warm: #faf1dc;
  --mint: #e4f0ea;
  --green: #196449;
  --rad: 12px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Arial,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid #d68621;
  outline-offset: 3px;
}
a {
  color: var(--blue);
}
svg {
  display: block;
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}
.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
}
.rail {
  position: sticky;
  top: 0;
  height: 100dvh;
  background: var(--navy);
  color: white;
  display: flex;
  flex-direction: column;
  padding: 34px 17px 16px;
}
.brand {
  margin: 0 13px 13px;
}
.brand img {
  width: 143px;
  display: block;
  filter: brightness(0) invert(1);
}
.product {
  color: #c5d6eb;
  font-size: 12px;
  letter-spacing: 0.025em;
  margin: 0 13px 36px;
}
.navlabel {
  font-size: 10px;
  color: #b1c6e3;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 23px 13px 9px;
}
.navlabel:first-child {
  margin-top: 0;
}
.navitem {
  display: flex;
  align-items: center;
  gap: 11px;
  background: none;
  color: #dce6f3;
  border: 0;
  text-align: left;
  border-radius: 8px;
  padding: 12px;
  width: 100%;
  font-size: 13px;
  font-weight: 530;
  margin: 2px 0;
}
.navitem:hover,
.identity:hover {
  background: #203f65;
}
.navitem.on {
  background: #2a4a73;
  color: white;
  font-weight: 650;
}
.navitem.on:before {
  content: '';
  width: 3px;
  height: 18px;
  background: #96c5fb;
  border-radius: 3px;
  margin-left: -12px;
  margin-right: -2px;
}
.rail-bottom {
  margin-top: auto;
}
.demo-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c8d7e9;
  font-size: 11px;
  padding: 15px 10px;
}
.demo-label span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8fbcab;
}
.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 6px 4px;
  border: 0;
  border-top: 1px solid #3c5574;
  width: 100%;
  color: #fff;
  text-align: left;
  background: none;
}
.identity small,
.identity strong {
  display: block;
}
.identity strong {
  font-size: 12px;
}
.identity small {
  font-size: 11px;
  color: #c7d7e9;
  margin-top: 3px;
}
.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: #d9e5f2;
  color: #244369;
  font-size: 11px;
  font-weight: 700;
}
.identity svg {
  margin-left: auto;
  width: 14px;
}
main {
  min-width: 0;
}
.top {
  height: 65px;
  margin: 0 36px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.crumb,
.profile-trigger,
.inline,
.actions,
.legend,
.legend span,
.kv,
.status,
.metric-head,
.panel-head,
.room,
.room-icon,
.weekbar,
.paging,
.toggle,
.dayhead,
.row-item,
.who,
.list-action,
.alert-line,
.sheet-head {
  display: flex;
  align-items: center;
}
.crumb {
  gap: 11px;
  font-size: 12px;
  color: var(--muted);
}
.crumb b {
  color: var(--ink);
  font-weight: 600;
}
.crumb-icon svg {
  width: 16px;
  height: 16px;
}
.slash {
  color: #91a0ad;
}
.profile-trigger {
  gap: 8px;
}
.profile-trigger svg {
  width: 15px;
  height: 15px;
}
button.subtle,
.plain,
.icon-btn,
.seg,
.secondary,
.primary,
.danger,
.danger-lite {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 610;
  min-height: 36px;
}
.plain,
.icon-btn,
.seg,
.primary,
.secondary,
.danger,
.danger-lite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.subtle:hover,
.secondary:hover,
.icon-btn:hover,
.seg:hover,
.list-action:hover {
  background: #ecf2f7;
}
.primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}
.primary:hover {
  background: #123d79;
}
.primary svg,
.secondary svg {
  width: 16px;
  height: 16px;
}
.danger {
  background: #942f39;
  color: white;
  border-color: #942f39;
}
.danger-lite {
  color: #8b3440;
  background: #fff;
  border-color: #e5c7cb;
}
.plain {
  background: none;
  border: 0;
  padding-inline: 4px;
  color: var(--blue);
}
.icon-btn {
  padding: 0;
  width: 32px;
  min-height: 31px;
}
.icon-btn svg {
  width: 15px;
  height: 15px;
}
#view {
  max-width: 1580px;
  margin: auto;
  padding: 28px 36px 42px;
}
.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 23px;
}
.hero h1,
h1 {
  font-size: clamp(29px, 3.1vw, 45px);
  line-height: 1.06;
  letter-spacing: -0.048em;
  margin: 0;
  font-weight: 670;
}
.hero p {
  color: var(--muted);
  font-size: 14px;
  margin: 10px 0 0;
  line-height: 1.45;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.metric {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 15px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 72px;
}
.metric-head {
  font-size: 12px;
  gap: 9px;
  color: var(--text);
  font-weight: 550;
}
.metric-head svg {
  color: #446b93;
}
.metric b {
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.06em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--rad);
  overflow: hidden;
}
.panel + .panel {
  margin-top: 18px;
}
.panel-head {
  padding: 16px 20px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
}
.room {
  gap: 11px;
}
.room-icon {
  width: 38px;
  height: 38px;
  justify-content: center;
  background: #ecf2f7;
  color: #244e71;
  border-radius: 9px;
}
.room strong,
.room small {
  display: block;
}
.room strong {
  font-size: 15px;
}
.room small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.legend {
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}
.legend span {
  gap: 5px;
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #94a5b6;
  flex: none;
}
.dot.only {
  background: repeating-linear-gradient(-45deg, #64748b 0 2px, #e6ebf1 2px 4px);
}
.weekbar {
  padding: 11px 18px;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.paging {
  gap: 5px;
}
.period {
  font-size: 14px;
  font-weight: 650;
  margin-right: 9px;
}
.today {
  min-height: 30px;
  padding: 5px 9px;
}
.toggle {
  padding: 2px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.seg {
  min-height: 26px;
  color: var(--muted);
  padding: 3px 12px;
  border: 1px solid transparent;
  background: none;
  font-size: 12px;
}
.seg.selected {
  background: #fff;
  border-color: #dfe5ec;
  color: var(--ink);
  box-shadow: 0 1px 2px #163e5b12;
}
.grid-scroll {
  overflow-x: auto;
}
.calendar {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 12px;
}
.calendar thead th {
  height: 46px;
  border-top: 1px solid var(--line);
  background: #f6f8fa;
}
.calendar thead th:first-child,
.calendar .time {
  width: 57px;
}
.dayhead {
  justify-content: center;
  gap: 6px;
}
.dayhead small {
  font-weight: 550;
  font-size: 11px;
  color: var(--muted);
  text-transform: capitalize;
}
.dayhead b {
  font-size: 17px;
  font-weight: 640;
}
.current .dayhead b {
  color: #fff;
  border-radius: 6px;
  background: var(--navy);
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  padding: 1px 3px;
}
.calendar th,
.calendar td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.calendar td:last-child,
.calendar th:last-child {
  border-right: 0;
}
.calendar tbody tr:last-child > * {
  border-bottom: 0;
}
.calendar .time {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 530;
  color: var(--muted);
  text-align: center;
  background: #fafbfc;
}
.calendar td {
  height: 43px;
  padding: 3px;
  background: #fff;
}
.slot {
  width: 100%;
  height: 100%;
  min-height: 35px;
  min-width: 0;
  display: flex;
  align-items: center;
  text-align: left;
  border: 0;
  border-radius: 5px;
  padding: 3px 8px;
  gap: 5px;
  background: transparent;
  color: #345e89;
  font-size: 11px;
  font-weight: 600;
}
.slot span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.slot svg {
  width: 12px;
  height: 12px;
}
.slot.free em {
  opacity: 0;
  font-style: normal;
}
.slot.free:hover,
.slot.free:focus-visible {
  background: #edf4fc;
}
.slot.free:hover em,
.slot.free:focus-visible em {
  opacity: 1;
}
.slot.exclusive {
  color: #465568;
  background: repeating-linear-gradient(-45deg, #f1f4f7 0 4px, #e8edf2 4px 5px);
  border-left: 3px solid #788593;
}
.slot.past {
  background: repeating-linear-gradient(-45deg, transparent, transparent 4px, #f3f5f7 4px, #f3f5f7 5px);
}
.slot:disabled {
  opacity: 1;
}
.cal-footer {
  border-top: 1px solid var(--line);
  padding: 9px 18px;
  font-size: 11px;
  color: var(--muted);
}
.panel h2 {
  font-size: 17px;
  letter-spacing: -0.02em;
  margin: 0;
}
.panel-body {
  padding: 20px;
}
.row-item {
  gap: 14px;
  padding: 14px 20px;
  justify-content: space-between;
  border-top: 1px solid #e4e9ef;
}
.row-item:first-child {
  border-top: 0;
}
.row-main {
  flex: 1;
  min-width: 0;
}
.row-main strong,
.row-main small {
  display: block;
}
.row-main strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.row-main small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.date-chip {
  width: 43px;
  border: 1px solid var(--line);
  border-radius: 8px;
  flex: none;
  text-align: center;
  padding: 5px 2px;
  color: var(--blue);
}
.date-chip small {
  display: block;
  text-transform: uppercase;
  font-size: 9px;
}
.date-chip b {
  font-size: 17px;
  line-height: 1;
}
.status {
  gap: 6px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 11px;
  padding: 5px 8px;
  width: max-content;
}
.status.confirmed {
  background: var(--mint);
  color: var(--green);
}
.status.pending {
  background: var(--warm);
  color: var(--ochre);
}
.status.blocked {
  background: #f7e6e6;
  color: #87333a;
}
.actions {
  gap: 7px;
  flex-wrap: wrap;
}
.empty {
  padding: 26px 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.empty strong {
  color: var(--ink);
}
.row-item .icon-btn {
  flex: none;
}
.policy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.policy-grid .panel {
  margin: 0;
}
.form {
  display: grid;
  gap: 14px;
}
.field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
}
.field input,
.field select {
  width: 100%;
  border: 1px solid #b8c5d2;
  border-radius: 7px;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
  min-height: 40px;
  font-size: 14px;
  font-weight: 450;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}
.check input {
  accent-color: var(--blue);
}
.helper {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.actions.end {
  justify-content: flex-end;
}
.activity-time {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  flex: none;
}
.dim {
  color: var(--muted);
}
.tag {
  font-size: 11px;
  color: var(--blue);
  background: var(--pale);
  border-radius: 15px;
  padding: 5px 9px;
}
.skip {
  position: absolute;
  left: -999em;
  z-index: 5;
  background: #fff;
  padding: 6px;
}
.skip:focus {
  left: 0;
}
dialog {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  width: min(445px, calc(100vw - 30px));
  color: var(--ink);
  box-shadow: 0 24px 80px #0e233c44;
  max-height: 88dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #0a223d63;
}
.sheet-head {
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 14px;
}
.sheet-head h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.04em;
}
.sheet-body {
  padding: 0 22px 23px;
}
.sheet-body > p {
  margin-top: 0;
  line-height: 1.5;
}
.kv {
  gap: 12px;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 13px;
}
.kv span {
  color: var(--muted);
}
.kv:last-of-type {
  margin-bottom: 18px;
}
.form-error {
  display: block;
  color: #88333a;
  background: #f9e9e9;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.4;
}
.form-error:empty {
  display: none;
}
.chooser {
  display: flex;
  align-items: center;
  font-size: 14px;
  gap: 11px;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px;
  text-align: left;
  margin-top: 7px;
}
.chooser:hover {
  background: #f3f7fa;
}
.chooser small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.chooser .role {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}
#notice {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  border-radius: 9px;
  padding: 12px 18px;
  box-shadow: 0 3px 18px #142d4a32;
  font-size: 13px;
  max-width: min(92vw, 620px);
  z-index: 5;
  pointer-events: none;
}
#notice:empty {
  display: none;
}
@media (min-width: 1550px) {
  .rail {
    padding-inline: 21px;
  }
  .app {
    grid-template-columns: 232px minmax(0, 1fr);
  }
  .calendar td {
    height: 49px;
  }
  .top {
    padding-inline: 8px;
  }
}
@media (max-width: 1080px) {
  .app {
    grid-template-columns: 181px minmax(0, 1fr);
  }
  .rail {
    padding-inline: 12px;
  }
  .top {
    margin-inline: 21px;
  }
  #view {
    padding: 22px 21px;
  }
  .metric {
    padding: 12px;
  }
  .legend {
    gap: 8px;
  }
  .policy-grid {
    grid-template-columns: 1fr;
  }
  .panel-head {
    padding: 13px;
  }
  .weekbar {
    padding-inline: 12px;
  }
  .brand img {
    width: 124px;
  }
}
@media (max-width: 760px) {
  .app {
    display: block;
  }
  .rail {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    padding: 12px 16px 0;
  }
  .brand {
    margin: 0;
  }
  .brand img {
    width: 99px;
  }
  .product {
    margin: 0;
    text-align: right;
    font-size: 11px;
  }
  .rail nav {
    display: flex;
    overflow: auto;
    grid-column: 1/-1;
    padding-top: 9px;
  }
  .navlabel,
  .rail-bottom {
    display: none;
  }
  .navitem {
    width: auto;
    white-space: nowrap;
    border-radius: 6px 6px 0 0;
    padding: 9px;
    gap: 5px;
    margin: 0;
    font-size: 12px;
  }
  .navitem svg {
    width: 15px;
    height: 15px;
  }
  .navitem.on:before {
    display: none;
  }
  .top {
    height: 46px;
    margin: 0 16px;
  }
  #view {
    padding: 19px 14px 28px;
  }
  .hero {
    gap: 8px;
    align-items: center;
    margin-bottom: 15px;
  }
  .hero h1 {
    font-size: 31px;
  }
  .hero p {
    font-size: 12px;
    margin-top: 5px;
  }
  .hero .primary {
    white-space: nowrap;
    font-size: 12px;
    padding: 8px;
  }
  .metrics {
    gap: 5px;
    margin-bottom: 11px;
  }
  .metric {
    min-height: 62px;
    align-items: start;
    flex-direction: column;
    padding: 8px;
    gap: 4px;
  }
  .metric b {
    font-size: 21px;
  }
  .metric-head {
    font-size: 10px;
    gap: 4px;
  }
  .metric-head svg {
    width: 13px;
    height: 13px;
  }
  .legend {
    font-size: 10px;
  }
  .panel-head:has(.room) {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }
  .room-icon {
    width: 30px;
    height: 30px;
  }
  .room small {
    font-size: 10px;
  }
  .weekbar {
    padding: 8px;
    gap: 5px;
  }
  .period {
    font-size: 12px;
    margin-right: 1px;
  }
  .paging {
    gap: 3px;
  }
  .paging .icon-btn {
    width: 27px;
  }
  .calendar .time,
  .calendar thead th:first-child {
    width: 46px;
  }
  .calendar.week {
    min-width: 550px;
  }
  .two {
    gap: 8px;
  }
  .row-item {
    padding: 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .actions .secondary,
  .actions .primary,
  .actions .danger-lite {
    padding: 6px 9px;
    font-size: 12px;
  }
  .profile-trigger {
    min-height: 28px !important;
    padding: 3px 7px !important;
    font-size: 11px !important;
  }
  .activity-time {
    font-size: 10px;
  }
  .panel-body {
    padding: 14px;
  }
  .cal-footer {
    padding: 8px 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
/* A hierarquia da agenda acompanha os estados das reservas e os indicadores do painel. */
.metrics .metric:first-child {
  background: #eaf2fc;
  border-color: #c8d9ec;
}
.metrics .metric:first-child b {
  color: #194c83;
}
.hero .primary {
  box-shadow: 0 2px 3px #12325318;
}
.panel-head .tag {
  font-weight: 600;
}
.admin-grid {
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  gap: 16px;
  margin-top: 17px;
  align-items: start;
}
.admin-grid .panel {
  margin: 0;
}
.day-usage {
  display: grid;
  grid-template-columns: 32px 1fr 29px;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text);
}
.day-usage span {
  text-transform: capitalize;
}
.day-usage b {
  font-weight: 600;
  text-align: right;
}
.bar-track {
  height: 7px;
  border-radius: 4px;
  background: #edf1f5;
  overflow: hidden;
}
.bar-track i {
  height: 100%;
  border-radius: 4px;
  background: #537ca4;
  display: block;
}
.range-caption {
  padding-bottom: 4px;
}
.rule-summary {
  padding-block: 10px;
}
.rule-summary .kv {
  padding: 13px 0;
}
.rule-summary .kv:last-of-type {
  margin: 0 0 4px;
}
.rule-summary .plain {
  font-size: 12px;
}
@media (max-width: 850px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

/* Na visão diária, o comando de reserva permanece visível também em telas de toque. */
.calendar.day .slot.free em {
  opacity: 1;
  color: var(--blue);
  font-weight: 550;
}
@media (max-width: 760px) {
  .crumb {
    gap: 6px;
  }
  .crumb > span:nth-child(2),
  .crumb .slash {
    display: none;
  }
  .profile-trigger {
    white-space: nowrap;
  }
  .calendar.day .slot.free {
    padding-left: 10px;
  }
}

.status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.navitem[data-to='admin'] {
  font-size: 12px;
  line-height: 1.35;
  padding-right: 12px;
}

/* Comparação de salas na mesma data e ocupação semanal de cada sala. */
.board-tools {
  align-items: center;
  gap: 10px 18px;
  padding-block: 12px;
}
.board-tools .period::first-letter {
  text-transform: uppercase;
}
.board-head .toggle {
  flex-shrink: 0;
}
.board-head .seg {
  padding-inline: 13px;
}
.dates-strip {
  display: flex;
  align-items: center;
  gap: 3px;
}
.date-pill {
  min-height: 29px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 550;
  text-transform: capitalize;
}
.date-pill:hover {
  background: var(--bg);
}
.date-pill.selected {
  background: var(--pale);
  color: var(--blue);
  border-color: #c6d8eb;
}
.room-picker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--blue);
}
.room-picker select {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: white;
  padding: 5px 7px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.room-picker svg,
.room-heading svg {
  width: 15px;
  height: 15px;
}
.room-heading {
  min-width: 0;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 3px 5px;
  font-size: 13px;
  font-weight: 650;
}
.room-heading svg {
  color: #527591;
}
.board-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.room-usage {
  margin-top: 17px;
}
.room-usage > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 12px;
}
.room-usage strong {
  font-weight: 580;
  color: var(--text);
}
.room-usage span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .rail {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .rail nav {
    min-width: 0;
    max-width: 100%;
  }
  .board-head.panel-head {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
  .board-head .seg {
    padding-inline: 7px;
  }
  .board-tools {
    gap: 7px;
  }
  .board-tools .paging {
    justify-content: flex-start;
  }
  .dates-strip {
    width: 100%;
  }
  .date-pill {
    flex: 1;
  }
  .calendar.day .slot {
    padding-left: 4px;
    padding-right: 3px;
    font-size: 10px;
  }
  .calendar.day .slot.free {
    padding-left: 6px;
  }
  .room-heading {
    font-size: 11px;
    gap: 0;
  }
  .room-heading svg {
    display: none;
  }
  .board-footer {
    font-size: 10px;
  }
}

.admin-grid + .panel { margin-top: 18px; }

.daily-availability h2 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.daily-availability .metric:first-child { background: var(--paper); border-color: var(--line); }
.daily-availability .metrics .metric b { color: var(--ink); }
.company-blue { --accent: #386fa9; --tint: #e5effb; --on-tint: #214e7c; }
.company-green { --accent: #207961; --tint: #def3e9; --on-tint: #15523e; }
.company-gold { --accent: #a76a0b; --tint: #fff1ce; --on-tint: #6c4100; }
.company-neutral { --accent: #64748b; --tint: #edf0f4; --on-tint: #35455b; }
.company-legend {
  padding: 8px 18px;
  border-top: 1px solid var(--line);
  color: var(--text);
}
.company-key { display: inline-flex; align-items: center; gap: 6px; }
.company-key i { width: 9px; height: 9px; border-radius: 3px; background: var(--accent); flex: none; }
.date-chip { background: var(--tint); border-color: var(--accent); color: var(--on-tint); }

/* Cada célula comporta todos os compromissos e os intervalos livres daquela hora. */
.minute-slots { display: grid; align-content: start; gap: 3px; min-width: 0; }
.calendar td { vertical-align: top; }
.minute-slots .slot { height: auto; min-width: 0; }
.minute-slots .event {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding: 5px 7px;
  line-height: 1.22;
  background: var(--tint);
  color: var(--on-tint);
}
.event-time, .free-range { font-variant-numeric: tabular-nums; }
.event-time, .event-company { font-size: 10px; font-weight: 500; }
.event-title { font-size: 12px; font-weight: 650; }
.slot .event-title, .slot .event-company { white-space: normal; overflow-wrap: anywhere; }
.slot.event:hover { filter: brightness(.96); }
.minute-slots .free { justify-content: space-between; flex-wrap: wrap; gap: 3px 5px; }
.minute-slots .free.whole .free-range { display: none; }
.minute-slots .free.partial { color: var(--blue); background: #f3f7fc; min-height: 24px; }
.minute-slots .free.partial em { opacity: 1; font-weight: 550; }
.minute-slots .past { min-height: 34px; }
.minute-slots:has(> :nth-child(2)) .past { min-height: 7px; }
.metrics .metric b { white-space: nowrap; }
@media (max-width: 900px) {
  .metrics .metric b { font-size: 22px; }
}
@media (max-width: 760px) {
  .minute-slots .slot.event { padding: 4px; }
  .event-title { font-size: 11px; }
  .event-time, .event-company { font-size: 9px; }
  .metrics .metric b { font-size: clamp(15px, 4.1vw, 21px); }
  .minute-slots .free.partial em { display: none; }
  .minute-slots .free.partial .free-range { white-space: normal; }
}

/* As cores da sala acompanham o seletor, o cabeçalho e a grade mensal. */
.room-color-0 { --room-accent: #b8444d; --room-tint: #fae9e9; --room-ink: #722733; }
.room-color-1 { --room-accent: #7656a3; --room-tint: #eee8f7; --room-ink: #51377a; }
.room-color-2 { --room-accent: #356fac; --room-tint: #e5effa; --room-ink: #234f7d; }

.rail-calendars { margin: 14px 2px; border-top: 1px solid #ffffff28; }
.rail-calendars[hidden] { display: none; }
.mini-cal { margin: 13px 3px 12px; font-variant-numeric: tabular-nums; }
.mini-head, .mini-paging, .rail-room-check, .room-month-head, .month-toolbar {
  display: flex;
  align-items: center;
}
.mini-head { justify-content: space-between; gap: 4px; font-size: 12px; font-weight: 620; }
.mini-head::first-letter, .month-title::first-letter { text-transform: uppercase; }
.mini-paging { gap: 1px; }
.mini-paging button {
  display: grid;
  place-items: center;
  width: 25px;
  min-height: 25px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #e1eaf5;
}
.mini-paging svg { width: 13px; height: 13px; }
.mini-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  justify-items: center;
  align-items: center;
  margin-top: 5px;
  row-gap: 1px;
}
.mini-weekday, .mini-day {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 27px;
  min-height: 23px;
  padding: 0;
  text-align: center;
  font-size: 11px;
}
.mini-weekday { color: #b5c9de; font-size: 10px; font-weight: 650; }
.mini-day { color: #f3f7fd; border: 1px solid transparent; border-radius: 5px; background: transparent; }
.mini-day.outside { color: #a4b6cb; }
.mini-day.today { color: #fff; border-color: #a8c7ed; font-weight: 700; }
.mini-day:hover, .mini-paging button:hover { background: #35567e; }
.mini-day.chosen { color: #15355d; background: #dceafa; font-weight: 700; }
.rail-room-list { display: grid; gap: 1px; }
.rail-calendars .navlabel { margin: 10px 6px 5px; }
.rail-room-check {
  position: relative;
  min-height: 31px;
  gap: 9px;
  padding: 4px 6px;
  border-radius: 5px;
  font-size: 12px;
  color: #f2f6fc;
  cursor: pointer;
}
.rail-room-check:hover { background: #25466c; }
.rail-room-check input { margin: 0; flex: 0 0 auto; width: 15px; height: 15px; accent-color: var(--room-accent); }
.rail-room-check .room-swatch { display: none; }
.rail-room-check:has(input:not(:checked)) { color: #c2d0e1; }
.rail-room-check .name { min-width: 0; line-height: 1.3; }
.rail-calendars :focus-visible { outline-color: #f9c977; outline-offset: 1px; }

#view:has(> .calendar-workspace) {
  max-width: none;
  padding: 0 clamp(10px, 1.4vw, 24px) 16px;
}
main:has(.calendar-workspace) { background: #fff; }
main:has(.calendar-workspace) .top {
  height: 46px;
  margin-inline: clamp(12px, 1.5vw, 26px);
}
.calendar-workspace { min-width: 0; }
.month-toolbar { gap: 12px; min-height: 64px; padding-block: 10px; flex-wrap: wrap; }
.month-title {
  margin: 0 auto 0 0;
  color: var(--ink);
  font-size: clamp(19px, 1.75vw, 27px);
  line-height: 1.18;
  font-weight: 650;
  letter-spacing: -.035em;
}
.month-toolbar .toggle, .month-toolbar .paging { flex: 0 0 auto; }
.month-toolbar .primary { min-height: 33px; font-size: 12px; padding: 6px 11px; }
.month-toolbar .paging button { min-height: 30px; }
.month-boards {
  --month-week-height: clamp(86px, calc((100dvh - 185px) / 6), 160px);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(min(245px, 100%), 1fr);
  gap: 6px;
  overflow-x: auto;
  align-items: start;
  padding: 1px 1px 6px;
}
.room-month {
  min-width: 0;
  border: 1px solid #ccd5df;
  border-radius: 7px 7px 4px 4px;
  background: #fff;
  overflow: hidden;
}
.room-month-head {
  gap: 6px;
  min-height: 34px;
  padding: 3px 7px 3px 11px;
  background: var(--room-accent);
  color: #fff;
  font-size: 12px;
  line-height: 1.25;
}
.room-month-head h2, .room-month-head h3 { margin: 0; font: inherit; font-weight: 650; }
.room-month-head strong { font-weight: 650; }
.room-month-head svg { width: 14px; height: 14px; }
.room-remove {
  display: grid;
  place-items: center;
  flex: none;
  width: 27px;
  min-height: 26px;
  padding: 0;
  margin-inline-start: auto;
  color: white;
  border: 0;
  border-radius: 4px;
  background: transparent;
}
.room-remove:hover { background: #ffffff29; }
.room-remove:focus-visible { outline-color: #fff; outline-offset: -2px; }
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: 27px;
  grid-auto-rows: var(--month-week-height);
}
.month-weekday {
  display: grid;
  align-items: center;
  text-align: center;
  background: #f9fafb;
  color: #46566b;
  font-size: 10px;
  font-weight: 650;
  border-bottom: 1px solid #d2dbe4;
}
.month-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: stretch;
  min-width: 0;
  min-height: 0;
  padding: 2px;
  overflow: auto;
  scrollbar-width: thin;
  border-right: 1px solid #dce2e9;
  border-bottom: 1px solid #dce2e9;
  background: #fff;
}
.month-cell:nth-child(7n) { border-right: 0; }
.month-cell:nth-last-child(-n + 7) { border-bottom: 0; }
.month-cell.outside { background: #f6f7f9; }
.month-cell.chosen { box-shadow: inset 0 0 0 1.5px var(--room-accent); }
.month-day-number {
  display: grid;
  place-items: center;
  align-self: flex-end;
  padding: 0;
  min-width: 23px;
  min-height: 22px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 530;
  font-variant-numeric: tabular-nums;
}
.month-cell.outside .month-day-number { color: #667584; }
.month-day-number:hover { background: #e9eef4; }
.month-cell.today .month-day-number { color: white; background: var(--blue); font-weight: 700; }
.month-event {
  flex: none;
  display: block;
  min-width: 0;
  max-width: 100%;
  min-height: 21px;
  padding: 3px 4px;
  border: 0;
  border-radius: 3px;
  color: var(--room-ink);
  background: var(--room-tint);
  text-align: start;
  line-height: 1.18;
}
.month-event:hover { outline: 1px solid var(--room-accent); outline-offset: -1px; }
.month-event-time, .month-event-title, .month-event-company {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.month-event-time { font-size: 10px; font-variant-numeric: tabular-nums; }
.month-event-title { font-size: 12px; font-weight: 550; }
.month-event-company { font-size: 10px; }
.month-boards:has(.room-month:nth-child(2)) .month-event-time,
.month-boards:has(.room-month:nth-child(2)) .month-event-company { display: none; }
.month-cell :focus-visible { outline: 2px solid #854d05; outline-offset: -2px; }
.rooms-empty {
  padding: 32px 16px;
  border: 1px dashed #afbdcd;
  border-radius: 6px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

@media (min-width: 761px) {
  .rail:has(.rail-calendars:not([hidden])) {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #56708f var(--navy);
    padding-top: 23px;
  }
  .rail:has(.rail-calendars:not([hidden])) .product { margin-bottom: 18px; }
  .rail:has(.rail-calendars:not([hidden])) .navitem { padding-block: 8px; }
  .rail:has(.rail-calendars:not([hidden])) nav .navlabel:not(:first-child) { margin-top: 12px; }
}
@media (max-width: 760px) {
  .rail-calendars { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 7px 0; }
  .rail-calendars .mini-cal, .rail-calendars .navlabel { display: none; }
  .rail-room-list { display: flex; flex-wrap: wrap; gap: 4px 10px; }
  .rail-room-check { min-height: 30px; gap: 5px; padding: 3px; font-size: 11px; }
  #view:has(> .calendar-workspace) { padding-inline: 10px; }
  .month-toolbar { gap: 8px; min-height: 56px; }
  .month-title { font-size: 20px; }
  .month-toolbar .seg { padding-inline: 7px; }
  .month-boards {
    grid-auto-flow: row;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-columns: auto;
    gap: 12px;
    --month-week-height: 82px;
  }
  .month-cell { padding: 2px; }
}
@media (max-width: 500px) {
  .month-title { flex: 1 0 calc(100% - 140px); }
  .month-toolbar .toggle { margin-inline-start: auto; }
}
.rail-room-list h2 {
  margin: 7px 6px 5px;
  color: #cadaec;
  font-size: 11px;
  font-weight: 640;
  letter-spacing: .02em;
}
.month-event:not(.outlook-event) {
  color: var(--on-tint, var(--room-ink));
  background: var(--tint, var(--room-tint));
  border-color: var(--accent, var(--room-accent));
}
.minute-slots .slot.event.outlook-event {
  color: var(--room-ink);
  background: var(--room-tint);
}
.month-cell.unknown,
.slot.unknown {
  background-color: #f6f8fa;
  background-image: repeating-linear-gradient(-45deg, transparent 0 7px, #dce2e765 7px 8px);
}
.coverage-day {
  color: #526172;
  font-size: 10px;
  line-height: 1.22;
  overflow-wrap: anywhere;
}
.slot.unknown { color: #536171; font-weight: 500; }
.coverage-note { margin: 8px 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
@media (max-width: 760px) {
  .rail-room-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(92px, 100%), 1fr));
    gap: 2px 6px;
  }
  .rail-room-list h2 { display: none; }
  .rail-room-check .name { overflow-wrap: anywhere; }
}
.calendar.day thead .room-th {
  color: var(--room-ink);
  background: var(--room-tint);
  border-top: 3px solid var(--room-accent);
}
.calendar.day .room-th svg { color: var(--room-accent); }
@media (min-width: 761px) {
  /* Mantém a grade à altura da janela também nos meses de quatro ou cinco semanas. */
  .month-grid:has(> :nth-child(35):last-child) { grid-auto-rows: clamp(86px, calc((100dvh - 185px) / 4), 215px); }
  .month-grid:has(> :nth-child(42):last-child) { grid-auto-rows: clamp(86px, calc((100dvh - 185px) / 5), 180px); }
}

.month-jump {
  display: inline-flex;
  align-items: baseline;
  gap: .28em;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: start;
}
.month-jump span { color: var(--muted); font-size: .74em; }
.month-jump:hover { color: var(--blue); }

/* O balão de uma reserva fica fora da área rolável da célula. */
.event-popover {
  position: fixed;
  z-index: 40;
  width: min(348px, calc(100vw - 20px));
  max-height: calc(100vh - 20px);
  max-height: calc(100dvh - 20px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 15px 16px 13px;
  border: 1px solid #c7d0da;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 7px #182c421c, 0 10px 32px #20344b2b;
  font-size: 13px;
  line-height: 1.42;
  overflow-wrap: anywhere;
  pointer-events: auto;
}
.event-popover[hidden] { display: none; }
.event-popover-head {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 27px;
  align-items: start;
  gap: 9px;
}
.event-marker {
  height: 10px;
  width: 10px;
  border-radius: 3px;
  margin-top: 5px;
  background: var(--accent, var(--room-accent, var(--blue)));
}
.popover-title {
  margin: 0;
  padding-top: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -.02em;
}
.popover-close {
  display: inline-grid;
  place-items: center;
  width: 27px;
  min-height: 27px;
  margin-top: -3px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
}
.popover-close svg { width: 14px; height: 14px; }
.popover-close:hover { background: #eaf0f5; color: var(--ink); }
.popover-meta {
  display: grid;
  gap: 5px;
  margin: 9px 0 0 19px;
  color: var(--text);
}
.popover-meta > * {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  margin: 0;
}
.popover-meta svg { align-self: center; width: 15px; height: 15px; color: var(--muted); }
.popover-time { font-variant-numeric: tabular-nums; }
.popover-origin { font-size: 12px; color: var(--muted); }
.popover-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.popover-actions:empty { display: none; }
.popover-actions button { min-height: 30px; padding: 5px 9px; font-size: 12px; }
.event-popover :focus-visible { outline: 2px solid #986018; outline-offset: 2px; }
@media (max-width: 500px) {
  .event-popover { padding: 12px; }
  .popover-actions button { min-height: 35px; }
}
@media (forced-colors: active) {
  .event-popover { border: 1px solid CanvasText; background: Canvas; color: CanvasText; }
  .event-marker { border: 1px solid CanvasText; }
}

[hidden] { display: none !important; }
.company-purple { --accent: #7558a0; --tint: #eee8fa; --on-tint: #533c79; }
.company-rose { --accent: #a25270; --tint: #f9e7ed; --on-tint: #73354d; }
.company-teal { --accent: #1f7883; --tint: #def1f3; --on-tint: #185662; }

.signed-out .app { display: block; }
.signed-out .rail {
  position: static;
  height: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 22px;
  padding: 16px clamp(20px, 5vw, 64px);
}
.signed-out .brand { margin: 0; }
.signed-out .brand img { width: 96px; }
.signed-out .product { display: block; margin: 0; }
.signed-out .rail-bottom, .signed-out .top, .signed-out nav { display: none; }
.signed-out #view { padding: clamp(40px, 10vh, 96px) 20px; }
.auth-panel {
  max-width: 396px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  background: var(--paper);
}
.auth-panel h1 { font-size: clamp(27px, 4vw, 35px); }
.auth-description { margin: 10px 0 4px; color: var(--text); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.auth-panel input { min-height: 44px; font-size: 16px; }
.auth-panel .primary { min-height: 42px; }
.auth-panel .plain { justify-self: center; }
.field .field-hint { font-size: inherit; font-weight: 450; color: var(--muted); }
.identity { overflow-wrap: anywhere; }
.identity:hover { background: transparent; }

