@import url("/assets/fonts.css");
:root {
  --forest: #18483d;
  --forest-deep: #10372e;
  --ivory: #f5f1e8;
  --sand: #ddd1bc;
  --clay: #ab5138;
  --ink: #213c35;
  --muted: #687970;
  --line: #dcded4;
  --paper: #fffefa;
  --soft: #e9eee6;
  --red: #ac3f30;
  --shadow: 0 12px 44px #1b46310b;
  --radius: 16px;
  color-scheme: light;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--ivory);
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
a,
button,
input,
select,
textarea {
  outline-offset: 4px;
}
*:focus-visible {
  outline: 3px solid #b66a3a;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2 {
  letter-spacing: -0.035em;
}
h1 {
  font-size: 40px;
  line-height: 1.08;
}
h2 {
  font-size: 26px;
}
h3 {
  font-size: 17px;
  letter-spacing: -0.015em;
}
p {
  line-height: 1.6;
}
svg {
  flex-shrink: 0;
  vertical-align: middle;
}
.brand {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -2px;
  text-decoration: none;
  line-height: 1;
}
.brand-dot {
  color: var(--clay);
}
.brand-label {
  padding-left: 17px;
  margin-left: 17px;
  border-left: 1px solid var(--line);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--clay);
  margin-bottom: 12px;
  text-transform: uppercase;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.button {
  min-height: 46px;
  padding: 12px 19px;
  border-radius: 9px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.25;
}
.primary {
  background: var(--forest);
  color: #fff;
}
.primary:hover {
  background: var(--forest-deep);
}
.secondary {
  background: var(--paper);
  border-color: var(--line);
  color: var(--forest);
}
.secondary:hover {
  background: var(--soft);
}
.danger {
  background: var(--red);
  color: #fff;
}
.text-button {
  background: none;
  border: 0;
  color: var(--forest);
  min-height: 44px;
  padding: 8px;
  font-weight: 600;
}
.text-link {
  text-underline-offset: 4px;
  font-size: 14px;
}
.icon-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 9px;
  flex-shrink: 0;
}
.icon-button:hover {
  background: var(--soft);
}
.flex {
  display: flex;
  align-items: center;
  gap: 12px;
}
.between {
  justify-content: space-between;
}
.wrap {
  flex-wrap: wrap;
}
.stack {
  display: grid;
  gap: 18px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}
