:root {
  --background: #ffffff;
  --foreground: #0f172a;
  --muted: #f8fafc;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --panel: #ffffff;
  --primary: #2563eb;
  --primary-foreground: #ffffff;
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --ring: #2563eb;
  --shadow: 0 16px 42px rgba(15, 23, 42, .08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.site-container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-topbar {
  background: #172554;
  color: #fff;
}

.topbar-inner {
  display: grid;
  min-height: 44px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding-block: 8px;
  font-size: 13px;
}

.topbar-inner p {
  margin: 0;
  color: #dbeafe;
  text-align: center;
}

.topbar-pill,
.topbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 6px 10px;
  font-weight: 800;
}

.topbar-pill {
  background: #fff;
  color: #1d4ed8;
}

.topbar-link {
  border: 1px solid rgba(255, 255, 255, .28);
  color: #fff;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(226, 232, 240, .9);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 12px;
  letter-spacing: .04em;
}

.brand-text {
  font-size: 18px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 500;
}

.desktop-nav a:hover,
.footer-links a:hover {
  color: var(--foreground);
}

.language-pill {
  display: inline-flex;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  padding: 3px;
}

.language-pill a {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 800;
}

.language-pill a.active {
  background: var(--primary);
  color: #fff;
}

.header-actions,
.hero-actions,
.portal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible,
.mobile-menu-button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 1px 1px rgba(43, 36, 53, .12);
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-outline,
.btn-ghost {
  border-color: var(--border);
  background: #f8f9fa;
  color: #3b3347;
  box-shadow: 0 1px 1px rgba(43, 36, 53, .06);
}

.btn-ghost {
  border-color: transparent;
}

.btn-outline:hover,
.btn-ghost:hover {
  border-color: #cbd5e1;
  background: #eef0f3;
}

.btn-large {
  min-height: 46px;
  padding-inline: 18px;
}

.btn-small {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.btn-danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.btn-danger:hover {
  border-color: #fca5a5;
  background: #fee2e2;
}

.app-confirm-modal.fade {
  opacity: 0;
  transition: opacity .15s linear;
}

.app-confirm-modal.show {
  opacity: 1;
}

.app-confirm-modal .modal-dialog {
  max-width: 500px;
  margin: 1.75rem auto;
  transition: none;
  transform: none !important;
}

.app-confirm-modal.show .modal-dialog {
  transform: none !important;
}

.app-confirm-modal .modal-content {
  border: 1px solid rgba(0, 0, 0, .175);
  border-radius: .5rem;
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}

.app-confirm-modal .modal-header,
.app-confirm-modal .modal-footer {
  border-color: #dee2e6;
}

.app-confirm-modal .modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
}

.app-confirm-modal .modal-body p {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .app-confirm-modal.fade,
  .app-confirm-modal .modal-dialog {
    transition: none;
  }
}

.mobile-menu-button {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--foreground);
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  padding: 10px 16px 16px;
  background: var(--panel);
}

.mobile-menu[data-open="true"] {
  display: grid;
  gap: 10px;
}

.mobile-menu a {
  border-radius: 8px;
  padding: 10px;
  color: var(--muted-foreground);
  font-weight: 600;
}

.mobile-menu a:hover {
  background: var(--muted);
  color: var(--foreground);
}

.hero-section {
  padding: 72px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  align-items: center;
  gap: 48px;
}

.hero-copy h1,
.section-heading h2,
.operations-grid h2,
.portal-inner h2 {
  margin: 12px 0 0;
  max-width: 760px;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.02;
  letter-spacing: 0;
}

.section-heading h2,
.operations-grid h2,
.portal-inner h2 {
  font-size: clamp(30px, 4.5vw, 48px);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  padding: 5px 10px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-lede,
.section-heading p,
.operations-grid p {
  max-width: 660px;
  margin: 20px 0 0;
  color: var(--muted-foreground);
  font-size: 18px;
}

.hero-actions {
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 560px;
  margin: 34px 0 0;
}

.hero-stats div,
.feature-card,
.checklist-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.hero-stats div {
  padding: 15px;
}

.hero-stats dt {
  font-size: 26px;
  font-weight: 800;
}

.hero-stats dd {
  margin: 2px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.hero-media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--muted);
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  min-height: 420px;
  object-fit: cover;
}

.media-panel {
  position: absolute;
  display: grid;
  gap: 2px;
  max-width: 240px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  padding: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
  font-size: 13px;
}

.media-panel span {
  color: var(--muted-foreground);
}

.media-panel-top {
  top: 18px;
  right: 18px;
}

.media-panel-bottom {
  bottom: 18px;
  left: 18px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #16a34a;
}

.section-band,
.operations-section,
.portal-strip {
  padding: 72px 0;
}

.section-band {
  background: var(--muted);
}

.section-heading {
  display: grid;
  gap: 0;
  margin-bottom: 28px;
}

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

.feature-card {
  min-height: 220px;
  padding: 22px;
}

.card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: #134e4a;
  font-size: 12px;
  font-weight: 800;
}

.feature-card h3,
.checklist-panel h3 {
  margin: 18px 0 0;
  font-size: 18px;
}

.feature-card p {
  margin: 10px 0 0;
  color: var(--muted-foreground);
}

.operations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 40px;
  align-items: start;
}

.checklist-panel {
  padding: 24px;
}

.checklist-panel ul {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.checklist-panel li {
  position: relative;
  padding-left: 26px;
  color: var(--muted-foreground);
}

.checklist-panel li::before {
  position: absolute;
  left: 0;
  top: 3px;
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent-soft);
  content: "";
}

.checklist-panel li::after {
  position: absolute;
  left: 6px;
  top: 7px;
  width: 6px;
  height: 9px;
  border-right: 2px solid #0f766e;
  border-bottom: 2px solid #0f766e;
  content: "";
  transform: rotate(40deg);
}

.portal-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.portal-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.pricing-page-hero {
  padding: 64px 0 34px;
}

.pricing-page-hero h1 {
  max-width: 780px;
  margin: 12px 0 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.04;
  letter-spacing: 0;
}

.pricing-plans {
  display: grid;
  gap: 22px;
}

.pricing-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.pricing-toolbar p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 14px;
}

.pricing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 3px;
}

.pricing-toggle button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 8px 12px;
  color: var(--muted-foreground);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.pricing-toggle button.active {
  background: var(--panel);
  color: var(--foreground);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .12);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  display: grid;
  min-height: 438px;
  grid-template-rows: auto 1fr auto;
  gap: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}

.pricing-card.featured {
  border-color: #111827;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .12);
}

.pricing-ribbon {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  padding: 5px 9px;
  color: #1e40af;
  font-size: 11px;
  font-weight: 800;
}

.pricing-card-heading h3 {
  margin: 0;
  font-size: 20px;
}

.pricing-card-heading strong {
  display: block;
  margin-top: 12px;
  color: var(--foreground);
  font-size: 28px;
  line-height: 1.12;
}

.pricing-card-heading p {
  margin: 12px 0 0;
  color: var(--muted-foreground);
  font-size: 14px;
}

.pricing-features {
  display: grid;
  align-content: start;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-features li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  color: var(--foreground);
  font-size: 14px;
}

.pricing-features i {
  color: #0f766e;
}

.selected-plan-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 14px;
}

.selected-plan-panel div {
  display: grid;
  gap: 4px;
  text-align: right;
}

.selected-plan-panel strong {
  color: var(--foreground);
}

.selected-plan-panel span:not(.eyebrow) {
  color: var(--muted-foreground);
  font-size: 14px;
}

@media (max-width: 1120px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.property-portal-landing {
  min-height: 100vh;
  background: var(--background);
}

.property-portal-hero {
  display: grid;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  align-content: center;
  gap: 56px;
  padding-top: 42px;
  padding-right: clamp(24px, 6vw, 88px);
  padding-bottom: 42px;
  padding-left: clamp(24px, 6vw, 88px);
}

.property-portal-copy h1 {
  margin: 10px 0 0;
  color: var(--foreground);
  font-size: clamp(38px, 6vw, 72px);
  line-height: .98;
  letter-spacing: 0;
}

.property-portal-copy p {
  margin: 18px 0 0;
  color: var(--muted-foreground);
  font-size: 18px;
  line-height: 1.6;
}

.property-soon-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 18%, rgba(20, 184, 166, .12), transparent 30%),
    linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
}

.property-soon-shell {
  display: grid;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  align-content: center;
  gap: 48px;
  padding-top: 42px;
  padding-right: clamp(24px, 6vw, 88px);
  padding-bottom: 42px;
  padding-left: clamp(24px, 6vw, 88px);
}

.property-soon-card {
  display: grid;
  width: 100%;
  min-height: 64vh;
  align-content: center;
  border-top: 1px solid rgba(108, 95, 199, .18);
  border-bottom: 1px solid rgba(108, 95, 199, .18);
  padding: clamp(28px, 6vw, 56px) 0;
}

.property-soon-mark {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--primary);
  font-size: 22px;
}

.property-soon-card h1 {
  margin: 10px 0 0;
  color: var(--foreground);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.property-soon-card p {
  margin: 18px 0 0;
  color: var(--muted-foreground);
  font-size: 17px;
  line-height: 1.65;
}

.property-soon-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.property-soon-meta span {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  padding: 7px 11px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 700;
}

.register-section {
  padding: 64px 0 72px;
  background: #f8fafc;
}

.register-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.register-copy {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 18px;
}

.register-copy h1,
.register-success h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.04;
  letter-spacing: 0;
}

.register-copy p,
.register-success p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 17px;
}

