@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --blue: #0b4bd6;
  --blue-deep: #001e74;
  --orange: #ff7b2c;
  --surface: #ffffff;
  --surface-alt: #f3f7ff;
  --ink: #14213d;
  --muted: #61708b;
  --border: rgba(20, 33, 61, 0.08);
  --success: #1b9a59;
  --warning: #cb7b12;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #eff4ff, #fafcff);
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

.office-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.login-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.login-panel {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 22px 50px rgba(0, 30, 116, 0.12);
  padding: 32px;
}

.login-panel-brand {
  color: #fff;
  background: linear-gradient(145deg, var(--blue-deep), #1352e2);
}

.login-panel-brand img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 18px;
}

.login-panel-brand h1,
.login-panel-form h2 {
  margin: 0 0 14px;
  line-height: 1.04;
}

.login-panel-brand p,
.login-panel-brand li,
.login-panel-form p {
  color: inherit;
  line-height: 1.7;
}

.login-panel-brand ul {
  margin: 20px 0 0;
  padding-left: 18px;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.login-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.login-form button {
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), #3a79ff);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.login-error {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  color: #fff;
  background: #d33f49;
}

.office-sidebar {
  padding: 24px 20px;
  background: linear-gradient(180deg, var(--blue-deep), #0d3bb7);
  color: #fff;
}

.office-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.office-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.office-brand strong,
.office-brand small {
  display: block;
}

.office-sidebar nav {
  display: grid;
  gap: 8px;
}

.office-sidebar nav a {
  padding: 12px 14px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.office-sidebar nav a.is-active,
.office-sidebar nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.office-main {
  padding: 28px;
}

.office-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 24px;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash-message {
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
}

.flash-success {
  background: rgba(27, 154, 89, 0.14);
  color: #0f6a3d;
}

.flash-error {
  background: rgba(211, 63, 73, 0.14);
  color: #a3222c;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.office-header h1,
.panel h2 {
  margin: 0;
  line-height: 1.04;
}

.header-note {
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}

.header-note strong,
.header-note span,
.header-note a {
  display: block;
}

.header-note a {
  margin-top: 8px;
  color: var(--blue);
  font-weight: 800;
}

.stats-grid,
.office-grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.stats-grid article,
.panel {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(0, 30, 116, 0.08);
}

.stats-grid article {
  padding: 22px;
}

.stats-grid p,
.stats-grid span,
.panel p {
  margin: 0;
}

.stats-grid p {
  color: var(--muted);
  font-weight: 700;
}

.stats-grid strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 2.2rem;
  color: var(--blue-deep);
}

.office-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.panel {
  grid-column: span 4;
  padding: 22px;
}

.panel-wide {
  grid-column: span 8;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.summary-list,
.roadmap-list {
  display: grid;
  gap: 12px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.filter-grid-tight {
  grid-template-columns: minmax(0, 1fr) auto;
}

.calendar-filter-grid {
  grid-template-columns: 1.2fr 1.2fr 1fr 1fr auto;
}

.filter-grid label {
  display: grid;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--muted);
}

.filter-grid input,
.filter-grid select {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.inline-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.inline-form-grid label {
  display: grid;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--muted);
}

.inline-form-grid input,
.inline-form-grid select,
.inline-form-grid textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.inline-form-grid textarea {
  min-height: 110px;
  resize: vertical;
}

.field-span-2 {
  grid-column: span 2;
}

.filter-actions {
  display: flex;
  gap: 10px;
  align-items: end;
}

.filter-actions button,
.filter-actions a {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  font: inherit;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-actions button {
  border: 0;
  background: linear-gradient(135deg, var(--blue), #3a79ff);
  color: #fff;
  cursor: pointer;
}

.filter-actions a {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--blue-deep);
}

.summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-list li,
.roadmap-list article {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.summary-list li:last-child,
.roadmap-list article:last-child {
  border-bottom: 0;
}

.roadmap-list h3 {
  margin: 0 0 6px;
}

.roadmap-list span {
  align-self: start;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--blue-deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.94rem;
}

.data-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.data-table-compact td {
  vertical-align: top;
}

.table-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.status-inline-form {
  margin-top: 10px;
}

.mini-action-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--blue-deep);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.mini-action-danger {
  border-color: rgba(211, 63, 73, 0.18);
  background: rgba(211, 63, 73, 0.08);
  color: #a3222c;
}

.mini-link-button {
  margin-top: 8px;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--blue);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
}

.pill.success {
  color: #fff;
  background: var(--success);
}

.pill.warning {
  color: #fff;
  background: var(--warning);
}

.property-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.property-mini-grid article {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-alt);
}

.property-mini-grid strong,
.property-mini-grid p,
.property-mini-grid span {
  display: block;
}

.property-mini-grid p,
.property-mini-grid span {
  color: var(--muted);
}

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

.property-office-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface-alt);
}

