    @font-face {
      font-family: 'Shabnam';
      src: url('/assets/Shabnam-Light.woff2') format('woff2');
      font-weight: 300;
      font-style: normal;
      font-display: swap;
    }
    @font-face {
      font-family: 'Shabnam';
      src: url('/assets/Shabnam.woff2') format('woff2');
      font-weight: 400;
      font-style: normal;
      font-display: swap;
    }
    @font-face {
      font-family: 'Shabnam';
      src: url('/assets/Shabnam-Medium.woff2') format('woff2');
      font-weight: 500;
      font-style: normal;
      font-display: swap;
    }
    @font-face {
      font-family: 'Shabnam';
      src: url('/assets/Shabnam-Bold.woff2') format('woff2');
      font-weight: 700;
      font-style: normal;
      font-display: swap;
    }

    /* Theme 1 (Default): Kashaneh Luxe (Warm Editorial — Airbnb / Soho House) */
    :root, [data-theme="luxe"] {
      --paper: #f8f7f3;
      --white: #ffffff;
      --ink: #18181b;
      --muted: #64615a;
      --gold: #b69b60;
      --gold-text: #7d6230;
      --gold-soft: #f5f0e4;
      --gold-border: #dcd0b4;
      --stone: #ece9e2;
      --line: #e6e4dd;
      --soft: #f3f1ec;
      --border: #d0ccc2;
      --row-hover: #fbf9f4;
      --green: #166534;
      --green-soft: #dcfce7;
      --amber: #9a5b13;
      --amber-soft: #fef3c7;
      --red: #991b1b;
      --red-soft: #fee2e2;
      --blue: #1e40af;
      --blue-soft: #dbeafe;
      --purple: #5b21b6;
      --purple-soft: #ede9fe;
      --radius-xl: 14px;
      --radius-lg: 10px;
      --radius-md: 7px;
      --radius-pill: 999px;
      --shadow-xs: 0 1px 2px rgba(24, 24, 27, 0.04);
      --shadow-sm: 0 2px 8px rgba(24, 24, 27, 0.05);
      --shadow-pop: 0 16px 40px rgba(24, 24, 27, 0.14), 0 2px 8px rgba(24, 24, 27, 0.06);
    }

    /* Theme 2: Linear / Attio Minimal (Crisp Zinc & Indigo) */
    [data-theme="linear"] {
      --paper: #f8fafc;
      --white: #ffffff;
      --ink: #0f172a;
      --muted: #64748b;
      --gold: #4f46e5;
      --gold-text: #4338ca;
      --gold-soft: #eef2ff;
      --gold-border: #c7d2fe;
      --stone: #e2e8f0;
      --line: #e2e8f0;
      --soft: #f1f5f9;
      --border: #cbd5e1;
      --row-hover: #f8fafc;
      --radius-lg: 8px;
      --radius-md: 6px;
    }

    /* Theme 3: Stripe / Mercury Financial Ledger (Cool Alabaster & Navy) */
    [data-theme="stripe"] {
      --paper: #f6f8fa;
      --white: #ffffff;
      --ink: #0a2540;
      --muted: #425466;
      --gold: #0066ff;
      --gold-text: #0055d4;
      --gold-soft: #f0f6ff;
      --gold-border: #b8d4ff;
      --stone: #e6ebf1;
      --line: #e3e8ee;
      --soft: #f0f4f8;
      --border: #cfd7df;
      --row-hover: #f5f9ff;
      --radius-lg: 10px;
      --radius-md: 6px;
    }

    /* Theme 4: Executive Obsidian Dark (Linear Dark / Raycast) */
    [data-theme="dark"] {
      --paper: #0b0d12;
      --white: #12161f;
      --ink: #f3f4f6;
      --muted: #9ca3af;
      --gold: #d4b475;
      --gold-text: #e7c98c;
      --gold-soft: rgba(212, 180, 117, 0.14);
      --gold-border: rgba(212, 180, 117, 0.32);
      --stone: #1e2433;
      --line: #1f2637;
      --soft: #171c28;
      --border: #2b3548;
      --row-hover: #181e2c;
      --green: #4ade80;
      --green-soft: rgba(74, 222, 128, 0.14);
      --amber: #fbbf24;
      --amber-soft: rgba(251, 191, 36, 0.14);
      --red: #f87171;
      --red-soft: rgba(248, 113, 113, 0.14);
      --blue: #60a5fa;
      --blue-soft: rgba(96, 165, 250, 0.14);
      --purple: #c084fc;
      --purple-soft: rgba(192, 132, 252, 0.14);
    }

    * { box-sizing: border-box; }
    html, body {
      width: 100%;
      max-width: 100vw;
      overflow-x: clip;
      -webkit-text-size-adjust: 100%;
    }
    body {
      margin: 0;
      background: var(--paper);
      color: var(--ink);
      font-family: 'Roboto', 'Shabnam', sans-serif;
      font-size: 13px;
      line-height: 1.48;
      -webkit-font-smoothing: antialiased;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      transition: background-color 0.15s ease, color 0.15s ease;
    }
    h1, h2, h3, h4, .brand-name, .profile-title, .kashaneh-auth-title, .kashaneh-auth-cta {
      font-family: 'Google Sans', 'Roboto', 'Shabnam', sans-serif;
    }

    button, input, select, textarea {
      font: inherit;
      color: inherit;
    }
    button {
      appearance: none;
      -webkit-appearance: none;
      background: transparent;
      border: 0;
      padding: 0;
      margin: 0;
      cursor: pointer;
    }
    bdi, .mono-pill { unicode-bidi: isolate; }

    /* Minimalist Info 'i' Badge & Floating Tooltip — Always lowercase 'i' everywhere */
    .info-i {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      border: 1px solid var(--border);
      background: var(--soft);
      color: var(--muted);
      font-family: ui-serif, Georgia, serif;
      font-style: italic;
      font-weight: 700;
      font-size: 10px;
      line-height: 1;
      text-transform: lowercase !important;
      font-variant: normal !important;
      letter-spacing: 0 !important;
      cursor: help;
      user-select: none;
      flex-shrink: 0;
      transition: all 0.14s ease;
      vertical-align: middle;
    }
    .info-i:hover, .info-i:focus {
      background: var(--gold-soft);
      color: var(--gold-text);
      border-color: var(--gold);
      outline: none;
    }
    .floating-info-tooltip {
      position: fixed;
      z-index: 99999;
      max-width: min(330px, calc(100vw - 24px));
      background: #18181b;
      color: #ffffff;
      padding: 10px 13px;
      border-radius: 8px;
      font-size: 12px;
      font-weight: 400;
      line-height: 1.48;
      box-shadow: var(--shadow-pop);
      pointer-events: none;
      opacity: 0;
      transform: translateY(4px);
      transition: opacity 0.14s ease, transform 0.14s ease;
      text-transform: none;
      letter-spacing: normal;
      text-align: left;
    }
    .floating-info-tooltip.visible {
      opacity: 1;
      transform: translateY(0);
    }
    .floating-info-tooltip strong { color: #f3dfb2; font-weight: 600; }
    .floating-info-tooltip .tip-split-box {
      margin-top: 7px;
      padding-top: 7px;
      border-top: 1px solid rgba(255, 255, 255, 0.16);
      font-size: 11.5px;
      color: #f7f4eb;
    }

    /* Unified Single-Row Architectural Sticky Header Across Staff, Tenant & Homeowner Portals */
    .header {
      background: var(--white);
      position: -webkit-sticky;
      position: sticky;
      top: 0;
      z-index: 45;
      width: 100%;
      max-width: 100vw;
      border-bottom: 1px solid var(--line);
      box-shadow: 0 2px 10px rgba(24, 24, 27, 0.035);
      transition: background-color 0.15s ease, border-color 0.15s ease;
    }
    .header-inner {
      width: 100%;
      max-width: 1600px;
      margin: 0 auto;
      padding: 8px 22px;
      display: flex;
      flex-direction: column;
      min-width: 0;
    }
    .header-top-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      width: 100%;
      min-height: 40px;
    }
    .header-center-nav {
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow-x: auto;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
    }
    .header-center-nav::-webkit-scrollbar { display: none; }
    .sticky-nav-shell {
      display: none !important;
    }

    .brand {
      --brand-mark-height: 33px;
      display: inline-flex;
      gap: 11px;
      align-items: center;
      direction: ltr !important;
      text-decoration: none;
      flex-shrink: 0;
    }
    .brand-mark {
      display: block;
      position: relative;
      overflow: visible;
      height: var(--brand-mark-height);
      width: calc(var(--brand-mark-height) * 412 / 464);
      flex-shrink: 0;
    }
    .brand-mark img {
      display: block;
      position: absolute;
      max-width: none;
      width: calc(100% * 512 / 412);
      height: auto;
      left: calc(-100% * 50 / 412);
      top: calc(-100% * 44 / 464);
    }
    .brand-wordmark,
    body.fa .brand-wordmark {
      font-family: 'Google Sans', 'Roboto', sans-serif !important;
      font-size: 16px;
      font-weight: 700;
      letter-spacing: 0.16em !important;
      text-transform: uppercase;
      line-height: 1;
      color: var(--ink);
      user-select: none;
      white-space: nowrap;
    }
    .brand-text { display: flex; align-items: center; width: max-content; }
    .brand-name { font-size: 16px; font-weight: 700; line-height: 1; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); }
    .brand-sub { display: none !important; }

    .nav-tabs {
      display: flex;
      align-items: center;
      gap: 2px;
      background: var(--soft);
      padding: 3px;
      border-radius: 8px;
      border: 1px solid var(--line);
      overflow-x: auto;
      max-width: 100%;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
    }
    .nav-tabs::-webkit-scrollbar { display: none; }
    .nav-tab {
      border: 0;
      background: transparent;
      color: var(--muted);
      padding: 5px 12px;
      border-radius: 6px;
      font-size: 12.5px;
      font-weight: 550;
      white-space: nowrap;
      transition: all 0.14s ease;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      flex-shrink: 0;
    }
    .nav-tab:hover { color: var(--ink); }
    .nav-tab.active {
      background: var(--white);
      color: var(--ink);
      font-weight: 600;
      box-shadow: var(--shadow-xs);
    }
    .nav-badge {
      font-size: 10px;
      font-weight: 700;
      padding: 1px 6px;
      border-radius: 99px;
      background: var(--amber-soft);
      color: var(--amber);
    }

    .user-menu-wrap {
      position: relative;
      display: inline-flex;
      align-items: center;
      flex-shrink: 0;
    }
    .user-circle-btn {
      position: relative;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      border: 1.5px solid var(--gold-border);
      background: var(--gold-soft);
      color: var(--gold-text);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 12.5px;
      font-weight: 700;
      letter-spacing: 0.3px;
      cursor: pointer;
      transition: all 0.16s ease;
      box-shadow: var(--shadow-xs);
      user-select: none;
      flex-shrink: 0;
      padding: 0;
      overflow: visible;
    }
    .user-circle-btn img.user-avatar-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 50%;
      display: block;
    }
    .user-circle-btn:hover,
    .user-circle-btn.active {
      border-color: var(--gold);
      box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow-sm);
      transform: translateY(-1px);
    }
    .user-circle-status-dot {
      position: absolute;
      bottom: -1px;
      right: -1px;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--green);
      border: 2px solid var(--white);
      z-index: 2;
    }
    .user-dropdown-menu {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      z-index: 250;
      width: min(320px, calc(100vw - 24px));
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px;
      box-shadow: var(--shadow-pop);
      display: none;
      flex-direction: column;
      gap: 10px;
    }
    .user-dropdown-menu.open {
      display: flex;
    }
    .user-profile-top-card {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 10px 11px;
      border-radius: 10px;
      background: var(--paper);
      border: 1px solid var(--line);
    }
    .user-profile-row {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }
    .user-profile-avatar-lg {
      width: 46px;
      height: 46px;
      border-radius: 50%;
      border: 1.5px solid var(--gold-border);
      background: var(--gold-soft);
      color: var(--gold-text);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      font-weight: 700;
      flex-shrink: 0;
      overflow: hidden;
      position: relative;
      cursor: pointer;
    }
    .user-profile-avatar-lg img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .user-profile-meta {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
      flex: 1;
    }
    .user-profile-name {
      font-size: 13.5px;
      font-weight: 700;
      color: var(--ink);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .user-profile-role {
      font-size: 11px;
      font-weight: 600;
      color: var(--muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .user-avatar-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }
    .user-menu-divider {
      height: 1px;
      background: var(--line);
      margin: 2px 0;
    }
    .user-menu-section {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .user-menu-label {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--muted);
      padding: 0 2px;
    }
    .quick-actions-bar {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }
    .theme-select {
      width: 100%;
      height: 30px;
      padding: 0 28px 0 10px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--white);
      color: var(--ink);
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      outline: none;
    }
    .theme-select:hover { border-color: var(--gold); }

    .auth-pill-btn {
      width: 100%;
      height: 28px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 0 10px;
      border-radius: 6px;
      border: 1px solid var(--gold-border);
      background: var(--gold-soft);
      color: var(--gold-text);
      font-size: 11.5px;
      font-weight: 600;
      transition: all 0.14s ease;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .auth-pill-btn:hover { filter: brightness(0.97); }
    .mode-pill {
      width: 100%;
      display: grid;
      grid-template-columns: 1fr 1fr;
      background: var(--soft);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 3px;
    }
    .mode-pill button {
      border: 0;
      background: transparent;
      padding: 5px 10px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 600;
      color: var(--muted);
      text-align: center;
    }
    .mode-pill button.active { background: var(--gold-soft); color: var(--gold-text); border: 1px solid var(--gold); font-weight: 700; }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      height: 28px;
      min-height: 28px;
      max-height: 28px;
      padding: 0 11px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--white);
      color: var(--ink);
      font-size: 11.5px;
      font-weight: 600;
      line-height: 1;
      white-space: nowrap;
      box-sizing: border-box;
      transition: all 0.12s ease;
      box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02);
    }
    .btn:hover { background: var(--soft); border-color: var(--gold-border); }
    .btn.primary { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; font-weight: 600; }
    .btn.primary:hover { background: #dbeafe; border-color: #60a5fa; }
    .btn.gold { background: var(--gold-soft); color: var(--gold-text); border-color: var(--gold-border); font-weight: 600; }
    .btn.gold:hover { filter: brightness(0.96); }
    .btn.green { background: #ecfdf5; color: #15803d; border-color: #86efac; font-weight: 600; }
    .btn.green:hover { background: #dcfce7; border-color: #4ade80; }
    .btn.danger, .btn.red { background: #fef2f2; color: #b91c1c; border-color: #fca5a5; font-weight: 600; }
    .btn.danger:hover, .btn.red:hover { background: #fee2e2; border-color: #f87171; }
    .btn.sm {
      height: 28px;
      min-height: 28px;
      max-height: 28px;
      padding: 0 10px;
      font-size: 11.5px;
      border-radius: 6px;
      box-sizing: border-box;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
    }

    /* Prominent Primary Workflow Call-To-Action (CTA) System */
    .wf-action-dock {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      padding: 4px 6px 4px 11px;
      border-radius: 9px;
      background: var(--white);
      border: 1.5px solid var(--border);
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    }
    .wf-next-label {
      font-size: 10.5px;
      font-weight: 800;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--ink);
      white-space: nowrap;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .btn-wf-cta {
      appearance: none;
      -webkit-appearance: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      height: 34px;
      min-height: 34px;
      padding: 0 16px;
      border-radius: 7px;
      font-family: inherit;
      font-size: 12.5px;
      font-weight: 800;
      line-height: 1;
      letter-spacing: 0.01em;
      white-space: nowrap;
      cursor: pointer;
      transition: all 0.14s ease;
      box-sizing: border-box;
    }
    .btn-wf-cta.cta-green {
      background: #ecfdf5;
      color: #15803d;
      border: 1.5px solid #6ee7b7;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    }
    .btn-wf-cta.cta-green:hover {
      background: #dcfce7;
      border-color: #4ade80;
    }
    .btn-wf-cta.cta-blue {
      background: #eff6ff;
      color: #1d4ed8;
      border: 1.5px solid #93c5fd;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    }
    .btn-wf-cta.cta-blue:hover {
      background: #dbeafe;
      border-color: #60a5fa;
    }
    .btn-wf-cta.cta-gold {
      background: var(--gold-soft);
      color: var(--gold-text);
      border: 1.5px solid var(--gold);
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    }
    .btn-wf-cta.cta-gold:hover {
      background: #ece0c8;
      border-color: var(--gold);
    }

    main {
      width: 100%;
      max-width: 1600px;
      margin: 0 auto;
      padding: 18px 24px 36px;
      flex: 1;
      min-width: 0;
    }

    /* Role Banner for Tenant / Homeowner Portal Views */
    .portal-mode-banner {
      display: none;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 18px;
      margin-bottom: 16px;
      border-radius: var(--radius-lg);
      background: var(--gold-soft);
      border: 1px solid var(--gold-border);
      box-shadow: var(--shadow-xs);
      flex-wrap: wrap;
    }
    .portal-mode-banner.active, .portal-mode-banner.visible { display: flex; }

    /* KPI Strip */
    .kpi-strip {
      display: grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 16px;
    }
    @media (max-width: 1320px) {
      .kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    }
    .kpi-card {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      padding: 14px 18px;
      box-shadow: var(--shadow-xs);
      display: flex;
      flex-direction: column;
      gap: 4px;
      cursor: pointer;
      min-width: 0;
      transition: border-color 0.14s ease, box-shadow 0.14s ease;
    }
    .kpi-card:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
    .kpi-label {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--muted);
    }
    .kpi-val {
      font-size: 22px;
      font-weight: 650;
      letter-spacing: -0.02em;
      color: var(--ink);
      font-variant-numeric: tabular-nums;
      line-height: 1.15;
    }
    .kpi-sub { font-size: 11.5px; color: var(--muted); }
    .kpi-sub strong { color: var(--ink); font-weight: 600; }

    /* Overview Split Grid */
    .overview-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
      gap: 16px;
      margin-bottom: 16px;
    }
    .panel-card {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-xs);
      overflow: hidden;
      min-width: 0;
      max-width: 100%;
    }
    .panel-head {
      padding: 12px 18px;
      background: var(--white);
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }
    .panel-head h2 {
      margin: 0;
      font-size: 14px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .panel-head p { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }

    /* MODERN SAAS CLICKABLE LINKS (Zero Native Button Box, Zero Clutter) */
    .entity-link {
      appearance: none;
      -webkit-appearance: none;
      background: transparent !important;
      border: 0 !important;
      box-shadow: none !important;
      padding: 0;
      margin: 0;
      color: var(--ink);
      font: inherit;
      font-weight: 600;
      text-align: left;
      text-decoration: none;
      cursor: pointer;
      display: inline;
      line-height: 1.35;
      transition: color 0.12s ease;
    }
    .entity-link:hover {
      color: var(--gold-text);
      text-decoration: underline;
      text-underline-offset: 3px;
      text-decoration-thickness: 1.5px;
    }
    .entity-unit-pill {
      appearance: none;
      -webkit-appearance: none;
      display: inline-flex;
      align-items: center;
      padding: 1px 7px;
      margin-left: 4px;
      border-radius: 5px;
      background: var(--soft);
      border: 1px solid #cbd5e1;
      color: var(--ink2);
      font-size: 11px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.12s ease;
    }
    .entity-unit-pill:hover {
      background: var(--gold-soft);
      border-color: var(--gold-border);
      color: var(--gold-text);
    }

    /* Dedicated Graphical Entity Profile View (#entity-profile-view) */
    #entity-profile-view {
      display: none;
      margin-bottom: 20px;
      animation: fadeInProfile 0.16s ease;
      min-width: 0;
      max-width: 100%;
    }
    #entity-profile-view.active {
      display: block;
    }
    @keyframes fadeInProfile {
      from { opacity: 0; transform: translateY(3px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .profile-topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 16px;
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      margin-bottom: 14px;
      box-shadow: var(--shadow-xs);
      flex-wrap: wrap;
    }
    .profile-breadcrumb {
      font-size: 12px;
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }
    .profile-breadcrumb a {
      color: var(--gold-text);
      font-weight: 600;
      cursor: pointer;
      text-decoration: none;
    }
    .profile-breadcrumb a:hover { text-decoration: underline; }

    .profile-hero {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      padding: 20px 24px;
      margin-bottom: 16px;
      box-shadow: var(--shadow-xs);
      min-width: 0;
    }
    .profile-hero-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
    }
    .profile-eyebrow {
      display: block;
      font-size: 10.5px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.07em;
      color: var(--gold-text);
      margin-bottom: 4px;
    }
    .profile-title {
      font-size: 22px;
      font-weight: 650;
      margin: 0 0 4px;
      letter-spacing: -0.02em;
      color: var(--ink);
      word-break: break-word;
    }
    .profile-sub {
      margin: 0;
      font-size: 12.5px;
      color: var(--muted);
    }
    .profile-cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
      gap: 12px;
      margin-top: 16px;
    }
    .access-card {
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 12px 15px;
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }
    .access-icon {
      width: 34px;
      height: 34px;
      border-radius: 7px;
      background: var(--gold-soft);
      border: 1px solid var(--gold-border);
      color: var(--gold-text);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      flex-shrink: 0;
    }
    .access-card small {
      display: block;
      font-size: 11px;
      color: var(--muted);
      font-weight: 500;
    }
    .access-card strong {
      display: block;
      font-size: 13.5px;
      color: var(--ink);
      margin-top: 1px;
      word-break: break-word;
    }

    .profile-sections-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 16px;
      margin-bottom: 16px;
    }
    .profile-section-full { grid-column: 1 / -1; }

    /* 6-Tier Pricing Matrix Cards in Unit Profile */
    .tier-matrix-grid {
      display: grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 10px;
      margin-top: 8px;
    }
    .tier-box {
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 11px 12px;
      text-align: center;
      min-width: 0;
    }
    .tier-box.highlight {
      background: var(--gold-soft);
      border-color: var(--gold-border);
    }
    .tier-box span {
      display: block;
      font-size: 10.5px;
      font-weight: 600;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }
    .tier-box strong {
      display: block;
      font-size: 16.5px;
      margin-top: 3px;
      color: var(--ink);
      font-variant-numeric: tabular-nums;
    }

    /* Task Workflow Stepper */
    .workflow-stepper {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      margin-top: 16px;
    }
    .wf-step {
      padding: 11px 14px;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: var(--paper);
      font-size: 12px;
      color: var(--muted);
      min-width: 0;
    }
    .wf-step small {
      display: block;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      opacity: 0.8;
    }
    .wf-step strong {
      display: block;
      font-size: 13px;
      margin-top: 2px;
      color: var(--ink);
    }
    .wf-step.active {
      background: var(--gold-soft);
      border-color: var(--gold);
    }
    .wf-step.done {
      background: var(--green-soft);
      border-color: transparent;
      color: var(--green);
    }
    .wf-step.done strong { color: var(--green); }

    /* Modern SaaS Status Badges */
    .badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 2px 8px;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 600;
      white-space: nowrap;
      line-height: 1.4;
    }
    .badge.green, .badge.task-done { background: #ecfdf5; color: #15803d; border: 1px solid #6ee7b7; }
    .badge.amber { background: #fffbeb; color: #b45309; border: 1px solid #fbbf24; }
    .badge.red { background: #fef2f2; color: #b91c1c; border: 1px solid #f87171; }
    .badge.gold { background: var(--gold-soft); color: var(--gold-text); border: 1px solid var(--gold-border); }
    .badge.blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #7dd3fc; }
    .badge.purple { background: #f5f3ff; color: #6d28d9; border: 1px solid #c4b5fd; }
    .badge.stone, .badge.neutral { background: var(--soft); color: var(--ink2); border: 1px solid #cbd5e1; }
    /* Task Priority Spectrum (Graduated Soft-to-Rich Tints with Crisp Visible Borders; Completed = Green) */
    .badge.prio-urgent { background: #fecaca; color: #7f1d1d; border: 1px solid #ef4444; font-weight: 700; }
    .badge.prio-high   { background: #fee2e2; color: #b91c1c; border: 1px solid #f87171; font-weight: 700; }
    .badge.prio-medium { background: #ffedd5; color: #c2410c; border: 1px solid #fb923c; font-weight: 600; }
    .badge.prio-low    { background: #fef9c3; color: #854d0e; border: 1px solid #facc15; font-weight: 600; }

    /* Sheet Toolbar & Table */
    .sheet-toolbar {
      padding: 11px 18px;
      border-bottom: 1px solid var(--line);
      background: var(--white);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }
    .search-box {
      position: relative;
      flex: 1;
      min-width: 240px;
      max-width: 380px;
    }
    .search-box input {
      width: 100%;
      padding: 6px 12px 6px 32px;
      border-radius: 7px;
      border: 1px solid var(--line);
      background: var(--paper);
      font-size: 12.5px;
      outline: none;
      transition: border-color 0.14s ease, background-color 0.14s ease;
    }
    .search-box input:focus { border-color: var(--gold); background: var(--white); }
    .search-box svg {
      position: absolute;
      left: 10px;
      top: 50%;
      transform: translateY(-50%);
      width: 14px;
      height: 14px;
      stroke: var(--muted);
      fill: none;
      stroke-width: 2;
    }
    .sheet-toolbar-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    .toolbar-select {
      padding: 6px 11px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--white);
      font-size: 12px;
      outline: none;
      max-width: 100%;
    }

    .active-filters-bar {
      display: none;
      align-items: center;
      gap: 8px;
      padding: 8px 18px;
      background: var(--gold-soft);
      border-bottom: 1px solid var(--gold-border);
      font-size: 12px;
      flex-wrap: wrap;
    }
    .active-filters-bar.visible { display: flex; }
    .filter-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 2px 9px;
      border-radius: 6px;
      background: var(--white);
      border: 1px solid var(--gold-border);
      font-size: 11.5px;
    }
    .filter-chip button { border: 0; background: none; padding: 0 2px; color: var(--muted); font-weight: 700; }

    .table-wrap {
      width: 100%;
      max-width: 100%;
      overflow-x: auto;
      max-height: 66vh;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }
    table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; }
    thead th {
      position: sticky;
      top: 0;
      z-index: 10;
      background: var(--soft);
      color: var(--muted);
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      padding: 10px 14px;
      border-bottom: 1px solid var(--line);
      white-space: nowrap;
      user-select: none;
    }
    #data-table thead th {
      padding: 0;
    }
    .th-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 4px;
      padding: 7px 8px;
      width: 100%;
      transition: background-color 0.12s ease;
    }
    .th-inner:hover { background: rgba(231, 229, 224, 0.55); color: var(--ink); }
    .th-label-wrap {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      cursor: pointer;
      padding: 2px 0;
      font-weight: 650;
      transition: color 0.12s ease;
    }
    .th-label-wrap:hover { color: var(--ink); }
    .th-actions {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      flex-shrink: 0;
    }
    .th-icon-btn {
      appearance: none;
      -webkit-appearance: none;
      border: 1px solid rgba(214, 211, 205, 0.75);
      background: rgba(255, 255, 255, 0.75);
      color: var(--muted);
      width: 20px;
      height: 20px;
      border-radius: 5px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      position: relative;
      transition: all 0.14s ease;
      box-shadow: 0 1px 1px rgba(24, 24, 27, 0.03);
    }
    .th-icon-btn svg {
      width: 11px;
      height: 11px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      pointer-events: none;
    }
    .th-inner:hover .th-icon-btn {
      border-color: var(--border);
      background: var(--white);
      color: var(--ink-2);
    }
    .th-icon-btn:hover {
      border-color: var(--gold) !important;
      background: var(--gold-soft) !important;
      color: var(--gold-text) !important;
      transform: translateY(-0.5px);
    }
    .th-sort-btn.active {
      background: var(--gold-soft) !important;
      border-color: var(--gold) !important;
      color: var(--gold-text) !important;
      box-shadow: 0 1px 2px rgba(180, 83, 9, 0.14);
    }
    .th-filter-btn.active {
      background: var(--gold-soft) !important;
      border-color: var(--gold) !important;
      color: var(--gold-text) !important;
      box-shadow: 0 1px 2px rgba(180, 83, 9, 0.16);
    }
    .th-filter-btn.active::after {
      content: "";
      position: absolute;
      top: -2px;
      right: -2px;
      width: 6px;
      height: 6px;
      border-radius: 999px;
      background: var(--red);
      border: 1.5px solid var(--white);
    }

    tbody tr { transition: background-color 0.1s ease; }
    tbody tr:hover td { background: var(--row-hover); }
    tbody td {
      padding: 10px 14px;
      border-bottom: 1px solid var(--line);
      vertical-align: top;
      background: var(--white);
      font-size: 13px;
    }
    .num {
      text-align: right;
      font-variant-numeric: tabular-nums;
    }
    th.num, td.num {
      padding-right: 22px;
    }
    #data-table th.num .th-inner {
      padding-right: 20px;
    }
    th.num + th, td.num + td {
      padding-left: 18px;
    }

    /* Explicit Recorded / Approved Attribution Stack & Check-in / Check-out Stack */
    .audit-stack, .stay-stack {
      display: flex;
      flex-direction: column;
      gap: 4px;
      font-size: 11.5px;
      line-height: 1.2;
      white-space: nowrap;
    }
    .audit-row, .stay-row, .audit-line {
      display: flex;
      align-items: center;
      min-height: 22px;
      height: 22px;
      gap: 5px;
    }
    .audit-lbl {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--muted);
      min-width: 58px;
    }
    .audit-ok { color: var(--green); }
    .audit-pend { color: var(--amber); font-weight: 600; }
    .stay-lbl {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--muted);
      min-width: 28px;
    }
    .stay-lbl.out {
      color: var(--gold-text);
    }

    /* Section Bottom Activity, Change Log & Full-Width Note Composer Panel */
    .section-log-card {
      margin-top: 16px;
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-xs);
      overflow: hidden;
      min-width: 0;
      max-width: 100%;
    }
    .log-bar-head {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 10px;
      padding: 14px 18px;
      border-bottom: 1px solid var(--line);
      background: var(--soft);
      width: 100%;
    }
    .log-bar-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
      width: 100%;
    }
    .log-bar-title {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      font-weight: 600;
      color: var(--ink);
    }
    .log-staff-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 11.5px;
      font-weight: 600;
      color: var(--gold-text);
      background: var(--gold-soft);
      border: 1px solid var(--gold-border);
      padding: 3px 10px;
      border-radius: 99px;
    }
    .note-composer-bar {
      padding: 12px 18px;
      background: var(--soft);
      border-bottom: 1px solid var(--line);
      width: 100%;
    }
    .quick-note-form,
    .note-composer-bar .quick-note-form {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      width: 100%;
      align-items: start;
    }
    .quick-note-input-col {
      display: flex;
      flex-direction: column;
      gap: 6px;
      min-width: 0;
      width: 100%;
    }
    .quick-note-form textarea,
    .quick-note-form input,
    .note-composer-bar textarea {
      width: 100%;
      min-width: 0;
      height: 52px;
      min-height: 52px;
      margin: 0;
      padding: 14px 14px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--white);
      font-family: 'Roboto', 'Shabnam', sans-serif;
      font-size: 13px;
      line-height: 1.45;
      resize: vertical;
      outline: none;
      unicode-bidi: plaintext;
      transition: border-color 0.14s ease, box-shadow 0.14s ease;
    }
    .quick-note-form .note-submit-btn,
    .note-composer-bar .note-submit-btn {
      height: 52px;
      min-height: 52px;
      padding: 0 20px;
      margin: 0;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .quick-note-form textarea:focus,
    .note-composer-bar textarea:focus {
      border-color: var(--gold);
      box-shadow: 0 0 0 3px var(--gold-soft);
    }
    .bidi-live-preview {
      padding: 8px 12px;
      border-radius: 8px;
      border: 1px dashed var(--gold-border);
      background: var(--white);
      font-size: 12.5px;
      line-height: 1.55;
      color: var(--ink);
    }
    .bidi-live-preview-lbl {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--gold-text);
      margin-bottom: 3px;
      display: block;
    }
    .bidi-line {
      line-height: 1.5;
      word-break: break-word;
    }
    .bidi-line.rtl {
      direction: rtl;
      text-align: right;
      font-family: 'Shabnam', 'Roboto', sans-serif;
    }
    .bidi-line.ltr {
      direction: ltr;
      text-align: left;
    }
    .bidi-ltr-run {
      direction: ltr;
      unicode-bidi: isolate;
      display: inline-block;
      padding: 0 2px;
      font-family: 'Roboto', sans-serif;
    }
    .log-list { max-height: 280px; overflow-y: auto; }
    .log-item {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      padding: 10px 18px;
      border-bottom: 1px solid var(--line);
      font-size: 12.5px;
    }
    .log-item:last-child { border-bottom: 0; }
    .log-left {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      flex: 1;
      min-width: 0;
      flex-wrap: wrap;
    }
    .log-msg-body {
      flex: 1;
      min-width: 180px;
      color: var(--ink);
    }
    .log-meta-right {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
      white-space: nowrap;
      font-size: 11.5px;
      color: var(--muted);
      padding-top: 2px;
    }
    .log-actor {
      font-weight: 600;
      color: var(--ink);
      background: var(--soft);
      border: 1px solid var(--line);
      padding: 1px 7px;
      border-radius: 99px;
      font-size: 11px;
    }
    .log-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

    /* Report View */
    .report-hero {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      padding: 20px 24px;
      margin-bottom: 16px;
      box-shadow: var(--shadow-xs);
      min-width: 0;
    }
    .report-metrics-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      margin-top: 16px;
    }
    .report-metric-box {
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 13px 16px;
      min-width: 0;
    }
    .report-metric-box .rm-label {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 10.5px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--muted);
    }
    .report-metric-box strong { display: block; font-size: 20px; margin-top: 4px; font-variant-numeric: tabular-nums; }
    .report-metric-box small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }

    /* Unit-Separated Current Occupants Grid */
    .unit-occupants-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
      gap: 12px;
      padding: 16px 18px;
    }
    .unit-occupant-box {
      display: flex;
      flex-direction: column;
      gap: 8px;
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 11px 13px;
      min-width: 0;
      transition: border-color 0.14s ease, box-shadow 0.14s ease;
    }
    .unit-occupant-box.is-current-unit {
      background: var(--gold-soft);
      border-color: var(--gold-border);
    }
    .unit-occupant-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding-bottom: 7px;
      border-bottom: 1px solid var(--line);
    }
    .unit-occupant-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .unit-occupant-card {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 2px;
      width: 100%;
      text-align: left;
      padding: 7px 10px;
      border-radius: 7px;
      border: 1px solid var(--line);
      background: var(--white);
      color: var(--ink);
      cursor: pointer;
      transition: all 0.12s ease;
    }
    .unit-occupant-card:hover {
      border-color: var(--gold);
      background: var(--gold-soft);
    }
    .unit-occupant-card.is-current-res {
      border-color: var(--gold);
      background: var(--white);
      box-shadow: 0 0 0 2px var(--gold-border);
      cursor: default;
    }
    .unit-occupant-name {
      font-size: 13px;
      font-weight: 600;
      color: var(--ink);
      display: inline-flex;
      align-items: center;
      gap: 6px;
      word-break: break-word;
    }
    .unit-occupant-meta {
      font-size: 11px;
      color: var(--muted);
    }

    /* Bold Lease & Entity Identity Strip */
    .lease-identity-strip {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      margin-top: 10px;
    }
    .identity-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: var(--paper);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 6px 11px;
      font-size: 12.5px;
      color: var(--ink);
      line-height: 1.25;
    }
    .identity-pill.highlight {
      background: var(--gold-soft);
      border-color: var(--gold-border);
    }
    .identity-pill .id-lbl {
      font-size: 10.5px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--muted);
    }
    .identity-pill strong {
      font-size: 13.5px;
      font-weight: 700;
      color: var(--ink);
    }

    /* Equal-Weight 3-Cell Strip for First Month, Last Month & Key Deposit */
    .fld-equal-strip {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      margin-top: 6px;
    }
    .fld-equal-cell {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 7px;
      padding: 7px 9px;
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }
    .fld-equal-cell .fld-lbl {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .fld-equal-cell strong {
      display: block !important;
      font-size: 15.5px !important;
      margin-top: 1px !important;
      font-weight: 700;
      color: var(--ink);
      font-variant-numeric: tabular-nums;
    }

    /* Column Filter Popover */
    .col-filter-popover {
      position: fixed;
      z-index: 100;
      width: 295px;
      max-width: calc(100vw - 24px);
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: 10px;
      box-shadow: var(--shadow-pop);
      display: none;
      flex-direction: column;
      overflow: hidden;
      font-size: 12.5px;
    }
    .col-filter-popover.open { display: flex; }
    .pop-section { padding: 10px 12px; border-bottom: 1px solid var(--line); }
    .pop-title {
      font-size: 10.5px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--muted);
      margin-bottom: 6px;
      display: flex;
      justify-content: space-between;
    }
    .sort-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
    .sort-btn {
      padding: 6px 8px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--paper);
      font-size: 11.5px;
      font-weight: 550;
    }
    .sort-btn.active { background: var(--gold-soft); color: var(--gold-text); border-color: var(--gold); font-weight: 700; }
    .cond-row { display: grid; gap: 6px; }
    .cond-row select, .cond-row input, .val-search {
      width: 100%;
      padding: 6px 9px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--paper);
      font-size: 12px;
      outline: none;
    }
    .cond-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
    .val-links { display: flex; gap: 10px; font-size: 11px; margin: 6px 0; }
    .val-links button { border: 0; background: none; padding: 0; color: var(--gold-text); font-weight: 600; text-decoration: underline; }
    .val-list {
      max-height: 160px;
      overflow-y: auto;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--paper);
      padding: 4px;
    }
    .val-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 4px 6px;
      border-radius: 4px;
      font-size: 12px;
    }
    .val-item:hover { background: var(--white); }
    .val-item label { display: flex; align-items: center; gap: 7px; cursor: pointer; flex: 1; min-width: 0; }
    .val-item input[type="checkbox"] { accent-color: var(--gold-text); width: 14px; height: 14px; margin: 0; }
    .val-item-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .val-item-count { font-size: 10.5px; color: var(--muted); }
    .pop-footer { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; background: var(--soft); }

    /* Modals */
    dialog {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      padding: 0;
      width: min(670px, calc(100vw - 24px));
      max-width: calc(100vw - 24px);
      background: var(--white);
      color: var(--ink);
      box-shadow: var(--shadow-pop);
      max-height: calc(100dvh - 32px);
      overflow-x: hidden;
    }
    dialog::backdrop { background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(2px); }
    .modal-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 22px;
      border-bottom: 1px solid var(--line);
      gap: 10px;
      min-width: 0;
    }
    .modal-head h3 { margin: 0; font-size: 15.5px; font-weight: 600; min-width: 0; word-break: break-word; }
    .modal-body {
      padding: 18px 22px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 12px;
      max-height: calc(100dvh - 160px);
      overflow-y: auto;
      overflow-x: hidden;
      min-width: 0;
    }
    .modal-body.single-col {
      grid-template-columns: minmax(0, 1fr);
    }
    .modal-body > * {
      min-width: 0;
      max-width: 100%;
    }
    .auth-tabs-bar {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
      background: var(--soft);
      padding: 4px;
      border-radius: 10px;
      width: 100%;
    }
    .auth-tabs-bar .btn {
      width: 100%;
      min-width: 0;
      white-space: normal;
      text-align: center;
      line-height: 1.25;
      padding: 6px 8px;
    }
    .auth-inline-form {
      display: flex;
      gap: 8px;
      width: 100%;
      min-width: 0;
    }
    .auth-inline-form input {
      flex: 1;
      min-width: 0;
      padding: 7px 12px;
      border: 1px solid var(--border);
      border-radius: 6px;
    }
    .responsive-two-col {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 10px;
      width: 100%;
      min-width: 0;
    }
    .field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
    .field.full { grid-column: 1 / -1; }
    .field label {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 11.5px;
      font-weight: 600;
      color: var(--muted);
      flex-wrap: wrap;
    }
    .field input, .field select, .field textarea {
      width: 100%;
      min-width: 0;
      max-width: 100%;
      padding: 7px 10px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--paper);
      font-size: 13px;
    }
    .field input:focus, .field select:focus, .field textarea:focus {
      outline: none;
      border-color: var(--gold);
      background: var(--white);
    }
    .modal-history-box {
      grid-column: 1 / -1;
      margin-top: 6px;
      border-top: 1px solid var(--line);
      padding-top: 10px;
      min-width: 0;
    }
    .modal-history-list {
      max-height: 120px;
      overflow-y: auto;
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: 6px;
      padding: 6px 10px;
      font-size: 11.5px;
      margin-top: 6px;
    }
    .modal-foot {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      padding: 12px 22px;
      border-top: 1px solid var(--line);
      background: var(--soft);
      flex-wrap: wrap;
    }
    .perm-check {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 10px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--paper);
      font-size: 12.5px;
      cursor: pointer;
      min-width: 0;
      word-break: break-word;
    }
    .google-user-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 9px 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--paper);
      cursor: pointer;
      transition: all 0.14s ease;
      flex-wrap: wrap;
      min-width: 0;
      max-width: 100%;
    }
    .google-user-card:hover { border-color: var(--gold); background: var(--gold-soft); }
    .google-user-info {
      flex: 1 1 180px;
      min-width: 0;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    footer {
      text-align: center;
      padding: 14px;
      font-size: 11.5px;
      color: var(--muted);
      border-top: 1px solid var(--line);
      background: var(--white);
      width: 100%;
    }

    /* Tablet & Compact Laptop Breakpoint */
    @media (max-width: 1100px) {
      .kpi-strip, .report-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .tier-matrix-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .workflow-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .overview-grid, .profile-sections-grid { grid-template-columns: minmax(0, 1fr); }
      .header-nav-row { flex-direction: column; align-items: stretch; gap: 8px; }
      .quick-actions-bar { width: 100%; overflow-x: auto; padding-bottom: 2px; }
    }

    /* Mobile Phone & Small Tablet Breakpoint (Full UI/UX Optimization & Zero Non-Table Overflow) */
    @media (max-width: 768px) {
      .header {
        position: relative;
      }
      .header-inner {
        padding: 10px 12px;
        gap: 8px;
      }
      .header-top-row {
        flex-wrap: nowrap;
        gap: 10px;
      }
      .header-nav-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-top: 8px;
      }
      .nav-tabs {
        width: 100%;
        max-width: 100%;
      }
      .quick-actions-bar {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 5px;
      }
      .quick-actions-bar .btn {
        padding: 6px 4px;
        font-size: 11px;
        width: 100%;
      }
      main {
        padding: 12px 12px 28px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
      }
      .kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 12px;
      }
      .kpi-card {
        padding: 11px 12px;
      }
      .kpi-val {
        font-size: 18px;
      }
      .kpi-sub {
        font-size: 10.5px;
      }
      .panel-head {
        padding: 10px 12px;
        gap: 8px;
      }
      .sheet-toolbar {
        padding: 10px 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
      }
      .search-box {
        min-width: 0;
        max-width: 100%;
        width: 100%;
      }
      .sheet-toolbar-actions {
        width: 100%;
        justify-content: space-between;
      }
      #rep-prop-select {
        min-width: 0 !important;
        width: 100%;
      }
      thead th, tbody td, .th-inner {
        padding: 8px 10px;
        font-size: 12px;
      }
      .log-bar-head, .note-composer-bar {
        padding: 12px;
      }
      .quick-note-form,
      .note-composer-bar .quick-note-form {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
      }
      .quick-note-form select {
        height: 42px;
        width: 100%;
      }
      .quick-note-form textarea,
      .note-composer-bar textarea {
        height: 46px;
        min-height: 46px;
        padding: 11px 12px;
        width: 100%;
      }
      .quick-note-form .note-submit-btn,
      .note-composer-bar .note-submit-btn,
      .quick-note-form button[type="submit"] {
        height: 42px !important;
        min-height: 42px !important;
        width: 100%;
      }
      .log-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 10px 12px;
      }
      .log-msg-body {
        min-width: 0;
        width: 100%;
      }
      .profile-hero, .report-hero {
        padding: 14px;
      }
      .profile-title {
        font-size: 18px;
      }
      .profile-cards-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
      }
      .tier-matrix-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }
      .workflow-stepper {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
      }
      .report-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }
      dialog {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        max-height: calc(100dvh - 20px);
        margin: auto;
      }
      .modal-head {
        padding: 12px 14px;
      }
      .modal-body {
        grid-template-columns: minmax(0, 1fr) !important;
        padding: 12px 14px;
        gap: 10px;
        max-height: calc(100dvh - 130px);
      }
      .modal-foot {
        padding: 10px 14px;
      }
      .auth-tabs-bar {
        grid-template-columns: minmax(0, 1fr);
        border-radius: 10px;
      }
      .auth-inline-form {
        flex-direction: column;
      }
      .auth-inline-form .btn {
        width: 100%;
      }
      .responsive-two-col {
        grid-template-columns: minmax(0, 1fr);
      }
      .google-user-card {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
      }
      .google-user-card > .btn {
        width: 100%;
      }
      .col-filter-popover {
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: calc(100vw - 24px);
        max-height: 80vh;
        overflow-y: auto;
      }
    }

    @media (max-width: 420px) {
      .quick-actions-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
      .quick-actions-bar .btn.primary {
        grid-column: span 2;
      }
    }

    /* 7-Day Upcoming Check-Ins & Check-Outs Table: Fit 100% Width Without Horizontal Scroll */
    #turnovers-table-wrap {
      overflow-x: hidden;
    }
    #turnovers-table {
      width: 100%;
      table-layout: auto;
    }
    #turnovers-table thead th {
      padding: 8px 9px;
      font-size: 10.5px;
      letter-spacing: 0.03em;
      white-space: nowrap;
    }
    #turnovers-table tbody td {
      padding: 8px 9px;
      font-size: 12px;
      line-height: 22px;
      vertical-align: top;
    }

    /* Universal Searchable Select Dropdown Popover (First Row = Sticky Live Search Box) */
    .searchable-select-menu {
      position: fixed;
      z-index: 999999;
      background: var(--white);
      border: 1.5px solid var(--gold-border);
      border-radius: 10px;
      box-shadow: 0 14px 36px rgba(15, 23, 42, 0.22), 0 3px 10px rgba(15, 23, 42, 0.10);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      min-width: 240px;
      max-height: 340px;
      font-family: inherit;
    }
    .ss-search-row {
      position: sticky;
      top: 0;
      z-index: 2;
      background: var(--paper);
      border-bottom: 1px solid var(--line);
      padding: 7px 9px;
      display: flex;
      align-items: center;
      gap: 7px;
    }
    .ss-search-icon {
      font-size: 12.5px;
      color: var(--muted);
      flex-shrink: 0;
      user-select: none;
    }
    .ss-search-input {
      width: 100%;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: var(--white);
      color: var(--ink);
      padding: 5px 9px;
      font-size: 12.5px;
      outline: none;
    }
    .ss-search-input:focus {
      border-color: var(--gold);
      box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.15);
    }
    .ss-options-list {
      overflow-y: auto;
      max-height: 280px;
      padding: 4px 0;
      overscroll-behavior: contain;
    }
    .ss-optgroup-label {
      padding: 6px 11px 3px;
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--gold-text);
      background: var(--soft);
      user-select: none;
    }
    .ss-opt {
      padding: 6px 11px;
      font-size: 12.5px;
      color: var(--ink);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      transition: background-color 0.08s ease;
    }
    .ss-opt:hover,
    .ss-opt.focused {
      background: var(--gold-soft);
      color: var(--ink);
    }
    .ss-opt.selected {
      background: rgba(217, 119, 6, 0.14);
      font-weight: 600;
      color: var(--gold-text);
    }
    .ss-opt-check {
      font-size: 11.5px;
      font-weight: 700;
      color: var(--gold-text);
      flex-shrink: 0;
    }
    .ss-empty {
      padding: 14px 12px;
      text-align: center;
      font-size: 12px;
      color: var(--muted);
    }
    .btn-edit-task-bold {
      height: 28px !important;
      min-height: 28px !important;
      max-height: 28px !important;
      font-weight: 600 !important;
      font-size: 11.5px !important;
      padding: 0 11px !important;
      border-radius: 6px !important;
      border-width: 1px !important;
      box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02) !important;
      letter-spacing: 0;
    }
    .btn-edit-task-bold:hover {
      transform: none;
    }
    .wf-step.clickable,
    .report-metric-box.clickable {
      cursor: pointer;
      transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
      position: relative;
    }
    .report-metric-box.clickable::after {
      content: "✎";
      position: absolute;
      top: 9px;
      right: 11px;
      font-size: 11px;
      color: var(--muted);
      opacity: 0;
      transition: opacity 0.14s ease, color 0.14s ease;
      pointer-events: none;
    }
    .report-metric-box.clickable:hover::after {
      opacity: 0.85;
      color: var(--gold-text);
    }
    .wf-step.clickable:hover,
    .report-metric-box.clickable:hover {
      border-color: var(--gold) !important;
      box-shadow: 0 3px 10px rgba(184, 151, 88, 0.12);
      transform: translateY(-1px);
    }
    .wf-click-hint {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      margin-top: 7px;
      height: 24px;
      min-height: 24px;
      padding: 0 9px;
      border-radius: 6px !important;
      font-size: 11px;
      font-weight: 600;
      line-height: 1;
      background: var(--white);
      border: 1px solid var(--border);
      color: var(--ink);
      box-sizing: border-box;
    }
    .wf-step.clickable:hover .wf-click-hint,
    .report-metric-box.clickable:hover .wf-click-hint {
      background: var(--gold-soft);
      border-color: var(--gold-border);
      color: var(--gold-text);
    }
    /* Compact Icon Buttons & Attachment Pills */
    .btn-icon,
    .btn.sm.btn-icon {
      padding: 0 7px !important;
      min-width: 28px;
      height: 28px;
      min-height: 28px;
      box-sizing: border-box;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      line-height: 1;
      border-radius: 6px !important;
    }
    .attach-clip-btn {
      height: 52px;
      min-height: 52px;
      padding: 0 13px;
      border-radius: 8px;
      border: 1px dashed var(--gold-border);
      background: var(--gold-soft);
      color: var(--gold-text);
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      transition: all 0.14s ease;
      flex-shrink: 0;
    }
    .attach-clip-btn:hover {
      border-color: var(--gold);
      background: var(--white);
    }
    .doc-pill {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      height: 22px;
      min-height: 22px;
      padding: 0 7px;
      border-radius: 5px !important;
      background: var(--gold-soft);
      border: 1px solid var(--gold-border);
      color: var(--gold-text);
      font-size: 10.5px;
      font-weight: 600;
      line-height: 1;
      text-decoration: none;
      white-space: nowrap;
      box-sizing: border-box;
    }
    .doc-pill:hover {
      background: var(--white);
      border-color: var(--gold);
    }

    /* ==========================================================================
       1. CENTERED ENTITY PROFILE WINDOW OVERLAY (MODAL SHEET WITH VISIBLE MARGINS)
       ========================================================================== */
    body.entity-window-open {
      overflow: hidden;
    }
    #entity-profile-view.overlay-mode {
      position: fixed;
      inset: 0;
      z-index: 1200;
      background: rgba(15, 23, 42, 0.52);
      backdrop-filter: blur(3px);
      -webkit-backdrop-filter: blur(3px);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 26px 36px;
      margin: 0;
      box-sizing: border-box;
    }
    #entity-profile-view.overlay-mode.active {
      display: flex;
      animation: fadeOverlayBackdrop 0.16s ease;
    }
    @keyframes fadeOverlayBackdrop {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    @keyframes popEntityWindow {
      from { opacity: 0; transform: scale(0.975) translateY(8px); }
      to { opacity: 1; transform: scale(1) translateY(0); }
    }
    .entity-window-shell {
      width: min(1240px, calc(100vw - 64px));
      height: auto;
      max-height: min(90vh, calc(100vh - 48px));
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: 0 24px 64px rgba(15, 23, 42, 0.34), 0 4px 16px rgba(15, 23, 42, 0.14);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      animation: popEntityWindow 0.18s cubic-bezier(0.16, 1, 0.3, 1);
      position: relative;
    }
    dialog {
      border: 1px solid var(--border) !important;
      border-radius: 12px !important;
    }
    @media (max-width: 900px) {
      #entity-profile-view.overlay-mode {
        padding: 12px;
      }
      .entity-window-shell {
        width: calc(100vw - 24px);
        height: auto;
        max-height: calc(100vh - 24px);
        border-radius: 12px;
      }
    }
    .btn-window-close-circle,
    .modal-head > button,
    .modal-close-btn {
      appearance: none;
      -webkit-appearance: none;
      width: 28px !important;
      min-width: 28px !important;
      max-width: 28px !important;
      height: 28px !important;
      min-height: 28px !important;
      max-height: 28px !important;
      border-radius: 6px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      font-family: inherit;
      font-size: 13px !important;
      font-weight: 700 !important;
      line-height: 1 !important;
      background: var(--white) !important;
      border: 1px solid var(--border) !important;
      color: var(--ink) !important;
      cursor: pointer;
      transition: all 0.14s ease;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
      padding: 0 !important;
      flex-shrink: 0;
    }
    .btn-window-close-circle {
      position: absolute;
      top: 20px;
      right: 20px;
      z-index: 30;
    }
    .btn-window-close-circle:hover,
    .modal-head > button:hover,
    .modal-close-btn:hover {
      background: #fef2f2 !important;
      border-color: #fca5a5 !important;
      color: #b91c1c !important;
    }
    /* Scalable Notes & Activity Explorer Toolbar + Progressive Loader */
    .log-list {
      max-height: none !important;
      overflow-y: visible !important;
    }
    .notes-filter-bar {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      padding: 10px 18px;
      background: var(--paper);
      border-bottom: 1px solid var(--line);
    }
    .notes-filter-input {
      flex: 1 1 200px;
      min-width: 150px;
      height: 28px;
      padding: 0 10px;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: var(--white);
      color: var(--ink);
      font-size: 12px;
      outline: none;
    }
    .notes-filter-input:focus {
      border-color: var(--gold);
    }
    .notes-filter-select {
      height: 28px;
      padding: 0 28px 0 9px !important;
      border: 1px solid var(--border);
      border-radius: 6px;
      background-color: var(--white);
      color: var(--ink);
      font-size: 11.5px;
      font-weight: 600;
      cursor: pointer;
      outline: none;
      max-width: 220px;
    }
    .notes-filter-date {
      height: 28px;
      padding: 0 8px;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: var(--white);
      color: var(--ink);
      font-size: 11.5px;
      font-weight: 600;
      outline: none;
    }
    .notes-load-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
      padding: 10px 18px;
      background: var(--paper);
      border-top: 1px solid var(--line);
      font-size: 11.5px;
      color: var(--muted);
    }
    .notes-load-btns {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }
    .entity-window-body {
      flex: 1 1 auto;
      overflow-y: auto;
      padding: 0;
      background: var(--white);
      overscroll-behavior: contain;
      min-width: 0;
    }
    .entity-window-body > .profile-hero {
      border: none;
      border-radius: 0;
      box-shadow: none;
      margin: 0 !important;
      padding: 20px 24px;
      border-bottom: 1.5px solid var(--line);
    }
    .entity-window-body .profile-hero-top,
    .entity-fullpage-wrap .profile-hero-top {
      padding-right: 40px;
    }
    .entity-window-body > .panel-card,
    .entity-window-body > div:not(.profile-sections-grid) > .panel-card {
      border-left: none !important;
      border-right: none !important;
      border-top: none !important;
      border-bottom: 1.5px solid var(--line) !important;
      border-radius: 0 !important;
      box-shadow: none !important;
      margin: 0 !important;
    }
    .entity-window-body > .panel-card:last-child {
      border-bottom: none !important;
    }
    .entity-window-body > .profile-sections-grid {
      margin: 0 !important;
      padding: 16px 24px;
      background: var(--white);
      border-bottom: 1.5px solid var(--line);
    }
    .entity-fullpage-wrap {
      position: relative;
    }
    /* Tiny corner icon at the end of every entity button/badge to open in Full-Page mode instead of Overlay Window */
    .ext-page-hit {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 15px;
      min-height: 15px;
      max-height: 15px;
      font-size: 9px;
      font-weight: 800;
      line-height: 1;
      padding: 0 3.5px;
      margin-left: 4px;
      border-radius: 3.5px;
      background: rgba(15, 23, 42, 0.06);
      border: 1px solid rgba(15, 23, 42, 0.15);
      color: inherit;
      opacity: 0.72;
      cursor: pointer;
      transition: all 0.13s ease;
      vertical-align: middle;
      box-sizing: border-box;
      flex-shrink: 0;
    }
    .badge .ext-page-hit,
    .entity-unit-pill .ext-page-hit {
      background: rgba(255, 255, 255, 0.65);
      border-color: rgba(15, 23, 42, 0.22);
      padding: 0 3.5px;
      margin-left: 4px;
    }
    .ext-page-hit:hover {
      opacity: 1;
      background: var(--gold-soft) !important;
      border-color: var(--gold) !important;
      color: var(--gold-text) !important;
      transform: scale(1.06);
      box-shadow: 0 1px 4px rgba(180, 83, 9, 0.18);
    }
    .prop-unit-stacked {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
      line-height: 1.2;
    }
    .prop-unit-subline {
      display: flex;
      align-items: center;
      gap: 5px;
      flex-wrap: nowrap !important;
      white-space: nowrap !important;
      font-size: 10.5px;
      color: var(--ink);
      font-weight: 600;
    }
    .tasks-row-line2 {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      flex-wrap: nowrap;
      white-space: nowrap;
    }

    /* ==========================================================================
       2. DASHBOARD HEADER SUMMARY CAPTION & WORKSPACE QUICK FILTER BAR
       ========================================================================== */
    .panel-head-right-stack {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 4px;
    }
    .panel-head-count-sub {
      font-size: 11px;
      color: var(--muted);
      line-height: 1.25;
      text-align: right;
      white-space: nowrap;
    }
    .panel-head-count-sub strong {
      color: var(--ink);
      font-weight: 700;
    }
    .dashboard-card-footer {
      display: none !important;
    }
    .workspace-quick-bar {
      padding: 10px 16px;
      background: var(--paper);
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }
    .workspace-quick-pills {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }
    .quick-pill-btn {
      appearance: none;
      -webkit-appearance: none;
      height: 28px;
      min-height: 28px;
      max-height: 28px;
      padding: 0 10px;
      border-radius: 6px !important;
      border: 1px solid var(--border);
      background: var(--white);
      color: var(--ink2);
      font-family: inherit;
      font-size: 11.5px;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      transition: all 0.12s ease;
      white-space: nowrap;
      box-sizing: border-box;
    }
    .quick-pill-btn:hover {
      border-color: var(--gold);
      color: var(--ink);
      background: var(--gold-soft);
    }
    .quick-pill-btn.active {
      background: var(--gold-soft);
      border-color: var(--gold);
      color: var(--gold-text);
      font-weight: 700;
    }
    .quick-pill-count {
      font-size: 10px;
      padding: 1px 5px;
      border-radius: 4px;
      background: rgba(15, 23, 42, 0.08);
      color: inherit;
      font-variant-numeric: tabular-nums;
    }
    .quick-pill-btn.active .quick-pill-count {
      background: rgba(180, 83, 9, 0.14);
      color: var(--gold-text);
    }

    /* ==========================================================================
       3. UNIVERSAL ENTERPRISE TABLE PAGINATION & PROGRESSIVE LOAD BAR
       ========================================================================== */
    .table-pagination-bar {
      padding: 10px 16px;
      background: var(--paper);
      border-top: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      font-size: 12px;
      color: var(--muted);
    }
    .pagination-left,
    .pagination-center,
    .pagination-right {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .pagination-controls {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      flex-wrap: wrap;
    }
    select,
    .field select,
    .page-size-select,
    .theme-select,
    .toolbar-select,
    .cond-row select {
      appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2357534e' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
      background-repeat: no-repeat !important;
      background-position: right 10px center !important;
      background-size: 12px 12px !important;
      padding-right: 30px !important;
    }
    html[data-theme="dark"] select,
    html[data-theme="dark"] .field select,
    html[data-theme="dark"] .page-size-select,
    html[data-theme="dark"] .theme-select,
    html[data-theme="dark"] .toolbar-select,
    html[data-theme="dark"] .cond-row select {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    }
    .page-size-select {
      height: 28px;
      padding: 0 30px 0 10px !important;
      border-radius: 6px;
      border: 1px solid var(--border);
      background-color: var(--white);
      color: var(--ink);
      font-family: inherit;
      font-size: 11.5px;
      font-weight: 600;
      cursor: pointer;
      transition: border-color 0.14s ease, box-shadow 0.14s ease;
    }
    .page-size-select:hover {
      border-color: var(--gold);
    }

    /* ==========================================================================
       UNIVERSAL BADGE, PILL & BUTTON GEOMETRY STANDARD (100% UNIFORM ACROSS APP)
       - All status badges / task pills / stage pills / due pills / unit pills / table row buttons: 22px height, 5px radius, 1px border
       - All header / toolbar / profile-hero buttons: 28px height, 6px radius
       ========================================================================== */
    .badge,
    button.badge,
    button.row-task-btn,
    .stage-pill,
    .due-alert-pill,
    .entity-unit-pill,
    .doc-pill,
    .log-actor,
    .log-staff-badge {
      display: inline-flex !important;
      align-items: center !important;
      gap: 4px !important;
      height: 22px !important;
      min-height: 22px !important;
      max-height: 22px !important;
      padding: 0 7px !important;
      border-radius: 5px !important;
      font-size: 10.5px !important;
      font-weight: 600 !important;
      line-height: 1 !important;
      white-space: nowrap !important;
      box-sizing: border-box !important;
      vertical-align: middle !important;
    }
    .badge.green, .badge.task-done { background: #ecfdf5; color: #15803d; border: 1px solid #6ee7b7; }
    .badge.amber { background: #fffbeb; color: #b45309; border: 1px solid #fbbf24; }
    .badge.red { background: #fef2f2; color: #b91c1c; border: 1px solid #f87171; }
    .badge.gold { background: var(--gold-soft); color: var(--gold-text); border: 1px solid var(--gold-border); }
    .badge.blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #7dd3fc; }
    .badge.purple { background: #f5f3ff; color: #6d28d9; border: 1px solid #c4b5fd; }
    .badge.stone, .badge.neutral { background: var(--soft); color: var(--ink2); border: 1px solid #cbd5e1; }

    .stage-pill.s1, .stage-pill.s1-approve { background: #f5f3ff; color: #6d28d9; border: 1px solid #c4b5fd; }
    .stage-pill.s2, .stage-pill.s2-assign  { background: #fef2f2; color: #b91c1c; border: 1px solid #f87171; }
    .stage-pill.s3, .stage-pill.s3-exec    { background: #fffbeb; color: #b45309; border: 1px solid #fbbf24; }
    .stage-pill.s4, .stage-pill.s4-verify  { background: #eff6ff; color: #1d4ed8; border: 1px solid #7dd3fc; }
    .stage-pill.s5, .stage-pill.s5-done    { background: #ecfdf5; color: #15803d; border: 1px solid #6ee7b7; }
    .stage-pill.s6, .stage-pill.s-rejected { background: var(--soft); color: var(--ink2); border: 1px solid #cbd5e1; }

    .due-alert-pill.overdue { background: #fecaca; color: #7f1d1d; border: 1px solid #ef4444; font-weight: 700 !important; }
    .due-alert-pill.today { background: #fee2e2; color: #991b1b; border: 1px solid #f87171; font-weight: 700 !important; }
    .due-alert-pill.tomorrow { background: #ffedd5; color: #c2410c; border: 1px solid #fb923c; }
    .due-alert-pill.soon { background: #fef9c3; color: #854d0e; border: 1px solid #facc15; }
    .due-alert-pill.future, .due-alert-pill.upcoming { background: var(--soft); color: var(--ink2); border: 1px solid #cbd5e1; }

    .identity-pill {
      height: 28px !important;
      min-height: 28px !important;
      max-height: 28px !important;
      padding: 0 10px !important;
      border-radius: 6px !important;
      display: inline-flex !important;
      align-items: center !important;
      gap: 6px !important;
      font-size: 12px !important;
      box-sizing: border-box !important;
    }
    .identity-pill .entity-unit-pill {
      background: transparent !important;
      border: 0 !important;
      padding: 0 !important;
      margin: 0 !important;
      height: auto !important;
      min-height: 0 !important;
      font-size: 12px !important;
      color: var(--ink) !important;
      font-weight: 600 !important;
    }
    .identity-pill .entity-unit-pill:hover {
      color: var(--gold-text) !important;
      text-decoration: underline;
    }

    /* Active filter tab buttons in Dashboard headers */
    button[id^="flt-"].btn.primary {
      background: var(--gold-soft) !important;
      color: var(--gold-text) !important;
      border-color: var(--gold) !important;
      font-weight: 700 !important;
    }

    .overview-grid {
      grid-template-columns: minmax(0, 1fr) !important;
      gap: 14px !important;
    }
    thead th {
      padding: 8px 8px !important;
      font-size: 10.5px !important;
      letter-spacing: 0.03em !important;
      white-space: nowrap !important;
    }
    thead th:first-child {
      padding-left: 12px !important;
    }
    thead th:last-child {
      padding-right: 12px !important;
    }
    #data-table thead th {
      padding: 0 !important;
    }
    tbody td,
    #turnovers-table tbody td,
    #data-table tbody td {
      padding: 12px 8px 8px 8px !important;
      font-size: 12.5px !important;
      line-height: 22px !important;
      vertical-align: top !important;
    }
    tbody td:first-child,
    #turnovers-table tbody td:first-child,
    #data-table tbody td:first-child {
      padding-left: 12px !important;
    }
    tbody td:last-child,
    #turnovers-table tbody td:last-child,
    #data-table tbody td:last-child {
      padding-right: 12px !important;
    }
    .cell-stack,
    .prop-unit-stacked,
    .audit-stack,
    .stay-stack,
    .avail-window-cell {
      display: flex !important;
      flex-direction: column !important;
      align-items: flex-start !important;
      gap: 4px !important;
      line-height: 1.2 !important;
    }
    .cell-line,
    .prop-unit-stacked > div,
    .prop-unit-subline,
    .audit-row,
    .stay-row,
    .audit-line,
    .avail-window-cell > div,
    .tasks-row-line2 {
      display: flex !important;
      align-items: center !important;
      gap: 5px;
      min-height: 22px !important;
      height: 22px !important;
      line-height: 1.2 !important;
      margin: 0 !important;
      box-sizing: border-box !important;
      flex-wrap: nowrap !important;
      white-space: nowrap !important;
    }
    .status-dot {
      display: inline-block;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      flex-shrink: 0;
      background: currentColor;
    }
    .status-dot.red { background: var(--red); }
    .status-dot.amber { background: var(--amber); }
    .status-dot.green { background: var(--green); }
    .status-dot.blue { background: var(--blue); }
    .pipe-sep {
      display: inline-block;
      margin: 0 5px;
      opacity: 0.45;
      font-weight: 400;
      user-select: none;
    }
    .cell-line.wrap-line {
      height: auto !important;
      min-height: 22px !important;
      line-height: 1.35 !important;
      flex-wrap: wrap !important;
      white-space: normal !important;
    }
    .cell-line.cell-line-sub {
      height: 16px !important;
      min-height: 16px !important;
      margin-top: -6px !important;
    }
    tbody td .entity-link {
      display: inline-flex !important;
      align-items: center !important;
      white-space: nowrap !important;
      max-width: 175px;
      overflow: hidden;
      text-overflow: ellipsis;
      vertical-align: middle;
    }
    .prop-unit-subline .entity-unit-pill:first-child,
    td > .entity-unit-pill:first-child,
    .cell-line > .entity-unit-pill:first-child {
      margin-left: 0 !important;
    }
    tbody td .pricing-matrix-box {
      min-height: 48px;
    }
    tbody td .btn,
    tbody td .btn.sm,
    tbody td a.btn,
    tbody td button.row-task-btn {
      height: 22px !important;
      min-height: 22px !important;
      max-height: 22px !important;
      padding: 0 7px !important;
      font-size: 10.5px !important;
      font-weight: 600 !important;
      line-height: 1 !important;
      border-radius: 5px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 4px !important;
      box-sizing: border-box !important;
      white-space: nowrap !important;
      vertical-align: middle !important;
    }
    tbody td .btn-icon,
    tbody td .btn.sm.btn-icon {
      width: 22px !important;
      min-width: 22px !important;
      max-width: 22px !important;
      height: 22px !important;
      min-height: 22px !important;
      max-height: 22px !important;
      padding: 0 !important;
      font-size: 11px !important;
      border-radius: 5px !important;
      flex-shrink: 0 !important;
    }
    .page-btn {
      appearance: none;
      -webkit-appearance: none;
      min-width: 28px;
      height: 28px;
      padding: 0 8px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--white);
      color: var(--ink);
      font-family: inherit;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: all 0.12s ease;
      font-variant-numeric: tabular-nums;
    }
    .page-btn:hover:not(:disabled) {
      border-color: var(--gold);
      background: var(--gold-soft);
      color: var(--gold-text);
    }
    .page-btn.active {
      background: var(--gold-soft);
      border-color: var(--gold);
      color: var(--gold-text);
      font-weight: 700;
    }
    .page-btn:disabled {
      opacity: 0.42;
      cursor: not-allowed;
    }
    .btn-load-more-rows {
      height: 30px;
      padding: 0 12px;
      border-radius: 7px;
      border: 1px solid var(--gold-border);
      background: var(--gold-soft);
      color: var(--gold-text);
      font-family: inherit;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      transition: all 0.12s ease;
    }
    .btn-load-more-rows:hover {
      background: #ece0c8;
      border-color: var(--gold);
      color: var(--gold-text);
    }
    /* =========================================================================
       6-COLUMN UNIFIED PRICING BOX, PROPERTY FINANCIAL MATRIX & VACANCY WINDOW
       ========================================================================= */
    .pricing-matrix-box {
      display: grid;
      grid-template-columns: repeat(6, minmax(44px, 1fr));
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--white);
      overflow: hidden;
      min-width: 270px;
      box-shadow: 0 1px 2px rgba(24, 24, 27, 0.03);
      font-variant-numeric: tabular-nums;
    }
    .pricing-matrix-box.fin-matrix-4 {
      grid-template-columns: repeat(4, minmax(62px, 1fr));
      min-width: 260px;
    }
    .pricing-matrix-box.fin-matrix-5 {
      grid-template-columns: repeat(5, minmax(60px, 1fr));
      min-width: 310px;
    }
    .pm-cell {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 4px 5px;
      border-right: 1px solid var(--line);
      text-align: center;
      line-height: 1.2;
      min-width: 0;
    }
    .pm-cell:last-child {
      border-right: none;
    }
    .pm-lbl {
      font-size: 8.5px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--muted);
      font-weight: 600;
      margin-bottom: 2px;
      white-space: nowrap;
    }
    .pm-val {
      font-size: 11px;
      color: var(--ink-soft);
      font-weight: 500;
      white-space: nowrap;
    }
    .pm-cell.pm-sub {
      background: #fafafa;
    }
    .pm-cell.pm-bold {
      background: var(--white);
    }
    .pm-cell.pm-bold .pm-lbl {
      color: var(--ink-soft);
      font-weight: 800;
    }
    .pm-cell.pm-bold .pm-val {
      color: var(--ink);
      font-weight: 800;
      font-size: 12px;
    }
    .pm-cell.pm-primary {
      background: var(--gold-soft);
    }
    .pm-cell.pm-primary .pm-lbl {
      color: var(--gold-text);
      font-weight: 800;
    }
    .pm-cell.pm-primary .pm-val {
      color: var(--gold-text);
      font-weight: 900;
      font-size: 12.5px;
    }

    .avail-window-cell {
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 135px;
    }
    .avail-window-top {
      display: flex;
      align-items: center;
      gap: 5px;
      flex-wrap: nowrap;
    }
    .avail-window-dates {
      font-size: 10.5px;
      color: var(--ink);
      font-weight: 600;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }

    /* =========================================================================
       FIRST & LAST MONTH [ MONTHS * RATE = TOTAL ] FORMULA ROW
       ========================================================================= */
    .fl-formula-row {
      display: grid;
      grid-template-columns: 58px 14px minmax(92px, 1fr) 14px minmax(105px, 1.15fr);
      align-items: center;
      gap: 4px;
      background: var(--paper);
      padding: 4px 6px;
      border: 1px solid var(--border);
      border-radius: 8px;
    }
    .fl-op {
      text-align: center;
      font-weight: 800;
      font-size: 13px;
      color: var(--muted);
      user-select: none;
    }
    .fl-inp {
      width: 100% !important;
      height: 30px !important;
      padding: 4px 7px !important;
      font-size: 12px !important;
      border-radius: 6px !important;
      font-variant-numeric: tabular-nums;
    }
    .fl-inp-months {
      text-align: center;
      font-weight: 700;
    }
    .fl-inp-rate::placeholder {
      color: #a1a1aa;
      opacity: 0.78;
      font-style: italic;
      font-weight: 500;
    }
    .fl-inp-total {
      font-weight: 800;
      background: var(--white) !important;
      border-color: var(--gold-border) !important;
      color: var(--ink) !important;
    }
    .fl-inp-total::placeholder {
      color: #a1a1aa;
      font-weight: 500;
      font-size: 11px;
    }

    /* =========================================================================
       PUBLIC SHAREABLE PROPERTY / UNIT CLIENT SHOWCASE OVERLAY
       ========================================================================= */
    .showcase-overlay {
      position: fixed;
      inset: 0;
      z-index: 9999;
      background: rgba(15, 23, 42, 0.72);
      backdrop-filter: blur(6px);
      display: flex;
      align-items: flex-start;
      justify-content: center;
      overflow-y: auto;
      padding: 20px 14px;
    }
    .showcase-shell {
      width: 100%;
      max-width: 1160px;
      background: var(--white);
      border-radius: 16px;
      border: 1px solid var(--border);
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
      overflow: hidden;
      margin: auto;
    }
    .showcase-topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px 22px;
      background: linear-gradient(135deg, #18181b 0%, #27272a 100%);
      color: #ffffff;
      flex-wrap: wrap;
    }
    .showcase-brand {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .showcase-brand-badge {
      width: 34px;
      height: 34px;
      border-radius: 9px;
      background: var(--gold);
      color: #fff;
      font-weight: 900;
      font-size: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .showcase-body {
      padding: 22px;
      display: flex;
      flex-direction: column;
      gap: 20px;
    }
    .showcase-hero-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
      border-bottom: 1px solid var(--line);
      padding-bottom: 16px;
    }
    .showcase-title {
      font-size: 24px;
      font-weight: 800;
      color: var(--ink);
      margin: 4px 0 6px;
      letter-spacing: -0.02em;
    }
    .showcase-meta-pills {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .showcase-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
      gap: 20px;
      align-items: start;
    }
    .showcase-main-stage {
      width: 100%;
      aspect-ratio: 16 / 10;
      background: #0f172a;
      border-radius: 12px;
      overflow: hidden;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--border);
    }
    .showcase-main-stage img,
    .showcase-main-stage iframe {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border: none;
    }
    .showcase-thumbs {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      padding: 8px 2px 4px;
    }
    .showcase-thumb {
      width: 86px;
      height: 60px;
      border-radius: 8px;
      overflow: hidden;
      border: 2px solid transparent;
      cursor: pointer;
      flex-shrink: 0;
      position: relative;
      background: #18181b;
      opacity: 0.78;
      transition: all 0.14s ease;
    }
    .showcase-thumb:hover,
    .showcase-thumb.active {
      opacity: 1;
      border-color: var(--gold);
      transform: translateY(-1px);
    }
    .showcase-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .showcase-unit-tabs {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }
    .showcase-unit-tab {
      padding: 8px 13px;
      border-radius: 9px;
      border: 1px solid var(--border);
      background: var(--paper);
      color: var(--ink);
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: all 0.14s ease;
    }
    .showcase-unit-tab.active {
      background: var(--gold-soft);
      color: var(--gold-text);
      border-color: var(--gold);
    }
    .showcase-contact-card {
      background: var(--paper);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .showcase-whatsapp-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 11px 14px;
      border-radius: 9px;
      background: #ecfdf5;
      color: #15803d !important;
      border: 1px solid #86efac;
      font-weight: 800;
      font-size: 13px;
      text-decoration: none;
      transition: all 0.14s ease;
    }
    .showcase-whatsapp-btn:hover {
      background: #dcfce7;
      border-color: #4ade80;
    }
    .showcase-call-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 11px 14px;
      border-radius: 9px;
      background: var(--gold-soft);
      color: var(--gold-text) !important;
      border: 1px solid var(--gold-border);
      font-weight: 800;
      font-size: 13px;
      text-decoration: none;
      transition: all 0.14s ease;
    }
    .showcase-call-btn:hover {
      border-color: var(--gold);
      filter: brightness(0.97);
    }
    @media (max-width: 900px) {
      .showcase-grid {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    /* PDI Living Standard Checklist & Gateway Status Strip */
    .pdi-checklist-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .pdi-pillar-row {
      border: 1px solid var(--line);
      border-radius: 9px;
      background: var(--white);
      padding: 10px 12px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      transition: border-color 0.14s ease, background 0.14s ease;
    }
    .pdi-pillar-row.is-issue {
      border-color: var(--gold-border);
      background: var(--gold-soft);
    }
    .pdi-pillar-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    .pdi-pillar-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--ink);
    }
    .pdi-seg-group {
      display: inline-flex;
      flex-wrap: wrap;
      gap: 4px;
      background: var(--paper);
      padding: 3px;
      border-radius: 8px;
      border: 1px solid var(--line);
    }
    .pdi-seg-btn {
      appearance: none;
      border: 1px solid transparent;
      background: transparent;
      color: var(--muted);
      font-size: 11.5px;
      font-weight: 700;
      padding: 5px 10px;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.12s ease;
    }
    .pdi-seg-btn:hover {
      color: var(--ink);
      background: var(--white);
    }
    .pdi-seg-btn.active-PASS {
      background: #ecfdf5;
      color: #15803d;
      border-color: #86efac;
    }
    .pdi-seg-btn.active-REPAIR {
      background: #fef2f2;
      color: #b91c1c;
      border-color: #fca5a5;
    }
    .pdi-seg-btn.active-CLEANING {
      background: #eff6ff;
      color: #1d4ed8;
      border-color: #93c5fd;
    }
    .pdi-seg-btn.active-CHANGE {
      background: #faf5ff;
      color: #6d28d9;
      border-color: #d8b4fe;
    }
    .pdi-issue-detail-grid {
      display: grid;
      grid-template-columns: 190px minmax(0, 1fr);
      gap: 8px;
      align-items: center;
      padding-top: 4px;
      border-top: 1px dashed var(--line);
    }
    @media (max-width: 680px) {
      .pdi-issue-detail-grid {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    /* Kashaneh.com Architectural Luxury Sign-In Gate & Resident Payment Modal */
    body.auth-locked {
      background: radial-gradient(circle at 50% 0%, #fcfbf7 0%, #efebe0 100%) !important;
      overflow: hidden !important;
    }
    body.auth-locked > .header,
    body.auth-locked > .sticky-nav-shell,
    body.auth-locked > main,
    body.auth-locked > #app-footer {
      visibility: hidden !important;
      opacity: 0 !important;
      pointer-events: none !important;
    }
    /* Hard CSS Gate Isolation: Staff shell, navigation, KPIs, and tables can NEVER render on /tenant or /owner */
    html[data-portal-gate="tenant"] #header-nav-row,
    html[data-portal-gate="owner"] #header-nav-row,
    html[data-portal-gate="tenant"] #main-nav-tabs,
    html[data-portal-gate="owner"] #main-nav-tabs,
    html[data-portal-gate="tenant"] #staff-quick-actions,
    html[data-portal-gate="owner"] #staff-quick-actions,
    html[data-portal-gate="tenant"] #top-kpi-strip,
    html[data-portal-gate="owner"] #top-kpi-strip,
    html[data-portal-gate="tenant"] #ws-overview,
    html[data-portal-gate="owner"] #ws-overview,
    html[data-portal-gate="tenant"] #ws-report-detail,
    html[data-portal-gate="owner"] #ws-report-detail,
    html[data-portal-gate="tenant"] #main-sheet-card,
    html[data-portal-gate="owner"] #main-sheet-card,
    html[data-portal-gate="tenant"] #section-log-card,
    html[data-portal-gate="owner"] #section-log-card,
    html[data-portal-gate="tenant"] #staff-rows-menu-section,
    html[data-portal-gate="owner"] #staff-rows-menu-section,
    html[data-portal-gate="tenant"] #dataset-mode-section,
    html[data-portal-gate="owner"] #dataset-mode-section,
    html[data-portal-gate="tenant"] #dataset-mode-divider,
    html[data-portal-gate="owner"] #dataset-mode-divider,
    html[data-portal-gate="tenant"] #staff-tools-menu-section,
    html[data-portal-gate="owner"] #staff-tools-menu-section,
    html[data-portal-gate="tenant"] #staff-tools-menu-divider,
    html[data-portal-gate="owner"] #staff-tools-menu-divider,
    html[data-portal-gate="tenant"] #header-brand-sub,
    html[data-portal-gate="owner"] #header-brand-sub {
      display: none !important;
    }
    body.auth-locked #modal-auth::backdrop {
      background: radial-gradient(circle at 50% 0%, #fcfbf7 0%, #efebe0 100%) !important;
      backdrop-filter: none !important;
    }
    #modal-auth-close-btn[hidden],
    body.auth-locked #modal-auth-close-btn {
      display: none !important;
    }
    #modal-auth {
      width: min(448px, calc(100vw - 32px)) !important;
      padding: 0 !important;
      border-radius: 26px !important;
      border: 1px solid #ded7c8 !important;
      box-shadow: 0 26px 64px rgba(41, 41, 41, 0.11), 0 2px 10px rgba(41, 41, 41, 0.04) !important;
      background: #fafaf6 !important;
      color: #292929 !important;
      overflow: hidden;
    }
    .kashaneh-auth-card-inner {
      padding: 36px !important;
      position: relative;
      display: flex;
      flex-direction: column;
      gap: 22px;
    }
    @media (max-width: 480px) {
      .kashaneh-auth-card-inner {
        padding: 28px 22px !important;
        gap: 18px;
      }
    }
    .kashaneh-auth-brand {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 10px;
      padding: 0;
      margin: 0;
    }
    .kashaneh-arch-mark {
      --mark-height: 56px;
      display: block;
      position: relative;
      height: var(--mark-height);
      width: calc(var(--mark-height) * 412 / 464);
      overflow: visible;
      flex: 0 0 auto;
    }
    .kashaneh-arch-mark img {
      display: block;
      position: absolute;
      width: calc(100% * 512 / 412);
      max-width: none;
      height: auto;
      left: calc(-100% * 50 / 412);
      top: calc(-100% * 44 / 464);
      border-radius: 0 !important;
      box-shadow: none !important;
      object-fit: contain;
    }
    .kashaneh-auth-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      font-size: 10.5px;
      font-weight: 600;
      letter-spacing: 0.13em;
      text-transform: uppercase;
      color: #927643;
      margin-top: 2px;
    }
    .kashaneh-auth-eyebrow::before,
    .kashaneh-auth-eyebrow::after {
      content: '';
      width: 22px;
      height: 1px;
      background: #d7c9ab;
    }
    .kashaneh-auth-title {
      margin: 0;
      font-size: 27px;
      font-weight: 500;
      line-height: 1.12;
      letter-spacing: -0.035em;
      color: #292929;
    }
    .kashaneh-auth-title em {
      font-family: 'Google Sans', 'Roboto', sans-serif;
      font-weight: 500;
      font-style: italic;
      color: #927643;
    }
    .kashaneh-auth-sub {
      margin: 0;
      font-size: 13.5px;
      line-height: 1.55;
      color: #605d58;
      max-width: 340px;
    }
    .kashaneh-auth-form-stack {
      display: flex;
      flex-direction: column;
      gap: 14px;
      margin: 0;
    }
    .kashaneh-smart-input-shell {
      display: flex;
      align-items: center;
      width: 100%;
      height: 52px;
      border-radius: 14px;
      border: 1.5px solid #dcd6c8;
      background: #ffffff;
      overflow: hidden;
      transition: border-color 0.16s ease, box-shadow 0.16s ease;
    }
    .kashaneh-smart-input-shell:focus-within {
      border-color: #b69b60;
      box-shadow: 0 0 0 3.5px rgba(182, 155, 96, 0.16);
    }
    .kashaneh-phone-prefix {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      height: 100%;
      padding: 0 13px;
      background: #f4f1ea;
      border-right: 1px solid #e6e0d2;
      font-size: 14px;
      font-weight: 600;
      color: #44403c;
      user-select: none;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .kashaneh-smart-input-shell .kashaneh-auth-input {
      flex: 1;
      min-width: 0;
      height: 100% !important;
      border: none !important;
      border-radius: 0 !important;
      background: transparent !important;
      padding: 0 15px !important;
      font-size: 16px !important;
      font-weight: 500 !important;
      letter-spacing: 0.01em;
      color: #292929 !important;
      box-shadow: none !important;
      outline: none !important;
    }
    .kashaneh-auth-input {
      width: 100%;
      height: 50px !important;
      padding: 0 15px !important;
      border-radius: 14px !important;
      border: 1.5px solid #dcd6c8 !important;
      background: #ffffff !important;
      font-size: 15.5px !important;
      font-weight: 500 !important;
      color: #292929 !important;
      transition: border-color 0.16s ease, box-shadow 0.16s ease;
    }
    .kashaneh-auth-input:focus {
      outline: none !important;
      background: #ffffff !important;
      border-color: #b69b60 !important;
      box-shadow: 0 0 0 3.5px rgba(182, 155, 96, 0.16) !important;
    }
    .kashaneh-otp-grid {
      display: grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 8px;
      direction: ltr;
      width: 100%;
    }
    .kashaneh-otp-cell {
      width: 100%;
      height: 56px !important;
      padding: 0 !important;
      border-radius: 13px !important;
      border: 1.5px solid #dcd6c8 !important;
      background: #ffffff !important;
      text-align: center !important;
      font-size: 22px !important;
      font-weight: 650 !important;
      font-variant-numeric: tabular-nums;
      color: #292929 !important;
      caret-color: #927643;
      transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease, background 0.15s ease;
    }
    .kashaneh-otp-cell.is-filled {
      border-color: #b69b60 !important;
      background: #fdfcf8 !important;
    }
    .kashaneh-otp-cell:focus {
      outline: none !important;
      border-color: #292929 !important;
      background: #ffffff !important;
      box-shadow: 0 0 0 3.5px rgba(182, 155, 96, 0.22) !important;
      transform: translateY(-1px);
    }
    .kashaneh-auth-cta {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 8px !important;
      width: 100%;
      height: 50px !important;
      min-height: 50px !important;
      max-height: 50px !important;
      padding: 0 24px !important;
      border-radius: 14px !important;
      background: #292929 !important;
      color: #ffffff !important;
      border: 1px solid #292929 !important;
      font-size: 15px !important;
      font-weight: 560 !important;
      letter-spacing: -0.005em;
      box-shadow: 0 6px 18px rgba(41, 41, 41, 0.13) !important;
      cursor: pointer;
      transition: background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease, opacity 0.15s ease;
    }
    .kashaneh-auth-cta:hover:not(:disabled) {
      background: #3a3733 !important;
      border-color: #3a3733 !important;
      box-shadow: 0 8px 22px rgba(41, 41, 41, 0.18) !important;
      transform: translateY(-1px);
    }
    .kashaneh-auth-cta:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }
    .kashaneh-cta-arrow {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: transparent;
      color: rgba(255, 255, 255, 0.88);
      font-size: 16px;
      font-weight: 500;
      line-height: 1;
      flex-shrink: 0;
      transition: transform 0.18s ease;
    }
    .kashaneh-auth-cta:hover:not(:disabled) .kashaneh-cta-arrow {
      transform: translateX(3px);
    }
    .kashaneh-auth-chip {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      border-radius: 12px;
      background: #f3f0e8;
      border: 1px solid #e2dccf;
      font-size: 13px;
      color: #292929;
    }
    .kashaneh-auth-mode-switch-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      width: 100%;
      height: 44px;
      margin-top: 2px;
      padding: 0 18px;
      border-radius: 999px;
      background: #faf8f4;
      border: 1px solid #e2dccf;
      color: #44403c;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: -0.005em;
      cursor: pointer;
      transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    }
    .kashaneh-auth-mode-switch-btn:hover {
      background: #f2ede3;
      border-color: #c8b896;
      color: #292929;
    }
    .kashaneh-auth-ghost-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 42px;
      border-radius: 999px;
      background: transparent;
      border: 1px solid #dcd6c8;
      color: #57534e;
      font-size: 13px;
      font-weight: 550;
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    }
    .kashaneh-auth-ghost-btn:hover:not(:disabled) {
      background: #f3f0e8;
      color: #292929;
      border-color: #cbbba0;
    }
    .kashaneh-auth-ghost-btn:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }

    /* Dedicated Resident Rent Payment Modal (#modal-tenant-pay) */
    #modal-tenant-pay {
      width: min(520px, calc(100vw - 28px)) !important;
      padding: 0 !important;
      border-radius: 22px !important;
      border: 1px solid #ded7c8 !important;
      background: #fafaf6 !important;
      color: #292929 !important;
      box-shadow: 0 26px 64px rgba(41, 41, 41, 0.16) !important;
      overflow: hidden;
    }
    .tp-modal-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      padding: 22px 24px 16px;
      border-bottom: 1px solid #e7e2d6;
      background: #ffffff;
    }
    .tp-modal-body {
      padding: 20px 24px 24px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }
    .tp-lease-summary-card {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      padding: 13px 15px;
      border-radius: 14px;
      background: #f3f0e8;
      border: 1px solid #e2dccf;
    }
    @media (max-width: 500px) {
      .tp-lease-summary-card {
        grid-template-columns: 1fr;
      }
    }
    .tp-sum-item small {
      display: block;
      font-size: 10.5px;
      font-weight: 600;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: #78716c;
      margin-bottom: 3px;
    }
    .tp-sum-item strong {
      font-size: 13.5px;
      font-weight: 650;
      color: #292929;
    }
    .tp-mode-tabs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
      padding: 5px;
      border-radius: 14px;
      background: #ebe6db;
      border: 1px solid #ded7c8;
    }
    .tp-mode-tab {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      height: 42px;
      border-radius: 10px;
      border: none;
      background: transparent;
      font-size: 13.5px;
      font-weight: 600;
      color: #605d58;
      cursor: pointer;
      transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
    }
    .tp-mode-tab.active {
      background: #ffffff;
      color: #292929;
      box-shadow: 0 2px 8px rgba(41, 41, 41, 0.08);
    }
    .tp-dropzone {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 5px;
      padding: 16px 14px;
      border-radius: 14px;
      border: 1.5px dashed #c8b99b;
      background: #ffffff;
      text-align: center;
      cursor: pointer;
      transition: border-color 0.16s ease, background 0.16s ease;
    }
    .tp-dropzone:hover {
      border-color: #927643;
      background: #fdfcf8;
    }
    .tp-dropzone.has-file {
      border-style: solid;
      border-color: #166534;
      background: #f0fdf4;
    }

    /* ==========================================================================
       TEHRANTO.PLUS-STYLE SLIDING LANGUAGE TOGGLE (En | فا) & SINGLE-LOCALE MODE
       ========================================================================== */
    .lang-fa { display: none !important; }
    body.fa .lang-en { display: none !important; }
    body.fa .lang-fa { display: inline !important; }
    body.fa .lang-fa.block { display: block !important; }
    body.fa .lang-fa.flex { display: inline-flex !important; }

    .lang-toggle {
      position: relative;
      display: inline-flex;
      align-items: center;
      width: 68px;
      height: 30px;
      border: 1px solid var(--border, #d0ccc2);
      border-radius: 999px;
      background: var(--paper, #f8f7f3);
      padding: 2px;
      cursor: pointer;
      direction: ltr;
      flex-shrink: 0;
      transition: border-color 0.25s ease, box-shadow 0.2s ease;
    }
    .lang-toggle::before {
      content: '';
      position: absolute;
      top: 2px;
      left: 2px;
      width: calc(50% - 2px);
      height: calc(100% - 4px);
      border-radius: 999px;
      background: #292929;
      box-shadow: 0 2px 6px rgba(24, 24, 27, 0.22);
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    body.fa .lang-toggle::before {
      transform: translateX(100%);
    }
    .lang-toggle span {
      position: relative;
      z-index: 1;
      flex: 1;
      text-align: center;
      font-family: 'Google Sans', 'Roboto', sans-serif;
      font-size: 0.68rem;
      line-height: 1;
      color: #292929;
      user-select: none;
      transition: color 0.3s ease, font-weight 0.3s ease;
    }
    .lang-toggle .seg-fa {
      font-family: 'Shabnam', sans-serif !important;
      letter-spacing: 0;
      font-size: 0.72rem;
      font-weight: 400;
    }
    .lang-toggle .seg-en {
      font-family: 'Google Sans', 'Roboto', sans-serif !important;
      color: #ffffff;
      font-weight: 600;
    }
    body.fa .lang-toggle .seg-en {
      font-family: 'Google Sans', 'Roboto', sans-serif !important;
      color: #57534e;
      font-weight: 400;
    }
    body.fa .lang-toggle .seg-fa {
      font-family: 'Shabnam', sans-serif !important;
      color: #ffffff;
      font-weight: 600;
    }
    .lang-toggle:hover {
      border-color: var(--gold, #b69b60);
    }
    .lang-toggle:focus-visible {
      outline: 2px solid var(--gold, #b69b60);
      outline-offset: 2px;
    }

    /* Global Farsi Typography Parity with Tehranto.Plus */
    body.fa,
    body.fa h1,
    body.fa h2,
    body.fa h3,
    body.fa h4,
    body.fa p,
    body.fa span,
    body.fa li,
    body.fa a,
    body.fa button,
    body.fa input,
    body.fa select,
    body.fa textarea,
    body.fa label,
    body.fa small,
    body.fa div,
    body.fa #global-info-tooltip {
      font-family: 'Shabnam', sans-serif !important;
      letter-spacing: 0;
    }
    body.fa h1,
    body.fa h2,
    body.fa h3 {
      font-weight: 600 !important;
    }
    body.fa h1 em,
    body.fa h2 em,
    body.fa h3 em {
      font-style: normal;
      font-weight: 700;
    }
    body.fa .brand-name,
    body.fa .brand-wordmark,
    body.fa .brand-sub,
    body.fa .brand-sub span,
    body.fa .lang-toggle .seg-en,
    body.fa .ltr-token {
      font-family: 'Google Sans', 'Roboto', sans-serif !important;
    }
    .ltr-token {
      direction: ltr !important;
      unicode-bidi: isolate !important;
      display: inline-block;
    }
    html:not([dir="rtl"]) #modal-tenant-pay .tp-modal-head,
    html:not([dir="rtl"]) #modal-tenant-pay .tp-modal-body,
    html:not([dir="rtl"]) #modal-tenant-pay .tp-sum-item {
      direction: ltr;
      text-align: left !important;
    }
    body.fa #modal-tenant-pay .tp-modal-head,
    body.fa #modal-tenant-pay .tp-modal-body,
    body.fa #modal-tenant-pay .tp-sum-item {
      direction: rtl;
      text-align: right !important;
    }
    body.fa #modal-tenant-pay .tp-sum-item small {
      letter-spacing: 0 !important;
      text-transform: none !important;
      font-size: 11.5px;
    }
    body.fa .kashaneh-cta-arrow {
      display: inline-block;
      transform: scaleX(-1);
    }

    /* Portal-Scoped Center Header Navigation, Resident Header Utilities & Staff Quick-Create Menu */
    html[data-portal-gate="tenant"] #main-nav-tabs,
    html[data-portal-gate="owner"] #main-nav-tabs,
    html[data-portal-gate="tenant"] #staff-create-wrap,
    html[data-portal-gate="owner"] #staff-create-wrap {
      display: none !important;
    }
    html[data-portal-gate="staff"] #tenant-nav-tabs,
    html[data-portal-gate="owner"] #tenant-nav-tabs,
    html[data-portal-gate="staff"] #tenant-header-actions,
    html[data-portal-gate="owner"] #tenant-header-actions,
    html[data-portal-gate="staff"] #tp-header-unit-wrap,
    html[data-portal-gate="owner"] #tp-header-unit-wrap {
      display: none !important;
    }
    html[data-portal-gate="staff"] #owner-nav-tabs,
    html[data-portal-gate="tenant"] #owner-nav-tabs {
      display: none !important;
    }
    .header-brand-cluster {
      display: flex;
      align-items: center;
      gap: 11px;
      flex-shrink: 0;
      min-width: 0;
    }
    .tp-header-unit-wrap {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }
    .tp-header-divider {
      width: 1px;
      height: 20px;
      background: #e2dcd0;
      flex-shrink: 0;
    }
    .tp-header-unit-pill {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      height: 32px;
      max-width: 240px;
      padding: 0 12px;
      border-radius: 999px;
      background: #faf8f3;
      border: 1px solid #e2dbcc;
      color: #3a3630;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: border-color 0.15s ease, background 0.15s ease;
    }
    .tp-header-unit-pill:hover {
      background: #f3eee3;
      border-color: #c8b07d;
    }
    .tp-live-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #16a34a;
      box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
      flex-shrink: 0;
    }
    @media (max-width: 1340px) {
      .tp-header-unit-wrap {
        display: none !important;
      }
    }
    .header-center-nav .nav-tabs {
      background: #f2efe7;
      padding: 3px;
      border-radius: 999px;
      border: 1px solid #e2dbcd;
      gap: 3px;
      min-height: 38px;
    }
    .header-center-nav .nav-tab {
      height: 30px;
      border-radius: 999px;
      padding: 0 13px;
      font-size: 12.5px;
      font-weight: 600;
      color: #5c574f;
      white-space: nowrap;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
    }
    .header-center-nav .nav-tab:hover {
      color: #18181b;
    }
    .header-center-nav .nav-tab.active {
      background: #ffffff;
      color: #18181b;
      font-weight: 650;
      box-shadow: 0 1px 4px rgba(24, 24, 27, 0.09);
    }
    .tenant-header-actions {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      flex-shrink: 0;
    }
    .tp-hdr-ghost-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      height: 32px;
      padding: 0 12px;
      border-radius: 999px;
      background: #faf8f3;
      border: 1px solid #dfd7c6;
      color: #3a3630;
      font-size: 12px;
      font-weight: 600;
      text-decoration: none;
      white-space: nowrap;
      cursor: pointer;
      transition: background 0.15s ease, border-color 0.15s ease;
    }
    .tp-hdr-ghost-pill:hover {
      background: #f3eee2;
      border-color: #c8b07d;
    }
    @media (max-width: 860px) {
      .tp-hdr-ghost-pill {
        display: none !important;
      }
    }
    .staff-create-wrap,
    .tp-quick-wrap {
      position: relative;
      flex-shrink: 0;
    }
    .staff-create-trigger,
    .tp-quick-trigger {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      height: 32px;
      padding: 0 13px;
      border-radius: 999px;
      background: #232220;
      color: #ffffff;
      border: 1px solid #232220;
      font-size: 12px;
      font-weight: 600;
      white-space: nowrap;
      cursor: pointer;
      transition: background 0.15s ease, transform 0.12s ease;
    }
    .staff-create-trigger:hover,
    .tp-quick-trigger:hover { background: #3b3833; }
    .staff-create-dropdown,
    .tp-quick-dropdown {
      display: none;
      position: absolute;
      top: calc(100% + 7px);
      inset-inline-end: 0;
      min-width: 235px;
      padding: 6px;
      border-radius: 14px;
      background: var(--white);
      border: 1px solid var(--border);
      box-shadow: var(--shadow-pop);
      z-index: 90;
      flex-direction: column;
      gap: 2px;
    }
    .staff-create-dropdown.open,
    .tp-quick-dropdown.open { display: flex; }
    .staff-create-item {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      padding: 8px 11px;
      border-radius: 8px;
      border: 0;
      background: transparent;
      font-size: 12.5px;
      font-weight: 550;
      color: var(--ink);
      text-align: start;
      text-decoration: none;
      cursor: pointer;
      transition: background 0.12s ease;
    }
    .staff-create-item:hover { background: var(--soft); }

    /* Spinner-Free Currency Input Shell */
    input[type="number"].no-spin::-webkit-outer-spin-button,
    input[type="number"].no-spin::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }
    input[type="number"].no-spin {
      -moz-appearance: textfield;
      appearance: textfield;
    }
    .tp-currency-shell {
      display: flex;
      align-items: center;
      direction: ltr !important;
      height: 48px;
      border-radius: 13px;
      border: 1.5px solid #d9d2c3;
      background: #ffffff;
      overflow: hidden;
      transition: border-color 0.16s ease, box-shadow 0.16s ease;
    }
    .tp-currency-shell:focus-within {
      border-color: #b69b60;
      box-shadow: 0 0 0 3px rgba(182, 155, 96, 0.16);
    }
    .tp-currency-prefix {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 100%;
      padding: 0 14px;
      background: #f4f1ea;
      border-right: 1px solid #e6e0d2;
      font-family: 'Google Sans', 'Roboto', sans-serif !important;
      font-size: 13px;
      font-weight: 700;
      color: #57534e;
      letter-spacing: 0.04em;
      user-select: none;
    }
    .tp-currency-shell input {
      flex: 1;
      min-width: 0;
      height: 100% !important;
      border: 0 !important;
      outline: none !important;
      background: transparent !important;
      padding: 0 14px !important;
      font-family: 'Google Sans', 'Roboto', sans-serif !important;
      font-size: 16px !important;
      font-weight: 600 !important;
      color: #1c1917 !important;
      text-align: left !important;
    }

    /* Architectural Modals for Resident Request & Staff-to-Resident Message */
    #modal-tenant-request,
    #modal-staff-resident-msg {
      width: min(560px, calc(100vw - 28px)) !important;
      padding: 0 !important;
      border-radius: 22px !important;
      border: 1px solid #ded7c8 !important;
      background: #fafaf6 !important;
      color: #292929 !important;
      box-shadow: 0 26px 64px rgba(41, 41, 41, 0.16) !important;
      overflow: hidden;
    }
    html:not([dir="rtl"]) #modal-tenant-request .tp-modal-head,
    html:not([dir="rtl"]) #modal-tenant-request .tp-modal-body {
      direction: ltr;
      text-align: left !important;
    }
    body.fa #modal-tenant-request .tp-modal-head,
    body.fa #modal-tenant-request .tp-modal-body {
      direction: rtl;
      text-align: right !important;
    }

    /* Categorized Ticket Modal Controls & Payment Method Pills */
    .trq-cat-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    @media (max-width: 500px) {
      .trq-cat-grid { grid-template-columns: 1fr; }
    }
    .trq-cat-btn {
      display: flex;
      align-items: center;
      gap: 9px;
      min-height: 44px;
      padding: 8px 12px;
      border-radius: 12px;
      border: 1.5px solid #e2dbcc;
      background: #ffffff;
      color: #292524;
      font-size: 12.5px;
      font-weight: 600;
      text-align: start;
      cursor: pointer;
      transition: all 0.14s ease;
    }
    .trq-cat-btn:hover {
      border-color: #c8b07d;
      background: #fdfbf6;
    }
    .trq-cat-btn.active {
      border-color: #232220;
      background: #f5f1e7;
      color: #18181b;
      box-shadow: 0 2px 8px rgba(24, 24, 27, 0.06);
    }
    .trq-cat-btn.span-2 {
      grid-column: 1 / -1;
    }
    .trq-urg-grid,
    .tp-method-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
      padding: 4px;
      border-radius: 12px;
      background: #efeae0;
      border: 1px solid #dfd8c9;
    }
    .trq-urg-btn,
    .tp-method-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      height: 36px;
      padding: 0 8px;
      border-radius: 9px;
      border: 0;
      background: transparent;
      color: #5c574f;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.14s ease;
    }
    .trq-urg-btn.active,
    .tp-method-btn.active {
      background: #ffffff;
      color: #18181b;
      font-weight: 650;
      box-shadow: 0 1px 4px rgba(24, 24, 27, 0.09);
    }
    .trq-urg-btn[data-urg="Urgent"].active {
      background: #fef2f2;
      color: #991b1b;
      box-shadow: inset 0 0 0 1px #fca5a5;
    }

    /* Executive 4-Tab Resident Portal Layout */
    .tp-portal-shell {
      max-width: 1100px;
      margin: 0 auto;
      padding: 6px 0 30px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }
    .tp-hero-bar {
      background: var(--white);
      border: 1px solid #e6e0d3;
      border-radius: 16px;
      padding: 15px 20px;
      box-shadow: 0 4px 16px rgba(28, 25, 23, 0.025);
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 14px;
      flex-wrap: wrap;
    }
    .tp-hero-facts {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .tp-fact-chip {
      display: inline-flex;
      flex-direction: column;
      gap: 2px;
      padding: 6px 12px;
      border-radius: 10px;
      background: #faf8f4;
      border: 1px solid #ebe5d8;
      min-width: 108px;
    }
    .tp-fact-chip small {
      font-size: 10.5px;
      font-weight: 600;
      color: #78716c;
      line-height: 1.2;
    }
    .tp-fact-chip strong {
      font-size: 13px;
      font-weight: 700;
      color: #18181b;
      line-height: 1.25;
    }
    .tp-bento-2 {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
      align-items: stretch;
    }
    .tp-kpi-4 {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
    }
    @media (max-width: 860px) {
      .tp-bento-2 { grid-template-columns: 1fr; }
      .tp-kpi-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 480px) {
      .tp-kpi-4 { grid-template-columns: 1fr; }
    }

    /* Symmetric Bento Pillar Cards + Pixel-Locked Headers & 48px CTAs */
    .tp-pillar-card {
      background: var(--white);
      border: 1px solid #e6e0d3;
      border-radius: 18px;
      padding: 20px 22px;
      box-shadow: 0 6px 22px rgba(28, 25, 23, 0.035);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 16px;
      height: 100%;
      box-sizing: border-box;
    }
    .tp-card-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      padding-bottom: 14px;
      border-bottom: 1px solid #eee9de;
      min-height: 52px;
      box-sizing: border-box;
    }
    .tp-card-head-start {
      display: flex;
      align-items: center;
      gap: 11px;
      min-width: 0;
    }
    .tp-card-icon {
      width: 38px;
      height: 38px;
      border-radius: 11px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .tp-card-icon.rent {
      background: #f6f0e2;
      border: 1px solid #e2d3b3;
      color: #785d2b;
    }
    .tp-card-icon.support {
      background: #f3f1eb;
      border: 1px solid #dfd9cb;
      color: #36332e;
    }
    .tp-card-eyebrow {
      font-size: 10.5px;
      font-weight: 700;
      letter-spacing: 0.09em;
      text-transform: uppercase;
      color: #8c7241;
      line-height: 1.2;
      margin-bottom: 2px;
    }
    body.fa .tp-card-eyebrow {
      letter-spacing: 0 !important;
      text-transform: none !important;
      font-size: 11px;
    }
    .tp-card-title {
      margin: 0;
      font-size: 16.5px;
      font-weight: 700;
      color: #18181b;
      letter-spacing: -0.015em;
      line-height: 1.25;
    }
    .tp-head-pill {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 5px;
      height: 28px !important;
      min-height: 28px !important;
      max-height: 28px !important;
      padding: 0 11px !important;
      border-radius: 999px !important;
      font-size: 11.5px !important;
      font-weight: 650 !important;
      line-height: 1 !important;
      white-space: nowrap;
      flex-shrink: 0;
      text-decoration: none;
      box-sizing: border-box !important;
    }
    .tp-head-pill.action {
      background: #faf8f3;
      border: 1px solid #ded7c7;
      color: #292524;
      cursor: pointer;
      transition: background 0.14s ease, border-color 0.14s ease;
    }
    .tp-head-pill.action:hover {
      background: #f2ece0;
      border-color: #c8b07d;
    }
    .tp-head-pill.status-green {
      background: #ecfdf5;
      border: 1px solid #86efac;
      color: #166534;
    }
    .tp-head-pill.status-amber {
      background: #fffbeb;
      border: 1px solid #fcd34d;
      color: #92400e;
    }
    .tp-head-pill.status-red {
      background: #fef2f2;
      border: 1px solid #fca5a5;
      color: #991b1b;
    }

    .tp-rent-hero-box {
      padding: 13px 15px;
      border-radius: 13px;
      background: linear-gradient(180deg, #fdfcf9 0%, #f6f2e8 100%);
      border: 1px solid #e7e0d0;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    .tp-cycle-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 9px;
    }
    @media (max-width: 500px) {
      .tp-cycle-grid { grid-template-columns: 1fr; }
    }
    .tp-cycle-cell {
      padding: 10px 12px;
      border-radius: 11px;
      background: #faf9f5;
      border: 1px solid #ebe5d9;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }
    .tp-cycle-cell small {
      font-size: 11px;
      font-weight: 600;
      color: #78716c;
    }
    .tp-cycle-cell strong {
      font-size: 12.5px;
      font-weight: 700;
      color: #18181b;
    }

    .tp-cat-grid-4 {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    @media (max-width: 460px) {
      .tp-cat-grid-4 { grid-template-columns: 1fr; }
    }
    .tp-cat-chip {
      display: flex;
      align-items: center;
      gap: 8px;
      height: 38px;
      padding: 0 11px;
      border-radius: 10px;
      background: #faf8f4;
      border: 1px solid #e5dfd1;
      color: #292524;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      text-align: start;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: background 0.14s ease, border-color 0.14s ease, transform 0.12s ease;
    }
    .tp-cat-chip:hover {
      background: #f3ede0;
      border-color: #c8b07d;
      transform: translateY(-1px);
    }
    .tp-ticket-mini-row {
      padding: 10px 12px;
      border-radius: 11px;
      background: #faf9f5;
      border: 1px solid #eae4d7;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      cursor: pointer;
      transition: border-color 0.14s ease, background 0.14s ease;
    }
    .tp-ticket-mini-row:hover {
      background: #ffffff;
      border-color: #cfc3ab;
    }
    .tp-ticket-mini-row.needs-reply {
      border-color: #f59e0b;
      background: #fffdf5;
    }

    /* Symmetric 48px Primary Action Buttons (Left & Right Pillar Cards + Sub-tabs) */
    .tp-card-cta {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 9px !important;
      width: 100% !important;
      height: 48px !important;
      min-height: 48px !important;
      max-height: 48px !important;
      padding: 0 20px !important;
      border-radius: 13px !important;
      font-size: 14px !important;
      font-weight: 650 !important;
      line-height: 1 !important;
      letter-spacing: -0.005em;
      cursor: pointer;
      box-sizing: border-box !important;
      margin-top: auto;
      text-decoration: none;
      transition: transform 0.15s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    }
    .tp-card-cta.tp-cta-dark {
      background: #232220 !important;
      color: #ffffff !important;
      border: 1.5px solid #232220 !important;
      box-shadow: 0 6px 18px rgba(28, 25, 23, 0.14) !important;
    }
    .tp-card-cta.tp-cta-dark:hover {
      background: #35332f !important;
      border-color: #35332f !important;
      box-shadow: 0 8px 22px rgba(28, 25, 23, 0.19) !important;
      transform: translateY(-1px);
    }
    .tp-card-cta.tp-cta-gold {
      background: linear-gradient(180deg, #fcf9f2 0%, #efe3c8 100%) !important;
      color: #362810 !important;
      border: 1.5px solid #c5ac78 !important;
      box-shadow: 0 4px 14px rgba(146, 118, 67, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
    }
    .tp-card-cta.tp-cta-gold:hover {
      background: linear-gradient(180deg, #f9f3e6 0%, #e7d6b3 100%) !important;
      border-color: #b19358 !important;
      box-shadow: 0 7px 18px rgba(146, 118, 67, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
      transform: translateY(-1px);
    }
    .tp-card-cta .kashaneh-cta-arrow {
      color: currentColor;
      opacity: 0.85;
    }
    .tp-action-pill {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 6px;
      height: 34px !important;
      min-height: 34px !important;
      max-height: 34px !important;
      padding: 0 13px !important;
      border-radius: 9px !important;
      font-size: 12px !important;
      font-weight: 600 !important;
      text-decoration: none;
      cursor: pointer;
      box-sizing: border-box !important;
      transition: all 0.14s ease;
    }
    .tp-action-pill.outline {
      background: #faf8f3;
      border: 1px solid #dfd8c8;
      color: #292524;
    }
    .tp-action-pill.outline:hover {
      background: #f2ece0;
      border-color: #c8b07d;
    }
    .tp-action-pill.gold {
      background: linear-gradient(180deg, #fcf9f2 0%, #efe3c8 100%);
      border: 1px solid #c8b07d;
      color: #362810;
    }
    .tp-action-pill.gold:hover {
      background: linear-gradient(180deg, #f8f1e2 0%, #e7d6b3 100%);
      border-color: #b19358;
    }
    .tp-action-pill.dark {
      background: #232220;
      border: 1px solid #232220;
      color: #ffffff;
    }
    .tp-action-pill.dark:hover {
      background: #383530;
    }

    .tp-filter-strip {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }
    .tp-filter-chip {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      height: 30px;
      padding: 0 12px;
      border-radius: 999px;
      border: 1px solid #e2dbcc;
      background: #faf8f4;
      color: #57534e;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.14s ease;
    }
    .tp-filter-chip.active {
      background: #232220;
      border-color: #232220;
      color: #ffffff;
    }

    .tp-surface-card {
      background: var(--white);
      border: 1px solid #e6e0d3;
      border-radius: 18px;
      padding: 18px 22px;
      box-shadow: 0 4px 16px rgba(28, 25, 23, 0.03);
      display: flex;
      flex-direction: column;
      gap: 14px;
    }
    .tp-stat-tile {
      background: var(--white);
      border: 1px solid #e6e0d3;
      border-radius: 14px;
      padding: 14px 16px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .tp-ledger-row {
      background: #faf9f5;
      border: 1px solid #e8e3d8;
      border-radius: 13px;
      padding: 14px 16px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 14px;
      flex-wrap: wrap;
      transition: border-color 0.15s ease, background 0.15s ease;
    }
    .tp-ledger-row:hover {
      border-color: #d3c7b0;
      background: #ffffff;
    }
    .tp-stepper {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      border-radius: 999px;
      background: #ffffff;
      border: 1px solid #e5e0d4;
      font-size: 11px;
      font-weight: 600;
      color: #57534e;
    }
    .tp-step-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      display: inline-block;
    }
    .tp-thread-card {
      background: var(--white);
      border: 1px solid #e6e0d3;
      border-radius: 15px;
      overflow: hidden;
      transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }
    .tp-thread-card.needs-reply {
      border-color: #d97706;
      box-shadow: 0 4px 16px rgba(217, 119, 6, 0.09);
    }
    .tp-thread-head {
      padding: 14px 18px;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      cursor: pointer;
      background: #fdfcf9;
    }
    .tp-thread-body {
      padding: 14px 18px 16px;
      border-top: 1px solid var(--line);
      background: #faf9f5;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .tp-msg-bubble {
      padding: 10px 13px;
      border-radius: 12px;
      font-size: 12.5px;
      line-height: 1.55;
      max-width: 82%;
    }
    .tp-msg-bubble.from-tenant {
      align-self: flex-end;
      background: #f3ecdd;
      border: 1px solid #d9cbb0;
      color: #1c1917;
      border-end-end-radius: 4px;
    }
    .tp-msg-bubble.from-kashaneh {
      align-self: flex-start;
      background: #ffffff;
      border: 1px solid #e5dfd2;
      color: #1c1917;
      border-start-start-radius: 4px;
    }

    /* ==========================================================================
       COMPACT SINGLE-SCREEN RESIDENT COCKPIT + SPLIT MESSENGER INBOX + WAYFINDING
       ========================================================================== */
    .tp-cockpit-shell {
      max-width: 880px;
      margin: 0 auto;
      padding: 4px 0 28px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .tp-cockpit-alert {
      cursor: pointer;
      padding: 11px 16px;
      border-radius: 13px;
      background: #fffbeb;
      border: 1px solid #f59e0b;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      box-shadow: 0 3px 12px rgba(217, 119, 6, 0.08);
      transition: transform 0.14s ease, box-shadow 0.14s ease;
    }
    .tp-cockpit-alert:hover {
      transform: translateY(-1px);
      box-shadow: 0 5px 16px rgba(217, 119, 6, 0.14);
    }
    .tp-cockpit-alert.is-red {
      background: #fef2f2;
      border-color: #f87171;
      box-shadow: 0 3px 12px rgba(220, 38, 38, 0.08);
    }
    .tp-cockpit-id-bar {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 15px;
      padding: 12px 16px;
      box-shadow: var(--shadow-xs);
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }
    .tp-cockpit-cta-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }
    @media (max-width: 560px) {
      .tp-cockpit-cta-row {
        grid-template-columns: 1fr;
      }
    }
    .tp-cockpit-cta-btn {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 48px;
      padding: 0 16px;
      border-radius: 13px;
      font-family: inherit;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      transition: transform 0.14s ease, box-shadow 0.16s ease, filter 0.14s ease;
    }
    .tp-cockpit-cta-btn:hover {
      transform: translateY(-1px);
    }
    .tp-cockpit-cta-btn.primary-dark {
      background: #232220;
      border: 1.5px solid #232220;
      color: #ffffff;
      box-shadow: 0 6px 16px rgba(28, 25, 23, 0.13);
    }
    .tp-cockpit-cta-btn.primary-dark:hover {
      background: #33312d;
      border-color: #33312d;
    }
    .tp-cockpit-cta-btn.secondary-gold {
      background: linear-gradient(180deg, #fdfbf7 0%, #f3ead8 100%);
      border: 1.5px solid #c9b07a;
      color: #4a3818;
      box-shadow: 0 4px 12px rgba(146, 118, 67, 0.10);
    }
    .tp-cockpit-cta-btn.secondary-gold:hover {
      filter: brightness(0.98);
    }
    .tp-cockpit-summary-card {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 15px;
      padding: 13px 15px;
      box-shadow: var(--shadow-xs);
      display: flex;
      flex-direction: column;
      gap: 11px;
    }
    .tp-cockpit-summary-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      align-items: stretch;
    }
    @media (max-width: 680px) {
      .tp-cockpit-summary-grid {
        grid-template-columns: 1fr;
      }
    }
    .tp-cockpit-subbox {
      padding: 10px 12px;
      border-radius: 11px;
      background: var(--paper);
      border: 1px solid var(--line);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 7px;
    }
    .tp-unit-drawer {
      padding: 11px 13px;
      border-radius: 11px;
      background: var(--paper);
      border: 1px dashed var(--gold-border);
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
      gap: 10px;
      font-size: 12px;
    }

    /* Segmented Bottom Card */
    .tp-seg-card {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 12px 14px 14px;
      box-shadow: var(--shadow-xs);
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .tp-seg-bar {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
      background: var(--soft);
      padding: 4px;
      border-radius: 11px;
      border: 1px solid var(--line);
    }
    .tp-seg-tab {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      min-height: 38px;
      padding: 6px 10px;
      border-radius: 8px;
      border: 0;
      background: transparent;
      color: var(--muted);
      font-family: inherit;
      font-size: 12.5px;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .tp-seg-tab:hover {
      color: var(--ink);
    }
    .tp-seg-tab.active {
      background: var(--white);
      color: var(--ink);
      box-shadow: 0 2px 6px rgba(24, 24, 27, 0.08);
    }
    .tp-seg-count {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 20px;
      height: 19px;
      padding: 0 6px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      background: var(--stone);
      color: var(--ink);
    }
    .tp-seg-count.attn {
      background: #fef3c7;
      color: #92400e;
      border: 1px solid #f59e0b;
    }

    /* Master-Detail Split Support Inbox & Messenger */
    .tp-inbox-split {
      display: grid;
      grid-template-columns: 280px minmax(0, 1fr);
      min-height: 410px;
      max-height: 540px;
      border: 1px solid var(--line);
      border-radius: 13px;
      overflow: hidden;
      background: var(--white);
    }
    .tp-inbox-sidebar {
      border-inline-end: 1px solid var(--line);
      background: var(--paper);
      display: flex;
      flex-direction: column;
      min-height: 0;
    }
    .tp-inbox-side-head {
      padding: 10px 12px;
      border-bottom: 1px solid var(--line);
      background: var(--white);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      flex-wrap: wrap;
    }
    .tp-inbox-list {
      flex: 1;
      overflow-y: auto;
      padding: 6px;
      display: flex;
      flex-direction: column;
      gap: 5px;
    }
    .tp-inbox-item {
      width: 100%;
      text-align: start;
      padding: 10px 11px;
      border-radius: 10px;
      border: 1px solid transparent;
      background: transparent;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      gap: 4px;
      transition: background 0.13s ease, border-color 0.13s ease, box-shadow 0.13s ease;
    }
    .tp-inbox-item:hover {
      background: rgba(255, 255, 255, 0.78);
      border-color: var(--line);
    }
    .tp-inbox-item.active {
      background: var(--white);
      border-color: var(--gold-border);
      box-shadow: 0 2px 8px rgba(24, 24, 27, 0.05);
    }
    .tp-inbox-item.needs-reply {
      border-inline-start: 3px solid #d97706;
      background: #fffdf6;
    }
    .tp-inbox-item.needs-reply.active {
      background: #ffffff;
      border-color: #f59e0b;
      border-inline-start-width: 3.5px;
    }
    .tp-inbox-pane {
      display: flex;
      flex-direction: column;
      min-height: 0;
      min-width: 0;
      max-width: 100%;
      overflow: hidden;
      background: var(--white);
    }
    .tp-chat-head {
      padding: 11px 15px;
      border-bottom: 1px solid var(--line);
      background: var(--white);
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      flex-shrink: 0;
      min-width: 0;
      max-width: 100%;
    }
    .tp-mobile-back-threads {
      display: none !important;
    }
    body.fa .tp-mobile-back-threads .back-arrow-glyph,
    [dir="rtl"] .tp-mobile-back-threads .back-arrow-glyph {
      display: inline-block;
      transform: scaleX(-1);
    }
    @media (max-width: 740px) {
      .tp-inbox-split {
        grid-template-columns: minmax(0, 1fr);
        max-height: none;
        min-height: 360px;
      }
      .tp-inbox-sidebar {
        border-inline-end: 0;
        max-height: 420px;
        min-width: 0;
      }
      .tp-inbox-split:not(.mobile-chat-open) .tp-inbox-pane {
        display: none;
      }
      .tp-inbox-split.mobile-chat-open .tp-inbox-sidebar {
        display: none;
      }
      .tp-inbox-split.mobile-chat-open .tp-mobile-back-threads {
        display: inline-flex !important;
      }
      .tp-chat-bubble {
        max-width: calc(100% - 36px) !important;
      }
      .tp-composer-wrap {
        padding: 8px 9px;
      }
      .tp-composer-bar {
        padding: 4px 5px 4px 8px;
        gap: 5px;
      }
      .tp-composer-send {
        padding: 0 11px;
        font-size: 12px;
      }
    }

    /* True Directional Messenger Stream */
    .tp-chat-stream {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 16px 16px;
      background: var(--paper);
      display: flex;
      flex-direction: column;
      gap: 10px;
      min-height: 240px;
      max-height: 470px;
      min-width: 0;
    }
    .tp-chat-day-sep {
      align-self: center;
      margin: 2px 0;
      padding: 2px 10px;
      border-radius: 999px;
      background: var(--stone);
      color: var(--muted);
      font-size: 10.5px;
      font-weight: 600;
    }
    .tp-chat-row {
      display: flex;
      align-items: flex-end;
      gap: 8px;
      width: 100%;
      min-width: 0;
    }
    .tp-chat-row.incoming {
      justify-content: flex-start;
    }
    .tp-chat-row.outgoing {
      justify-content: flex-end;
    }
    .tp-chat-avatar {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 800;
      flex-shrink: 0;
      user-select: none;
    }
    .tp-chat-avatar.kashaneh {
      background: #232220;
      color: #f3dfb2;
      border: 1px solid #3c3832;
    }
    .tp-chat-avatar.resident {
      background: var(--gold-soft);
      color: var(--gold-text);
      border: 1px solid var(--gold-border);
    }
    .tp-chat-bubble {
      max-width: min(82%, 460px);
      min-width: 0;
      padding: 9px 13px;
      border-radius: 14px;
      font-size: 12.8px;
      line-height: 1.56;
      box-shadow: 0 1px 2px rgba(24, 24, 27, 0.04);
      word-break: break-word;
      overflow: hidden;
    }
    .tp-chat-row.incoming .tp-chat-bubble {
      background: var(--white);
      border: 1px solid var(--line);
      color: var(--ink);
      border-end-start-radius: 4px;
    }
    .tp-chat-row.outgoing .tp-chat-bubble {
      background: #f3ecdd;
      border: 1px solid #dacbb0;
      color: #18181b;
      border-end-end-radius: 4px;
    }
    [data-theme="dark"] .tp-chat-row.outgoing .tp-chat-bubble {
      background: rgba(212, 180, 117, 0.18);
      border-color: rgba(212, 180, 117, 0.36);
      color: #f3f4f6;
    }
    .tp-chat-bubble.is-starter {
      border-top: 2.5px solid var(--gold);
    }
    .tp-chat-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 3px;
      font-size: 10.5px;
      color: var(--muted);
    }
    .tp-chat-sender {
      font-weight: 700;
      color: var(--ink);
    }
    .tp-chat-row.outgoing .tp-chat-sender {
      color: #6b5326;
    }
    [data-theme="dark"] .tp-chat-row.outgoing .tp-chat-sender {
      color: #e7c98c;
    }

    /* Rich Attachment Cards Inside Chat */
    .tp-att-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-top: 7px;
    }
    .tp-att-card {
      display: flex;
      align-items: center;
      gap: 9px;
      padding: 6px 10px;
      border-radius: 9px;
      background: rgba(255, 255, 255, 0.88);
      border: 1px solid var(--border);
      text-decoration: none;
      color: var(--ink);
      transition: border-color 0.13s ease, background 0.13s ease;
      max-width: 100%;
      min-width: 0;
      overflow: hidden;
    }
    [data-theme="dark"] .tp-att-card {
      background: rgba(18, 22, 31, 0.85);
    }
    .tp-att-card:hover {
      border-color: var(--gold);
      background: var(--white);
    }
    .tp-att-ext {
      width: 30px;
      height: 30px;
      border-radius: 7px;
      background: var(--gold-soft);
      border: 1px solid var(--gold-border);
      color: var(--gold-text);
      font-size: 9.5px;
      font-weight: 800;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      text-transform: uppercase;
    }
    .tp-att-img-wrap {
      display: inline-flex;
      flex-direction: column;
      gap: 4px;
      padding: 5px;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.9);
      border: 1px solid var(--border);
      text-decoration: none;
      color: var(--ink);
      max-width: 220px;
    }
    .tp-att-img-wrap img {
      display: block;
      width: 100%;
      max-height: 135px;
      object-fit: cover;
      border-radius: 7px;
    }

    /* Chat Composer with Staged File Chips */
    .tp-composer-wrap {
      padding: 10px 12px;
      border-top: 1px solid var(--line);
      background: var(--white);
      display: flex;
      flex-direction: column;
      gap: 7px;
      flex-shrink: 0;
    }
    .tp-staged-files-bar {
      display: none;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }
    .tp-staged-files-bar.has-files {
      display: flex;
    }
    .tp-staged-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 3px 8px;
      border-radius: 999px;
      background: var(--gold-soft);
      border: 1px solid var(--gold-border);
      color: var(--ink);
      font-size: 11px;
      font-weight: 600;
      max-width: 240px;
    }
    .tp-staged-chip button {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: rgba(24, 24, 27, 0.12);
      color: var(--ink);
      font-size: 10px;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .tp-composer-bar {
      display: flex;
      align-items: flex-end;
      gap: 7px;
      padding: 5px 6px 5px 10px;
      border-radius: 13px;
      border: 1.5px solid var(--border);
      background: var(--paper);
      transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    }
    .tp-composer-bar:focus-within {
      background: var(--white);
      border-color: var(--gold);
      box-shadow: 0 0 0 3px rgba(182, 155, 96, 0.14);
    }
    .tp-composer-bar textarea {
      flex: 1;
      min-width: 0;
      min-height: 32px;
      max-height: 104px;
      padding: 6px 4px;
      border: 0 !important;
      outline: none !important;
      background: transparent !important;
      resize: none;
      font-size: 13px;
      line-height: 1.45;
      color: var(--ink);
    }
    .tp-composer-attach {
      width: 34px;
      height: 34px;
      border-radius: 9px;
      border: 1px solid var(--line);
      background: var(--white);
      color: var(--muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      flex-shrink: 0;
      transition: border-color 0.14s ease, color 0.14s ease;
    }
    .tp-composer-attach:hover {
      border-color: var(--gold);
      color: var(--ink);
    }
    .tp-composer-send {
      height: 34px;
      padding: 0 14px;
      border-radius: 9px;
      background: #232220;
      color: #ffffff;
      border: 1px solid #232220;
      font-size: 12.5px;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      cursor: pointer;
      flex-shrink: 0;
      transition: background 0.14s ease, opacity 0.14s ease;
    }
    .tp-composer-send:hover:not(:disabled) {
      background: #383530;
    }
    .tp-composer-send:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    /* Global Dashboard Wayfinding & Standard Back Bars (Staff Sub-Workspaces + Entity Windows) */
    .ws-back-context-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 18px;
      background: var(--paper);
      border-bottom: 1px solid var(--line);
      flex-wrap: wrap;
    }
    .btn-back-standard {
      display: inline-flex !important;
      align-items: center !important;
      gap: 6px !important;
      height: 32px !important;
      padding: 0 12px !important;
      border-radius: 8px !important;
      background: var(--white) !important;
      border: 1px solid var(--border) !important;
      color: var(--ink) !important;
      font-size: 12px !important;
      font-weight: 700 !important;
      cursor: pointer;
      transition: border-color 0.14s ease, background 0.14s ease, transform 0.12s ease;
      box-shadow: var(--shadow-xs);
    }
    .btn-back-standard:hover {
      border-color: var(--gold) !important;
      background: var(--gold-soft) !important;
      color: var(--gold-text) !important;
    }
    body.fa .btn-back-standard .back-arrow-glyph {
      display: inline-block;
      transform: scaleX(-1);
    }
    .entity-nav-topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 9px 16px;
      background: var(--paper);
      border-bottom: 1px solid var(--line);
      flex-shrink: 0;
      flex-wrap: wrap;
    }
    .entity-fullpage-wrap > .entity-nav-topbar {
      border: 1px solid var(--line);
      border-radius: 11px;
      margin-bottom: 12px;
      background: var(--white);
      box-shadow: var(--shadow-xs);
    }

    /* =====================================================================
       STAFF PORTAL ENGLISH-ONLY ENFORCEMENT + TRELLO/LINEAR TASK WORKSPACE
       ===================================================================== */
    html[data-portal-gate="staff"] .lang-toggle {
      display: none !important;
    }

    /* Prominent Primary Edit Task CTA */
    .btn-edit-primary {
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      gap: 7px;
      height: 38px !important;
      padding: 0 18px !important;
      border-radius: 10px !important;
      background: #1c1917 !important;
      color: #ffffff !important;
      border: 1px solid #1c1917 !important;
      font-size: 13px !important;
      font-weight: 700 !important;
      letter-spacing: -0.01em;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(28, 25, 23, 0.16);
      transition: background 0.14s ease, transform 0.12s ease, box-shadow 0.14s ease;
    }
    .btn-edit-primary:hover {
      background: #2f2a25 !important;
      border-color: var(--gold) !important;
      box-shadow: 0 4px 12px rgba(28, 25, 23, 0.22);
      transform: translateY(-1px);
    }

    /* Trello / Linear 2-Column Task Detail Workspace */
    .task-trello-header {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 18px 20px 15px;
      margin-bottom: 16px;
      box-shadow: var(--shadow-xs);
    }
    .task-trello-header-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      flex-wrap: wrap;
    }
    .task-trello-cta-cluster {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      flex-shrink: 0;
    }
    .task-trello-stepper {
      margin-top: 14px;
      padding: 9px 12px;
      border-radius: 11px;
      background: var(--paper);
      border: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }
    .task-trello-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.58fr) 318px;
      gap: 16px;
      align-items: start;
    }
    @media (max-width: 920px) {
      .task-trello-grid {
        grid-template-columns: minmax(0, 1fr);
      }
    }
    .task-trello-main {
      display: flex;
      flex-direction: column;
      gap: 14px;
      min-width: 0;
    }
    .task-trello-side {
      display: flex;
      flex-direction: column;
      gap: 12px;
      min-width: 0;
    }
    .task-desc-card {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 14px 16px;
      box-shadow: var(--shadow-xs);
    }
    .task-desc-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 8px;
    }
    .task-side-eyebrow {
      font-size: 10.5px;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--muted);
    }
    .task-side-card {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 14px 16px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      box-shadow: var(--shadow-xs);
    }
    .task-side-card.finance {
      background: #fdfbf6;
      border-color: #e3d6ba;
    }
    .task-side-card.subtle {
      background: var(--paper);
      box-shadow: none;
    }
    .task-kv-list {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .task-kv-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 7px 8px;
      margin: 0 -8px;
      border-radius: 8px;
      font-size: 12.5px;
      transition: background 0.12s ease;
    }
    .task-kv-row.clickable {
      cursor: pointer;
    }
    .task-kv-row.clickable:hover {
      background: var(--paper);
    }
    .task-kv-key {
      color: var(--muted);
      font-weight: 600;
      font-size: 12px;
      flex-shrink: 0;
    }
    .task-kv-val {
      color: var(--ink);
      font-weight: 600;
      text-align: right;
      min-width: 0;
    }
    .task-fin-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }
    .task-fin-box {
      background: var(--white);
      border: 1px solid #e7decb;
      border-radius: 10px;
      padding: 9px 10px;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .task-fin-box span {
      font-size: 10.5px;
      font-weight: 600;
      color: var(--muted);
    }
    .task-fin-box strong {
      font-size: 15px;
      font-weight: 800;
      color: var(--ink);
    }
    .task-fin-total-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-top: 8px;
      border-top: 1px dashed #dfd2b6;
      font-size: 12.5px;
      font-weight: 700;
      color: var(--ink);
    }

    /* Unified Segmented Audience Hub (Resident Reply vs Internal Note) */
    .task-comms-card {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 14px;
      overflow: hidden;
      box-shadow: var(--shadow-xs);
    }
    .task-comms-head {
      padding: 10px 14px;
      background: var(--paper);
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }
    .task-comms-tabs {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px;
      border-radius: 10px;
      background: var(--stone);
      border: 1px solid var(--line);
    }
    .task-comms-tab {
      height: 30px;
      padding: 0 12px;
      border-radius: 7px;
      border: 0;
      background: transparent;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      transition: all 0.14s ease;
    }
    .task-comms-tab:hover {
      color: var(--ink);
    }
    .task-comms-tab.active {
      background: var(--white);
      color: var(--ink);
      box-shadow: 0 1px 4px rgba(24, 24, 27, 0.08);
    }
    .task-comms-tab.active.is-resident {
      color: #6b5326;
    }
    .task-comms-tab.active.is-internal {
      color: #1e293b;
    }

    /* Modern SaaS Pill Toggle Switch (Replaces Ugly Native Checkboxes) */
    .ksh-switch-pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 4px 11px 4px 6px;
      border-radius: 999px;
      background: var(--paper);
      border: 1px solid var(--border);
      cursor: pointer;
      user-select: none;
      font-size: 11.5px;
      font-weight: 600;
      color: var(--ink2);
      transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
      height: 30px;
      flex-shrink: 0;
    }
    .ksh-switch-pill:hover {
      border-color: var(--gold);
    }
    .ksh-switch-pill input[type="checkbox"] {
      position: absolute;
      opacity: 0;
      width: 0;
      height: 0;
      pointer-events: none;
    }
    .ksh-switch-track {
      position: relative;
      width: 30px;
      height: 17px;
      border-radius: 999px;
      background: #d6d3cd;
      transition: background 0.16s ease;
      flex-shrink: 0;
    }
    .ksh-switch-track::after {
      content: "";
      position: absolute;
      top: 2px;
      left: 2px;
      width: 13px;
      height: 13px;
      border-radius: 50%;
      background: #ffffff;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
      transition: transform 0.16s ease;
    }
    .ksh-switch-pill input[type="checkbox"]:checked + .ksh-switch-track {
      background: #16a34a;
    }
    .ksh-switch-pill.amber-tone input[type="checkbox"]:checked + .ksh-switch-track {
      background: #b45309;
    }
    .ksh-switch-pill input[type="checkbox"]:checked + .ksh-switch-track::after {
      transform: translateX(13px);
    }
    .ksh-switch-pill:has(input[type="checkbox"]:checked) {
      background: #f0fdf4;
      border-color: #86efac;
      color: #166534;
    }
    .ksh-switch-pill.amber-tone:has(input[type="checkbox"]:checked) {
      background: #fffbeb;
      border-color: #fcd34d;
      color: #92400e;
    }
    .ksh-switch-pill .sw-on { display: none; }
    .ksh-switch-pill .sw-off { display: inline; }
    .ksh-switch-pill:has(input[type="checkbox"]:checked) .sw-on { display: inline; }
    .ksh-switch-pill:has(input[type="checkbox"]:checked) .sw-off { display: none; }

    /* Trello / Linear 2-Column Edit Task Modal */
    dialog#modal-task.modal-task-trello {
      width: min(880px, 95vw) !important;
      max-width: 880px !important;
      border-radius: 16px;
    }
    dialog#modal-task.modal-task-trello .modal-body {
      display: block !important;
      padding: 18px 20px;
      background: #f9f7f2;
    }
    .task-edit-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.48fr) 290px;
      gap: 16px;
      align-items: start;
    }
    @media (max-width: 760px) {
      .task-edit-grid {
        grid-template-columns: minmax(0, 1fr);
      }
    }
    .task-edit-col {
      display: flex;
      flex-direction: column;
      gap: 13px;
      min-width: 0;
    }
    .task-edit-card {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 13px;
      padding: 14px 15px;
      display: flex;
      flex-direction: column;
      gap: 11px;
    }
    .task-edit-card.finance {
      background: #fdfbf6;
      border-color: #e2d4b7;
    }
    .task-edit-card-title {
      font-size: 10.5px;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--muted);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
    }
    .task-edit-2col {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }
    @media (max-width: 520px) {
      .task-edit-2col {
        grid-template-columns: 1fr;
      }
    }
    .task-edit-card .field {
      margin: 0;
    }
    .task-edit-audit-box {
      padding: 10px 12px;
      border-radius: 10px;
      background: var(--paper);
      border: 1px solid var(--line);
      font-size: 11.5px;
      color: var(--muted);
      display: flex;
      flex-direction: column;
      gap: 3px;
    }
    .task-edit-audit-box strong {
      color: var(--ink);
      font-size: 12px;
    }