.register-note,
.register-panel,
.register-success {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.register-note {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.register-note span {
  color: var(--muted-foreground);
  font-size: 14px;
}

.register-panel {
  padding: 24px;
}

.register-panel .panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.register-panel .panel-heading h2 {
  margin: 0;
  font-size: 22px;
}

.register-panel .panel-heading p {
  margin: 4px 0 0;
  color: var(--muted-foreground);
}

.public-register-form {
  gap: 18px;
}

.public-register-form input,
.public-register-form select,
.public-register-form textarea {
  width: 100%;
}

.register-success-section {
  min-height: 58vh;
  display: grid;
  align-items: center;
}

.register-success {
  display: grid;
  gap: 18px;
  max-width: 720px;
  padding: 34px;
}

.site-footer {
  padding: 38px 0;
}

.page-hero {
  padding: 72px 0;
}

.compact-page-hero {
  padding-bottom: 42px;
}

.page-hero-grid,
.contact-grid,
.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 36px;
  align-items: start;
}

.page-hero h1,
.compact-page-hero h1 {
  max-width: 820px;
  margin: 12px 0 0;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.page-hero p,
.compact-page-hero p,
.copy-stack p,
.portal-inner p {
  margin: 18px 0 0;
  color: var(--muted-foreground);
  font-size: 17px;
  line-height: 1.65;
}

.compact-media img {
  min-height: 320px;
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.four-up {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card.compact {
  min-height: 190px;
}

.feature-story-section {
  background: #f8fafc;
}

.feature-stories {
  display: grid;
  gap: 24px;
}

.feature-story {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  padding: 22px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.feature-story.reversed .story-visual {
  order: 2;
}

.story-visual {
  overflow: hidden;
  border-radius: 10px;
  background: var(--muted);
}

.story-visual img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.feature-story h3,
.module-detail h2,
.demo-role-card h2,
.help-category h2,
.demo-card h2,
.split-section h2,
.legal-content h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.14;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--muted-foreground);
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 2px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  content: "\2713";
  font-size: 12px;
  font-weight: 900;
}

.testimonial-section,
.faq-section,
.feature-anchor-section {
  padding: 72px 0;
}

.testimonial-grid,
.faq-grid,
.demo-grid,
.help-category-grid,
.feature-anchor-grid {
  display: grid;
  gap: 16px;
}

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

.testimonial-grid figure,
.faq-grid details,
.module-detail,
.demo-role-card,
.help-category,
.contact-card,
.demo-card,
.legal-content {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.testimonial-grid figure {
  margin: 0;
  padding: 24px;
}

.testimonial-grid blockquote {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.7;
}

.testimonial-grid figcaption {
  margin-top: 18px;
  color: var(--foreground);
  font-weight: 800;
}

.testimonial-grid figcaption span {
  display: block;
  margin-top: 3px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
}

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

.faq-grid details {
  padding: 22px;
}

.faq-grid summary {
  cursor: pointer;
  color: var(--foreground);
  font-weight: 800;
}

.faq-grid p {
  margin: 12px 0 0;
  color: var(--muted-foreground);
}

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

.module-detail {
  scroll-margin-top: 120px;
  padding: 24px;
}

.module-index,
.category-meta,
.legal-updated,
.pricing-guarantee {
  display: inline-flex;
  width: fit-content;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.module-detail p,
.demo-role-card p,
.help-category p,
.demo-card p,
.legal-content p {
  margin: 12px 0 0;
  color: var(--muted-foreground);
  line-height: 1.65;
}

.about-stat-panel {
  display: grid;
  gap: 14px;
  margin: 0;
}

.about-stat-panel div {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 20px;
}

.about-stat-panel dt {
  font-size: 34px;
  font-weight: 900;
}

.about-stat-panel dd {
  margin: 4px 0 0;
  color: var(--muted-foreground);
}

.copy-stack {
  display: grid;
  gap: 4px;
}

.help-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.help-stats span {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  padding: 8px 12px;
  color: var(--muted-foreground);
}

.help-stats strong {
  color: var(--foreground);
}

.help-category-grid,
.demo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.help-category,
.demo-role-card,
.contact-card,
.demo-card {
  padding: 24px;
}

.category-meta {
  margin-top: 16px;
  color: var(--muted-foreground);
}

.contact-card {
  display: grid;
  gap: 18px;
}

.contact-card div {
  display: grid;
  gap: 4px;
}

.contact-card i {
  color: var(--primary);
  font-size: 20px;
}

.contact-card span {
  color: var(--muted-foreground);
}

.public-contact-form {
  gap: 18px;
}

.public-contact-form input,
.public-contact-form select,
.public-contact-form textarea {
  width: 100%;
}

.form-disclaimer {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.form-disclaimer a {
  color: var(--primary);
  font-weight: 800;
}

.demo-role-card {
  display: grid;
  gap: 18px;
}

.demo-role-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.demo-role-card dl div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
}

.demo-role-card dt {
  color: var(--muted-foreground);
  font-weight: 700;
}

.demo-role-card dd {
  margin: 0;
  color: var(--foreground);
  font-weight: 800;
  word-break: break-word;
}

.legal-content {
  display: grid;
  max-width: 860px;
  gap: 24px;
  padding: 30px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  color: var(--muted-foreground);
  font-size: 14px;
}

.footer-brand {
  color: var(--foreground);
}

.footer-inner p {
  margin: 12px 0 0;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  justify-content: flex-end;
  gap: 10px 18px;
  font-weight: 600;
}

.footer-copy {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

@media (max-width: 920px) {
  .desktop-nav,
  .header-actions {
    display: none;
  }

  .topbar-inner {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .mobile-menu-button {
    display: block;
  }

  .hero-grid,
  .operations-grid,
  .page-hero-grid,
  .contact-grid,
  .split-section,
  .feature-story {
    grid-template-columns: 1fr;
  }

  .hero-media img {
    min-height: 320px;
  }

  .card-grid,
  .testimonial-grid,
  .faq-grid,
  .feature-anchor-grid,
  .help-category-grid,
  .demo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-story.reversed .story-visual {
    order: 0;
  }

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

  .portal-inner,
  .footer-inner,
  .register-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .register-copy {
    position: static;
  }

  .footer-links {
    grid-template-columns: repeat(2, minmax(0, max-content));
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .hero-section {
    padding-top: 48px;
  }

  .pricing-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .pricing-toggle {
    width: 100%;
  }

  .pricing-toggle button {
    flex: 1;
  }

  .hero-stats,
  .card-grid,
  .testimonial-grid,
  .faq-grid,
  .feature-anchor-grid,
  .help-category-grid,
  .demo-grid,
  .footer-links {
    grid-template-columns: 1fr;
  }

  .media-panel {
    position: static;
    margin: 12px;
  }
}

.app-body {
  --background: #f6f5f8;
  --foreground: #2b2435;
  --muted: #faf9fb;
  --muted-foreground: #6f6878;
  --border: #dedbe5;
  --panel: #ffffff;
  --primary: #6c5fc7;
  --primary-foreground: #ffffff;
  --accent: #6c5fc7;
  --accent-soft: #f0ecff;
  --ring: #6c5fc7;
  --shadow: 0 1px 2px rgba(43, 36, 53, .08);
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-size: 13px;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 292px minmax(0, 1fr);
}

.client-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 252px minmax(0, 1fr);
}

.client-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  height: 100vh;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  border-right: 1px solid var(--border);
  background: #fbfafc;
  padding: 18px 14px;
}

.client-sidebar-header {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}

.client-sidebar-header > span {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
}

.client-main {
  min-width: 0;
}

.client-nav {
  display: grid;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
}

.client-nav-search {
  position: relative;
  display: block;
}

.client-nav-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  color: var(--muted-foreground);
  font-size: 13px;
  pointer-events: none;
  transform: translateY(-50%);
}

.client-nav-search input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #ffffff;
  padding: 0 12px 0 34px;
  color: var(--foreground);
  font: inherit;
  outline: none;
}

.client-nav-search input:focus {
  border-color: #b8afe8;
  box-shadow: 0 0 0 3px rgba(108, 95, 199, .14);
}

.client-nav-groups {
  display: grid;
  min-height: 0;
  align-content: start;
  gap: 6px;
  overflow-y: auto;
  padding-right: 3px;
}

.client-nav-group {
  display: grid;
  gap: 4px;
}

.client-nav-group-toggle {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 7px 9px;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}

.client-nav-group-toggle:hover {
  background: #f1eff6;
  color: var(--foreground);
}

.client-nav-group-toggle i {
  font-size: 11px;
  transition: transform 140ms ease;
}

.client-nav-group-toggle[aria-expanded="true"] i {
  transform: rotate(90deg);
}

.client-nav-group-items {
  display: grid;
  gap: 3px;
}

.client-nav-empty {
  margin: 0;
  border-radius: 7px;
  background: #f1eff6;
  padding: 10px;
  color: var(--muted-foreground);
  font-weight: 600;
}

.client-nav-quota {
  justify-content: center;
  min-height: 38px;
  border-top: 1px solid var(--border);
  background: var(--foreground);
  color: #ffffff;
}

.client-nav-quota .app-nav-icon {
  background: rgba(255, 255, 255, .14);
  color: #ffffff;
}

.client-nav-quota:hover,
.client-nav-quota.active {
  background: var(--primary);
  color: #ffffff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.app-rail {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  height: 100vh;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  border-right: 1px solid var(--border);
  background: #ffffff;
  padding: 10px 8px;
}

.app-rail-brand,
.app-rail-item,
.app-rail-user {
  position: relative;
  display: grid;
  width: 42px;
  min-height: 42px;
  align-items: center;
  justify-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 5px;
  color: #4f465c;
  font-size: 12px;
  font-weight: 800;
}

.app-rail-brand {
  color: var(--foreground);
}

.app-rail-brand::after,
.app-rail-item::after,
.app-rail-user::after {
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  z-index: 80;
  width: max-content;
  max-width: 220px;
  padding: 6px 9px;
  border: 1px solid #23202a;
  border-radius: 6px;
  background: #23202a;
  box-shadow: 0 10px 22px rgba(24, 19, 32, 0.18);
  color: #ffffff;
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  transform: translate(-4px, -50%);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}

.app-rail-brand::before,
.app-rail-item::before,
.app-rail-user::before {
  position: absolute;
  top: 50%;
  left: calc(100% + 5px);
  z-index: 81;
  width: 8px;
  height: 8px;
  background: #23202a;
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translate(-4px, -50%) rotate(45deg);
  transition: opacity 120ms ease, transform 120ms ease;
}

.app-rail-brand:hover::after,
.app-rail-brand:hover::before,
.app-rail-brand:focus-visible::after,
.app-rail-brand:focus-visible::before,
.app-rail-item:hover::after,
.app-rail-item:hover::before,
.app-rail-item:focus-visible::after,
.app-rail-item:focus-visible::before,
.app-rail-user:hover::after,
.app-rail-user:hover::before {
  opacity: 1;
  transform: translate(0, -50%);
}

.app-rail-brand:hover::before,
.app-rail-brand:focus-visible::before,
.app-rail-item:hover::before,
.app-rail-item:focus-visible::before,
.app-rail-user:hover::before {
  transform: translate(0, -50%) rotate(45deg);
}

.app-rail-nav {
  display: grid;
  align-content: start;
  gap: 6px;
  margin-top: 18px;
}

.app-rail-icon {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 7px;
  background: #f2f0f6;
  color: #5f566c;
  font-size: 14px;
  font-weight: 900;
}

.app-rail-item:hover,
.app-rail-item.active {
  border-color: #cfc9ef;
  background: var(--accent-soft);
  color: var(--primary);
}

.app-rail-brand .app-rail-icon,
.app-rail-item.active .app-rail-icon {
  background: var(--primary);
  color: var(--primary-foreground);
}

.nav-unread-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 9px;
  line-height: 1;
}

.app-rail-user {
  border-color: var(--border);
  background: var(--muted);
  color: var(--foreground);
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  height: 100vh;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid var(--border);
  background: #fbfafc;
  padding: 0;
}

.app-sidebar-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  min-height: 72px;
  align-content: center;
  border-bottom: 1px solid var(--border);
  background: rgba(251, 250, 252, .96);
  padding: 16px 18px;
  backdrop-filter: blur(12px);
}

.app-sidebar-header span {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.app-sidebar-header strong {
  margin-top: 2px;
  color: var(--foreground);
  font-size: 18px;
  font-weight: 800;
}

.app-sidebar-content {
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}

.root-sidebar-nav {
  display: grid;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
}

.root-nav-search {
  position: relative;
  display: block;
}

.root-nav-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  color: var(--muted-foreground);
  font-size: 13px;
  pointer-events: none;
  transform: translateY(-50%);
}

.root-nav-search input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #ffffff;
  padding: 0 12px 0 34px;
  color: var(--foreground);
  font: inherit;
  outline: none;
}

.root-nav-search input:focus {
  border-color: #b8afe8;
  box-shadow: 0 0 0 3px rgba(108, 95, 199, .14);
}

.root-nav-groups {
  display: grid;
  min-height: 0;
  align-content: start;
  gap: 6px;
  overflow-y: auto;
  padding-right: 3px;
}

.root-nav-group {
  display: grid;
  gap: 4px;
}

.root-nav-group-toggle {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 7px 9px;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}

.root-nav-group-toggle:hover {
  background: #f1eff6;
  color: var(--foreground);
}

.root-nav-group-toggle i {
  font-size: 11px;
  transition: transform 140ms ease;
}

.root-nav-group-toggle[aria-expanded="true"] i {
  transform: rotate(90deg);
}

.root-nav-group-items {
  display: grid;
  gap: 3px;
}

.root-nav-empty {
  margin: 0;
  border-radius: 7px;
  background: #f1eff6;
  padding: 10px;
  color: var(--muted-foreground);
  font-weight: 600;
}

.app-brand {
  display: flex;
  margin-bottom: 18px;
  padding: 0 8px 16px;
  border-bottom: 1px solid var(--border);
}

.app-brand .brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--primary);
}

