:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --panel: #ffffff;
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --brand: #155eef;
  --brand-dark: #123c9c;
  --green: #0e9384;
  --amber: #dc6803;
  --red: #d92d20;
  --violet: #6941c6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: #0b1220;
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 3px;
  color: #98a2b3;
  font-size: 13px;
}

.tabs {
  display: grid;
  gap: 8px;
}

.tab,
.download,
button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 750;
}

.tab {
  padding: 0 12px;
  text-align: left;
  color: #cbd5e1;
  background: transparent;
  cursor: pointer;
}

.tab.active,
.tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.download,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: #fff;
  background: var(--brand);
  text-decoration: none;
  cursor: pointer;
}

.download {
  margin-top: auto;
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

main {
  min-width: 0;
  padding: 28px;
}

.topbar,
.section-title,
.panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.topbar {
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 20px;
}

.panel-head p,
.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.actions,
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status {
  max-width: 420px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metrics.compact {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.metric,
.panel,
.table-wrap,
.day-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric {
  min-height: 104px;
  padding: 16px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 12px;
  font-size: 27px;
  line-height: 1;
}

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

.panel {
  padding: 18px;
}

canvas {
  display: block;
  width: 100%;
  height: 360px;
}

.notifications {
  display: grid;
  gap: 10px;
}

.notification-menu {
  position: relative;
}

.notification-button {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.notification-button span {
  min-width: 24px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  margin-left: 8px;
  border-radius: 999px;
  background: #fee4e2;
  color: #b42318;
  font-size: 12px;
}

.notification-dropdown {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, calc(100vw - 40px));
  max-height: 440px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.16);
}

.notice {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f9fafb;
}

.notice strong,
.notice span {
  display: block;
}

.notice span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.notice.demand {
  border-color: #fecdca;
  background: #fffbfa;
}

.notice.property {
  border-color: #d9d6fe;
  background: #f4f3ff;
}

.notice.reservation {
  border-color: #abefc6;
  background: #f6fef9;
}

.section-title {
  margin-bottom: 16px;
}

.subsection-title {
  margin: 22px 0 12px;
}

.subsection-title h2,
.subsection-title p {
  margin: 0;
}

.subsection-title p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(86px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.day-card {
  min-height: 92px;
  padding: 12px;
  border-left-width: 4px;
}

.day-card span,
.day-card small {
  display: block;
  color: var(--muted);
}

.day-card strong {
  display: block;
  margin: 8px 0 5px;
  font-size: 24px;
}

.high {
  border-color: #fecdca;
  border-left-color: var(--red);
}

.medium {
  border-color: #fedf89;
  border-left-color: var(--amber);
}

.normal {
  border-color: #abefc6;
  border-left-color: var(--green);
}

.missing {
  border-color: var(--line);
  border-left-color: #98a2b3;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #f9fafb;
}

.new-row {
  background: #f4f3ff;
}

.mine-row {
  background: #eff8ff;
}

.name {
  max-width: 420px;
  font-weight: 800;
}

.name a {
  color: var(--ink);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.pill.high {
  color: #b42318;
  background: #fee4e2;
}

.pill.medium {
  color: #b54708;
  background: #fef0c7;
}

.pill.normal {
  color: #067647;
  background: #dcfae6;
}

.pill.missing {
  color: #475467;
  background: #f2f4f7;
}

.pill.new {
  color: #5925dc;
  background: #ebe9fe;
}

.pill.mine {
  color: #175cd3;
  background: #d1e9ff;
}

input[type="search"],
input[type="date"] {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  font: inherit;
}

input[type="search"] {
  width: min(340px, 100%);
}

.empty {
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.empty.small {
  padding: 16px;
  text-align: left;
}

@media (max-width: 1180px) {
  .metrics,
  .calendar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 860px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  main {
    padding: 20px;
  }

  .topbar,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics,
  .metrics.compact,
  .calendar-grid {
    grid-template-columns: 1fr;
  }
}