.small {
  font-size: 12px;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.panel > h2 {
  margin-bottom: 20px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.section-title h1,
.section-title p {
  margin-bottom: 6px;
}
.serif {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--soft);
  color: var(--forest);
}
.badge.pending,
.badge.ringing,
.badge.manual_offline {
  background: #f7ecd3;
  color: #885314;
}
.badge.denied,
.badge.cancelled,
.badge.failed,
.badge.suspended,
.badge.closed {
  background: #fae5df;
  color: #9b3525;
}
.badge.entered,
.badge.authorized,
.badge.connected,
.badge.active {
  background: #e4eee4;
  color: #245e34;
}
.badge:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.empty {
  padding: 42px 15px;
  text-align: center;
  color: var(--muted);
  line-height: 1.6;
}
.empty svg {
  margin-bottom: 14px;
  color: #95a598;
}
.empty strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
  margin-bottom: 8px;
}
label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #ccd2c7;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 12px;
  min-height: 46px;
}
textarea {
  resize: vertical;
  min-height: 86px;
}
input::placeholder,
textarea::placeholder {
  color: #7d8980;
  font-size: 13px;
}
form {
  display: grid;
  gap: 16px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.full {
  grid-column: 1/-1;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 35px;
}
.checkbox input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  accent-color: var(--forest);
}
.notice {
  padding: 14px 16px;
  background: #f6eddc;
  border: 1px solid #ebddbd;
  border-radius: 10px;
  color: #795220;
  font-size: 13px;
  line-height: 1.6;
}
.notice.info {
  background: var(--soft);
  border-color: var(--line);
  color: var(--forest);
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
.cell-secondary {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.table-wrap button {
  min-height: 40px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  padding: 14px 22px;
  background: var(--forest);
  color: white;
  border-radius: 10px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  box-shadow: 0 8px 24px #0002;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
#toast.error {
  background: var(--red);
}
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #132e2570;
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal {
  background: var(--paper);
  width: min(620px, 100%);
  border-radius: 20px;
  padding: 28px;
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 20px 80px #0003;
}
.modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 24px;
}
.modal header h2 {
  margin: 0;
}
.loading-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.auth-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.auth-card {
  width: min(440px, 100%);
  padding: 48px 32px;
  margin: auto;
}
.auth-card > .brand {
  display: inline-block;
  margin-bottom: 50px;
}
.auth-card h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 45px;
}
.auth-card form {
  margin: 28px 0;
}
.auth-aside {
  margin: 28px;
  background: var(--forest);
  color: var(--ivory);
  min-height: calc(100dvh - 56px);
  border-radius: 22px;
  padding: 12%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 25px;
  background-image: radial-gradient(
    ellipse at 100% 0,
    #52735b55,
    transparent 60%
  );
}
.auth-aside h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 64px;
  line-height: 1.1;
}
.auth-aside .eyebrow {
  color: #d9cbb1;
}
.site-header {
  max-width: 1320px;
  margin: auto;
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.site-nav a {
  text-decoration: none;
  font-size: 13px;
}
.hero {
  max-width: 1320px;
  margin: auto;
  min-height: 580px;
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  padding: 60px 40px 90px;
  align-items: center;
  gap: 50px;
}
.hero h1 {
  font-family: Georgia, serif;
  font-size: clamp(44px, 5.4vw, 76px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.045em;
}
.hero p:not(.eyebrow) {
  font-size: 17px;
  color: var(--muted);
  max-width: 440px;
}
.hero-art {
  position: relative;
  height: 430px;
  border-radius: 180px 180px 20px 20px;
  background: #e3e7db;
  overflow: hidden;
  border: 1px solid #d3dbc8;
}
.hero-art:before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: #ede3c6;
  right: -30px;
  top: -20px;
}
.hero-art > svg {
  position: absolute;
  width: 100%;
  height: 100%;
  color: var(--forest);
}
.hero-art .floating-card {
  position: absolute;
  bottom: 30px;
  left: 25px;
  right: 25px;
  padding: 18px;
  background: #fffdf4ed;
  border: 1px solid #fff;
  border-radius: 13px;
  box-shadow: var(--shadow);
}
.hero-art .floating-card p {
  font-size: 12px;
  margin: 0;
}
.feature-section {
  background: var(--paper);
  padding: 70px 40px;
}
.content-width {
  max-width: 1240px;
  margin: auto;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
  margin-top: 42px;
}
.feature-grid .round-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--soft);
  border-radius: 14px;
  margin-bottom: 22px;
}
.feature-grid h3 {
  font-size: 20px;
}
.feature-grid p {
  font-size: 14px;
  color: var(--muted);
}
.price-contact {
  max-width: 1240px;
  margin: 70px auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 80px;
}
.price-card {
  padding-top: 32px;
}
.price-number {
  font-size: 68px;
  letter-spacing: -0.06em;
  font-family: Georgia, serif;
  margin: 25px 0 12px;
}
.site-footer {
  padding: 30px 40px;
  max-width: 1320px;
  margin: auto;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
}
.roles-page {
  min-height: 100dvh;
  padding: 44px 6vw;
  display: flex;
  flex-direction: column;
}
.roles-intro {
  text-align: center;
  margin: 70px auto 45px;
}
.roles-intro h1 {
  font-family: Georgia, serif;
  font-size: 60px;
  font-weight: 400;
}
.role-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  width: min(960px, 100%);
  margin: 0 auto;
}
.role-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 40px 28px;
  text-align: left;
  border-radius: 18px;
  color: var(--ink);
  text-decoration: none;
  transition:
    transform 0.2s,
    border-color 0.2s;
}
.role-card:hover {
  transform: translateY(-5px);
  border-color: var(--forest);
}
.role-card > svg {
  margin-bottom: 30px;
}
.role-card h2 {
  font-size: 24px;
}
.role-card p {
  color: var(--muted);
  font-size: 13px;
}
.shell-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  height: 84px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.shell-brand {
  display: flex;
  align-items: center;
  gap: 28px;
}
.tenant-label {
  border-left: 1px solid var(--line);
  padding-left: 28px;
  display: grid;
  gap: 4px;
}
.tenant-label strong {
  font-size: 15px;
}
.tenant-label span {
  font-size: 11px;
  color: var(--muted);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 12px;
}
.connection {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--forest);
  font-size: 11px;
}
.connection.offline {
  color: var(--red);
}
.shell-nav {
  padding: 0 32px;
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  overflow: auto;
}
.nav-item {
  padding: 16px 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  white-space: nowrap;
}
.nav-item.active {
  color: var(--forest);
  border-bottom-color: var(--forest);
  background: #e9eee65c;
}
.workspace {
  max-width: 1600px;
  margin: auto;
  padding: 30px 32px 48px;
}
.support-bar {
  background: #e7d7b7;
  color: #61451f;
  text-align: center;
  padding: 9px 20px;
  font-size: 12px;
}
.support-bar button {
  font-size: 12px;
  margin-left: 15px;
}
.greeting h1 {
  font-size: 32px;
  font-weight: 500;
  font-family: Georgia, serif;
}
.greeting p {
  font-size: 13px;
  color: var(--muted);
}
.board {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(350px, 0.82fr);
  gap: 25px;
  align-items: start;
}
.directory {
  background: #efeee5;
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: var(--radius);
}
.directory-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}
.directory-header h2 {
  font-size: 18px;
  margin: 0;
}
.search-input {
  position: relative;
  max-width: 220px;
}
.search-input svg {
  position: absolute;
  top: 14px;
  left: 12px;
  color: var(--muted);
}
.search-input input {
  padding-left: 40px;
  min-height: 44px;
  font-size: 12px;
}
.units-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-height: 600px;
  overflow: auto;
  padding: 2px;
}
.unit-tile {
  background: var(--paper);
  border: 1px solid #daddd1;
  border-radius: 12px;
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 15px;
  color: var(--ink);
}
.unit-tile:hover {
  border-color: #93ad97;
  background: #fafbf6;
}
.unit-tile.selected {
  border: 2px solid var(--forest);
  padding: 14px;
  background: #e5ece2;
}
.unit-tile .unit-icon {
  width: 38px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #efede2;
  border-radius: 9px;
  flex-shrink: 0;
}
.unit-tile strong {
  font-size: 14px;
  display: block;
}
.unit-tile small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.unit-tile.admin-tile {
  background: #e2e8dc;
}
.contact-panel {
  padding: 26px;
}
.contact-title {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 22px;
}
.contact-title > span {
  width: 51px;
  height: 51px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
}
.contact-title h2 {
  font-size: 25px;
  margin: 0 0 4px;
}
.contact-title p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.contacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 24px;
}
.contact-button {
  background: #ebeade;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px;
  text-align: left;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--forest);
  min-height: 66px;
}
.contact-button:hover {
  border-color: var(--forest);
}
.contact-button > span:first-child {
  background: var(--forest);
  color: #fff;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.contact-button strong {
  font-size: 12px;
  display: block;
}
.contact-button small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
.contact-panel form {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.contact-panel form h3 {
  margin: 0;
}
.contact-panel .notice {
  margin-top: 18px;
}
.recent-strip {
  margin-top: 26px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}
.stat {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.stat .stat-label {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-bottom: 14px;
}
.stat strong {
  font-size: 34px;
  font-family: Georgia, serif;
  font-weight: 400;
}
.stat small {
  display: block;
  color: var(--muted);
  margin-top: 8px;
  font-size: 10px;
}
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.tenant-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.tenant-card h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 28px;
  margin-top: 20px;
}
.tenant-card .tenant-stats {
  display: flex;
  gap: 30px;
  margin: 25px 0;
}
.tenant-stats strong {
  font-size: 25px;
}
.tenant-stats span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.timeline {
  display: grid;
  gap: 0;
}
.timeline-item {
  border-left: 2px solid var(--sand);
  padding: 0 0 22px 20px;
  margin-left: 6px;
  position: relative;
}
.timeline-item:before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--forest);
  position: absolute;
  left: -5px;
  top: 3px;
}
.timeline-item p {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 8px 0;
  color: var(--muted);
}
.timeline-item strong {
  font-size: 13px;
}
.secret-box {
  background: var(--soft);
  padding: 20px;
  border: 1px dashed var(--forest);
  border-radius: 10px;
  font-family: monospace;
  font-size: 20px;
  user-select: all;
  overflow-wrap: anywhere;
}
.call-card {
  position: fixed;
  z-index: 70;
  bottom: 24px;
  right: 24px;
  width: min(410px, calc(100% - 32px));
  padding: 25px;
  background: var(--paper);
  border: 2px solid var(--forest);
  border-radius: 22px;
  box-shadow: 0 16px 80px #16372e33;
  text-align: center;
}
.call-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--soft);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
}
.call-card h2 {
  margin-bottom: 7px;
}
.call-card .eyebrow {
  margin-bottom: 10px;
}
.call-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.resident-shell {
  max-width: 650px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 24px 22px 40px;
}
.resident-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.resident-header .brand {
  font-size: 27px;
}
.resident-hero {
  text-align: center;
  padding: 42px 0 28px;
}
.resident-hero .house-avatar {
  width: 94px;
  height: 94px;
  background: #e6dfcf;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
}
.resident-hero h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 40px;
  margin-bottom: 8px;
}
.resident-hero p {
  margin-bottom: 8px;
}
.resident-main-call {
  width: 100%;
  min-height: 72px;
  font-size: 18px;
  border-radius: 14px;
}
.resident-section {
  margin-top: 28px;
}
.resident-section h2 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.quick-messages {
  display: grid;
  gap: 9px;
}
.quick-messages button {
  background: var(--paper);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
  color: var(--forest);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}
