:root {
  color-scheme: light;
  --ink: #162033;
  --muted: #5f6f83;
  --line: #dce5ee;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-solid: #ffffff;
  --wash: #f4f8fb;
  --navy: #12375d;
  --blue: #2f78a8;
  --aqua: #8fd5df;
  --gold: #d4a341;
  --green: #20b36a;
  --red: #db3f3f;
  --shadow: 0 24px 60px rgba(18, 55, 93, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --site-max: 1480px;
  --sticky-table-top: 91px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: linear-gradient(135deg, #eef7fa 0%, #f9fbfd 44%, #fff7e7 100%);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(16px, 4vw, 42px);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(220, 229, 238, 0.82);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand__logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(18, 55, 93, 0.08);
  padding: 6px;
}

.brand__text {
  display: grid;
  min-width: 0;
}

.brand__eyebrow,
.section-kicker {
  margin: 0;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand__title {
  font-weight: 850;
  font-size: clamp(1.02rem, 2vw, 1.3rem);
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.status-chip,
.admin-link,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: none;
}

.status-chip {
  color: var(--navy);
  background: #ffffff;
  border: 1px solid rgba(18, 55, 93, 0.12);
}

.admin-link,
.button-link {
  color: #ffffff;
  background: var(--navy);
  border: 1px solid var(--navy);
}

.button-link {
  appearance: none;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border: 0;
  box-shadow: 0 12px 26px rgba(18, 55, 93, 0.18);
}

.shell {
  width: min(var(--site-max), calc(100% - clamp(20px, 5vw, 72px)));
  margin: 0 auto;
  padding: clamp(22px, 4vw, 48px) 0 clamp(40px, 6vw, 72px);
}

.hero-card,
.board-section,
.login-card {
  background: var(--panel);
  border: 1px solid rgba(220, 229, 238, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 4vw, 36px);
  margin-bottom: 26px;
}

.hero-card h1,
.login-card h1 {
  margin: 8px 0 0;
  max-width: 820px;
  font-size: clamp(2rem, 5vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-weight: 800;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(220, 229, 238, 0.9);
}

.board-section {
  padding: clamp(18px, 3vw, 28px);
  margin-top: 24px;
  overflow: visible;
}

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

.section-heading h2 {
  margin: 2px 0 0;
  font-size: clamp(1.35rem, 2.4vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.section-meta,
.form-message {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.ops-table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.ops-table td {
  padding: 14px 14px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.ops-table td.property-cell,
.ops-table td.property-group-cell {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 86px;
  width: 86px;
  text-align: center;
  background: #fff;
}

.ops-table .col-property {
  width: 9%;
}

.ops-table .col-status {
  width: 18.2%;
}

.ops-table tr:last-child td {
  border-bottom: 0;
}

.property-name {
  display: inline-flex;
  justify-content: center;
  min-width: 0;
  width: 100%;
  font-weight: 850;
  color: var(--ink);
  white-space: nowrap;
}

.status-light,
.status-light-button {
  --status-color: var(--red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--status-color), #ffffff 10%), var(--status-color));
  border: 1px solid color-mix(in srgb, var(--status-color), #000000 16%);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--status-color), transparent 84%), 0 9px 18px color-mix(in srgb, var(--status-color), transparent 66%);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-light--green,
.status-light-button--green {
  --status-color: var(--green);
}

.status-light--red,
.status-light-button--red {
  --status-color: var(--red);
}

.status-light-button {
  appearance: none;
  cursor: pointer;
}

.status-light-button:hover,
.status-light-button:focus-visible {
  outline: 3px solid rgba(18, 55, 93, 0.18);
  outline-offset: 3px;
}

.status-light-button[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.three-day-grid {
  display: block;
}

.three-day-wrap {
  width: 100%;
}

.three-day-table {
  min-width: 900px;
}

.three-day-table .col-property {
  width: 9%;
}

.three-day-table .col-status {
  width: 18.2%;
}

.three-day-table .property-group-cell {
  vertical-align: middle;
  border-right: 1px solid var(--line);
  background: #ffffff;
}


.three-day-table .property-group-start td {
  border-top: 3px solid #eaf2f8;
}

.three-day-table tbody tr:first-child td {
  border-top: 0;
}


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

.login-card {
  width: min(640px, 100%);
  margin: clamp(26px, 6vw, 72px) auto;
  padding: clamp(24px, 5vw, 42px);
}

.login-form,
.property-form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.login-form label {
  font-weight: 850;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(18, 55, 93, 0.16);
  color: var(--ink);
  background: #fff;
}

input:focus {
  outline: 3px solid rgba(143, 213, 223, 0.55);
  border-color: var(--blue);
}

.property-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.property-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.property-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.property-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.danger-button {
  appearance: none;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(219, 63, 63, 0.24);
  color: #9f2525;
  background: #fff4f4;
  font-weight: 850;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 680px) {
  .app-header {
    align-items: flex-start;
    padding: 12px 14px;
  }

  .brand {
    gap: 10px;
  }

  .brand__logo {
    width: 48px;
    height: 48px;
    border-radius: 13px;
  }

  .brand__title {
    white-space: normal;
  }

  .header-actions {
    gap: 8px;
  }

  .status-chip,
  .admin-link,
  .primary-button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.8rem;
  }

  .shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 18px;
  }

  :root {
    --sticky-table-top: 73px;
  }

  .hero-card,
  .section-heading,
  .property-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-card h1,
  .login-card h1 {
    font-size: clamp(2rem, 12vw, 3.3rem);
  }

  .board-section {
    padding: 14px;
    border-radius: 22px;
  }

  .table-wrap {
    margin-left: -14px;
    margin-right: -14px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .ops-table td {
    padding: 13px 12px;
  }

  .ops-table {
    min-width: 860px;
  }

  .ops-table td.property-cell,
.ops-table td.property-group-cell {
    min-width: 72px;
    width: 72px;
  }

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