/* ─── VitaUnits App CSS ─── */
:root {
  --bg: #f7f5fc;
  --panel: #ffffff;
  --ink: #1d1733;
  --muted: #6f6885;
  --line: rgba(91,62,145,.13);
  --purple: #7c3aed;
  --pink: #ec4899;
  --soft: #f4eaff;
  --soft2: #fff0f7;
  --shadow: 0 20px 60px rgba(77,42,136,.10);
  --sidebar-w: 240px;
  --topbar-h: 66px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }


/* ════════════════════════════════
   LOGIN PAGE
════════════════════════════════ */
.login-body {
  height: 100vh;
  overflow: hidden;
  background: var(--panel);
}

.login-wrap {
  display: grid;
  grid-template-columns: 420px 1fr;
  height: 100vh;
}

/* Brand panel (left) */
.login-brand {
  background: linear-gradient(160deg, #4c1d95 0%, #7c3aed 48%, #be185d 100%);
  display: flex;
  flex-direction: column;
  padding: 40px 44px;
  position: relative;
  overflow: hidden;
}

.login-brand-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.login-tagline {
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -.022em;
  line-height: 1.12;
  color: #fff;
  margin-bottom: 18px;
}

.login-sub {
  font-size: 15px;
  color: rgba(255,255,255,.64);
  max-width: 320px;
  line-height: 1.6;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.login-orb1 {
  width: 300px; height: 300px;
  background: rgba(236,72,153,.28);
  bottom: -60px; right: -80px;
}
.login-orb2 {
  width: 180px; height: 180px;
  background: rgba(255,255,255,.10);
  top: 40px; right: 20px;
}

.login-brand-footer {
  display: flex;
  gap: 20px;
  color: rgba(255,255,255,.45);
  font-size: 12px;
  position: relative;
  z-index: 2;
}
.login-brand-footer a { color: rgba(255,255,255,.45); }
.login-brand-footer a:hover { color: rgba(255,255,255,.8); }

/* Form panel (right) */
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  overflow-y: auto;
}

.login-form-wrap {
  width: 100%;
  max-width: 380px;
  padding: 48px 0;
}

.login-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--pink);
  margin-bottom: 12px;
}

.login-heading {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -.022em;
  color: var(--ink);
  margin-bottom: 6px;
}

.login-desc {
  color: var(--muted);
  margin-bottom: 32px;
  font-size: 14px;
}

.login-error {
  background: rgba(239,68,68,.07);
  border: 1px solid rgba(239,68,68,.2);
  color: #b91c1c;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 22px;
}

.login-form { display: grid; gap: 20px; }

.field-group { display: grid; gap: 7px; }
.field-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.forgot-link {
  font-size: 12px;
  color: var(--purple);
  font-weight: 500;
}
.forgot-link:hover { text-decoration: underline; }

.field-group input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  outline: none;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field-group input::placeholder { color: rgba(111,104,133,.45); }
.field-group input:focus {
  border-color: rgba(124,58,237,.4);
  box-shadow: 0 0 0 4px rgba(124,58,237,.07);
}

.login-demo-hint {
  margin-top: 28px;
  padding: 14px 16px;
  background: var(--soft);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.login-demo-hint code {
  background: rgba(124,58,237,.1);
  color: var(--purple);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
}


/* ════════════════════════════════
   SHARED APP LOGO
════════════════════════════════ */
.app-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.015em;
  color: var(--ink);
  text-decoration: none;
}
.login-brand .app-logo { color: #fff; }

/* Real logo image */
.app-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
/* Larger version on login brand panel */
.login-brand .app-logo-img {
  height: 48px;
  /* transparent-bg version is used there — no filter needed */
}

/* Legacy CSS mark — hidden now that we use real logo */
.app-logo-mark { display: none; }


/* ════════════════════════════════
   BUTTONS
════════════════════════════════ */
.app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 5px;
  padding: 12px 22px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.app-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.07); }

.app-btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 14px 32px rgba(124,58,237,.22);
}
.app-btn-primary:hover { box-shadow: 0 18px 40px rgba(124,58,237,.3); }

.login-submit { width: 100%; min-height: 46px; font-size: 15px; }


/* ════════════════════════════════
   APP LAYOUT (Dashboard etc.)
════════════════════════════════ */
.app-body {
  background: var(--bg);
  min-height: 100vh;
}

.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}


/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-top {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--line);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: grid;
  align-content: start;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .15s, color .15s;
  position: relative;
}
.sidebar-link:hover { background: var(--soft); color: var(--ink); }
.sidebar-link.active {
  background: linear-gradient(135deg, rgba(124,58,237,.10), rgba(236,72,153,.08));
  color: var(--purple);
}
.sidebar-link.disabled {
  opacity: .5;
  pointer-events: none;
  cursor: default;
}

.sidebar-icon { display: flex; align-items: center; justify-content: center; width: 20px; flex-shrink: 0; }
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; display: block; }

.sidebar-soon {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  background: rgba(111,104,133,.1);
  border-radius: 4px;
  padding: 2px 6px;
}

/* AR sub-nav */
.sidebar-ar-sub {
  margin: 2px 0 4px 20px;
  display: grid;
  gap: 1px;
  border-left: 2px solid rgba(124,58,237,.2);
  padding-left: 10px;
}
.sidebar-ar-link {
  display: block;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.sidebar-ar-link:hover { background: var(--soft); color: var(--ink); }
.sidebar-ar-link.active { color: var(--purple); font-weight: 600; }

.sidebar-bottom {
  padding: 14px 14px 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
}

.sidebar-phase {}
.sidebar-phase-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 7px;
  font-weight: 500;
}
.sidebar-phase-bar {
  height: 3px;
  background: var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.sidebar-phase-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  border-radius: 10px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 11px;
  color: var(--muted);
  text-transform: capitalize;
}
.sidebar-logout {
  color: var(--muted);
  font-size: 16px;
  padding: 4px;
  border-radius: 4px;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.sidebar-logout:hover { color: var(--ink); background: var(--soft); }
.sidebar-support-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 8px;
  transition: background .15s, color .15s;
}
.sidebar-support-link:hover { background: var(--soft); color: var(--ink); }


/* ── Top bar ── */
.app-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;          /* prevent grid child from blowing out its column */
  overflow-x: hidden;   /* nothing inside should cause horizontal page scroll */
}

.app-topbar {
  height: var(--topbar-h);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-topbar-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.012em;
}
.app-topbar-sub {
  font-size: 12.5px;
  color: var(--muted);
}
.app-date {
  font-size: 12.5px;
  color: var(--muted);
}


/* ── Dashboard content ── */
.dash-content {
  padding: 28px 32px;
  display: grid;
  gap: 22px;
  flex: 1;
  align-content: start;
}


/* Stat row */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(77,42,136,.09);
}
.stat-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 10px;
}
.stat-value {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-note {
  font-size: 12px;
  color: var(--muted);
}


/* Two column panels */
.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.dash-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.dash-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.dash-panel-kicker {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--pink);
  margin-bottom: 4px;
}
.dash-panel-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.dash-badge {
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.dash-badge-building {
  background: rgba(124,58,237,.1);
  color: var(--purple);
}


/* Roadmap list */
.roadmap-list { display: grid; gap: 0; }
.roadmap-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.roadmap-item:last-child { border-bottom: 0; }
.roadmap-item.done { color: var(--ink); }
.roadmap-item.active { color: var(--ink); }

.roadmap-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex-shrink: 0;
  margin-top: 4px;
}
.roadmap-item.done .roadmap-dot {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  border-color: transparent;
}
.roadmap-item.active .roadmap-dot {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(124,58,237,.12);
}

.roadmap-label { font-size: 13.5px; font-weight: 500; margin-bottom: 2px; }
.roadmap-sub { font-size: 12px; color: var(--muted); }