.app-brand .brand-text {
  font-size: 15px;
  font-weight: 800;
}

.app-nav {
  display: grid;
  gap: 3px;
}

.app-nav-label,
.app-kicker {
  margin: 14px 8px 7px;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.app-nav-item {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  padding: 5px 8px;
  color: #4f465c;
  font-size: 13px;
  font-weight: 600;
}

.app-nav-item:hover {
  background: #f1eff6;
  color: var(--foreground);
}

.app-nav-item.active {
  background: var(--accent-soft);
  color: var(--primary);
}

.app-nav-item.disabled {
  cursor: not-allowed;
  opacity: .55;
}

.app-nav-icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 5px;
  background: #f2f0f6;
  color: #6f6878;
  font-size: 12px;
  font-weight: 800;
}

.app-nav-item.active .app-nav-icon {
  background: #ffffff;
  color: var(--primary);
}

.nav-unread-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  place-items: center;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.app-main {
  min-width: 0;
  background: var(--background);
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  min-height: 48px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px) auto auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .92);
  padding: 7px 22px;
  backdrop-filter: blur(12px);
}

.client-main .app-topbar {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.client-shell.has-client-impersonation {
  min-height: calc(100vh - 44px);
}

.client-shell.has-client-impersonation .client-sidebar {
  top: 44px;
  height: calc(100vh - 44px);
}

.client-shell.has-client-impersonation .app-topbar {
  top: 44px;
}

.client-impersonation-banner {
  position: sticky;
  top: 0;
  z-index: 45;
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #075985;
  padding: 8px 22px;
}

.client-impersonation-banner > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.client-impersonation-banner i {
  color: #0284c7;
  font-size: 14px;
}

.client-impersonation-banner span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.client-impersonation-banner strong,
.client-impersonation-banner small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-impersonation-banner strong {
  font-size: 12px;
  line-height: 1.15;
}

.client-impersonation-banner small {
  color: #0369a1;
  font-size: 11px;
  font-weight: 700;
}

.owner-preview-banner {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #075985;
  padding: 8px 22px;
}

.owner-preview-banner > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.owner-preview-banner i {
  color: #0284c7;
  font-size: 14px;
}

.owner-preview-banner span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.owner-preview-banner strong,
.owner-preview-banner small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-preview-banner strong {
  font-size: 12px;
  line-height: 1.15;
}

.owner-preview-banner small {
  color: #0369a1;
  font-size: 11px;
  font-weight: 700;
}

.client-property-switcher {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.client-property-switcher .form-field {
  width: min(32vw, 280px);
  min-width: 190px;
  gap: 0;
}

.owner-property-switcher {
  width: min(32vw, 300px);
  min-width: 210px;
  justify-self: end;
  gap: 0;
}

.owner-shell.has-owner-preview {
  min-height: calc(100vh - 44px);
}

.owner-shell.has-owner-preview .client-sidebar {
  top: 44px;
  height: calc(100vh - 44px);
}

.app-breadcrumbs {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 600;
}

.app-breadcrumbs strong {
  color: var(--foreground);
}

.app-search {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfafc;
  padding: 0 10px;
  color: var(--muted-foreground);
}

.app-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--foreground);
  font: inherit;
  outline: 0;
}

.app-search:focus-within {
  border-color: #b8b0df;
  box-shadow: 0 0 0 2px rgba(108, 95, 199, .14);
}

.app-view-site {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfafc;
  padding: 0 11px;
  color: #3b3347;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 1px 1px rgba(43, 36, 53, .05);
}

.app-view-site:hover {
  border-color: #c8c1d5;
  background: #f2f0f6;
}

.app-topbar h1 {
  margin: 0;
  font-size: 18px;
}

.app-user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-user-trigger {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  padding: 3px 6px;
  color: var(--foreground);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.app-user-trigger:hover,
.app-user-trigger[aria-expanded="true"] {
  background: #f4f1fb;
}

.app-user-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #d8d1f2;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
}

.app-user-label {
  min-width: 0;
}

.app-user strong,
.app-user span {
  display: block;
  font-size: 13px;
}

.app-user span {
  color: var(--muted-foreground);
}

.app-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 220px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(26, 19, 43, .16);
  padding: 6px;
}

.app-user-menu[hidden] {
  display: none !important;
}

.app-user-menu-header {
  border-bottom: 1px solid var(--border);
  margin: 0 0 4px;
  padding: 8px 9px 10px;
}

.app-user-menu-header strong,
.app-user-menu-header span {
  display: block;
}

.app-user-menu-header strong {
  color: var(--foreground);
  font-size: 13px;
}

.app-user-menu-header span {
  color: var(--muted-foreground);
  font-size: 12px;
}

.app-user-menu-item {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--foreground);
  padding: 7px 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
}

.app-user-menu-item:hover {
  background: #f4f1fb;
  color: var(--foreground);
}

.app-user-menu-button {
  cursor: pointer;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
}

