:root {
  color-scheme: light;
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-alt: #f8fafc;
  --line: #d9e2ef;
  --text: #15304b;
  --muted: #5f7187;
  --primary: #1865f2;
  --primary-soft: rgba(24, 101, 242, 0.1);
  --occupied: #18a957;
  --vacant: #f59e0b;
  --reserved: #6d5efc;
  --maintenance: #ef4444;
  --shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #edf3ff 0%, var(--bg) 18%, var(--bg) 100%);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

#toast-notice {
  position: fixed;
  z-index: 40;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 13px 17px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 13px;
  background: rgba(23, 32, 51, 0.92);
  color: #fff;
  box-shadow: 0 14px 36px rgba(23, 32, 51, 0.24);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#toast-notice.visible {
  opacity: 1;
  transform: translateY(0);
}

.hidden {
  display: none !important;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.4fr);
  overflow: hidden;
  background: #f5f0e7;
}

.login-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #334836;
}

.login-gallery {
  position: absolute;
  inset: 0;
}

.login-gallery-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.92) contrast(1.03);
  opacity: 1;
  transform: scale(1);
  transition: opacity 140ms ease, transform 340ms ease;
}

.login-gallery-main.is-changing {
  opacity: 0;
  transform: scale(1.015);
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(19, 35, 25, 0.08) 28%, rgba(18, 37, 25, 0.74) 100%);
}

.login-visual-overlay {
  position: absolute;
  z-index: 2;
  right: clamp(28px, 5vw, 76px);
  bottom: clamp(116px, 10vw, 150px);
  left: clamp(28px, 5vw, 76px);
  color: #fffef7;
  text-shadow: 0 2px 18px rgba(12, 25, 17, 0.35);
}