.roadmap-status {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-radius: 4px;
  padding: 3px 7px;
  white-space: nowrap;
  flex-shrink: 0;
}
.done-tag { background: rgba(124,58,237,.1); color: var(--purple); }
.next-tag { background: rgba(236,72,153,.1); color: var(--pink); }


/* Setup list */
.setup-list { display: grid; gap: 0; }
.setup-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.setup-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}
.setup-label { font-size: 13.5px; font-weight: 500; margin-bottom: 2px; }
.setup-sub { font-size: 12px; color: var(--muted); }
.setup-tag {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  background: rgba(111,104,133,.08);
  border-radius: 4px;
  padding: 3px 7px;
  white-space: nowrap;
  flex-shrink: 0;
}

.dash-divider {
  height: 1px;
  background: var(--line);
  margin: 22px 0 18px;
}

.account-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.account-detail:last-child { border-bottom: 0; }
.account-detail span { color: var(--muted); }
.account-detail strong { font-weight: 500; }


/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { display: none; }

  .app-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }

  .dash-stats { grid-template-columns: 1fr 1fr; }
  .dash-two-col { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .dash-stats { grid-template-columns: 1fr; }
  .dash-content { padding: 18px 16px; }
  .app-topbar { padding: 0 16px; }
}


/* ════════════════════════════════
   SIDEBAR SECTION LABELS
════════════════════════════════ */
.sidebar-section-label {
  padding: 14px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  opacity: .55;
}


/* ════════════════════════════════
   TABLE PANEL
════════════════════════════════ */
.table-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.toolbar-left  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.search-wrap { position: relative; }
.search-wrap input {
  padding: 6px 10px 6px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit; font-size: 13px;
  background: var(--bg); color: var(--ink);
  width: 210px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-wrap input:focus {
  border-color: rgba(124,58,237,.4);
  box-shadow: 0 0 0 3px rgba(124,58,237,.07);
}
.search-wrap input::placeholder { color: rgba(111,104,133,.45); }
.search-icon {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--muted); pointer-events: none;
}

.filter-select {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit; font-size: 13px; color: var(--ink);
  background: var(--bg); outline: none; cursor: pointer;
}

/* Data table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 10px 16px;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); text-align: left;
  background: var(--bg); border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(124,58,237,.022); }
.td-muted  { color: var(--muted); font-size: 13px; }
.td-strong { font-weight: 500; }
.td-mono   { font-variant-numeric: tabular-nums; }

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 3px 9px; border-radius: 100px;
  font-size: 11.5px; font-weight: 600;
  white-space: nowrap;
}
.badge-green  { background: rgba(16,185,129,.10);  color: #065f46; }
.badge-red    { background: rgba(239,68,68,.09);   color: #991b1b; }
.badge-yellow { background: rgba(245,158,11,.10);  color: #78350f; }
.badge-purple { background: rgba(124,58,237,.10);  color: var(--purple); }
.badge-blue   { background: rgba(59,130,246,.10);  color: #1e40af; }
.badge-gray   { background: rgba(107,112,128,.10); color: var(--muted); }

/* Row action buttons */
.row-actions { display: flex; align-items: center; gap: 3px; }
.row-action {
  padding: 5px 8px; border-radius: 4px; font-size: 11.5px;
  color: var(--muted); background: none; border: none;
  cursor: pointer; transition: all .14s; font-family: inherit;
}
.row-action:hover { background: var(--soft); color: var(--ink); }

/* Empty state */
.empty-state { text-align: center; padding: 52px 24px; color: var(--muted); }
.empty-state-icon  { font-size: 26px; margin-bottom: 12px; }
.empty-state-title { font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }


/* ════════════════════════════════
   MODAL
════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10,8,30,.46);
  z-index: 500;
  align-items: center; justify-content: center;
  padding: 24px;
  backdrop-filter: blur(3px);
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--panel);
  border-radius: calc(var(--radius) + 2px);
  width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,.22);
  animation: modal-in .18s ease;
}
@keyframes modal-in {
  from { opacity:0; transform: scale(.96) translateY(10px); }
  to   { opacity:1; transform: scale(1)   translateY(0); }
}

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--panel); z-index: 1;
}
.modal-title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.modal-close {
  width: 28px; height: 28px; border-radius: 5px;
  border: none; background: none; font-size: 18px; color: var(--muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .14s, color .14s; line-height: 1;
}
.modal-close:hover { background: var(--soft); color: var(--ink); }

.modal-body { padding: 22px 24px; display: grid; gap: 15px; }
.modal-foot,
.modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 10px;
  position: sticky; bottom: 0; background: var(--panel);
}

/* Alias: accounting pages use .modal-box instead of .modal */
.modal-box {
  background: var(--panel);
  border-radius: calc(var(--radius) + 2px);
  width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,.22);
  animation: modal-in .18s ease;
}

.modal-field { display: grid; gap: 6px; }
.modal-field label { font-size: 12.5px; font-weight: 500; }
.modal-field input,
.modal-field select,
.modal-field textarea {
  padding: 10px 13px; border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit; font-size: 13.5px; color: var(--ink);
  background: var(--panel); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.modal-field input:focus,
.modal-field select:focus,
.modal-field textarea:focus {
  border-color: rgba(124,58,237,.4);
  box-shadow: 0 0 0 3px rgba(124,58,237,.07);
}
.modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-hint { font-size: 12px; color: var(--muted); }


/* ════════════════════════════════
   SIDEBAR — ROLE BADGES & COMPANY
════════════════════════════════ */
.sidebar-badge-super {
  display: inline-block;
  margin: 6px 0 0 0;
  padding: 3px 10px;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  color: #fff;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.sidebar-company-name {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ════════════════════════════════
   DASHBOARD — ROLE BANNERS
════════════════════════════════ */
.dash-role-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-bottom: 24px;
}
.dash-role-banner .banner-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.dash-role-banner div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-role-banner strong {
  font-size: 14px;
  font-weight: 600;
}
.dash-role-banner span {
  font-size: 13px;
  color: var(--muted);
}
.banner-super {
  background: linear-gradient(135deg, rgba(124,58,237,.08), rgba(236,72,153,.06));
  border-color: rgba(124,58,237,.2);
}
.banner-pm {
  background: rgba(37,99,235,.05);
  border-color: rgba(37,99,235,.15);
}
.banner-generic {
  background: var(--soft);
  border-color: var(--line);
}


/* ════════════════════════════════
   LOGIN — DEMO CREDENTIALS BLOCK
════════════════════════════════ */
.login-demo-hint {
  margin-top: 28px;
  padding: 16px 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.demo-hint-title {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 10px;
}
.demo-credentials { display: grid; gap: 6px; }
.demo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.demo-role {
  font-weight: 600;
  color: var(--purple);
  min-width: 105px;
  font-size: 11.5px;
}
.demo-row code {
  font-family: ui-monospace, monospace;
  font-size: 11.5px;
  background: rgba(124,58,237,.08);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--ink);
}


/* ════════════════════════════════
   COMING SOON PAGES
════════════════════════════════ */
.dash-coming-soon {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: 60px 24px 80px;
}
.coming-icon {
  font-size: 48px;
  color: var(--purple);
  margin-bottom: 20px;
  opacity: .7;
}
.coming-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}
.coming-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 40px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.coming-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  text-align: left;
  margin-bottom: 36px;
}
.coming-feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.coming-feature-icon {
  font-size: 18px;
  color: var(--purple);
  flex-shrink: 0;
  margin-top: 1px;
}
.coming-feature strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}
.coming-feature span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.coming-badge {
  display: inline-block;
  padding: 7px 22px;
  border-radius: 30px;
  border: 1px solid rgba(124,58,237,.3);
  color: var(--purple);
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(124,58,237,.05);
}