.app-content {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.root-module-shell {
  display: grid;
  width: 100%;
  min-height: calc(100vh - 92px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.root-module-header {
  min-height: 72px;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.root-module-header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 0 14px;
}

.root-module-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.root-module-header p {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.root-module-content-container {
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

.root-module-tabs {
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 14px 0 0;
}

.root-module-filter {
  position: relative;
  display: flex;
  width: min(360px, 100%);
  align-items: center;
  gap: 8px;
  color: var(--muted-foreground);
}

.root-module-filter i {
  position: absolute;
  left: 12px;
  font-size: 14px;
  pointer-events: none;
}

.root-module-filter input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--foreground);
  font: inherit;
  font-size: 13px;
  padding: 8px 10px 8px 34px;
}

.root-module-filter input:focus {
  border-color: var(--ring);
  outline: 2px solid rgba(17, 24, 39, .14);
  outline-offset: 1px;
}

.root-module-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.root-module-tab {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px 9px;
  transform: translateY(1px);
}

.root-module-tab:hover {
  background: var(--muted);
  color: var(--foreground);
}

.root-module-tab.active {
  border-color: var(--border);
  background: var(--background);
  color: var(--foreground);
}

.root-module-tab span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.root-module-tab strong {
  display: inline-grid;
  min-width: 22px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 800;
  padding: 0 6px;
}

.root-module-tab.active strong {
  background: var(--foreground);
  color: var(--background);
}

.root-module-content-grid {
  display: grid;
  width: 100%;
  min-height: 100%;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

.root-module-content-grid.has-left-panel {
  grid-template-columns: minmax(0, 1fr);
}

.root-module-side-panel[hidden] {
  display: none !important;
}

.root-module-side-panel {
  min-width: 250px;
  overflow: auto;
  background: var(--panel);
}

.root-module-side-panel-left {
  border-right: 1px solid var(--border);
}

.root-module-side-panel-right {
  border-left: 1px solid var(--border);
}

.root-module-content {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  min-height: 0;
  gap: 14px;
  overflow: auto;
  padding: 16px 0 0;
  background: transparent;
}

.root-module-content > * {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
}

.root-module-content .app-panel,
.root-module-content .datatable-controls,
.root-module-content .app-table-panel,
.root-module-content .form-panel {
  width: 100%;
  max-width: none;
}

.root-module-content[aria-busy="true"] {
  cursor: wait;
  opacity: .72;
}

.root-module-footer {
  min-height: 60px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

.app-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.app-page-heading h1,
.app-page-heading h2 {
  margin: 7px 0 0;
  font-size: 24px;
  line-height: 1.15;
}

.app-page-heading p {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.page-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.page-heading-actions form {
  margin: 0;
}

.module-action-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.module-action-row form {
  margin: 0;
}

.app-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.app-stat-card,
.app-panel {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.app-stat-card {
  padding: 15px;
}

.app-stat-card span {
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 700;
}

.app-stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 32px;
  line-height: 1;
}

.app-stat-card p {
  margin: 10px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.app-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 16px;
}

.client-stat-grid {
  margin-top: 18px;
}

.forum-module-shell {
  margin-top: 16px;
}

.survey-module-shell {
  margin-top: 16px;
}

.announcement-module-shell {
  margin-top: 16px;
}

.forum-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding: 0 0 10px;
}

.forum-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 11px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 800;
}

.forum-tabs a:hover,
.forum-tabs a.active {
  border-color: var(--border);
  background: var(--panel);
  color: var(--foreground);
  text-decoration: none;
}

.forum-icon-chip {
  display: inline-grid;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--muted);
  color: var(--foreground);
}

.forum-check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 700;
}

.check-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.survey-response-list {
  display: grid;
  gap: 12px;
}

.survey-response-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}

.survey-response-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.survey-response-card header div {
  display: grid;
  gap: 2px;
}

.survey-response-card small {
  color: var(--muted-foreground);
}

.survey-answer-list {
  display: grid;
  gap: 8px;
}

.survey-answer-row {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(0, 1.2fr);
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.survey-answer-row span {
  color: var(--muted-foreground);
  font-weight: 700;
}

.owner-stat-grid {
  margin-top: 18px;
}

.client-dashboard-grid,
.client-onboarding-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

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

.app-panel {
  padding: 16px;
}

.app-panel h2,
.app-panel h3 {
  margin: 0;
  font-size: 15px;
}

.app-panel-icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--primary);
  font-size: 15px;
}

.client-onboarding-card {
  display: flex;
  min-height: 190px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.client-onboarding-action,
.panel-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.client-onboarding-action {
  justify-content: flex-end;
}

.client-flash {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid #bbf7d0;
  border-radius: 7px;
  background: #f0fdf4;
  color: #166534;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}

.client-flash-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.client-property-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.client-property-card {
  display: grid;
  gap: 16px;
}

.client-property-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.client-property-card-header .app-panel-icon {
  margin-bottom: 0;
}

.client-property-card-body h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.client-property-card-body p {
  margin: 8px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.client-property-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.client-property-meta div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--muted);
  padding: 10px;
}

.client-property-meta dt {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-property-meta dd {
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-property-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.client-property-actions form {
  margin: 0;
}

.client-property-note {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
}

.client-properties-empty {
  display: grid;
  justify-items: start;
  gap: 10px;
  margin-top: 16px;
}

.client-properties-empty .app-panel-icon {
  margin-bottom: 4px;
}

.client-properties-empty p {
  margin: 0;
  color: var(--muted-foreground);
}

.client-owner-filter-panel {
  margin-top: 16px;
}

.client-owner-filter-form {
  display: flex;
  align-items: end;
  gap: 12px;
}

.client-owner-filter-form .form-field {
  flex: 1 1 320px;
}

.client-owner-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-owner-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.client-owner-card {
  display: grid;
  gap: 16px;
}

.client-owner-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.client-owner-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 13px;
  font-weight: 900;
}

.client-owner-card-body h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.client-owner-card-body p {
  margin: 7px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.client-owner-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.client-owner-meta div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--muted);
  padding: 10px;
}

.client-owner-meta dt {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-owner-meta dd {
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-owner-property {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.client-owner-property i {
  margin-top: 2px;
  color: var(--primary);
}

.client-owner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.client-owners-empty {
  display: grid;
  justify-items: start;
  gap: 10px;
  margin-top: 16px;
}

.client-owners-empty .app-panel-icon {
  margin-bottom: 4px;
}

.client-owners-empty p {
  margin: 0;
  color: var(--muted-foreground);
}

.client-form-panel,
.client-properties-panel {
  margin-top: 16px;
}

.client-onboarding-card p,
.client-next-steps p {
  margin: 8px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.client-next-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

.panel-heading h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.panel-heading p {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.app-panel p {
  margin: 8px 0 0;
  color: var(--muted-foreground);
}

.app-panel-note {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--muted);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
}

.app-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted-foreground);
}

.app-alert {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
  font-size: 14px;
  font-weight: 700;
}

.app-alert-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.app-alert-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.app-toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1200;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.app-toast {
  --ui-toast-bg: rgba(255, 255, 255, .96);
  --ui-toast-border-color: var(--border);
  --ui-toast-border-radius: 8px;
  box-shadow: var(--shadow);
}

.app-toast.show {
  display: block;
  opacity: 1;
}

.app-toast .toast-header {
  color: var(--foreground);
  font-weight: 800;
}

.app-toast-title {
  margin-right: auto;
}

.app-toast-success {
  border-color: #bbf7d0;
}

.app-toast-error {
  border-color: #fecaca;
}

.app-toast-warning {
  border-color: #fde68a;
}

.notification-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.notification-panel {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.notification-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  background: #fbfafc;
  padding: 12px;
}

.notification-tab {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  padding: 6px 11px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 800;
}

.notification-tab:hover,
.notification-tab.active {
  border-color: #cfc9ef;
  background: var(--accent-soft);
  color: var(--primary);
}

.notification-tab strong {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 999px;
  background: var(--muted);
  color: var(--foreground);
  font-size: 11px;
}

.notification-list {
  display: grid;
}

.notification-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: start;
  border-bottom: 1px solid var(--border);
  padding: 15px;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item.unread {
  background: #fffdf7;
}

.notification-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--primary);
  font-size: 16px;
}

.notification-success .notification-icon {
  background: #f0fdf4;
  color: #15803d;
}

.notification-warning .notification-icon {
  background: #fffbeb;
  color: #b45309;
}

.notification-error .notification-icon {
  background: #fef2f2;
  color: #b91c1c;
}

.notification-content {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.notification-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-title-row h3 {
  margin: 0;
  font-size: 14px;
}

.notification-content p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.45;
}

.notification-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
}

.notification-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.notifications-empty {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 28px;
}

.notifications-empty h3,
.notifications-empty p {
  margin: 0;
}

.notifications-empty p {
  color: var(--muted-foreground);
  font-size: 13px;
}

.notification-preferences-form {
  display: grid;
  gap: 16px;
}

.notification-preferences-panel {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.notification-preference-groups,
.notification-preference-list {
  display: grid;
}

.notification-preference-toolbar {
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  padding: 12px 14px;
}

.notification-preference-toolbar .form-field {
  max-width: 360px;
}

.notification-preference-group + .notification-preference-group {
  border-top: 1px solid var(--border);
}

.notification-preference-group-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  background: #fbfafc;
  padding: 14px;
}

.notification-preference-module-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary);
}

.notification-preference-group-header h3 {
  margin: 0;
  font-size: 14px;
}

.notification-preference-group-header p {
  margin: 4px 0 0;
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.45;
}

.notification-preference-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.notification-preference-row + .notification-preference-row {
  border-top: 1px solid var(--border);
}