.property-office-cover {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #dde7ff, #f8fbff);
}

.property-office-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.property-office-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.property-office-body {
  padding: 18px;
}

.property-office-body h3 {
  margin: 0 0 10px;
}

.property-office-body p,
.property-office-body small {
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.chip-row span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue-deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.metric-stack {
  display: grid;
  gap: 10px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-alt);
}

.metric-row strong,
.metric-row span,
.metric-row b {
  display: block;
}

.metric-row span {
  color: var(--muted);
  font-size: 0.84rem;
}

.calendar-board {
  overflow: auto;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
}

.calendar-grid {
  display: grid;
  grid-template-columns: 250px repeat(var(--calendar-days, 21), minmax(42px, 1fr));
  min-width: max-content;
}

.calendar-grid-head,
.calendar-property-meta,
.calendar-cell {
  min-height: 64px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.calendar-grid-head {
  display: grid;
  place-items: center;
  padding: 10px 6px;
  background: var(--surface-alt);
  text-align: center;
}

.calendar-grid-head strong,
.calendar-grid-head small,
.calendar-grid-head span {
  display: block;
}

.calendar-grid-head strong {
  font-size: 1rem;
}

.calendar-grid-head small,
.calendar-grid-head span {
  color: var(--muted);
  font-size: 0.74rem;
}

.calendar-grid-head-fixed {
  place-items: center start;
  padding-left: 18px;
  font-weight: 800;
}

.calendar-property-meta {
  padding: 12px 16px;
  background: #fff;
}

.calendar-property-meta strong,
.calendar-property-meta span,
.calendar-property-meta small {
  display: block;
}

.calendar-property-meta span,
.calendar-property-meta small {
  color: var(--muted);
}

.calendar-cell {
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.76rem;
}

.calendar-cell span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.calendar-cell.tone-free {
  background: #fff;
}

.calendar-cell.tone-checkin {
  background: rgba(11, 75, 214, 0.08);
}

.calendar-cell.tone-checkin span {
  background: var(--blue);
  color: #fff;
}

.calendar-cell.tone-occupied {
  background: rgba(255, 123, 44, 0.14);
}

.calendar-cell.tone-occupied span {
  color: var(--orange);
  font-size: 1rem;
}

.calendar-cell.tone-checkout {
  background: rgba(27, 154, 89, 0.12);
}

.calendar-cell.tone-checkout span {
  background: var(--success);
  color: #fff;
  font-size: 0.66rem;
}

.calendar-cell.tone-turnover {
  background: rgba(203, 123, 18, 0.14);
}

.calendar-cell.tone-turnover span {
  background: var(--warning);
  color: #fff;
}

.calendar-cell.tone-blocked {
  background: rgba(20, 33, 61, 0.1);
}

.calendar-cell.tone-blocked span {
  background: var(--ink);
  color: #fff;
}

@media (max-width: 1120px) {
  .login-shell,
  .office-shell {
    grid-template-columns: 1fr;
  }

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

  .panel,
  .panel-wide {
    grid-column: span 12;
  }

  .filter-grid,
  .filter-grid-tight,
  .calendar-filter-grid,
  .inline-form-grid,
  .property-card-grid {
    grid-template-columns: 1fr;
  }

  .field-span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 720px) {
  .office-main {
    padding: 18px;
  }

  .login-panel {
    padding: 24px;
  }

  .office-header,
  .stats-grid,
  .property-mini-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .office-header {
    align-items: start;
  }

  .filter-actions {
    flex-direction: column;
  }

  .filter-actions button,
  .filter-actions a {
    width: 100%;
  }
}