/* ════════════════════════════════
   ACCOUNTING KPI STAT CARDS
   Compact, unified across all
   accounting sub-pages.
════════════════════════════════ */
.acct-kpi-row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}
.acct-kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .875rem 1.125rem;
  flex: 1;
  min-width: 120px;
}
.acct-kpi-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
}
.acct-kpi-lbl {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 3px;
}


/* ════════════════════════════════
   PAGE TABS (Entrata-style)
════════════════════════════════ */
.page-tabs {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
  background: var(--panel);
  flex-shrink: 0;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.page-tabs::-webkit-scrollbar { display: none; }
/* When .page-tabs is the sub-tab row inside .acct-nav, no outer border */
.acct-nav .page-tabs { border-bottom: none; padding: 0; }

/* ── Accounting two-tier nav ─────────────────────────────────────────────── */
.acct-nav {
  flex-shrink: 0;
  background: var(--panel, #fff);
}
.acct-nav-groups {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 24px 0;
  border-bottom: 1px solid var(--line, #e5e7eb);
}
.acct-nav-group-btn {
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  letter-spacing: .02em;
  transition: background .13s, color .13s;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: -1px;
}
.acct-nav-group-btn:hover { background: #f1f5f9; color: #1e293b; }
.acct-nav-group-btn.active {
  background: var(--panel, #fff);
  color: var(--purple, #7c3aed);
  border-color: var(--line, #e5e7eb);
  border-bottom-color: var(--panel, #fff);
}
.acct-nav-sub {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 24px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.acct-nav-sub::-webkit-scrollbar { display: none; }

.page-tab {
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .14s, border-color .14s;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  user-select: none;
}
.page-tab:hover { color: var(--ink); }
.page-tab.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
  font-weight: 600;
}
.page-tab.disabled {
  color: rgba(111,104,133,.4);
  cursor: not-allowed;
  pointer-events: none;
}
.tab-count {
  background: var(--purple);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.6;
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }


/* ════════════════════════════════
   FLASH MESSAGES
════════════════════════════════ */
.flash-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 24px;
  font-size: 13.5px;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: opacity .4s;
}
.flash-success {
  background: #f0fdf4;
  color: #166534;
  border-bottom-color: #bbf7d0;
}
.flash-error {
  background: #fef2f2;
  color: #991b1b;
  border-bottom-color: #fecaca;
}
.flash-warning {
  background: #fffbeb;
  color: #92400e;
  border-bottom-color: #fde68a;
}
.flash-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  opacity: .6;
  color: inherit;
  padding: 0 4px;
  flex-shrink: 0;
}
.flash-close:hover { opacity: 1; }


/* ════════════════════════════════
   PROPERTY SETUP FORM
════════════════════════════════ */
.setup-form-panel {
  max-width: 760px;
}
.setup-form-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
}
.setup-form-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.setup-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.setup-form-field {
  display: grid;
  gap: 6px;
}
.setup-form-field.full { grid-column: 1 / -1; }
.setup-form-field.short { grid-column: span 1; max-width: 160px; }
.setup-form-field label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
}
.setup-form-field input,
.setup-form-field select,
.setup-form-field textarea {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit; font-size: 13.5px; color: var(--ink);
  background: var(--panel); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.setup-form-field input:focus,
.setup-form-field select:focus {
  border-color: rgba(124,58,237,.4);
  box-shadow: 0 0 0 3px rgba(124,58,237,.07);
}
.field-hint { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.required { color: var(--pink); }
.field-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--purple);
  margin-left: 6px;
  vertical-align: middle;
}

.setup-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 0 0;
}


/* ════════════════════════════════
   EMPTY STATES
════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.empty-icon {
  font-size: 40px;
  color: var(--muted);
  opacity: .5;
}
.empty-title {
  font-size: 16px;
  font-weight: 600;
}
.empty-desc {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 400px;
  line-height: 1.6;
  margin-bottom: 6px;
}


/* ════════════════════════════════
   IMPORT / CSV UPLOAD
════════════════════════════════ */
.import-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.import-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.import-panel-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.import-icon {
  font-size: 28px;
  color: var(--purple);
  flex-shrink: 0;
}
.import-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}
.import-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.import-form { display: grid; gap: 16px; }
.import-upload-area {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  position: relative;
}
.import-upload-area:hover,
.import-upload-area.dragover {
  border-color: var(--purple);
  background: rgba(124,58,237,.03);
}
.import-upload-area input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.upload-label {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; pointer-events: none;
}
.upload-icon { font-size: 28px; color: var(--purple); opacity: .7; }
.upload-text { font-size: 14px; font-weight: 600; color: var(--ink); }
.upload-hint { font-size: 12.5px; color: var(--muted); }
.upload-formats {
  font-size: 11px;
  color: var(--muted);
  background: var(--soft);
  padding: 3px 10px;
  border-radius: 10px;
  margin-top: 4px;
}
.upload-selected {
  font-size: 13px;
  color: #166534;
  background: #f0fdf4;
  padding: 8px 14px;
  border-radius: var(--radius);
  text-align: center;
}
.import-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Import guide (right column) */
.import-guide {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.import-guide-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.import-col-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-bottom: 16px;
}
.import-col-table th {
  text-align: left;
  padding: 6px 10px;
  background: var(--soft);
  font-weight: 600;
  font-size: 11px;
  border-bottom: 1px solid var(--line);
}
.import-col-table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(91,62,145,.06);
  vertical-align: top;
}
.import-col-table code {
  font-family: ui-monospace, monospace;
  font-size: 11.5px;
  background: rgba(124,58,237,.07);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--purple);
}
.req-yes {
  color: #dc2626;
  font-size: 11px;
  font-weight: 700;
}
.req-no {
  color: var(--muted);
  font-size: 11px;
}
.import-guide-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  padding: 12px 14px;
  background: var(--soft);
  border-radius: var(--radius);
  border-left: 3px solid var(--purple);
}
.import-guide-note strong { color: var(--ink); }

@media (max-width: 1024px) {
  .import-layout { grid-template-columns: 1fr; }
  .setup-form-grid { grid-template-columns: 1fr; }
  .setup-form-field.short { max-width: 100%; }
}


/* ════════════════════════════════
   ACTION CENTER (Dashboard)
════════════════════════════════ */
.action-center {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.action-center-head {
  padding: 18px 24px 0;
}
.action-center-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.action-center-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
  margin-bottom: 10px;
}
.action-tabs {
  display: flex;
  gap: 0;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.action-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.action-tab:hover { color: var(--ink); }
.action-tab.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}
.action-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
}
.action-count.urgent  { background: #fef2f2; color: #dc2626; }
.action-count.warning { background: #fffbeb; color: #b45309; }
.action-count.neutral { background: var(--soft); color: var(--muted); }

.action-pane {
  padding: 16px 24px 20px;
}
.action-subtabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.action-subtab {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--soft);
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.action-subtab.active,
.action-subtab:hover {
  background: var(--purple);
  color: #fff;
}

.action-table { margin-top: 0 !important; }

.action-type-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--muted);
}

.priority-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 9px;
  border-radius: 10px;
}
.priority-badge.urgent    { background: #fef2f2; color: #dc2626; }
.priority-badge.important { background: #fffbeb; color: #b45309; }
.priority-badge.normal    { background: var(--soft); color: var(--muted); }

.action-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 0 8px;
  color: var(--muted);
  font-size: 13.5px;
}
.action-empty-icon {
  font-size: 22px;
  color: #16a34a;
  flex-shrink: 0;
}


/* ════════════════════════════════
   SETUP TABS (11-tab property setup)
════════════════════════════════ */
.setup-tabs {
  flex-wrap: wrap;
  gap: 0;
}
.setup-tabs .page-tab {
  font-size: 12px;
  padding: 10px 12px;
}
.tab-done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  font-size: 10px;
  font-weight: 700;
  margin-left: 5px;
  flex-shrink: 0;
}