.notification-preference-action {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.notification-preference-action strong {
  font-size: 13px;
}

.notification-preference-action span {
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.45;
}

.notification-preference-action code {
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--muted);
  padding: 3px 6px;
  color: var(--muted-foreground);
  font-size: 11px;
}

.notification-preference-toggle {
  justify-self: end;
  white-space: nowrap;
}

.table-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 200px auto;
  gap: 12px;
  align-items: end;
}

.datatable-controls {
  padding: 14px;
}

.datatable-filter-form {
  display: grid;
  gap: 14px;
}

.datatable-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 110px auto auto;
  gap: 10px;
  align-items: end;
}

.datatable-search,
.datatable-limit {
  min-width: 0;
}

.datatable-advanced {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(220px, 280px) auto;
  gap: 10px;
  align-items: end;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.datatable-filter-actions {
  display: flex;
  justify-content: flex-end;
}

.datatable-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--border);
  background: var(--border);
}

.datatable-stats div {
  display: grid;
  gap: 4px;
  background: var(--panel);
  padding: 11px 13px;
}

.datatable-stats span,
.datatable-state > span {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.datatable-stats strong {
  font-size: 15px;
  line-height: 1.15;
}

.datatable-state {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 11px 13px;
}

.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.sort-icon {
  position: relative;
  display: inline-grid;
  width: 10px;
  height: 14px;
  opacity: .42;
}

.sort-icon::before,
.sort-icon::after {
  position: absolute;
  left: 1px;
  width: 0;
  height: 0;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
}

.sort-icon::before {
  top: 1px;
  border-bottom: 5px solid currentColor;
}

.sort-icon::after {
  bottom: 1px;
  border-top: 5px solid currentColor;
}

.sort-link.active {
  color: var(--foreground);
}

.sort-link.active .sort-icon {
  opacity: 1;
}

.sort-link.active[data-sort-dir="asc"] .sort-icon::after,
.sort-link.active[data-sort-dir="desc"] .sort-icon::before {
  opacity: .24;
}

.permission-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.permission-main {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.permission-toolbar {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.module-sidebar {
  position: sticky;
  top: 104px;
  align-self: start;
}

.module-sidebar-inner {
  max-height: calc(100vh - 128px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
  padding: 12px;
}

.module-filter {
  display: grid;
  gap: 7px;
  border-bottom: 1px solid var(--border);
  padding: 2px 2px 12px;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 800;
}

.module-filter input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--foreground);
  font: inherit;
  font-weight: 500;
}

.module-filter input:focus {
  border-color: var(--ring);
  outline: 2px solid rgba(17, 24, 39, .16);
  outline-offset: 1px;
}

.module-list {
  display: grid;
  gap: 5px;
  margin-top: 12px;
}

.module-list-item {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 8px;
  padding: 8px 9px;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 700;
}

.module-list-item:hover {
  background: var(--muted);
  color: var(--foreground);
}

.module-list-item.active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.module-list-item strong {
  display: grid;
  min-width: 28px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--muted);
  color: var(--foreground);
  font-size: 12px;
}

.module-list-item.active strong {
  background: rgba(255, 255, 255, .16);
  color: var(--primary-foreground);
}

.app-table-panel {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.table-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
}

.table-meta span {
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-table th,
.data-table td {
  border-top: 1px solid var(--border);
  padding: 10px 13px;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  background: #fbfafc;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.data-table th a {
  color: var(--foreground);
}

.data-table td small {
  display: block;
  margin-top: 2px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.owner-table-identity {
  display: flex;
  min-width: 180px;
  align-items: center;
  gap: 8px;
}

.owner-table-identity .client-owner-avatar {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 11px;
}

.owner-table-name {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.owner-table-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table td .owner-table-name small {
  display: inline;
  margin-top: 0;
}

.empty-cell {
  color: var(--muted-foreground);
  text-align: center;
}

.badge-row,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.row-actions form {
  margin: 0;
}

.badge,
.status-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 800;
}

.badge {
  background: #f2f0f6;
  color: var(--foreground);
}

.status-badge {
  border: 1px solid var(--border);
}

.status-active {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.status-pending {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.status-draft {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #5b21b6;
}

.status-archived {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.status-open {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #075985;
}

.status-paid,
.status-succeeded {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.status-overdue {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.status-canceling,
.status-canceled {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #334155;
}

.billing-subscription-panel,
.billing-empty-panel,
.billing-tabs-panel,
.billing-datatable-controls,
.billing-table-panel,
.invoice-view-panel,
.invoice-payment-form,
.payment-method-empty,
.payment-method-form {
  margin-top: 18px;
}

.billing-subscription-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.billing-subscription-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.billing-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.billing-title-row h2,
.billing-empty-panel h2,
.invoice-view-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.billing-subscription-main p,
.billing-empty-panel p,
.invoice-view-header p {
  margin: 6px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.billing-subscription-meta,
.invoice-view-grid dl,
.invoice-totals {
  display: grid;
  gap: 10px;
  margin: 0;
}

.billing-subscription-meta {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.billing-subscription-meta div,
.invoice-view-grid dl div,
.invoice-totals div {
  display: grid;
  gap: 3px;
}

.billing-subscription-meta dt,
.invoice-view-grid dt,
.invoice-totals dt {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.billing-subscription-meta dd,
.invoice-view-grid dd,
.invoice-totals dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.billing-cancel-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #fde68a;
  border-radius: 6px;
  background: #fffbeb;
  color: #92400e;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}

.billing-subscription-actions {
  display: flex;
  justify-content: flex-end;
}

.billing-empty-panel {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 18px;
}

.billing-tabs-panel {
  padding: 10px;
}

.billing-invoice-table {
  min-width: 900px;
}

.invoice-view-panel {
  display: grid;
  gap: 22px;
  padding: 24px;
}

.invoice-view-header,
.invoice-view-grid,
.invoice-view-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 22px;
}

.invoice-view-header {
  align-items: start;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}

.invoice-brand {
  display: block;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.invoice-view-header .status-badge {
  justify-self: end;
}

.invoice-view-grid h3,
.invoice-view-footer h3,
.invoice-payments h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.invoice-view-grid p,
.invoice-tax-list,
.invoice-view-footer p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.6;
}

.invoice-subscription-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfafc;
  padding: 11px 12px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.invoice-subscription-strip strong {
  color: var(--foreground);
}

.invoice-line-table {
  min-width: 820px;
}

.invoice-tax-list {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.invoice-tax-list li,
.invoice-totals div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.invoice-totals {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.invoice-totals div:last-child {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-size: 16px;
}

.invoice-payments {
  display: grid;
  gap: 10px;
}

.invoice-payment-form {
  display: grid;
  gap: 18px;
}

.invoice-payment-panel {
  display: grid;
  gap: 22px;
  padding: 24px;
}

.invoice-payment-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}

.invoice-payment-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 30px;
  line-height: 1.1;
}

.invoice-payment-summary p {
  margin: 8px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.invoice-payment-methods {
  display: grid;
  gap: 14px;
}

.invoice-payment-option-list {
  display: grid;
  gap: 10px;
}

.invoice-payment-option {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 12px;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.invoice-payment-option:has(input:checked) {
  border-color: var(--primary);
  background: #f8fafc;
  box-shadow: 0 0 0 1px var(--primary);
}

.invoice-payment-option input {
  inline-size: 16px;
  block-size: 16px;
  margin: 0;
}

.invoice-payment-option-icon {
  display: grid;
  place-items: center;
  inline-size: 38px;
  block-size: 38px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--foreground);
}

.invoice-payment-option-main {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.invoice-payment-option-main strong {
  font-size: 14px;
}

.invoice-payment-option-main small {
  overflow-wrap: anywhere;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
}

.invoice-payment-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: #fbfafc;
  padding: 14px;
}

.invoice-payment-empty h3 {
  margin: 0;
  font-size: 14px;
}

.invoice-payment-empty p {
  margin: 3px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.payment-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.payment-method-card {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.payment-method-card-header,
.payment-method-actions,
.payment-method-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.payment-method-card-header {
  justify-content: space-between;
}

.payment-method-badges,
.payment-method-actions {
  flex-wrap: wrap;
}

.payment-method-card-body h2,
.payment-method-empty h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.payment-method-card-body p,
.payment-method-empty p {
  margin: 6px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.payment-method-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.payment-method-meta div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.payment-method-meta dt {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.payment-method-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 700;
}

.payment-method-actions form {
  margin: 0;
}

.payment-method-empty {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 18px;
}

.payment-method-default-toggle {
  align-self: end;
  min-height: 44px;
}

.payment-method-default-toggle span {
  display: grid;
  gap: 2px;
  white-space: normal;
}

.payment-method-default-toggle small {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.status-disabled,
.status-inactive,
.status-not_connected,
.status-action_required {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.status-action_required {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.status-inactive {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.status-trial {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.status-suspended {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.cron-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.status-completed {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.status-started {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}

.status-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.status-sent,
.status-dry_run {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.status-failed {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.send-mail-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.send-mail-mode-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  cursor: pointer;
}

.send-mail-mode-card input {
  margin-top: 4px;
}

.send-mail-mode-card span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
}

.send-mail-mode-card small {
  grid-column: 2;
  color: var(--muted-foreground);
  font-size: 12px;
}

.send-mail-mode-card:has(input:checked) {
  border-color: #111827;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px #111827;
}

.send-mail-vars-editor {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.send-mail-history-subject {
  max-width: 420px;
}

.send-mail-history-subject strong,
.send-mail-history td strong {
  display: block;
}

.send-mail-history-subject span,
.send-mail-history td span {
  display: block;
  margin-top: 2px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f0f9ff;
  color: #075985;
  padding: 10px 12px;
}

.impersonation-banner strong,
.impersonation-banner span {
  display: block;
}

.impersonation-banner span {
  margin-top: 2px;
  color: #0369a1;
  font-size: 12px;
}

.pagination {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
}

.pagination a {
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 800;
}

.pagination a.active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.form-panel {
  max-width: none;
}

.resource-form {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.panel-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

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

.form-field-full {
  grid-column: 1 / -1;
}

.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--foreground);
  font: inherit;
  font-weight: 500;
}

.form-field select {
  min-height: 34px;
  background: var(--panel);
}

.password-field {
  display: flex;
  width: 100%;
  align-items: stretch;
}

.password-field input {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.password-toggle {
  display: inline-grid;
  flex: 0 0 40px;
  place-items: center;
  width: 40px;
  min-width: 0;
  min-height: 34px;
  margin-left: -1px;
  border-color: var(--border);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding: 0;
  align-self: stretch;
  background: var(--panel);
  color: var(--muted-foreground);
  box-shadow: none;
}

.password-toggle:hover {
  transform: none;
  border-color: var(--ring);
  background: var(--muted);
  color: var(--foreground);
}

.password-field:focus-within .password-toggle {
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(108, 95, 199, .16);
  clip-path: inset(-3px -3px -3px 0);
}

.password-field input:focus {
  position: relative;
  z-index: 1;
}

.password-field input.is-invalid + .password-toggle {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, .1);
  clip-path: inset(-3px -3px -3px 0);
}

.password-toggle .bi {
  color: currentColor;
  font-size: 16px;
  line-height: 1;
}

.form-field textarea {
  resize: vertical;
}

.template-editor {
  min-height: 180px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
}

.checkbox-section {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.checkbox-section h3,
.permission-group h4,
.settings-card h3 {
  margin: 0;
}

.checkbox-section p,
.settings-card p {
  margin: 6px 0 0;
  color: var(--muted-foreground);
}

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

.choice-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}

.choice-card input {
  margin-top: 3px;
}

.choice-card small {
  display: block;
  color: var(--muted-foreground);
  font-size: 12px;
}

.permission-groups {
  display: grid;
  gap: 18px;
}

.permission-group {
  display: grid;
  gap: 10px;
}

.field-error {
  color: #b91c1c;
  font-weight: 700;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.settings-card {
  display: grid;
  min-height: 220px;
  align-content: space-between;
  gap: 18px;
}

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

.feature-workflow-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-muted);
  padding: 12px 14px;
  color: var(--foreground);
  font-weight: 700;
}

.feature-workflow-card i {
  color: #15803d;
  flex: 0 0 auto;
}

.settings-count {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: #134e4a;
  font-weight: 900;
}

.root-settings-page {
  display: grid;
  gap: 18px;
}

.root-settings-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.root-settings-title h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.root-settings-title p {
  max-width: 760px;
  margin: 5px 0 0;
  color: var(--muted-foreground);
}

.root-settings-title .eyebrow {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fbfafc;
  padding: 4px 9px;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.root-settings-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.root-settings-nav {
  position: sticky;
  top: 86px;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.root-settings-nav a {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--border);
  padding: 8px 11px;
  color: #4f465c;
  font-weight: 700;
}

.root-settings-nav a:last-child {
  border-bottom: 0;
}

.root-settings-nav a:hover {
  background: #fbfafc;
  color: var(--foreground);
}

.root-settings-nav a.active {
  background: var(--accent-soft);
  color: var(--primary);
}

.root-settings-nav i {
  color: currentColor;
}

.root-settings-content,
.root-settings-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.settings-section {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.settings-section > h2 {
  margin: 0;
  border-bottom: 1px solid var(--border);
  background: #fbfafc;
  padding: 11px 13px;
  color: #6f6878;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(220px, 38%) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  border-top: 1px solid var(--border);
  padding: 14px 13px;
}

.settings-section > h2 + .settings-row,
.settings-section > h2 + .settings-warning + .settings-row {
  border-top: 0;
}

.settings-row-copy h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
}

.settings-row-copy h3 span {
  color: #dc2626;
}

.settings-row-copy p {
  max-width: 560px;
  margin: 4px 0 0;
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.4;
}

.settings-control {
  width: 100%;
}

.settings-switch {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  color: var(--foreground);
  font-weight: 800;
}

.settings-switch input[type="hidden"] {
  display: none;
}

.settings-switch input[type="checkbox"] {
  position: relative;
  width: 34px;
  height: 20px;
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #eeedf2;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}

.settings-switch input[type="checkbox"]::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(43, 36, 53, .22);
  content: "";
  transition: transform .16s ease;
}

.settings-switch input[type="checkbox"]:checked {
  border-color: var(--primary);
  background: var(--primary);
}

.settings-switch input[type="checkbox"]:checked::after {
  transform: translateX(14px);
}

.settings-switch input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: .62;
}

.settings-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  padding: 12px 13px;
  font-weight: 700;
}

.settings-number {
  grid-template-columns: minmax(90px, 160px) auto;
  align-items: center;
  gap: 8px;
}

.settings-number .sr-only,
.settings-number .field-error {
  grid-column: 1 / -1;
}

.settings-number > span:not(.sr-only) {
  color: var(--muted-foreground);
  font-weight: 700;
}

.settings-save-row {
  display: flex;
  justify-content: flex-end;
}

.tax-simulator-panel .root-settings-form {
  gap: 0;
}

.tax-simulator-intro form {
  justify-self: end;
}

.tax-simulator-panel .settings-control {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--foreground);
  font: inherit;
  font-weight: 600;
  padding: 8px 10px;
}

.tax-simulator-panel .settings-control:focus {
  border-color: var(--ring);
  outline: 2px solid rgba(17, 24, 39, .14);
  outline-offset: 1px;
}

.tax-simulator-actions {
  border-top: 1px solid var(--border);
  padding: 13px;
}

.tax-simulation-result {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--border);
  background: #ffffff;
  padding: 13px;
}

.tax-simulation-result[hidden] {
  display: none;
}

.tax-simulation-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tax-simulation-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
}

.tax-simulation-summary div {
  display: grid;
  gap: 5px;
  background: var(--panel);
  padding: 11px 13px;
}

.tax-simulation-summary span,
.tax-simulation-line-header span {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.tax-simulation-summary strong {
  color: var(--foreground);
  font-size: 18px;
  line-height: 1.15;
}

.tax-simulation-lines {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.tax-simulation-line {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(80px, .45fr) minmax(120px, .6fr) minmax(90px, .45fr);
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--border);
  padding: 10px 13px;
  font-size: 13px;
}

.tax-simulation-line:first-child {
  border-top: 0;
}

.tax-simulation-line-header {
  background: #fbfafc;
}

.tax-simulation-line strong {
  display: block;
}

.tax-simulation-line small {
  display: block;
  margin-top: 2px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.tax-simulation-empty {
  padding: 13px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 700;
}

.voipms-overview-page {
  gap: 16px;
}

.voipms-overview-page .root-settings-form {
  gap: 0;
}

.voipms-overview-page .settings-section > .auth-alert {
  margin: 12px 13px 0;
}

.voipms-overview-page .settings-section > h2 + .root-settings-form .settings-row:first-of-type,
.voipms-overview-page .settings-section > .auth-alert + .root-settings-form .settings-row:first-of-type {
  border-top: 0;
}

.voipms-overview-page .settings-save-row {
  border-top: 1px solid var(--border);
  padding: 13px;
}

.voipms-setting-value {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.voipms-setting-value strong {
  color: var(--foreground);
  font-size: 18px;
  line-height: 1.1;
}

.voipms-status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fbfafc;
  padding: 4px 8px;
  color: #4f465c;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.voipms-ledger-section .table-scroll {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.voipms-ledger-section .data-table {
  border: 0;
}

/* Root admin surfaces: keep every module in the same compact settings language. */
.app-shell {
  --shadow: 0 1px 2px rgba(15, 23, 42, .04);
  --root-subtle: #fbfafc;
  --root-panel-border: #e5e7eb;
}

.app-shell .app-content {
  background: #ffffff;
}

.app-shell .app-page-heading,
.app-shell .page-heading {
  align-items: flex-start;
  border-bottom: 1px solid var(--root-panel-border);
  padding-bottom: 16px;
}

.app-shell .app-page-heading h1,
.app-shell .app-page-heading h2,
.app-shell .page-heading h1,
.app-shell .page-heading h2 {
  margin: 0;
  color: #1f2937;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.25;
}

.app-shell .app-page-heading .eyebrow,
.app-shell .page-heading .eyebrow {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 8px;
  border: 1px solid var(--root-panel-border);
  border-radius: 999px;
  background: var(--root-subtle);
  padding: 4px 9px;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.app-shell .app-page-heading p,
.app-shell .page-heading p {
  max-width: 760px;
  color: #6b7280;
  font-size: 13px;
}

.app-shell .app-stat-grid {
  overflow: hidden;
  gap: 0;
  border: 1px solid var(--root-panel-border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.app-shell .app-stat-card {
  min-height: 0;
  border: 0;
  border-right: 1px solid var(--root-panel-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 12px 13px;
}

.app-shell .app-stat-card:last-child {
  border-right: 0;
}

.app-shell .app-stat-card span {
  color: #6b7280;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.app-shell .app-stat-card strong {
  margin-top: 6px;
  color: #1f2937;
  font-size: 20px;
  font-weight: 750;
  line-height: 1.15;
}

.app-shell .app-stat-card p {
  margin-top: 5px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
}

.app-shell .app-panel-grid,
.app-shell .settings-grid {
  grid-template-columns: 1fr;
}

.app-shell .app-panel,
.app-shell .datatable-controls,
.app-shell .form-panel,
.app-shell .app-table-panel,
.app-shell .notification-panel,
.app-shell .invoice-view-panel {
  overflow: hidden;
  border-color: var(--root-panel-border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.app-shell .app-panel {
  padding: 0;
}

.app-shell .app-panel > h2:first-child,
.app-shell .app-panel > h3:first-child {
  margin: 0;
  border-bottom: 1px solid var(--root-panel-border);
  background: var(--root-subtle);
  padding: 11px 13px;
  color: #6f6878;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.app-shell .app-panel > h2:first-child + p,
.app-shell .app-panel > h3:first-child + p {
  margin: 0;
  padding: 13px;
}

.app-shell .panel-heading,
.app-shell .table-meta {
  align-items: flex-start;
  border-bottom: 1px solid var(--root-panel-border);
  background: var(--root-subtle);
  padding: 11px 13px;
}

.app-shell .panel-heading h3,
.app-shell .table-meta strong {
  color: #6f6878;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.app-shell .panel-heading p,
.app-shell .table-meta span {
  max-width: 760px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.app-shell .resource-form,
.app-shell .form-panel form {
  gap: 0;
  margin-top: 0;
}

.app-shell .form-panel .auth-alert {
  margin: 12px 13px 0;
}

.app-shell .form-panel .form-grid {
  grid-template-columns: 1fr;
  gap: 0;
}

.app-shell .form-panel .form-grid > .form-field,
.app-shell .form-panel .form-grid > .choice-card,
.app-shell .form-panel .checkbox-section,
.app-shell .form-panel .panel-divider {
  grid-column: 1 / -1;
  border-top: 1px solid var(--root-panel-border);
}

.app-shell .form-panel .form-grid > .form-field {
  display: grid;
  grid-template-columns: minmax(220px, 38%) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin: 0;
  padding: 13px;
}

.app-shell .form-panel .form-grid > .form-field > .form-label,
.app-shell .form-panel .form-grid > .form-field > span:not(.password-field):not(.input-group):not(.sr-only) {
  align-self: center;
  color: #1f2937;
  font-size: 13px;
  font-weight: 750;
}

.app-shell .form-panel .form-grid > .form-field > input,
.app-shell .form-panel .form-grid > .form-field > select,
.app-shell .form-panel .form-grid > .form-field > textarea,
.app-shell .form-panel .form-grid > .form-field > .password-field,
.app-shell .form-panel .form-grid > .form-field > .input-group {
  grid-column: 2;
}

.app-shell .form-panel .form-grid > .form-field > small,
.app-shell .form-panel .form-grid > .form-field > .field-error,
.app-shell .form-panel .form-grid > .form-field > .form-help {
  grid-column: 2;
}

.app-shell .form-panel .form-grid > .choice-card {
  margin: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  padding: 13px;
}

.app-shell .form-panel .form-actions,
.app-shell .panel-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--root-panel-border);
  padding: 13px;
}

.app-shell .datatable-controls {
  padding: 0;
}

.app-shell .datatable-filter-form {
  gap: 0;
}

.app-shell .datatable-toolbar,
.app-shell .datatable-advanced {
  border-top: 0;
  padding: 13px;
}

.app-shell .datatable-advanced {
  border-top: 1px solid var(--root-panel-border);
  background: #ffffff;
}

.app-shell .datatable-stats {
  border-bottom-color: var(--root-panel-border);
  background: var(--root-panel-border);
}

.app-shell .datatable-state {
  border-bottom-color: var(--root-panel-border);
  background: var(--root-subtle);
}

.app-shell .table-scroll {
  border-radius: 0;
}

.app-shell .data-table th,
.app-shell .data-table td {
  border-top-color: var(--root-panel-border);
  padding: 9px 13px;
}

.app-shell .data-table th {
  background: var(--root-subtle);
  color: #6b7280;
}

.app-shell .notification-stats {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--root-panel-border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.app-shell .notification-stats .app-stat-card {
  border-right: 1px solid var(--root-panel-border);
}

.settings-shortcut-row {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.settings-shortcut-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.settings-admin-section .settings-count {
  width: auto;
  min-width: 34px;
  height: 28px;
  border-radius: 6px;
  padding: 0 9px;
  background: #f2f0f6;
  color: var(--foreground);
  font-size: 12px;
}

.client-profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
}

.app-shell .client-profile-header {
  padding: 14px;
}

.client-profile-title {
  min-width: 0;
}

.client-profile-back {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 750;
}

.client-profile-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.client-profile-name-row h3 {
  margin: 0;
  color: #1f2937;
  font-size: 20px;
  line-height: 1.2;
}

.client-profile-title p {
  margin: 5px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.client-profile-header .page-actions form {
  margin: 0;
}

.client-profile-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.client-profile-form-panel .client-profile-subsection,
.client-profile-form-panel .client-profile-address-grid,
.client-profile-form-panel .client-notes-field {
  border-top: 1px solid var(--root-panel-border, var(--border));
}

.client-profile-subsection {
  display: grid;
  gap: 0;
  padding: 13px;
}

.client-profile-subsection h4 {
  margin: 0;
  color: #1f2937;
  font-size: 13px;
  font-weight: 800;
}

.client-profile-subsection > p {
  margin: 4px 0 12px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.client-phone-list {
  display: grid;
  gap: 8px;
}

.client-phone-row {
  display: grid;
  grid-template-columns: minmax(160px, .8fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--root-panel-border, var(--border));
  border-radius: 6px;
  background: #fbfafc;
  padding: 10px;
}

.client-phone-row .form-field {
  gap: 5px;
}

.client-primary-check {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 750;
}

.client-profile-address-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.client-profile-address-grid .client-profile-subsection + .client-profile-subsection {
  border-left: 1px solid var(--root-panel-border, var(--border));
}

.client-notes-field {
  margin: 0;
  padding: 13px;
}

.app-shell .client-notes-field {
  display: grid;
  grid-template-columns: minmax(220px, 38%) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.app-shell .client-notes-field textarea,
.app-shell .client-notes-field .field-error {
  grid-column: 2;
}

.client-profile-overview-panel .client-profile-detail-grid {
  margin: 0;
}

.client-profile-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.client-profile-detail-grid div {
  border-top: 1px solid var(--root-panel-border, var(--border));
  padding: 12px 13px;
}

.client-profile-detail-grid dt {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.client-profile-detail-grid dd {
  margin: 5px 0 0;
  color: #1f2937;
  font-size: 13px;
  font-weight: 700;
}

.client-profile-workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.client-profile-menu {
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 12px;
}

.client-profile-menu-head {
  border-bottom: 1px solid var(--root-panel-border, var(--border));
  padding: 4px 8px 12px;
}

.client-profile-menu-head span {
  display: block;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.client-profile-menu-head strong {
  display: block;
  margin-top: 4px;
  color: #1f2937;
  font-size: 13px;
  line-height: 1.35;
}

.client-profile-menu-list {
  display: grid;
  gap: 4px;
  padding-top: 10px;
}

.client-profile-menu-item {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  border-radius: 6px;
  padding: 8px 10px;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.client-profile-menu-item:hover {
  background: #f4f2f7;
  color: #1f2937;
}

.client-profile-menu-item.active {
  background: #5f56c6;
  color: #ffffff;
}

.client-profile-menu-item i {
  width: 16px;
  color: inherit;
  font-size: 14px;
  text-align: center;
}

.client-profile-billing-group {
  margin: 8px 0;
  border-top: 1px solid var(--root-panel-border, var(--border));
  border-bottom: 1px solid var(--root-panel-border, var(--border));
  padding: 8px 0;
}

.client-profile-menu-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  color: #111827;
  font-size: 13px;
  font-weight: 850;
}

.client-profile-billing-links {
  display: grid;
  gap: 3px;
  padding-left: 14px;
}

.client-profile-subitem {
  min-height: 32px;
  font-size: 12px;
  font-weight: 650;
}

.client-profile-subitem.active {
  background: #eef2ff;
  color: #4f46e5;
}

.client-profile-main {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.client-profile-section {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.client-profile-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--root-panel-border, var(--border));
  margin: -16px -16px 0;
  padding: 16px;
}

.client-profile-section-heading h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  line-height: 1.25;
}

.client-profile-section-heading p {
  margin: 5px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.client-profile-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.client-profile-kpi {
  display: grid;
  gap: 5px;
  min-height: 112px;
  border: 1px solid var(--root-panel-border, var(--border));
  border-radius: 7px;
  background: #ffffff;
  padding: 14px;
  color: #1f2937;
}

.client-profile-kpi:hover {
  border-color: #c8c1ee;
  background: #fbfaff;
}

.client-profile-kpi span {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.client-profile-kpi strong {
  color: #111827;
  font-size: 22px;
  line-height: 1.15;
}

.client-profile-kpi small {
  color: var(--muted-foreground);
  font-size: 12px;
}

.client-profile-kpi-blue {
  background: #f5f8ff;
  border-color: #dbe7ff;
}

.client-profile-kpi-green {
  background: #f2fbf7;
  border-color: #d7f0e3;
}

.client-profile-kpi-amber {
  background: #fff9ee;
  border-color: #f3dfb5;
}

.client-profile-kpi-violet {
  background: #f8f6ff;
  border-color: #ded7fa;
}

.client-profile-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.client-profile-block {
  min-width: 0;
  border: 1px solid var(--root-panel-border, var(--border));
  border-radius: 7px;
  background: #ffffff;
  overflow: hidden;
}

.client-profile-block-head {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--root-panel-border, var(--border));
  padding: 12px 14px;
}

.client-profile-block-head h4 {
  margin: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 850;
}

.client-profile-block-head a {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.client-profile-block .client-profile-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.client-profile-block .client-profile-detail-grid div {
  border-top: 0;
  border-bottom: 1px solid var(--root-panel-border, var(--border));
}

.client-profile-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
}

.client-profile-action-row-strong {
  border: 1px solid var(--root-panel-border, var(--border));
  border-radius: 7px;
  background: #fbfafc;
}

.client-profile-mini-list {
  display: grid;
}

.client-profile-mini-row {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid var(--root-panel-border, var(--border));
  padding: 12px 14px;
}

.client-profile-mini-row:last-child {
  border-bottom: 0;
}

.client-profile-mini-row strong {
  color: #111827;
  font-size: 13px;
}

.client-profile-mini-row span,
.client-profile-empty {
  color: var(--muted-foreground);
  font-size: 12px;
}

.client-profile-empty {
  padding: 18px 14px;
}

.client-profile-edit-form,
.client-profile-billing-form {
  display: grid;
  gap: 16px;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, .86), rgba(255, 255, 255, .96)),
    #f8fafc;
  padding: 32px 16px;
}

.auth-panel {
  width: min(100%, 440px);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 28px;
}

.auth-brand {
  margin-bottom: 26px;
}

.auth-panel h1 {
  margin: 14px 0 0;
  font-size: 32px;
  line-height: 1.1;
}

.auth-copy,
.auth-footer {
  color: var(--muted-foreground);
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.form-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.form-field input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--foreground);
  font: inherit;
  font-weight: 500;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--ring);
  outline: 2px solid rgba(108, 95, 199, .16);
  outline-offset: 1px;
}

.form-field input.is-invalid,
.form-field select.is-invalid,
.form-field textarea.is-invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, .1);
}

.form-field small {
  color: var(--muted-foreground);
  font-weight: 600;
}

.form-field small.field-error,
.form-field .field-error {
  color: #b91c1c;
  font-weight: 700;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 700;
}

.auth-remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--foreground);
}

.invalid-feedback {
  margin-top: 6px;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 700;
}

.form-field .password-field input {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.form-field .password-field .password-toggle {
  flex: 0 0 40px;
  width: 40px;
  min-height: 34px;
  margin-left: -1px;
  border-color: var(--border);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  background: #f8f9fa;
}

.form-field .password-field input:focus {
  outline-offset: 0;
  box-shadow: none;
}

.form-field .password-field input.is-invalid {
  border-right-color: #dc2626;
  box-shadow: none;
}

.form-field .password-field input.is-invalid + .password-toggle {
  border-color: #dc2626;
  color: #b91c1c;
  background: #fff7f7;
}

.spinner-border {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  vertical-align: -2px;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-alert {
  margin-top: 18px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
}

.auth-alert-info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.auth-alert-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.auth-footer {
  margin: 20px 0 0;
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-rail {
    position: static;
    height: auto;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .app-rail-nav {
    grid-template-columns: repeat(7, minmax(0, auto));
    justify-content: end;
    margin-top: 0;
  }

  .app-rail-user {
    display: none;
  }

  .app-rail-brand::before,
  .app-rail-brand::after,
  .app-rail-item::before,
  .app-rail-item::after,
  .app-rail-user::before,
  .app-rail-user::after {
    display: none;
  }

  .app-sidebar {
    position: static;
    height: auto;
    grid-template-rows: auto auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .app-sidebar-header {
    position: static;
  }

  .app-sidebar-content {
    overflow: visible;
  }

  .app-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .root-sidebar-nav {
    grid-template-columns: 1fr;
  }

  .root-nav-groups {
    overflow: visible;
  }

  .app-stat-grid,
  .app-panel-grid,
  .settings-grid,
  .client-dashboard-grid,
  .client-onboarding-grid,
  .client-property-card-grid,
  .client-owner-card-grid,
  .client-profile-address-grid,
  .client-profile-detail-grid,
  .notification-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .datatable-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .permission-workspace {
    grid-template-columns: 1fr;
  }

  .root-module-content-grid.has-left-panel {
    grid-template-columns: 1fr;
  }

  .root-settings-layout {
    grid-template-columns: 1fr;
  }

  .root-settings-nav {
    position: static;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .root-settings-nav a {
    justify-content: center;
    border-right: 1px solid var(--border);
    border-bottom: 0;
  }

  .root-settings-nav a:last-child {
    border-right: 0;
  }

  .module-sidebar {
    position: static;
  }

  .module-sidebar-inner {
    max-height: none;
  }

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

  .root-module-shell {
    min-height: auto;
  }

  .client-shell {
    grid-template-columns: 1fr;
  }

  .client-sidebar {
    position: static;
    height: auto;
    max-height: none;
  }

  .client-nav {
    grid-template-columns: none;
  }

  .client-nav-groups {
    max-height: 60vh;
  }

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

  .client-primary-check {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .app-topbar,
  .app-user,
  .app-page-heading {
    align-items: flex-start;
  }

  .app-topbar,
  .app-user,
  .app-page-heading,
  .app-nav,
  .client-property-switcher,
  .client-impersonation-banner,
  .owner-preview-banner {
    display: grid;
  }

  .client-main .app-topbar,
  .client-impersonation-banner,
  .owner-preview-banner {
    grid-template-columns: 1fr;
  }

  .client-impersonation-banner,
  .owner-preview-banner {
    align-items: flex-start;
  }

  .client-property-switcher,
  .client-property-switcher .form-field,
  .owner-property-switcher {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  .app-content,
  .app-topbar {
    padding: 18px;
  }

  .root-module-header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .root-module-content {
    padding: 18px;
  }

  .root-module-tabs {
    padding-top: 12px;
  }

  .root-module-filter {
    width: 100%;
  }

  .root-module-tab-list {
    display: grid;
    grid-template-columns: 1fr;
  }

  .root-module-tab {
    width: 100%;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: 6px;
    transform: none;
  }

  .app-stat-grid,
  .app-panel-grid,
  .table-toolbar,
  .form-grid,
  .checkbox-grid,
  .settings-grid,
  .client-dashboard-grid,
  .client-onboarding-grid,
  .client-property-card-grid,
  .client-property-meta,
  .client-owner-card-grid,
  .client-owner-meta,
  .client-profile-address-grid,
  .client-profile-detail-grid,
  .notification-stats,
  .billing-subscription-meta,
  .payment-method-meta,
  .invoice-payment-option,
  .invoice-view-header,
  .invoice-view-grid,
  .forum-check-grid,
  .survey-answer-row,
  .invoice-view-footer {
    grid-template-columns: 1fr;
  }

  .client-profile-header {
    display: grid;
  }

  .client-profile-workspace,
  .client-profile-dashboard-grid,
  .client-profile-kpi-grid,
  .client-profile-block .client-profile-detail-grid {
    grid-template-columns: 1fr;
  }

  .client-profile-menu {
    position: static;
  }

  .client-profile-section-heading {
    display: grid;
  }

  .client-phone-row {
    grid-template-columns: 1fr;
  }

  .client-profile-address-grid .client-profile-subsection + .client-profile-subsection {
    border-left: 0;
  }

  .app-shell .client-notes-field {
    grid-template-columns: 1fr;
  }

  .app-shell .client-notes-field textarea,
  .app-shell .client-notes-field .field-error {
    grid-column: 1;
  }

  .invoice-payment-summary,
  .invoice-payment-empty {
    align-items: flex-start;
    flex-direction: column;
  }

  .invoice-view-header .status-badge {
    justify-self: start;
  }

  .notification-item {
    grid-template-columns: 1fr;
  }

  .notification-actions {
    justify-content: stretch;
  }

  .notification-actions .btn,
  .notification-actions form {
    width: 100%;
  }

  .page-actions,
  .page-heading-actions,
  .module-action-row,
  .notification-preference-row {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .page-actions .btn,
  .page-heading-actions .btn,
  .page-heading-actions form .btn,
  .page-heading-actions form,
  .module-action-row .btn,
  .module-action-row form,
  .notification-preference-toggle {
    width: 100%;
    justify-self: stretch;
  }

  .client-owner-filter-form,
  .client-owner-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .root-settings-title,
  .settings-row,
  .tax-simulation-summary,
  .tax-simulation-line,
  .settings-shortcut-row {
    grid-template-columns: 1fr;
  }

  .root-settings-title {
    display: grid;
  }

  .root-settings-nav {
    grid-template-columns: 1fr;
  }

  .root-settings-nav a {
    justify-content: flex-start;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .settings-row {
    gap: 10px;
  }

  .voipms-setting-value {
    justify-content: flex-start;
    flex-wrap: wrap;
    text-align: left;
  }

  .settings-shortcut-meta {
    justify-content: flex-start;
  }

  .client-owner-filter-actions .btn,
  .client-owner-actions .btn {
    width: 100%;
  }

  .client-next-steps {
    align-items: flex-start;
    flex-direction: column;
  }

  .datatable-toolbar,
  .datatable-advanced {
    grid-template-columns: 1fr;
  }

  .datatable-stats {
    grid-template-columns: 1fr;
  }

  .datatable-state {
    align-items: flex-start;
    flex-direction: column;
  }

  .datatable-filter-actions {
    justify-content: stretch;
  }

  .datatable-filter-actions .btn {
    width: 100%;
  }

  .module-list {
    grid-template-columns: 1fr;
  }
}
