:root {
  --ink: #171717;
  --muted: #7a7f88;
  --line: #e7e9ee;
  --soft: #f6f7f9;
  --panel: #ffffff;
  --accent: #ec2c92;
  --yellow: #ffd014;
  --green: #55b647;
  --orange: #ed9b22;
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.login-page {
  min-height: 100vh;
  padding: 0;
  background: #dce3ec;
}
.login-visual {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(28px, 7vw, 92px);
  background:
    linear-gradient(90deg, rgba(244,248,252,.97) 0%, rgba(244,248,252,.88) 34%, rgba(244,248,252,.22) 56%, rgba(244,248,252,.04) 100%),
    url("https://images.unsplash.com/photo-1518005020951-eccb494ad742?auto=format&fit=crop&w=1800&q=85") center right / cover no-repeat;
}
.login-brand {
  position: absolute;
  top: clamp(28px, 5vw, 70px);
  left: clamp(28px, 7vw, 92px);
  display: flex;
  align-items: center;
  gap: 14px;
  color: #202631;
  letter-spacing: .18em;
}
.login-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid #202631;
  color: #202631;
  font-size: 22px;
}
.login-brand strong,
.login-brand em {
  display: block;
  font-style: normal;
  line-height: 1;
}
.login-brand strong {
  font-size: 28px;
  font-weight: 800;
}
.login-brand em {
  margin-top: 7px;
  font-size: 12px;
  font-weight: 700;
}
.login-card {
  width: min(430px, 100%);
  margin-top: 70px;
  margin-left: min(4vw, 64px);
  padding: 42px 46px;
  border-radius: 8px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 22px 55px rgba(32,38,49,.13);
}
.login-card h1 {
  margin: 0;
  text-align: center;
  font-size: 28px;
  font-weight: 850;
  color: #0d1017;
}
.login-card p {
  margin: 8px 0 26px;
  text-align: center;
  color: #6f747d;
}
.login-card label {
  display: block;
  margin: 0 0 8px;
  color: #6d7077;
  font-weight: 600;
}
.login-card input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #dfe2e8;
  border-radius: 5px;
  padding: 0 20px;
  margin-bottom: 20px;
  background: #fff;
  color: #191d25;
  font-size: 15px;
  outline: 0;
}
.login-card input:focus {
  border-color: #aab4c2;
  box-shadow: 0 0 0 4px rgba(44,56,76,.08);
}
.login-support {
  display: block;
  margin: -4px 0 28px auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #202631;
  font-weight: 700;
  text-decoration: underline;
}
.login-submit {
  width: 100%;
  min-height: 60px;
  border: 0;
  border-radius: 5px;
  background: #3f4655;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}
.login-submit:hover {
  background: #303746;
}

.app-background {
  min-height: 100vh;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
.app-shell {
  width: 100%;
  min-height: 100vh;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background: var(--panel);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.topbar {
  height: 88px;
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
  gap: 24px;
}
.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.sidebar-toggle {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ff3d77, #df22c3);
  border-radius: 50%;
}
.topnav {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
}
.topnav a {
  height: 100%;
  min-width: 96px;
  display: grid;
  place-items: center;
  color: #252525;
  text-decoration: none;
  border-bottom: 4px solid transparent;
  font-weight: 600;
}
.topnav a.active { border-bottom-color: #111; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: #f7f8fa;
  color: #111;
  font-size: 21px;
  position: relative;
  text-decoration: none;
}
.icon-btn:hover,
.icon-btn.active { background: #eff1f4; color: #111; }
.icon-btn:focus-visible,
.profile-chip:focus-visible,
.sidebar > a:focus-visible,
.topnav a:focus-visible,
.floating-panel button:focus-visible,
.floating-panel a:focus-visible,
.form-control:focus,
.form-select:focus,
.ticket-actions select:focus,
.work-order-form input:focus,
.work-order-form select:focus,
.work-order-form textarea:focus {
  outline: 3px solid rgba(236,44,146,.22);
  outline-offset: 2px;
  box-shadow: none;
}
.has-dot::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 13px;
  width: 8px;
  height: 8px;
  background: #67c943;
  border-radius: 50%;
}
.profile-menu { position: relative; }
.profile-chip {
  height: 58px;
  min-width: 205px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f7f8fa;
  border-radius: 8px;
  padding: 0 14px;
  border: 0;
  text-align: left;
  color: #111;
}
.profile-chip img,
.chat-row img,
.request-card img,
.reported-by img,
.assigned-to img,
.based-on img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}
.profile-chip div { flex: 1; line-height: 1.1; }
.profile-chip strong { display: block; font-size: 14px; }
.profile-chip span { color: var(--muted); font-size: 12px; }

.app-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: calc(100vh - 88px);
  min-height: 0;
  max-height: calc(100vh - 88px);
}
.app-shell.sidebar-collapsed .app-body {
  grid-template-columns: 82px 1fr;
}
.sidebar-pref-collapsed .app-shell .app-body {
  grid-template-columns: 82px 1fr;
}
.app-shell.sidebar-collapsed .sidebar {
  padding-left: 12px;
  padding-right: 12px;
}
.sidebar-pref-collapsed .app-shell .sidebar {
  padding-left: 12px;
  padding-right: 12px;
}
.app-shell.sidebar-collapsed .sidebar > a {
  justify-content: center;
  padding: 0;
}
.sidebar-pref-collapsed .app-shell .sidebar > a {
  justify-content: center;
  padding: 0;
}
.app-shell.sidebar-collapsed .sidebar > a span,
.app-shell.sidebar-collapsed .logout-link,
.sidebar-pref-collapsed .app-shell .sidebar > a span,
.sidebar-pref-collapsed .app-shell .logout-link {
  display: none;
}
.app-shell.sidebar-collapsed .sidebar > form,
.sidebar-pref-collapsed .app-shell .sidebar > form {
  display: none;
}
.sidebar {
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 30px 14px 20px;
  overflow: auto;
}
.sidebar > a {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #2d2f34;
  text-decoration: none;
  padding: 0 18px;
  border-radius: 8px;
  margin-bottom: 6px;
  font-weight: 600;
}
.sidebar > a i { font-size: 21px; }
.sidebar > a:hover,
.sidebar > a.active { background: #f4f5f7; color: #111; }
.dialog-panel {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.collapse-pill {
  display: block;
  width: 36px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  margin: -34px auto 18px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(20,20,20,.08);
}
.search-box {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  margin-bottom: 16px;
}
.chat-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px 1fr 8px;
  align-items: center;
  gap: 10px;
}
.chat-row strong { display:block; font-size: 13px; }
.chat-row span { display:block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row em { width: 8px; height: 8px; background: #67c943; border-radius: 50%; }
.broadcast-btn,
.logout-link,
.create-order {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: #141414;
  color: #fff;
  font-weight: 700;
}
.broadcast-btn { margin-top: 14px; }
.logout-link { margin-top: 8px; height: 40px; background: #f1f2f5; color: #333; }
.content {
  background: #fff;
  padding: 30px 28px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-bottom: 96px;
}
.notification-menu { position: relative; }
.floating-panel {
  position: absolute;
  right: 0;
  top: 68px;
  width: 360px;
  max-height: 460px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0,0,0,.14);
  z-index: 30;
  padding: 14px;
  display: none;
}
.floating-panel.open { display: block; }
.notifications-panel { width: 360px; }
.profile-panel { width: 280px; }
.notifications-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 4px 4px 12px;
}
.notifications-head a {
  color: #111;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.notifications-head span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
.notification-item {
  width: 100%;
  border: 0;
  background: transparent;
  display:grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  color:#222;
  padding: 12px 8px;
  border-radius: 8px;
  text-align: left;
}
.notification-item:hover,
.notification-item.unread { background:#fff6fb; }
.notification-item i { color: var(--accent); }
.notification-item strong,
.notification-item em { display:block; }
.notification-item em {
  color: var(--muted);
  font-style:normal;
  font-size:12px;
  margin-top:3px;
}
.notifications-panel form { margin: 0; }
.notifications-panel form[data-notifications-read] { margin-top: 8px; }
.notifications-panel form[data-notifications-read] button {
  width:100%;
  border:0;
  border-radius:8px;
  background:#111;
  color:#fff;
  height:38px;
  font-weight:700;
}
.empty-state { color: var(--muted); margin: 10px 4px; }
.panel-search {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f6f7f9;
  border-radius: 8px;
  padding: 0 12px;
  margin-bottom: 10px;
}
.panel-search input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: 0;
}
.profile-panel a:hover,
.profile-panel button:hover { background: #f6f7f9; }
.panel-primary-action,
.drawer-secondary-link {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
}
.profile-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.profile-summary img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}
.profile-summary strong,
.profile-summary span { display: block; }
.profile-summary span {
  color: var(--muted);
  font-size: 12px;
}
.profile-panel a,
.profile-panel button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #111;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 8px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
}
.profile-panel form { margin: 0; }
.drawer-secondary-link {
  background: transparent;
  border: 1px solid var(--line);
  color: #111;
}

.panel,
.property-card,
.ticket-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(340px, 380px) minmax(0, 1fr);
  gap: 16px;
}
.property-card { overflow: hidden; }
.property-hero { position: relative; height: 250px; }
.property-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.property-hero span {
  position: absolute;
  left: 24px;
  bottom: 18px;
  background: rgba(255,255,255,.84);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 12px;
  font-weight: 700;
}
.property-title {
  height: 78px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}
.property-title h1 { font-size: 18px; margin: 0; font-weight: 800; }
.property-title a { color: #111; font-size: 24px; }
.property-metrics,
.payments-row,
.order-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.order-stats a {
  color: #111;
  text-decoration: none;
}
.property-metrics { padding: 24px 24px 14px; }
.property-metrics strong,
.order-stats strong { display: block; font-size: 24px; line-height: 1; }
.property-metrics span,
.order-stats span,
.payments-row span { display:block; color: #272727; font-size: 13px; margin-top: 6px; }
.property-metrics a,
.payments-row a {
  color: #111;
  text-decoration: none;
}
.lease-progress {
  height: 18px;
  background: #f1f2f4;
  border-radius: 999px;
  margin: 0 24px;
  overflow: hidden;
}
.lease-progress span { display:block; height:100%; background: var(--yellow); }
.muted-line { margin: 10px 24px 28px; color: #333; font-size: 13px; }
.mini-chart { padding: 0 24px 28px; }
.mini-chart h2,
.staff-strip h2,
.panel-heading h2 {
  font-size: 16px;
  margin: 0;
  font-weight: 800;
}
.bars {
  height: 86px;
  display: flex;
  align-items: end;
  gap: 16px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 14px 0;
}
.bars span {
  width: 7px;
  background: #676767;
  border-radius: 5px 5px 0 0;
}
.staff-strip {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 22px 24px;
}
.staff-strip p { margin: 18px 0 0; font-size: 13px; }
.staff-strip a,
.panel-heading span {
  background: #f8f9fa;
  color: #333;
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
}

.dashboard-stack { display: grid; gap: 16px; }
.panel { padding: 22px 24px; }
.panel-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 16px;
}
.payments-row strong { display:block; font-size: 21px; line-height:1; white-space: nowrap; }
.payments-row i { color: var(--accent); font-size: 20px; }
.request-grid,
.upcoming-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.request-card div { display:flex; align-items:center; gap:10px; }
.request-card strong { display:block; font-size:13px; }
.request-card strong span { display:block; margin-top:2px; }
.request-card p {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.45;
  max-height: 38px;
  overflow: hidden;
}
.work-table { display: grid; gap: 0; }
.work-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: 72px 80px minmax(90px, 1fr) 120px 74px 84px;
  align-items: center;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
  padding: 0 8px;
}
.work-row:first-child { border-top: 0; }
.work-row:hover {
  background: #f7f8fa;
  color: var(--ink);
}
.work-row:focus-visible {
  outline: 3px solid rgba(236,44,146,.22);
  outline-offset: 2px;
}
.work-row em { color: var(--accent); font-style: normal; }
.priority {
  justify-self: end;
  min-width: 84px;
  padding: 7px 14px;
  border-radius: 999px;
  text-align: center;
  color: #fff;
  font-size: 13px;
}
.priority.success { background: var(--green); }
.priority.warning { background: var(--orange); }
.priority.danger { background: var(--accent); }
.upcoming-grid { grid-template-columns: repeat(4, 1fr); }
.upcoming-grid img {
  width: 100%;
  height: 112px;
  object-fit: cover;
  border-radius: 8px;
}
.upcoming-grid div {
  display:flex;
  justify-content:space-between;
  gap: 8px;
  font-size: 13px;
  margin-top: 10px;
}
.upcoming-grid p { font-size: 12px; margin: 4px 0 0; }

.workorders-layout {
  min-height: calc(100vh - 148px);
  display: block;
}
.board-toolbar {
  display: grid;
  grid-template-columns: auto 1fr 180px auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.board-toolbar-compact {
  grid-template-columns: 1fr auto;
  margin-bottom: 10px;
}
.board-toolbar h1,
.new-order-head h2 { margin: 0; font-size: 24px; font-weight: 850; }
.board-search {
  height: 42px;
  display:flex;
  align-items:center;
  gap: 12px;
  background:#f6f7f9;
  border-radius: 8px;
  padding: 0 18px;
  color: var(--muted);
}
.board-search input {
  width:100%;
  border:0;
  outline:0;
  background:transparent;
}
.filter-btn,
.board-select,
.add-btn {
  height: 42px;
  border:0;
  background:#fff;
  font-weight:700;
}
.board-select {
  border-radius: 8px;
  background:#f6f7f9;
  padding: 0 14px;
  outline:0;
}
.filter-btn i { font-size:22px; }
.add-btn {
  width: 42px;
  border-radius: 50%;
  color:#fff;
  background:#111;
  font-size: 20px;
}
.board-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 12px;
}
.board-columns h2 {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 10px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  padding: 4px 0 8px;
}
.ticket-card {
  padding: 12px;
  margin-bottom: 10px;
  min-width: 0;
}
.ticket-card:target {
  outline: 3px solid rgba(236,44,146,.24);
  outline-offset: 3px;
}
.ticket-open {
  display: block;
  color: inherit;
  cursor: pointer;
  border-radius: 8px;
  text-decoration: none;
}
.ticket-open:focus-visible {
  outline: 3px solid rgba(236,44,146,.22);
  outline-offset: 4px;
}
.ticket-open:hover .ticket-head strong {
  text-decoration: underline;
}
.ticket-head {
  display:grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px;
  align-items: start;
}
.ticket-head i {
  font-size: 13px;
  color: var(--muted);
}
.ticket-head strong { display:block; }
.ticket-head strong span,
.assigned-to span,
.reported-by span,
.based-on span,
.based-on em {
  display:block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.ticket-head strong {
  font-size: 13px;
  line-height: 1.2;
}
.ticket-head strong span {
  margin-top: 2px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-location {
  display:flex;
  justify-content:space-between;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding: 8px 0;
  margin: 9px 0;
  color: var(--muted);
  font-size: 12px;
  gap: 8px;
}
.ticket-location strong {
  color:#333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-card p {
  font-size: 12px;
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reported-by,
.assigned-to {
  display:flex;
  align-items:center;
  gap: 8px;
  margin: 8px 0;
}
.reported-by img {
  width: 26px;
  height: 26px;
}
.reported-by strong,
.assigned-to strong,
.based-on strong {
  display:block;
  color:#222;
  font-size:12px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-images {
  display:flex;
  gap: 6px;
  margin-top: 8px;
}
.ticket-images img,
.ticket-images span {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}
.ticket-images span {
  display: grid;
  place-items: center;
  background: #f1f2f5;
  color: var(--muted);
  font-weight: 800;
}
.ticket-images span {
  display:grid;
  place-items:center;
  background:#f7f8fa;
  font-size:12px;
}
.new-order-panel {
  background:#f2f4f7;
  margin: 0;
  padding: 40px 66px 40px 38px;
  overflow:auto;
}
.drawer-panel {
  position: fixed;
  top: 88px;
  right: 0;
  bottom: 0;
  width: min(470px, calc(100vw - 24px));
  z-index: 70;
  box-shadow: -18px 0 60px rgba(0,0,0,.16);
  transform: translateX(105%);
  transition: transform .22s ease;
}
.drawer-panel.open {
  transform: translateX(0);
}
.drawer-backdrop {
  position: fixed;
  inset: 88px 0 0;
  background: rgba(17,17,17,.2);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.new-order-head,
.based-on {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
}
.new-order-head button {
  border:0;
  background:transparent;
  display:flex;
  gap:8px;
  align-items:center;
}
.based-on { margin-top: 34px; align-items:center; }
.based-on div { flex:1; }
.based-on button {
  width: 58px;
  height: 58px;
  border:0;
  border-radius: 8px;
  background: #e8edf3;
  font-size: 22px;
}
.order-copy {
  margin: 24px 0;
  font-size: 15px;
  line-height: 1.55;
}
.new-order-panel label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}
.evidence-grid {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}
.evidence-grid img,
.evidence-grid button {
  width: 100%;
  aspect-ratio: 1;
  border:0;
  border-radius: 8px;
  object-fit: cover;
}
.evidence-upload {
  width: 100%;
  aspect-ratio: 1;
  display: grid !important;
  place-items: center;
  gap: 4px;
  border: 1px dashed #cfd5df;
  border-radius: 8px;
  background: #f7f8fa;
  color: #222 !important;
  cursor: pointer;
  margin: 0 !important;
}
.evidence-upload i {
  font-size: 22px;
}
.evidence-upload span {
  font-size: 12px;
  font-weight: 800;
}
.evidence-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.order-detail-panel {
  width: min(520px, 100vw);
}
.order-detail {
  display: grid;
  gap: 22px;
}
.order-detail-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.order-detail-title span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
}
.order-detail h3 {
  margin: -14px 0 0;
  font-size: 24px;
  font-weight: 850;
}
.order-detail p {
  margin: 0;
  line-height: 1.5;
}
.order-detail h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 850;
}
.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
}
.order-detail-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.order-detail-grid dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 800;
}
.order-detail-grid dd {
  margin: 4px 0 0;
  font-weight: 750;
}
.order-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.order-photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.order-photo-upload {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}
.order-photo-upload input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
}
.order-photo-upload button {
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #fff;
  min-height: 42px;
  font-weight: 800;
}
.order-timeline,
.order-history-list {
  display: grid;
  gap: 10px;
}
.order-timeline div,
.order-history-list a {
  display: grid;
  gap: 3px;
  border-left: 3px solid var(--accent);
  background: #f8f9fb;
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
  color: inherit;
  text-decoration: none;
}
.order-timeline span,
.order-history-list span {
  color: var(--muted);
  font-size: 13px;
}
.order-timeline em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.work-order-page {
  min-height: calc(100vh - 148px);
}
.work-order-detail-page {
  min-width: 0;
}
.back-to-board {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: #f6f7f9;
  color: #111;
  text-decoration: none;
  font-weight: 800;
  margin-bottom: 6px;
}
.back-to-board:hover {
  background: #eef0f4;
  color: #111;
}
.work-order-detail-page {
  display: grid;
  gap: 18px;
}
.detail-hero {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}
.detail-hero h1 {
  margin: 4px 0 8px;
  font-size: 32px;
  font-weight: 850;
}
.detail-hero p {
  max-width: 860px;
  margin: 0;
  color: #383b42;
  line-height: 1.55;
}
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}
.detail-summary-grid div {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: #fff;
}
.detail-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.detail-summary-grid strong {
  display: block;
  font-size: 14px;
}
.detail-sections {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 18px;
  align-items: start;
}
.detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}
.detail-panel .panel-heading {
  margin-bottom: 14px;
}
.detail-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.detail-photo-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.detail-upload,
.detail-update-form {
  display: grid;
  gap: 12px;
}
.detail-upload {
  margin-top: 14px;
}
.detail-upload input,
.detail-update-form input,
.detail-update-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
}
.detail-update-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.detail-upload button,
.detail-update-form button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-weight: 850;
}
.detail-timeline,
.detail-history-list {
  display: grid;
  gap: 10px;
}
.detail-timeline article,
.detail-history-list a {
  display: grid;
  gap: 4px;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: #f7f8fa;
  padding: 12px 14px;
  color: #222;
  text-decoration: none;
}
.detail-timeline span,
.detail-history-list span,
.detail-history-list em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}
.work-order-form textarea,
.work-order-form input,
.work-order-form select,
.ticket-actions select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-height: 46px;
  padding: 10px 12px;
  outline: 0;
}
.work-order-form textarea {
  min-height: 130px;
  resize: vertical;
  margin-bottom: 14px;
}
.work-order-form label {
  display:block;
  width:100%;
  color: var(--muted);
  font-size:12px;
  margin-bottom: 12px;
}
.form-row {
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ticket-actions {
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 8px;
}
.ticket-quick-actions {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 7px;
}
.ticket-quick-actions summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 8px;
  background: #f6f7f9;
  color: #222;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}
.ticket-quick-actions summary::-webkit-details-marker {
  display: none;
}
.ticket-quick-actions summary:hover {
  background: #eef0f4;
}
.ticket-actions label {
  display: block;
  margin: 0;
}
.ticket-actions label span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  margin-bottom: 3px;
  text-transform: uppercase;
}
.ticket-actions select {
  min-height: 34px;
  padding: 5px 8px;
  font-size: 12px;
}
.ticket-actions button {
  border:0;
  border-radius:8px;
  background:#111;
  color:#fff;
  min-height: 34px;
  padding: 0 10px;
  font-weight:800;
  grid-column: 1 / -1;
  font-size: 12px;
}
.ticket-delete {
  margin-top: 7px;
}
.ticket-delete button {
  width: 100%;
  border: 1px solid #f3b8cf;
  border-radius: 8px;
  background: #fff6fa;
  color: #a5144e;
  min-height: 32px;
  padding: 0 10px;
  font-weight: 800;
  font-size: 12px;
}
.ticket-delete button:hover {
  background: #ffe9f2;
}
.app-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  background:#111;
  color:#fff;
  border-radius:8px;
  padding: 13px 16px;
  box-shadow: 0 16px 50px rgba(0,0,0,.2);
  opacity: 0;
  transform: translateY(10px);
  pointer-events:none;
  transition: .2s ease;
}
.app-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(17,17,17,.22);
  display:none;
  align-items:center;
  justify-content:center;
}
.confirm-backdrop.open { display:flex; }
.confirm-dialog {
  width: min(420px, calc(100vw - 32px));
  background:#fff;
  border-radius:8px;
  padding: 22px;
  box-shadow: 0 20px 70px rgba(0,0,0,.22);
}
.confirm-dialog h2 { font-size: 18px; margin:0 0 8px; }
.confirm-dialog p { color: var(--muted); margin:0 0 18px; }
.confirm-actions { display:flex; justify-content:flex-end; gap:10px; }
.confirm-actions button {
  border:0;
  border-radius:8px;
  padding: 10px 16px;
  font-weight:700;
}
.confirm-cancel { background:#f1f2f5; }
.confirm-ok { background:#111; color:#fff; }
.evidence-grid button { background:#e8edf3; font-size:24px; }
.select-row {
  width:100%;
  min-height: 62px;
  border:1px solid var(--line);
  background:#fff;
  border-radius: 8px;
  padding: 11px 14px;
  margin-bottom: 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  text-align:left;
}
.select-row span { color: var(--muted); font-size:12px; }
.select-row strong { display:block; color:#333; font-size:15px; font-weight:500; }
.create-order { margin-top: 22px; height: 62px; }

.card,
.form-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}
.form-section {
  background: #fff;
  padding: 20px;
  margin-bottom: 18px;
}
.billing-summary {
  margin-bottom: 18px;
}
.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.account-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}
.account-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.account-head strong,
.account-head span {
  display: block;
}
.account-head span,
.account-card p,
.account-metrics small {
  color: var(--muted);
  font-size: 12px;
}
.account-card p {
  margin: 12px 0 0;
}
.account-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.account-metrics span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fafbfc;
}
.account-metrics small,
.account-metrics strong {
  display: block;
}
.account-metrics strong {
  margin-top: 3px;
  font-size: 15px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.status-pill.success { background: #e8f6e6; color: #2c7c22; }
.status-pill.warning { background: #fff4dc; color: #9a5d00; }
.status-pill.danger { background: #ffeaf4; color: #b51661; }
.status-pill.info { background: #e7f1ff; color: #155ca8; }
.status-pill.muted { background: #f1f2f5; color: #555; }
.payment-deleted {
  color: var(--muted);
  background: #fafafa;
}
.payment-deleted td:not(:last-child) {
  text-decoration: none;
}
.profile-form {
  max-width: 860px;
}
.profile-editor-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.profile-editor-head img {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}
.profile-editor-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
}
.profile-editor-head p {
  margin: 0;
  color: var(--muted);
}
.property-photo-preview {
  width: min(360px, 100%);
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
}
.guarantor-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfd;
}
.guarantor-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 800;
}
.guarantor-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
}
.guarantor-fields {
  margin-top: 16px;
}
select:disabled {
  background-color: #f6f7f9;
  color: var(--muted);
  cursor: not-allowed;
}
.crud-form,
.settings-form {
  max-width: 1180px;
}
.form-actions {
  position: sticky;
  bottom: -96px;
  z-index: 10;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px 0 0;
  background: linear-gradient(to top, #fff 75%, rgba(255,255,255,0));
}
.table thead th {
  white-space: nowrap;
  font-size: .78rem;
  text-transform: uppercase;
  color: #7a7f88;
}
.required:after { content:" *"; color:#dc2626; }
.btn-primary {
  background: #111;
  border-color: #111;
}
.btn-primary:hover {
  background: #2b2b2b;
  border-color: #2b2b2b;
}
.resource-toolbar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}
.resource-new {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.resource-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.workorder-filters {
  margin-bottom: 14px;
}
.resource-filters label {
  display: grid;
  gap: 4px;
  margin: 0;
  min-width: 0;
}
.resource-filters label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.resource-filters .form-control,
.resource-filters .form-select {
  min-height: 36px;
  font-size: 13px;
  border-radius: 8px;
}
.resource-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  flex-wrap: wrap;
}
.resource-filter-actions .btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.filter-count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2f6;
  color: #46505c;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .login-visual {
    align-items: center;
    background-position: 58% center;
  }
  .login-card {
    margin-left: 0;
  }
  .app-background { padding: 0; align-items: stretch; }
  .app-shell { min-height: 100vh; height: auto; max-height: none; overflow: visible; }
  .topbar { grid-template-columns: 1fr; height: auto; padding: 18px; }
  .topnav { overflow:auto; height: 52px; }
  .top-actions { flex-wrap: wrap; }
  .app-body { grid-template-columns: 1fr; height: auto; max-height:none; }
  .content { overflow: visible; }
  .sidebar { display:none; }
  .app-shell.sidebar-open .sidebar {
    display: block;
    position: fixed;
    left: 0;
    top: 88px;
    bottom: 0;
    width: 260px;
    z-index: 50;
    box-shadow: 18px 0 60px rgba(0,0,0,.14);
  }
  .dashboard-grid,
  .board-columns { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
  .detail-summary-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
  .detail-sections {
    grid-template-columns: 1fr;
  }
  .resource-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .login-page {
    background: #eef3f8;
  }
  .login-visual {
    min-height: 100vh;
    align-items: flex-start;
    padding: 26px 18px;
    background:
      linear-gradient(180deg, rgba(244,248,252,.98) 0%, rgba(244,248,252,.9) 48%, rgba(244,248,252,.55) 100%),
      url("https://images.unsplash.com/photo-1518005020951-eccb494ad742?auto=format&fit=crop&w=1200&q=82") center / cover no-repeat;
  }
  .login-brand {
    position: static;
    margin-bottom: 48px;
  }
  .login-brand strong {
    font-size: 24px;
  }
  .login-card {
    width: 100%;
    margin: 0;
    padding: 30px 22px;
  }
  .login-card h1 {
    font-size: 24px;
  }
  .content { padding: 18px; }
  .property-metrics,
  .payments-row,
  .request-grid,
  .upcoming-grid,
  .order-stats { grid-template-columns: repeat(2, 1fr); }
  .work-row { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 0; }
  .board-columns,
  .form-row,
  .ticket-actions { grid-template-columns: 1fr; }
  .detail-summary-grid,
  .detail-photo-grid {
    grid-template-columns: 1fr;
  }
  .detail-hero {
    display: grid;
  }
  .detail-hero h1 {
    font-size: 26px;
  }
  .floating-panel { width: calc(100vw - 24px); right: -120px; }
}