/* ════════════════════════════════
   SETUP OVERVIEW LAYOUT
════════════════════════════════ */
.setup-overview-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1024px) {
  .setup-overview-layout { grid-template-columns: 1fr; }
}

.setup-progress-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: sticky;
  top: 20px;
}
.setup-progress-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.setup-progress-bar-wrap {
  height: 6px;
  background: var(--soft);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.setup-progress-bar {
  height: 100%;
  background: var(--purple);
  border-radius: 3px;
  transition: width .4s;
}
.setup-progress-pct {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
.setup-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.setup-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(91,62,145,.06);
}
.setup-step:last-child { border-bottom: none; }
.setup-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  flex-shrink: 0;
}
.setup-step.done .setup-step-dot { background: #16a34a; }
.setup-step.current .setup-step-dot { background: var(--purple); }
.setup-step-label {
  font-size: 12.5px;
  color: var(--muted);
  flex: 1;
}
.setup-step.done .setup-step-label  { color: var(--ink); }
.setup-step.current .setup-step-label { color: var(--ink); font-weight: 600; }
.setup-step-check {
  font-size: 11px;
  color: #16a34a;
  font-weight: 700;
  flex-shrink: 0;
}
.setup-step.pending .setup-step-dot { background: var(--line); border: 2px solid var(--muted); background: transparent; }


/* ════════════════════════════════
   LEASING CRM — LEAD BADGES
════════════════════════════════ */
.lead-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 10px;
  white-space: nowrap;
  letter-spacing: .02em;
}
.lbadge-new       { background: #f5f3ff; color: #7c3aed; }
.lbadge-contacted { background: #eff6ff; color: #1d4ed8; }
.lbadge-tour      { background: #f0f9ff; color: #0369a1; }
.lbadge-toured    { background: #fffbeb; color: #b45309; }
.lbadge-app       { background: #fff7ed; color: #c2410c; }
.lbadge-approved  { background: #f0fdf4; color: #166534; }
.lbadge-signed    { background: #dcfce7; color: #15803d; }
.lbadge-lost      { background: #f1f5f9; color: #64748b; }

/* Urgency dot (inline status indicator) */
.urgency-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.urgency-dot.urgent  { background: #dc2626; }
.urgency-dot.warning { background: #d97706; }
.urgency-dot.normal  { background: #94a3b8; }
.urgency-dot.good    { background: #16a34a; }
.urgency-dot.neutral { background: #cbd5e1; }

/* Urgent text color */
.text-urgent { color: #dc2626; font-weight: 600; }


/* ════════════════════════════════
   CRM OVERVIEW METRICS
════════════════════════════════ */
.crm-overview-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
@media (max-width: 1280px) { .crm-overview-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .crm-overview-grid { grid-template-columns: repeat(2, 1fr); } }

.crm-metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 13px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.crm-metric.urgent  { border-left-color: #dc2626; }
.crm-metric.warning { border-left-color: #d97706; }
.crm-metric.good    { border-left-color: #16a34a; }
.crm-metric.neutral { border-left-color: var(--purple); }

.crm-metric-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}
.crm-metric.urgent  .crm-metric-value { color: #dc2626; }
.crm-metric.warning .crm-metric-value { color: #d97706; }
.crm-metric.good    .crm-metric-value { color: #16a34a; }

.crm-metric-label { font-size: 11.5px; color: var(--ink); font-weight: 500; margin-top: 1px; }
.crm-metric-note  { font-size: 10.5px; color: var(--muted); }


/* ════════════════════════════════
   CONVERSION FUNNEL
════════════════════════════════ */
.funnel-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.funnel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.funnel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(91,62,145,.05);
}
.funnel-row:last-child { border-bottom: none; }
.funnel-label     { width: 150px; font-size: 12.5px; color: var(--muted); flex-shrink: 0; }
.funnel-bar-wrap  { flex: 1; height: 5px; background: var(--soft); border-radius: 3px; overflow: hidden; }
.funnel-bar       { height: 100%; background: var(--purple); border-radius: 3px; transition: width .5s ease; }
.funnel-count     { width: 36px; text-align: right; font-size: 13px; font-weight: 600; color: var(--ink); flex-shrink: 0; }
.funnel-pct       { width: 40px; text-align: right; font-size: 11.5px; color: var(--muted); flex-shrink: 0; }


/* ════════════════════════════════
   GUEST CARD GRID (Guest Cards tab)
════════════════════════════════ */
.gc-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.gc-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.gc-card:hover {
  border-color: rgba(124,58,237,.3);
  box-shadow: 0 2px 12px rgba(124,58,237,.07);
}
.gc-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.gc-card-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--purple);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gc-card-name  { font-size: 13.5px; font-weight: 600; }
.gc-card-prop  { font-size: 11.5px; color: var(--muted); }
.gc-card-fields { display: flex; flex-direction: column; gap: 7px; }
.gc-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.gc-card-age { font-size: 11px; color: var(--muted); }


/* ════════════════════════════════
   FOLLOW-UP TASKS
════════════════════════════════ */
.task-section { margin-bottom: 4px; }
.task-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--line);
}
.task-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.task-section-title.overdue { color: #dc2626; }
.task-section-title.today   { color: #d97706; }
.task-section-title.upcoming{ color: var(--ink); }
.task-section-title.done    { color: #16a34a; }

.task-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--soft);
  color: var(--muted);
}
.task-count-badge.overdue { background: #fef2f2; color: #dc2626; }
.task-count-badge.today   { background: #fffbeb; color: #b45309; }


/* ════════════════════════════════
   TOUR TYPE TAGS
════════════════════════════════ */
.tour-type-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 4px;
  background: #eff6ff;
  color: #1d4ed8;
}
.tour-type-tag.virtual     { background: #f0f9ff; color: #0369a1; }
.tour-type-tag.self-guided { background: #fdf4ff; color: #7e22ce; }


/* ════════════════════════════════
   GUEST CARD LEAD HEADER
════════════════════════════════ */
.gc-lead-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.gc-lead-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--purple);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gc-lead-name { font-size: 18px; font-weight: 600; line-height: 1.2; }
.gc-lead-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }


/* ════════════════════════════════
   GUEST CARD DETAIL PANELS
════════════════════════════════ */
.guest-card-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1100px) { .guest-card-layout { grid-template-columns: 1fr; } }

.gc-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.gc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
}
.gc-panel-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.gc-fields { padding: 14px 20px; display: grid; gap: 10px; }
.gc-field {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: baseline;
  gap: 8px;
}
.gc-field-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.gc-field-value { font-size: 13px; color: var(--ink); }
.gc-field-value.muted { color: var(--muted); }


/* ════════════════════════════════
   ACTIVITY TIMELINE
════════════════════════════════ */
.timeline { padding: 4px 20px 16px; display: flex; flex-direction: column; }
.timeline-entry {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(91,62,145,.05);
  position: relative;
}
.timeline-entry:last-child { border-bottom: none; }
.timeline-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--purple);
  flex-shrink: 0;
  margin-top: 5px;
}
.timeline-dot.system { background: var(--muted); }
.timeline-dot.task   { background: #d97706; }
.timeline-dot.tour   { background: #0369a1; }
.timeline-dot.note   { background: var(--ink); }
.timeline-body { flex: 1; min-width: 0; }
.timeline-text { font-size: 13px; color: var(--ink); line-height: 1.5; }
.timeline-time { font-size: 11.5px; color: var(--muted); margin-top: 2px; }


/* ════════════════════════════════
   LEAD NAME LINK
════════════════════════════════ */
.lead-name-link { color: var(--ink); font-weight: 600; }
.lead-name-link:hover { color: var(--purple); }


/* ════════════════════════════════
   WIDER MODAL (Add Lead)
════════════════════════════════ */
.modal-wide { max-width: 680px; }


/* ════════════════════════════════
   SUPPORT HELP PANEL (Dashboard)
════════════════════════════════ */
.support-help-panel { padding: 4px 0; }
.support-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(124,58,237,.05), rgba(236,72,153,.05));
  border: 1px solid rgba(124,58,237,.18);
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 20px;
}
.support-card-icon {
  font-size: 24px;
  color: var(--purple);
  margin-top: 2px;
  flex-shrink: 0;
}
.support-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.support-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.support-card-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-sm { padding: 6px 16px; font-size: 13px; border-radius: 6px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; transition: all .15s; }
.btn-primary.btn-sm { background: var(--purple); color: #fff; border: none; }
.btn-primary.btn-sm:hover { background: #6d28d9; }
.btn-ghost.btn-sm { background: transparent; color: var(--purple); border: 1px solid rgba(124,58,237,.3); }
.btn-ghost.btn-sm:hover { background: var(--soft); }
.support-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.support-topic-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.support-topic-card:hover { border-color: rgba(124,58,237,.3); box-shadow: 0 2px 10px rgba(124,58,237,.08); }
.support-topic-icon { font-size: 16px; color: var(--purple); margin-top: 1px; flex-shrink: 0; }
.support-topic-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.support-topic-desc { font-size: 11.5px; color: var(--muted); line-height: 1.4; }


/* ════════════════════════════════
   TICKET SYSTEM
════════════════════════════════ */
.ticket-form-wrap {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: flex-start;
}
@media (max-width: 900px) { .ticket-form-wrap { grid-template-columns: 1fr; } }
.ticket-form { padding: 28px; }
.ticket-form-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.ticket-form-icon { font-size: 22px; color: var(--purple); margin-top: 2px; }
.ticket-form-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.ticket-form-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.form-optional { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 4px; }

/* Ticket detail */
.ticket-detail-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: flex-start;
}
@media (max-width: 900px) { .ticket-detail-layout { grid-template-columns: 1fr; } }
.ticket-detail-main { padding: 28px; }
.ticket-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.ticket-original-message {
  background: var(--soft);
  border-left: 3px solid var(--purple);
  border-radius: 0 6px 6px 0;
  padding: 16px 18px;
  margin-bottom: 24px;
}
.ticket-notes { margin-bottom: 24px; }
.ticket-note {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
}
.ticket-note.note-internal {
  background: #fffbeb;
  border-color: #fde68a;
}
.ticket-note-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.ticket-note-author { font-size: 13px; font-weight: 600; color: var(--ink); }
.ticket-note-time { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.note-internal-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 4px;
  padding: 1px 6px;
}
.ticket-note-body { font-size: 13px; color: var(--ink); line-height: 1.6; }
.ticket-reply-form { border-top: 1px solid var(--line); padding-top: 22px; }


/* ════════════════════════════════
   APPLICANTS MODULE
════════════════════════════════ */

/* ── Applicant status badges ── */
.appl-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 2px 9px;
  border-radius: 4px;
  white-space: nowrap;
}
.appl-started        { background: #f3f4f6; color: #374151; }
.appl-submitted      { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.appl-incomplete     { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.appl-screening      { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
.appl-screening-review { background: #fff7ed; color: #9a3412; border: 1px solid #fdba74; }
.appl-approved       { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.appl-conditional    { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }
.appl-denied         { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.appl-lease          { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.appl-resident       { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.appl-cancelled      { background: #f3f4f6; color: #6b7280; }

/* ── Screening badges ── */
.scr-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.scr-not-started { background: #f3f4f6; color: #6b7280; }
.scr-pending     { background: #fef9c3; color: #854d0e; }
.scr-passed      { background: #dcfce7; color: #166534; }
.scr-failed      { background: #fee2e2; color: #991b1b; }
.scr-review      { background: #fff7ed; color: #9a3412; }
.scr-waived      { background: #f3e8ff; color: #6b21a8; }

/* ── Document badges ── */
.doc-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.doc-missing   { background: #fee2e2; color: #991b1b; }
.doc-uploaded  { background: #eff6ff; color: #1d4ed8; }
.doc-review    { background: #fef9c3; color: #854d0e; }
.doc-approved  { background: #dcfce7; color: #166534; }
.doc-rejected  { background: #fee2e2; color: #991b1b; }

/* ── Applicant detail layout ── */
.applicant-detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}
.applicant-profile-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.applicant-main-col {
  min-width: 0;
}

/* ── Screening Criteria (property-setup + applicant-detail) ── */
.scr-criteria-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}
.scr-criteria-form { min-width: 0; }
.scr-criteria-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.scr-compliance-notice {
  display: flex;
  gap: 12px;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #78350f;
  line-height: 1.5;
}
.scr-compliance-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Eval rows in applicant screening section */
.scr-eval-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}
.scr-eval-row:last-child { border-bottom: none; }
.scr-eval-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.scr-eval-dot.pass    { background: #22c55e; }
.scr-eval-dot.fail    { background: #ef4444; }
.scr-eval-dot.review  { background: #f59e0b; }
.scr-eval-dot.pending { background: #facc15; }
.scr-eval-dot.waived  { background: #a855f7; }
.scr-eval-dot.na      { background: #d1d5db; }

.scr-eval-label { flex: 1; color: #374151; font-weight: 500; }
.scr-eval-status { font-size: 12px; color: #6b7280; }
.scr-eval-note  { font-size: 11px; color: #9ca3af; margin-top: 2px; }

/* Decision grid (read-only reference in criteria form) */
.scr-decision-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.scr-decision-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
}
.scr-decision-row:last-child { border-bottom: none; }
.scr-decision-row strong { color: #374151; }
.scr-decision-desc { color: #6b7280; }

/* Helper hint text beneath form inputs */
.setup-field-hint {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 3px;
  line-height: 1.4;
}

/* Internal note badge */
.note-internal-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: #fef9c3;
  color: #854d0e;
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
}

/* ── Lease / Move-In Module ── */
.lease-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.lease-draft     { background: #f3f4f6; color: #6b7280; }
.lease-sent      { background: #eff6ff; color: #1d4ed8; }
.lease-partial   { background: #fff7ed; color: #9a3412; }
.lease-signed    { background: #dcfce7; color: #166534; }
.lease-active    { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.lease-cancelled { background: #fee2e2; color: #991b1b; }

/* Status step bar */
.lease-steps-bar {
  display: flex;
  align-items: flex-start;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  gap: 0;
}
.lease-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 70px;
}
.lease-step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: transparent;
  transition: all .15s;
}
.lease-step.done .lease-step-dot  { background: #16a34a; border-color: #16a34a; color: #fff; }
.lease-step.active .lease-step-dot { background: var(--purple); border-color: var(--purple); color: transparent; position: relative; }
.lease-step.active .lease-step-dot::after {
  content: '';
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
}
.lease-step-label {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-align: center;
  line-height: 1.3;
}
.lease-step.done .lease-step-label  { color: #16a34a; }
.lease-step.active .lease-step-label { color: var(--purple); }
.lease-step-date {
  font-size: 10.5px;
  color: #9ca3af;
}
.lease-step-line {
  flex: 1;
  height: 2px;
  background: #e5e7eb;
  margin-top: 12px;
  min-width: 24px;
}
.lease-step-line.done { background: #16a34a; }

/* Detail layout */
.lease-detail-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 20px;
  align-items: start;
}

/* Action panel */
.lease-action-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.lease-action-header {
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  letter-spacing: .01em;
}
.lease-action-body {
  padding: 14px 16px;
}

/* ── Resident Module ── */
.res-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.res-active    { background: #dcfce7; color: #166534; }
.res-notice    { background: #fef9c3; color: #854d0e; }
.res-pending   { background: #eff6ff; color: #1d4ed8; }
.res-past      { background: #f3f4f6; color: #6b7280; }
.res-eviction  { background: #fee2e2; color: #991b1b; }

/* ── Clickable action-center rows ── */
.tr-clickable {
  cursor: pointer;
  transition: background 0.12s;
}
.tr-clickable:hover {
  background: #f5f3ff;
}
.row-action-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #7c3aed;
  background: #f5f3ff;
  border: 1px solid #ede9fe;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.row-action-link:hover {
  background: #ede9fe;
  color: #5b21b6;
}

/* ── Clickable action sub-tab links ── */
a.action-subtab {
  text-decoration: none;
  color: inherit;
  transition: background 0.12s, color 0.12s;
}
a.action-subtab:hover {
  background: #ede9fe;
  color: #5b21b6;
}

/* ── Metric tiles as links ── */
a.crm-metric {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}
a.crm-metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

/* ═══════════════════════════════════════════════════════════
   RENT ROLL & LEDGER MODULE
   ═══════════════════════════════════════════════════════════ */

/* ── Ledger status badges ── */
.ledger-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: .01em;
}
.ledger-current    { background: #dcfce7; color: #166534; }
.ledger-prepaid    { background: #eff6ff; color: #1d4ed8; }
.ledger-balancedue { background: #fef9c3; color: #854d0e; }
.ledger-delinquent { background: #fee2e2; color: #991b1b; }

/* ── Ledger amount colors ── */
.amount-charge     { color: #dc2626; font-weight: 600; font-variant-numeric: tabular-nums; }
.amount-payment    { color: #16a34a; font-weight: 600; font-variant-numeric: tabular-nums; }
.amount-credit     { color: #16a34a; font-weight: 600; font-variant-numeric: tabular-nums; }
.amount-fee        { color: #dc2626; font-weight: 600; font-variant-numeric: tabular-nums; }
.amount-adjustment { color: #6b7280; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── Balance display ── */
.balance-zero     { color: var(--muted); font-variant-numeric: tabular-nums; }
.balance-positive { color: #dc2626; font-weight: 600; font-variant-numeric: tabular-nums; }
.balance-negative { color: #16a34a; font-weight: 600; font-variant-numeric: tabular-nums; }
.text-urgent      { color: #dc2626; font-weight: 700; }
.text-good        { color: #16a34a; font-weight: 700; }

/* ── Transaction type badges ── */
.txn-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.txn-charge     { background: #fee2e2; color: #991b1b; }
.txn-payment    { background: #dcfce7; color: #166534; }
.txn-credit     { background: #d1fae5; color: #065f46; }
.txn-fee        { background: #ffedd5; color: #9a3412; }
.txn-adjustment { background: #f3f4f6; color: #374151; }
.txn-auto       { background: #ede9fe; color: #5b21b6; font-size: 10px; }

/* ── Rent Roll summary cards ── */
.rr-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.rr-summary-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  border-top: 3px solid var(--purple);
}
.rr-summary-card.rr-card-warn  { border-top-color: #d97706; }
.rr-summary-card.rr-card-urgent { border-top-color: #dc2626; }
.rr-summary-card.rr-card-good  { border-top-color: #16a34a; }
.rr-summary-label { font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.rr-summary-value { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.1; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.rr-summary-note  { font-size: 11px; color: var(--muted); }

/* ── Modal resident info ── */
.rr-modal-resident-header {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  padding: 10px 14px;
  background: var(--soft);
  border-radius: 6px;
  margin-bottom: 14px;
}
.rr-modal-balance-row {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  margin-top: -8px;
}

/* ── Generate charges info box ── */
.rr-generate-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f5f3ff;
  border: 1px solid #ede9fe;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 4px;
}

/* ── Ledger page layout ── */
.ledger-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .ledger-layout { grid-template-columns: 1fr; }
}

/* ── Ledger sidebar card ── */
.ledger-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ledger-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.ledger-card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}
.ledger-card-name   { font-size: 15px; font-weight: 600; color: var(--ink); }
.ledger-card-number { font-size: 11px; color: var(--muted); font-family: monospace; margin-top: 2px; }

.ledger-info-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ledger-info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  gap: 8px;
}
.ledger-info-label { color: var(--muted); flex-shrink: 0; }
.ledger-info-val   { font-weight: 500; color: var(--ink); text-align: right; }

.ledger-balance-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.ledger-balance-label  { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.ledger-balance-amount { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }

/* ── Ledger main panel ── */
.ledger-main {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.ledger-main-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px 13px;
  border-bottom: 1px solid var(--line);
}

/* ── Topbar back link ── */
.app-topbar-back {
  font-size: 12px;
  color: var(--purple);
  text-decoration: none;
  margin-right: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.app-topbar-back:hover { text-decoration: underline; }

/* ════════════════════════════════
   SIDEBAR — Group links & sub-nav
════════════════════════════════ */
.sidebar-group-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  transition: background .14s, color .14s;
  position: relative;
}
.sidebar-group-link:hover { background: var(--soft); color: var(--ink); }
.sidebar-group-link.active { background: var(--soft); color: var(--purple); font-weight: 700; }
.sidebar-group-link.disabled { opacity: .5; pointer-events: none; }

.sidebar-arrow {
  margin-left: auto;
  font-size: 15px;
  line-height: 1;
  color: var(--muted);
  transition: transform .2s;
  display: inline-block;
}
.sidebar-arrow.open { transform: rotate(90deg); color: var(--purple); }

.sidebar-sub-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px 0 4px 12px;
}
.sidebar-sub-link {
  display: block;
  padding: 5px 14px 5px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: background .12s, color .12s;
}
.sidebar-sub-link::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line);
}
.sidebar-sub-link:hover { background: var(--soft); color: var(--ink); }
.sidebar-sub-link.active { color: var(--purple); font-weight: 600; background: var(--soft); }
.sidebar-sub-link.active::before { background: var(--purple); }
.sidebar-sub-link.disabled { opacity: .5; pointer-events: none; }

/* ════════════════════════════════
   WORK ORDER STATUS BADGES
════════════════════════════════ */
.wo-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .02em;
}
.wo-status-new              { background: #eff6ff; color: #2563eb; }
.wo-status-open             { background: #fff7ed; color: #c2410c; }
.wo-status-assigned         { background: #f5f3ff; color: #7c3aed; }
.wo-status-in-progress      { background: #ecfdf5; color: #065f46; }
.wo-status-waiting-parts    { background: #fffbeb; color: #92400e; }
.wo-status-waiting-vendor   { background: #fdf2f8; color: #9d174d; }
.wo-status-completed        { background: #f0fdf4; color: #166534; }
.wo-status-cancelled        { background: #f9fafb; color: #6b7280; }

/* WO priority badges */
.wo-priority {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.wo-priority-emergency { background: #fef2f2; color: #dc2626; border: 1px solid #fca5a5; }
.wo-priority-high      { background: #fff7ed; color: #c2410c; }
.wo-priority-normal    { background: #f1f5f9; color: #475569; }
.wo-priority-low       { background: #f0fdf4; color: #4b7f52; }

/* WO category pill */
.wo-category-pill {
  display: inline-block;
  padding: 2px 8px;
  background: var(--soft);
  color: var(--purple);
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
}

/* ════════════════════════════════
   WORK ORDER DETAIL PAGE
════════════════════════════════ */
.wo-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.wo-number {
  font-size: 20px;
  font-weight: 800;
  font-family: monospace;
  margin-bottom: 6px;
}
.wo-detail-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wo-detail-header-right { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.wo-detail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 900px) {
  .wo-detail-layout { grid-template-columns: 1fr; }
}

.wo-detail-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 1rem;
}
.wo-detail-card-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: 12px;
}
.wo-info-row {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.wo-info-row:last-child { border-bottom: none; }
.wo-info-label { color: var(--muted); font-weight: 500; flex-shrink: 0; }

/* Timeline */
.wo-timeline { display: flex; flex-direction: column; gap: 1px; }
.wo-timeline-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.wo-timeline-item:last-child { border-bottom: none; }
.wo-timeline-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
}
.dot-status { background: var(--purple); }
.dot-note   { background: #94a3b8; }
.wo-timeline-content { flex: 1; }
.wo-timeline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
  font-size: 12.5px;
}
.wo-timeline-change { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.wo-timeline-time { color: var(--muted); font-size: 11.5px; margin-left: auto; }
.wo-timeline-msg { font-size: 13px; color: var(--ink); line-height: 1.5; }

/* ════════════════════════════════
   MAKE-READY BOARD
════════════════════════════════ */
.mr-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}
.mr-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.mr-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.mr-unit-label { font-weight: 700; font-size: 14px; }
.mr-progress-bar-wrap {
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 5px;
}
.mr-progress-bar { height: 100%; background: var(--purple); border-radius: 3px; transition: width .3s; }
.mr-progress-label { font-size: 12px; color: var(--muted); margin-bottom: 10px; }

.mr-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  margin-bottom: 14px;
}
.mr-check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  cursor: pointer;
  padding: 3px 0;
}
.mr-check-item input { cursor: pointer; accent-color: var(--purple); }

.mr-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* make-ready status badges */
.mr-pending     { background: #eff6ff; color: #2563eb; }
.mr-in-progress { background: #fff7ed; color: #c2410c; }
.mr-complete    { background: #f0fdf4; color: #166534; }

/* ════════════════════════════════
   COMING SOON GRID (Inspections)
════════════════════════════════ */
.coming-soon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}
.coming-soon-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.cs-icon { font-size: 28px; margin-bottom: 10px; }
.cs-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.cs-desc { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 12px; }

/* ════════════════════════════════
   MISC LAYOUT HELPERS
════════════════════════════════ */
.form-layout-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 860px) {
  .form-layout-two-col { grid-template-columns: 1fr; }
}
.form-section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.form-section-title { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.form-row-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.form-optional { font-weight: 400; font-size: 11px; color: var(--muted); }
.form-required { color: var(--pink); }

/* Empty state */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--muted); }
.empty-state-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state-title { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.empty-state-sub { font-size: 13.5px; }

/* back link style */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--purple);
  font-weight: 600;
  margin-bottom: 1rem;
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

/* button extra variants */
.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger-ghost { background: transparent; color: #dc2626; border: 1px solid #dc2626; }
.btn-danger-ghost:hover { background: #fef2f2; }
.btn-sm { padding: 5px 12px; font-size: 12.5px; }

/* orange color var */
:root { --orange: #c2410c; --green: #16a34a; --red: #dc2626; --border: var(--line); }

/* ── app-btn variants ── */
.app-btn-ghost  { background: transparent !important; color: var(--muted) !important; border: 1px solid var(--line) !important; }
.app-btn-ghost:hover { background: var(--soft) !important; color: var(--ink) !important; }
.app-btn-green  { background: #16a34a !important; }
.app-btn-green:hover { background: #15803d !important; }
.app-btn-danger { background: transparent !important; color: #dc2626 !important; border: 1px solid #dc2626 !important; }
.app-btn-danger:hover { background: #fef2f2 !important; }

/* ── app-topbar-back (inline back link in topbar) ── */
.app-topbar-back {
  font-size: 12px;
  color: var(--purple);
  font-weight: 600;
  white-space: nowrap;
  margin-right: 8px;
  display: inline-block;
}
.app-topbar-back:hover { text-decoration: underline; }

/* ════════════════════════════════
   PRINT STYLES — Work Order
════════════════════════════════ */
/* ══ WORK ORDER PRINT SHEET (screen: hidden) ══ */
.wo-print-sheet { display: none; }

@media print {
  /* ── Isolation: hide everything, then reveal only the print sheet ── */
  body * { visibility: hidden !important; }

  .wo-print-sheet,
  .wo-print-sheet * { visibility: visible !important; }

  .wo-print-sheet {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0;
    padding: 18px 24px;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 11px;
    color: #111;
    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body { margin: 0; background: #fff !important; }

}

/* ════════════════════════════════
   WO PRINT SHEET STYLES (always loaded, visible only at print)
════════════════════════════════ */
.wop-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 2px solid #111;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.wop-brand  { font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: #666; }
.wop-number { font-size: 20px; font-weight: 800; letter-spacing: -.5px; line-height: 1; }
.wop-badges { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.wop-badge  { display: inline-block; padding: 1px 6px; border: 1px solid #999; border-radius: 3px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.wop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px 14px;
  margin-bottom: 10px;
}
.wop-field-label { font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #777; margin-bottom: 1px; }
.wop-field-value { font-size: 11px; font-weight: 600; color: #111; }
.wop-divider { border: none; border-top: 1px solid #ccc; margin: 8px 0; }
.wop-section-label { font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #777; margin-bottom: 4px; }
.wop-description {
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 7px 9px;
  font-size: 11px;
  line-height: 1.5;
  min-height: 44px;
  background: #fafafa;
  margin-bottom: 10px;
}
.wop-tech-notes {
  border: 1px solid #bbb;
  border-radius: 3px;
  padding: 8px 9px;
  min-height: 90px;
  margin-bottom: 10px;
  font-size: 11px;
  color: #333;
  line-height: 1.6;
}
.wop-tech-blank {
  background-image: repeating-linear-gradient(transparent, transparent 22px, #e0e0e0 22px, #e0e0e0 23px);
  min-height: 90px;
}
.wop-sig {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #ccc;
  font-size: 9.5px;
}
.wop-sig-line  { border-bottom: 1px solid #555; padding-bottom: 2px; margin-bottom: 2px; min-height: 18px; }
.wop-sig-label { font-size: 8px; color: #888; text-transform: uppercase; letter-spacing: .06em; }
.wop-yn-yes { color: #166534; font-weight: 700; }
.wop-yn-no  { color: #991b1b; font-weight: 700; }

/* ── Reports Hub Layout ─────────────────────────────────────────────────── */
.rpt-hub {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.rpt-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  background: #fafafa;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 14px 0;
}
.rpt-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════════════
   Button normalization — unify all save/action button variants
   so nothing looks tiny regardless of which class is used
   ═══════════════════════════════════════════════════════════════ */

/* Base shared style for all primary action buttons */
.btn-save,
.btn.btn-primary,
.btn-primary:not(.app-btn),
button.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--purple, #7c3aed), var(--pink, #db2777));
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,.25);
  transition: box-shadow .2s, transform .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-save:hover,
.btn.btn-primary:hover,
.btn-primary:not(.app-btn):hover,
button.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(124,58,237,.35);
  transform: translateY(-1px);
}

/* Ghost/cancel companion */
.btn.btn-secondary,
button.btn-secondary,
.btn-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  color: var(--ink, #111827);
  transition: background .15s, border-color .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn.btn-secondary:hover,
button.btn-secondary:hover,
.btn-cancel:hover { background: var(--soft, #f8f9fb); }

/* Override tiny inline-styled save buttons in setup pages */
[class*="setup"] button[type="submit"],
.setup-form button[type="submit"],
.setup-section button[type="submit"] {
  min-height: 42px;
  min-width: 140px;
  padding: 11px 28px;
  font-size: 14px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   ███  MOBILE RESPONSIVE  ███  VitaUnits Staff & Resident Apps
   Applied: 2026-05-01
   Strategy: ALL changes are behind @media — desktop layout is never touched.
   The only exceptions are helper classes (.mob-*, .rp-bottom-nav) which are
   display:none on desktop via their own rules.
═══════════════════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════════════
   1. DASHBOARD — KPI grid inline-style override
══════════════════════════════════════════════════════════════════════ */
/* Inline style="grid-template-columns:repeat(N,1fr)" beats any class rule.
   !important is the only way to override inline styles from a stylesheet. */
@media (max-width: 768px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
}
@media (max-width: 420px) {
  .kpi-grid { grid-template-columns: 1fr !important; }
}

/* Dashboard two-column panel rows */
@media (max-width: 600px) {
  .snap-section { grid-template-columns: 1fr !important; }
  .dash-two-col { grid-template-columns: 1fr !important; }
}


/* ══════════════════════════════════════════════════════════════════════
   2. TOPBAR — compact on small screens
══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .app-topbar-sub       { display: none; }
  .app-topbar-right .app-date { display: none; }
  .app-topbar           { padding: 0 14px; }
}


/* ══════════════════════════════════════════════════════════════════════
   3. PAGE CONTENT — padding on small screens
══════════════════════════════════════════════════════════════════════ */
@media (max-width: 500px) {
  .page-content { padding: 14px !important; }
  .dash-content { padding: 14px !important; }
}


/* ══════════════════════════════════════════════════════════════════════
   4. GLOBAL TAP TARGETS — minimum 44px per WCAG / Apple HIG
══════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .btn, .app-btn, button.btn, a.btn, a.app-btn,
  .rp-btn, button[type="submit"], button[type="button"],
  button[type="reset"], select {
    min-height: 44px;
  }
}


/* ══════════════════════════════════════════════════════════════════════
   5. iOS ZOOM FIX — font-size ≥ 16px prevents auto-zoom on focus
══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="date"],
  input[type="number"],
  input[type="tel"],
  input[type="password"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px !important;
  }
}


/* ══════════════════════════════════════════════════════════════════════
   6. HELPER CLASSES — reusable utilities for any page
══════════════════════════════════════════════════════════════════════ */

/* Horizontal-scroll wrapper for any overflow table */
.mob-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.mob-table-scroll table { min-width: max-content; }

/* "Desktop recommended" notice — shown only on mobile */
.mob-desktop-notice {
  display: none;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13.5px;
  color: #1e40af;
  margin-bottom: 18px;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.5;
}
@media (max-width: 768px) {
  .mob-desktop-notice { display: flex; }
  /* Elements explicitly hidden on mobile */
  .mob-hide { display: none !important; }
  /* Elements shown only on mobile */
  .mob-show { display: block !important; }
}

/* Mobile report notice (filters/export hidden) */
.mob-report-notice { display: none; }
@media (max-width: 768px) {
  .mob-report-notice {
    display: block;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 14px;
  }
}


/* ══════════════════════════════════════════════════════════════════════
   7. MAINTENANCE — work order tables → horizontal scroll on mobile
══════════════════════════════════════════════════════════════════════ */
/* .mob-table-scroll wrapper handles overflow — see helper class §6 */
@media (max-width: 768px) {
  /* Make-ready wide table (min-width:1580px) — override and scroll */
  .make-ready-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .make-ready-table-wrap table { min-width: max-content; }
}


/* ══════════════════════════════════════════════════════════════════════
   8. TASKS — task table → horizontal scroll + filter bar wrap
══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Override inline min-width:1100px so the scroll container controls width */
  table.task-table            { min-width: max-content !important; }
  /* Filter bar wraps to full width */
  .task-filter-bar            { flex-wrap: wrap !important; gap: 8px !important; }
  .task-filter-bar select,
  .task-filter-bar input[type="text"],
  .task-filter-bar input[type="date"] { width: 100% !important; min-width: 0 !important; }
}


/* ══════════════════════════════════════════════════════════════════════
   9. MOVE-OUT DETAIL — layout stacking + table scroll
══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .mo-layout          { flex-direction: column !important; }
  .mo-sidebar         { width: 100% !important; min-width: 0 !important; flex-shrink: 0 !important; }
  .charge-table       { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .mo-section table:not([class]) {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mo-tabs            { overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; flex-wrap: nowrap !important; }
  .mo-section .btn,
  .mo-section .app-btn { min-height: 44px; }
}


/* ══════════════════════════════════════════════════════════════════════
   10. RESIDENT DETAIL — tab scroll + section stacking
══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .page-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    flex-wrap: nowrap !important;
    padding-bottom: 2px;
  }
  .res-detail-layout,
  .res-two-col      { flex-direction: column !important; }
  .res-detail-layout > *,
  .res-two-col > *  { width: 100% !important; min-width: 0 !important; }
}


/* ══════════════════════════════════════════════════════════════════════
   11. REPORTS — hide export + filter sidebar; show notice banner
══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .mob-hide-export    { display: none !important; }
  .rpt-filter-sidebar { display: none !important; }
  .rpt-results-area   { width: 100% !important; }
  .rpt-table-wrap     { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}


/* ══════════════════════════════════════════════════════════════════════
   12. ACCOUNTING — AR stats + table scroll
══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .ar-stats-bar       { flex-wrap: wrap !important; gap: 8px !important; }
  .ar-stats-bar > *   { flex: 1 1 calc(50% - 8px) !important; min-width: 0 !important; }
  .ar-table-wrap,
  .refund-table-wrap  { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}


/* ══════════════════════════════════════════════════════════════════════
   13. RESIDENT PORTAL — bottom navigation bar (mobile-first)
══════════════════════════════════════════════════════════════════════ */
.rp-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #0f172a;
  border-top: 1px solid rgba(255,255,255,.08);
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.rp-bottom-nav-inner {
  display: flex;
  height: 58px;
}
.rp-bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  -webkit-tap-highlight-color: transparent;
  transition: color .15s;
}
.rp-bottom-nav a.active,
.rp-bottom-nav a:active { color: #60a5fa; }
.rp-bottom-nav a .rp-bnav-icon { font-size: 20px; line-height: 1; }

@media (max-width: 768px) {
  .rp-bottom-nav  { display: block; }
  /* Push portal content above the bottom nav bar */
  .rp-content     { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px) + 16px) !important; }
}
@media (min-width: 769px) {
  .rp-bottom-nav  { display: none !important; }
}


/* ══════════════════════════════════════════════════════════════════════
   14. RESIDENT PORTAL — lease signing (mobile-first)
══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .esign-doc-frame  { font-size: 14px !important; line-height: 1.75 !important; }
  .esign-doc-wrap   { padding: 16px !important; max-width: 100% !important; overflow-x: hidden; }
  .esign-sig-area   { width: 100% !important; }
  .esign-footer-bar {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 14px 16px;
    border-top: 1px solid #e2e8f0;
    z-index: 50;
  }
  .esign-footer-bar .rp-btn,
  .esign-footer-bar button {
    width: 100%;
    justify-content: center;
    font-size: 15px !important;
    min-height: 52px !important;
  }
  .esign-checkbox-row             { min-height: 44px; display: flex; align-items: center; gap: 10px; }
  .esign-checkbox-row input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; }
}


/* ══════════════════════════════════════════════════════════════════════
   15. RESIDENT PORTAL — payments
══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .rp-payment-form .rp-form-grid  { grid-template-columns: 1fr !important; }
  .rp-pay-cta {
    width: 100%;
    justify-content: center;
    font-size: 16px !important;
    min-height: 52px !important;
  }
  .rp-payment-history-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}


/* ══════════════════════════════════════════════════════════════════════
   16. RESIDENT PORTAL — maintenance requests
══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .rp-maint-form { display: flex; flex-direction: column; gap: 14px; }
  .rp-maint-photo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
  }
  .rp-maint-list { display: flex; flex-direction: column; gap: 12px; }
  .rp-maint-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
  }
}


/* ══════════════════════════════════════════════════════════════════════
   17. MAKE READY — tap targets on status toggles
══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .unit-status-btn,
  .unit-card .app-btn,
  .unit-card select { min-height: 44px; width: 100%; }
}