.login-visual-overlay p,
.login-visual-overlay span {
  display: block;
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.login-visual-overlay strong {
  display: block;
  margin: 8px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 5.1vw, 76px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.login-gallery-nav {
  position: absolute;
  z-index: 2;
  right: clamp(28px, 5vw, 76px);
  bottom: clamp(34px, 6vw, 82px);
  display: flex;
  gap: 10px;
}

.gallery-thumb {
  width: 88px;
  height: 60px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 9px;
  background: rgba(15, 29, 37, 0.45);
  box-shadow: 0 8px 20px rgba(7, 18, 20, 0.22);
  opacity: 0.7;
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.gallery-thumb img {
  display: block;
  width: 88px;
  height: 60px;
  object-fit: cover;
}

.gallery-thumb:hover,
.gallery-thumb:focus-visible,
.gallery-thumb.active {
  border-color: #fffdf7;
  opacity: 1;
  outline: none;
  transform: translateY(-3px);
}

.gallery-thumb:focus-visible {
  box-shadow: 0 0 0 3px rgba(231, 207, 144, 0.9), 0 8px 20px rgba(7, 18, 20, 0.22);
}

.login-panel {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 26px;
  background:
    radial-gradient(circle at 78% 10%, rgba(211, 182, 126, 0.16), transparent 32%),
    #f7f3ea;
}

.login-card {
  width: min(360px, 100%);
  padding: clamp(26px, 3vw, 36px);
  border: 1px solid rgba(99, 82, 51, 0.15);
  border-radius: 24px;
  color: #2d3f2d;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 22px 56px rgba(82, 66, 39, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.login-photo-ribbon {
  width: min(300px, 100%);
  display: flex;
  align-items: center;
}

.login-photo-ribbon-top {
  justify-content: flex-start;
  gap: 10px;
  padding-left: 8px;
}

.login-photo-ribbon-top span {
  max-width: 70px;
  color: #6d765f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  font-style: italic;
  line-height: 1.25;
}

.login-photo-ribbon-bottom {
  justify-content: flex-end;
  gap: 8px;
  padding-right: 0;
}

.login-photo {
  margin: 0;
  overflow: hidden;
  border: 4px solid rgba(255, 253, 248, 0.92);
  background: #e4ddce;
  box-shadow: 0 9px 20px rgba(69, 58, 36, 0.16);
}

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

.login-photo-wide {
  width: 210px;
  height: 90px;
  transform: rotate(-2.5deg);
}

.login-photo-small {
  width: 104px;
  height: 72px;
}

.login-photo-tiny {
  width: 74px;
  height: 54px;
}

.login-photo-closet {
  transform: rotate(-5deg) translateY(5px);
}

.login-contact-details {
  width: min(300px, 100%);
  margin: 10px 0 0;
  padding-top: 13px;
  border-top: 1px solid rgba(102, 91, 65, 0.18);
  color: #6d765f;
  font-style: normal;
}

.login-contact-details span {
  display: block;
  color: #9a927e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.login-contact-address p {
  margin: 4px 0 11px;
  color: #53604f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  line-height: 1.35;
}

.login-contact-empty {
  display: inline-block;
  width: 48%;
  vertical-align: top;
}

.login-contact-empty i {
  display: block;
  width: calc(100% - 9px);
  height: 10px;
  margin-top: 3px;
  border-bottom: 1px solid rgba(102, 91, 65, 0.22);
}

.login-photo-home {
  transform: rotate(3deg) translateY(2px);
}

.login-photo-pool {
  transform: rotate(-4deg) translateY(-3px);
}

.login-card h1 {
  margin: 0;
  color: #243a29;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.login-copy {
  margin: 12px 0 28px;
  color: #687263;
  line-height: 1.55;
}

.login-card .stack-form {
  gap: 17px;
}

.login-card label {
  color: #3d4d3e;
  font-weight: 650;
}

.login-card input,
.login-card select {
  width: 100%;
  border-color: #d7d0c0;
  color: #2d3d2e;
  background: #fffdf8;
}

.login-card .primary-btn {
  width: 100%;
  margin-top: 5px;
  background: #456748;
  color: #fffdf7;
  box-shadow: 0 12px 24px rgba(49, 83, 53, 0.22);
}

.login-card .primary-btn:hover {
  background: #355638;
}

.login-error {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(155, 67, 56, 0.24);
  border-radius: 10px;
  color: #8a312a;
  background: #fff0ed;
  font-size: 14px;
  line-height: 1.4;
}

@media (max-width: 820px) {
  .login-page {
    grid-template-columns: 1fr;
    background: #f7f3ea;
  }

  .login-visual {
    min-height: 260px;
    max-height: 34vh;
  }

  .login-visual-overlay {
    right: 26px;
    bottom: 96px;
    left: 26px;
  }

  .login-gallery-nav {
    right: 26px;
    bottom: 28px;
    gap: 8px;
  }

  .gallery-thumb,
  .gallery-thumb img {
    width: 72px;
    height: 49px;
  }

  .login-visual-overlay strong {
    font-size: 42px;
  }

  .login-panel {
    min-height: auto;
    padding: 24px 16px 34px;
  }

  .login-photo-ribbon {
    display: none;
  }

  .login-contact-details {
    display: none;
  }

  .login-card {
    padding: 30px 24px;
    border-radius: 22px;
  }

  .login-card h1 {
    font-size: 27px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .login-gallery-main,
  .gallery-thumb {
    transition: none;
  }
}

.shell {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.hero h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

.hero p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 860px;
}

.toolbar,
.toolbar-right,
.toolbar-left,
.inline-actions,
.auth-box,
.summary-grid,
.layout-columns,
.management-grid,
.legend,
.status-actions,
.filter-row,
.tab-row,
.stats-row,
.building-tabs,
.floor-meta,
.detail-meta,
.board-toolbar,
.card-actions,
.settings-grid,
.asset-grid,
.fees-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar {
  align-items: center;
}

.toolbar-right {
  justify-content: flex-end;
}

.chip,
.ghost-btn,
.secondary-btn,
.primary-btn,
.status-btn,
.lang-btn,
.tab-btn,
.building-tab,
.mini-btn,
.danger-btn {
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
  transition: 0.2s ease;
}

.chip,
.ghost-btn,
.secondary-btn,
.lang-btn,
.tab-btn,
.building-tab,
.mini-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}

.ghost-btn:hover,
.secondary-btn:hover,
.lang-btn:hover,
.tab-btn:hover,
.building-tab:hover,
.mini-btn:hover {
  background: #eef4ff;
}

.primary-btn {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 28px rgba(24, 101, 242, 0.28);
}

.primary-btn:hover {
  background: #0f55d8;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(24, 101, 242, 0.1);
  border: 1px solid rgba(24, 101, 242, 0.2);
  color: var(--primary);
  font-weight: 700;
}

.login-badge strong {
  color: var(--text);
}

.danger-btn {
  background: #fee2e2;
  color: #b91c1c;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.panel,
.summary-card,
.building-card,
.unit-card,
.detail-card,
.board-card,
.setting-card {
  background: var(--panel);
  border: 1px solid rgba(217, 226, 239, 0.9);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.summary-card {
  padding: 18px;
}

.summary-card h3,
.panel h3,
.board-card h3,
.detail-card h3,
.setting-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.kpi {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
}

.kpi-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.layout-columns {
  align-items: flex-start;
}

.left-rail,
.main-rail,
.right-rail {
  min-width: 0;
}

.left-rail {
  flex: 0 0 300px;
}

.main-rail {
  flex: 1 1 0;
}

.right-rail {
  flex: 0 0 390px;
}

.panel {
  padding: 18px;
  margin-bottom: 18px;
}

.building-grid {
  display: grid;
  gap: 14px;
}

.building-card {
  padding: 16px;
  border: 1px solid transparent;
}

.building-card.active {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(24, 101, 242, 0.08), rgba(24, 101, 242, 0.02));
}

.building-head,
.unit-head,
.row-between,
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.muted {
  color: var(--muted);
}

.tiny {
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #ecf2ff;
  color: var(--primary);
}

.legend .pill {
  background: var(--panel-alt);
  border: 1px solid var(--line);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-occupied {
  background: rgba(24, 169, 87, 0.12);
  color: #0f8a46;
}

.status-vacant {
  background: rgba(245, 158, 11, 0.16);
  color: #b87100;
}

.status-reserved {
  background: rgba(109, 94, 252, 0.16);
  color: #4b3ed1;
}

.status-maintenance {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.status-dot.occupied {
  background: var(--occupied);
}

.status-dot.vacant {
  background: var(--vacant);
}

.status-dot.reserved {
  background: var(--reserved);
}

.status-dot.maintenance {
  background: var(--maintenance);
}

.lease-alert {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding: 4px 7px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
}

.lease-alert.expiring {
  background: #fff4d6;
  color: #9a5c00;
}

.lease-alert.normal {
  background: #e8eef5;
  color: #465a70;
}

.lease-alert.expired {
  background: #f8e7f0;
  color: #8c2455;
}

.unit-card.expiring {
  border-left: 4px solid #d58b00;
}

.unit-card.expired {
  border-left: 4px solid #9b2c61;
}

.summary-filter {
  text-align: left;
  cursor: pointer;
}

.summary-filter:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.floor-block {
  background: var(--panel-alt);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin-top: 14px;
}

.floor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
  gap: 12px;
}

.unit-card {
  padding: 14px;
  cursor: pointer;
  border: 1px solid transparent;
}

.unit-card:hover,
.unit-card.active {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.unit-card.occupied {
  background: linear-gradient(180deg, rgba(24, 169, 87, 0.1), rgba(24, 169, 87, 0.02));
}

.unit-card.vacant {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.02));
}

.unit-card.reserved {
  background: linear-gradient(180deg, rgba(109, 94, 252, 0.1), rgba(109, 94, 252, 0.02));
}

.unit-card.maintenance {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.02));
}

.unit-code {
  font-size: 18px;
  font-weight: 800;
}

.detail-card,
.board-card,
.setting-card {
  padding: 18px;
  margin-bottom: 18px;
}

.detail-card form,
.stack-form,
.board-form,
.settings-grid,
.asset-grid,
.fees-grid {
  display: grid;
  gap: 12px;
}

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

.three-col {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  color: var(--text);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

thead th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.list-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-alt);
  padding: 12px;
}

.asset-item {
  align-content: start;
}

.asset-item select {
  margin-top: 8px;
}

.equipment-date-grid {
  margin-top: 12px;
}

.tenant-history-panel {
  overflow: hidden;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.tenant-history-table {
  min-width: 760px;
}

/* The detail editor lives in a narrow right rail. Stack long equipment labels
   and date controls instead of forcing three overflowing columns. */
.detail-card .equipment-date-grid {
  grid-template-columns: minmax(0, 1fr);
}

.detail-card .equipment-date-grid label,
.detail-card .equipment-date-grid input {
  min-width: 0;
}

.locked {
  padding: 18px;
  text-align: center;
  background: linear-gradient(180deg, rgba(24, 101, 242, 0.06), rgba(24, 101, 242, 0.02));
  border: 1px dashed #a9c5ff;
  border-radius: 16px;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #eef4ff;
  color: var(--primary);
}

.status-actions .status-btn {
  background: var(--panel-alt);
  border: 1px solid var(--line);
  color: var(--text);
}

.status-actions .status-btn.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.management-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
}

.modal-card {
  width: min(520px, 100%);
  background: var(--panel);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.metric-lock {
  opacity: 0.55;
}

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

  .layout-columns {
    flex-direction: column;
  }

  .left-rail,
  .main-rail,
  .right-rail {
    flex: 1 1 auto;
    width: 100%;
  }

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

@media (max-width: 900px) {
  .shell {
    padding: 14px;
  }

  .summary-grid,
  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }
}

/* Blue glass hero */
.topbar {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    radial-gradient(circle at 12% 0%, rgba(121, 190, 255, 0.48), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(79, 112, 255, 0.48), transparent 36%),
    linear-gradient(135deg, rgba(19, 50, 111, 0.88), rgba(35, 72, 157, 0.72));
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  backdrop-filter: blur(24px) saturate(145%);
  box-shadow:
    0 22px 56px rgba(28, 62, 139, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.topbar::before,
.topbar::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(4px);
}

.topbar::before {
  width: 360px;
  height: 180px;
  top: -110px;
  left: 34%;
  background: rgba(150, 219, 255, 0.2);
  transform: rotate(-12deg);
}

.topbar::after {
  width: 220px;
  height: 220px;
  right: -70px;
  bottom: -130px;
  background: rgba(102, 115, 255, 0.32);
}

.topbar .chip,
.topbar .login-badge,
.topbar .toolbar-right .secondary-btn,
.topbar .toolbar-right .ghost-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.topbar .toolbar-right .secondary-btn:hover,
.topbar .toolbar-right .ghost-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.topbar .primary-btn {
  box-shadow: 0 10px 24px rgba(9, 24, 71, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* Operations console refresh */
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-alt: #f8fafc;
  --line: #e4e9f2;
  --text: #172033;
  --muted: #6c7890;
  --primary: #3657d6;
  --primary-soft: rgba(54, 87, 214, 0.1);
  --shadow: 0 10px 28px rgba(26, 38, 70, 0.07);
  --radius: 14px;
}

body {
  background: #f5f7fb;
}

.shell {
  max-width: 1840px;
  padding: 22px 28px 36px;
}

.topbar {
  align-items: stretch;
  padding: 22px 24px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #18264b 0%, #273d79 100%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(24, 38, 75, 0.18);
}

.hero h1 {
  font-size: 27px;
  letter-spacing: -0.02em;
}

.hero p,
.auth-box,
.hero .muted {
  color: rgba(255, 255, 255, 0.72);
}

.chip {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.login-badge {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  color: #dbe5ff;
}

.login-badge strong {
  color: #fff;
}

.toolbar-right {
  align-content: center;
  max-width: 520px;
}

.toolbar-right .secondary-btn,
.toolbar-right .ghost-btn {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.toolbar-right .primary-btn {
  background: #fff;
  color: #273d79;
  box-shadow: none;
}

.summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.summary-card,
.panel,
.detail-card,
.board-card,
.setting-card,
.building-card,
.unit-card {
  border-color: #e5e9f1;
  box-shadow: var(--shadow);
}

.summary-card {
  padding: 16px;
}

.summary-card h3 {
  color: #6d7890;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi {
  font-size: 25px;
}

.panel {
  padding: 16px;
}

.building-card,
.unit-card,
.detail-card,
.board-card,
.setting-card {
  border-radius: 14px;
}

.unit-card {
  min-height: 112px;
}

.floor-block {
  background: #fbfcfe;
  border-radius: 14px;
}

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

@media (max-width: 700px) {
  .shell {
    padding: 10px;
  }

  .topbar {
    padding: 18px;
  }

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

  .toolbar-right {
    max-width: none;
  }
}

/* Premium property operations layout */
body {
  font-size: 14px;
  letter-spacing: 0.005em;
}

.shell {
  padding: 32px 40px 56px;
}

.topbar {
  min-height: 238px;
  padding: 32px 36px;
  margin-bottom: 30px;
  border-radius: 24px;
  align-items: center;
}

.hero {
  max-width: 880px;
}

.toolbar-left {
  gap: 10px;
  margin-bottom: 20px;
}

.hero h1 {
  margin-bottom: 16px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 760px;
  line-height: 1.75;
}

.hero p+p {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.65;
}

.auth-box {
  gap: 20px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.toolbar-right {
  gap: 10px;
  max-width: 470px;
}

.toolbar-right button {
  min-height: 44px;
}

.summary-grid {
  gap: 18px;
  margin-bottom: 30px;
}

.summary-card {
  min-height: 128px;
  padding: 22px;
  border-radius: 18px;
}

.summary-card h3 {
  margin-bottom: 16px;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.kpi {
  font-size: 32px;
  letter-spacing: -0.04em;
}

.kpi-sub {
  margin-top: 10px;
  line-height: 1.45;
}

.layout-columns {
  gap: 24px;
}

.left-rail,
.right-rail {
  flex-basis: 360px;
}

.panel,
.detail-card,
.board-card,
.setting-card {
  padding: 24px;
  margin-bottom: 24px;
  border-radius: 18px;
}

.panel>h3,
.panel .row-between>h3,
.detail-card>h3,
.board-card>h3,
.setting-card>h3 {
  font-size: 17px;
  letter-spacing: -0.015em;
}

.building-grid {
  gap: 16px;
  margin-top: 18px;
}

.building-card {
  padding: 19px;
  border-radius: 16px;
}

.filter-row {
  gap: 12px;
  margin: 20px 0 14px;
}

.filter-row select,
.filter-row input {
  min-height: 44px;
  background: #fbfcff;
}

.building-tabs {
  gap: 8px;
  margin-bottom: 14px;
}

.building-tab {
  padding: 11px 16px;
}

.floor-block {
  padding: 20px;
  margin-top: 18px;
  border-radius: 16px;
}

.floor-meta {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.floor-grid {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.unit-card {
  min-height: 136px;
  padding: 17px;
  border-radius: 16px;
}

.unit-card .tiny {
  margin-top: 8px;
  line-height: 1.45;
}

.detail-card form {
  gap: 18px;
}

.detail-card h3 {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.detail-card>.row-between h3 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.detail-card .two-col,
.detail-card .three-col {
  gap: 16px;
}

.detail-card label {
  gap: 8px;
  line-height: 1.35;
}

input,
select,
textarea {
  min-height: 44px;
  border-radius: 11px;
  padding: 12px 13px;
}

textarea {
  min-height: 112px;
}

.status-actions {
  gap: 8px;
  margin: 18px 0 10px;
}

.status-actions .status-btn {
  padding: 9px 12px;
}

table {
  margin-top: 14px;
}

th,
td {
  padding: 13px 10px;
}

.management-grid {
  gap: 20px;
}

.board-card .list {
  gap: 12px;
  margin: 16px 0 20px;
}

.list-item {
  padding: 15px;
  line-height: 1.55;
}

.board-form,
.settings-grid {
  gap: 14px;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  min-height: 44px;
}

@media (max-width: 1380px) {
  .shell {
    padding: 24px 28px 44px;
  }

  .topbar {
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .shell {
    padding: 18px 16px 34px;
  }

  .topbar {
    padding: 26px 22px;
    margin-bottom: 22px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .summary-grid {
    gap: 12px;
    margin-bottom: 22px;
  }

  .summary-card {
    min-height: 112px;
    padding: 17px;
  }

  .kpi {
    font-size: 26px;
  }

  .panel,
  .detail-card,
  .board-card,
  .setting-card {
    padding: 18px;
    margin-bottom: 18px;
  }
}