.message-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.message-item p {
  font-size: 13px;
  margin: 0 0 7px;
}
.message-item time {
  font-size: 10px;
  color: var(--muted);
}
.approval-card {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 12px;
}
.approval-card h3 {
  font-size: 20px;
  margin: 8px 0;
}
.approval-card .actions button {
  flex: 1;
}
.sleep-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #101c17;
  color: #c0cbbc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 25px;
  cursor: pointer;
}
.sleep-screen time {
  font-family: Georgia, serif;
  font-size: 76px;
}
.sleep-screen p {
  color: #97a78f;
  font-size: 13px;
}
:root:has(body.dark),
body.dark {
  --forest: #bbd5bd;
  --forest-deep: #d6e4c7;
  --ivory: #0b100e;
  --paper: #151e19;
  --ink: #edf1e5;
  --muted: #b1bfae;
  --line: #455647;
  --soft: #202e25;
  --sand: #4a5744;
  --clay: #dbaf8a;
  color-scheme: dark;
  background: var(--ivory);
  color: var(--ink);
}
.dark .primary {
  color: #173327;
}
.dark .resident-hero .house-avatar {
  background: #374d3e;
}
.dark .quick-messages button {
  color: var(--ink);
}
.dark .notice {
  background: #3b3426;
  color: #f2dab0;
}
.dark .badge {
  background: #344638;
  color: #c8dfbd;
}
.dark input,
.dark select {
  background: var(--paper);
}
.dark .call-card {
  border-color: #bbd5bd;
}
.dark .danger {
  color: white;
}
.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 (min-width: 1600px) {
  .units-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  .units-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .header-right .operator-label {
    display: none;
  }
  .tenant-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero {
    gap: 30px;
  }
  .hero-art {
    height: 370px;
  }
  .site-nav {
    gap: 18px;
  }
  .auth-aside h2 {
    font-size: 48px;
  }
  .board {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  }
  .workspace {
    padding: 24px;
  }
  .shell-header {
    padding: 0 24px;
  }
  .shell-nav {
    padding: 0 15px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .site-header {
    padding: 24px;
  }
  .site-header .brand-label {
    font-size: 12px;
    margin-left: 10px;
    padding-left: 10px;
  }
  .site-nav > a:not(.button) {
    display: none;
  }
  .site-nav .button {
    font-size: 12px;
    padding: 10px;
  }
  .hero {
    display: flex;
    flex-direction: column;
    padding: 35px 24px 50px;
    gap: 25px;
    align-items: stretch;
    min-height: 0;
  }
  .hero h1 {
    font-size: 52px;
  }
  .hero-art {
    height: 310px;
    border-radius: 100px 100px 16px 16px;
  }
  .feature-section {
    padding: 45px 24px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .price-contact {
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 35px auto;
    padding: 0 24px;
  }
  .site-footer {
    flex-direction: column;
    padding: 24px;
  }
  .roles-page {
    padding: 30px 22px;
  }
  .roles-intro {
    margin: 45px 0 30px;
  }
  .roles-intro h1 {
    font-size: 44px;
  }
  .role-cards {
    grid-template-columns: 1fr;
  }
  .role-card {
    padding: 22px;
  }
  .role-card > svg {
    float: left;
    margin: 0 20px 40px 0;
  }
  .role-card h2 {
    margin: 0 0 7px;
  }
  .role-card p {
    margin: 0;
  }
  .auth-page {
    display: block;
  }
  .auth-aside {
    display: none;
  }
  .auth-card {
    padding: 40px 24px;
  }
  .auth-card > .brand {
    margin-bottom: 45px;
  }
  .shell-header {
    height: 74px;
    padding: 0 16px;
  }
  .shell-header .brand {
    font-size: 25px;
  }
  .shell-brand {
    gap: 15px;
  }
  .tenant-label {
    padding-left: 15px;
  }
  .tenant-label strong {
    font-size: 12px;
  }
  .header-right {
    gap: 8px;
  }
  .header-right .connection {
    display: none;
  }
  .workspace {
    padding: 20px 16px;
  }
  .shell-nav {
    padding: 0 6px;
  }
  .nav-item {
    padding: 14px 12px;
    font-size: 12px;
  }
  .nav-item svg {
    width: 18px;
  }
  .section-title {
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }
  .section-title h1 {
    font-size: 29px;
  }
  .section-title .button {
    font-size: 12px;
  }
  .board {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .directory {
    padding: 16px;
  }
  .units-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 320px;
    gap: 9px;
  }
  .unit-tile {
    padding: 10px;
    min-height: 85px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .unit-tile.selected {
    padding: 9px;
  }
  .unit-tile .unit-icon {
    width: 29px;
    height: 29px;
  }
  .unit-tile svg {
    width: 21px;
  }
  .unit-tile strong {
    font-size: 12px;
  }
  .unit-tile small {
    font-size: 9px;
  }
  .directory-header h2 {
    font-size: 16px;
  }
  .search-input {
    max-width: 170px;
  }
  .contact-panel {
    padding: 20px;
  }
  .contacts {
    gap: 8px;
  }
  .contact-button {
    padding: 10px;
  }
  .form-grid {
    gap: 12px;
  }
  .stat-grid {
    gap: 10px;
  }
  .stat {
    padding: 18px;
  }
  .stat strong {
    font-size: 28px;
  }
  .admin-grid,
  .tenant-cards {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 20px;
  }
  .modal {
    padding: 22px;
    border-radius: 16px;
  }
  .overlay {
    padding: 16px;
  }
  .call-card {
    bottom: 12px;
    right: 16px;
    padding: 22px;
  }
  .resident-shell {
    padding-top: 22px;
  }
  .table-wrap {
    margin: 0 -6px;
  }
  .support-bar {
    font-size: 11px;
  }
  .greeting h1 {
    font-size: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* Keep role-dependent form controls hidden despite label layout rules. */
[hidden] { display: none !important; }
.household { border-bottom: 1px solid var(--line, #ddd1bc); }
.household summary { cursor: pointer; padding: 18px 8px; }
.household summary span { margin-left: 14px; font-size: 14px; }
.household-content { padding: 0 8px 20px; }
.household summary:focus-visible { outline: 2px solid #18483d; outline-offset: 2px; }
@media (max-width: 600px) { .household summary span { display: block; margin: 6px 0 0 18px; } }

body.dark { min-height: 100dvh; }
.dark textarea, .dark input, .dark select { border-color: var(--line); }
.dark .overlay { background: #000b; }
