/* ====================================================================
   ALAMI TENANT HELPDESK — V1.1 DESIGN SYSTEM
   Edit the color variables below to rebrand the entire application.
   ==================================================================== */
:root {
  --green: #0ea14b;
  --green-dark: #087a38;
  --green-pale: #e9f8ef;
  --purple: #7e3f96;
  --navy: #172439;
  --navy-dark: #101b2c;
  --blue: #2563eb;
  --amber: #e49b15;
  --red: #d92d44;
  --ink: #1b273b;
  --muted: #788397;
  --muted-dark: #59677c;
  --line: #e8ecf2;
  --canvas: #f6f8fb;
  --paper: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 30px rgba(28, 43, 70, .045);
  --sidebar-width: 264px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(14,161,75,.3); outline-offset: 2px; }
svg { flex-shrink: 0; }
.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

/* Layout and sidebar */
.app-shell { min-height: 100vh; display: flex; }
.sidebar { background: var(--navy); color: #d9e0e9; flex: 0 0 var(--sidebar-width); width: var(--sidebar-width); min-height: 100vh; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 15px 18px; z-index: 25; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px 29px; }
.brand-symbol { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--green); color: white; position: relative; font-size: 25px; font-weight: 830; letter-spacing: -.06em; }
.brand-symbol i { position: absolute; width: 10px; height: 10px; background: #b479d1; border: 2px solid var(--navy); border-radius: 50%; right: -3px; top: -3px; }
.brand-name { color: white; font-size: 14px; font-weight: 820; letter-spacing: .025em; line-height: 1.2; white-space: nowrap; }
.brand-name strong { color: #7cd6a2; font-weight: 840; }
.brand-subtitle { color: #a6b4c8; font-size: 9px; font-weight: 750; letter-spacing: .19em; margin-top: 5px; }
.sidebar-property { background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; display: flex; gap: 10px; align-items: center; padding: 12px; margin: 0 5px 24px; }
.property-icon { width: 37px; height: 37px; display: grid; place-items: center; color: #76d8a2; background: rgba(39,185,100,.14); border-radius: 10px; }
.sidebar-property strong, .sidebar-property span { display: block; }
.sidebar-property strong { color: #fff; font-size: 12px; font-weight: 700; }
.sidebar-property span { color: #9cacc1; font-size: 10px; margin-top: 3px; }
.sidebar-property .property-dots { margin-left: auto; color: #9aacbe; letter-spacing: 2px; font-weight: 800; font-size: 17px; margin-top: -9px; }
.nav-section-label { color: #75869f; font-size: 10px; font-weight: 800; letter-spacing: .15em; margin: 0 16px 12px; }
.nav-list { display: grid; gap: 5px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; background: transparent; color: #a9b7c9; border: 0; border-radius: 10px; text-align: left; padding: 12px 13px; font-weight: 600; transition: background .15s,color .15s; }
.nav-item:hover { background: rgba(255,255,255,.055); color: white; }
.nav-item.active { color: white; background: #276045; box-shadow: inset 3px 0 0 #4dde90; }
.nav-item .icon { width: 18px; height: 18px; }
.nav-count { margin-left: auto; background: rgba(255,255,255,.11); color: #fff; padding: 2px 7px; font-size: 10px; border-radius: 999px; font-weight: 700; }
.sidebar-footer { margin-top: auto; padding-top: 26px; }
.sidebar-help { padding: 16px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(255,255,255,.035); }
.help-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 8px; color: #88dda8; background: rgba(14,161,75,.14); margin-bottom: 10px; }
.sidebar-help strong { display: block; color: #eef7f4; font-size: 12px; }
.sidebar-help p { color: #a7b7c9; font-size: 11px; line-height: 1.6; margin: 7px 0 0; }
.role-switch { margin-top: 13px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: #e3eaf3; display: flex; gap: 9px; align-items: center; text-align: left; border-radius: 10px; padding: 12px 11px; width: 100%; font-size: 11.5px; font-weight: 650; }
.role-switch:hover { background: rgba(255,255,255,.08); }
.role-switch .icon { width: 17px; height: 17px; }
.role-switch .chevron { margin-left: auto; width: 15px; height: 15px; }
.sidebar-scrim { display: none; }

/* App header */
.main-layout { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.topbar { min-height: 78px; background: white; border-bottom: 1px solid var(--line); padding: 13px 36px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 19px; min-width: 0; }
.breadcrumb { display: flex; align-items: center; gap: 9px; font-size: 12px; white-space: nowrap; }
.breadcrumb span { color: #93a0b3; }
.breadcrumb strong { color: #344258; font-weight: 710; }
.breadcrumb .icon { width: 13px; height: 13px; color: #a5afbb; }
.header-search { border: 1px solid #e8edf2; background: #f8fafc; width: min(270px, 25vw); height: 38px; display: flex; align-items: center; gap: 9px; border-radius: 9px; padding: 0 10px; color: #99a7b7; }
.header-search .icon { width: 16px; height: 16px; }
.header-search input { min-width: 0; flex: 1; background: transparent; border: 0; outline: none; color: var(--ink); font-size: 11.5px; }
.header-search input::placeholder { color: #98a3b2; }
.header-search kbd { background: white; border: 1px solid #e5ebf2; box-shadow: 0 1px 1px rgba(0,0,0,.03); padding: 2px 6px; border-radius: 4px; font: 10px ui-monospace, monospace; }
.topbar-divider { width: 1px; height: 26px; background: var(--line); }
.icon-button { border: 0; color: #5c6b7c; background: transparent; display: grid; place-items: center; width: 37px; height: 37px; border-radius: 10px; position: relative; }
.icon-button:hover { color: var(--green); background: #f0f7f3; }
.notify-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); position: absolute; top: 5px; right: 5px; box-shadow: 0 0 0 2px white; }
.user-pill { display: flex; gap: 10px; align-items: center; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #27583f; background: #e3f3e9; font-size: 11px; font-weight: 800; }
.user-label { white-space: nowrap; }
.user-label strong, .user-label span { display: block; }
.user-label strong { font-size: 11.5px; color: #2e3c50; font-weight: 760; }
.user-label span { color: #95a0ae; font-size: 10px; margin-top: 3px; }
.menu-toggle { display: none; }
.page-content { flex: 1; width: min(100%, 1660px); margin: 0 auto; padding: 28px 36px 36px; outline: none; }
.site-footer { padding: 16px 36px; border-top: 1px solid var(--line); color: #a0a9b7; display: flex; justify-content: space-between; gap: 10px; font-size: 10px; }

/* Shared typography, cards, buttons */
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 21px; }
.eyebrow { color: var(--green-dark); font-size: 10px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 6px; }
h1,h2,h3,h4,p { margin-top: 0; }
h1 { font-size: clamp(22px,2.3vw,29px); letter-spacing: -.055em; line-height: 1.17; font-weight: 800; margin-bottom: 8px; color: #1d2a3d; }
h2 { font-size: 15px; font-weight: 790; letter-spacing: -.018em; margin-bottom: 0; }
h3 { font-size: 13px; font-weight: 760; margin-bottom: 0; }
.subheading { color: #7c8898; font-size: 12px; margin: 0; line-height: 1.7; }
.card { background: var(--paper); border: 1px solid #edf0f4; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.small-note { color: var(--muted); font-size: 11px; }
.pill { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 10px; font-weight: 730; line-height: 1.1; border-radius: 100px; padding: 6px 9px; }
.pill:before { content: ""; width: 6px; height: 6px; border-radius: 100%; background: currentColor; }
.pill.new { color: #c36611; background: #fff3df; }
.pill.assigned { color: #5e4ac2; background: #f0edff; }
.pill.progress { color: #2164ce; background: #eaf2ff; }
.pill.review { color: #a76609; background: #fff0d6; }
.pill.rework { color: #be4c35; background: #ffede7; }
.pill.resolved, .pill.closed { color: #078344; background: #e5f7ec; }
.pill.hold { color: #7b8393; background: #eef0f3; }
.pill.reopened { color: #a04485; background: #fcecf8; }
.pill.neutral { color: #64748b; background: #f1f5f9; }
.btn { border-radius: 10px; border: 1px solid transparent; display: inline-flex; justify-content: center; align-items: center; gap: 8px; line-height: 1.2; font-weight: 760; font-size: 11.5px; padding: 11px 14px; transition: transform .15s,background .15s,border .15s; white-space: nowrap; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--green); color: white; box-shadow: 0 5px 12px rgba(14,161,75,.13); }
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary { border-color: #e3e9ee; background: white; color: #47566c; }
.btn-secondary:hover { border-color: #b5c9bb; color: var(--green-dark); }
.btn-purple { background: var(--purple); color: white; }
.btn-danger { background: var(--red); color: white; }
.btn-subtle { background: #f3f6f9; color: #536278; }
.btn-wide { width: 100%; }
.btn-compact { padding: 7px 10px; border-radius: 8px; font-size: 10.5px; }
.btn-ghost { background: none; border: 0; color: var(--green-dark); padding: 5px 0; font-size: 11px; font-weight: 760; }
.btn-ghost:hover { text-decoration: underline; }
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.text-link { color: var(--green-dark); font-size: 11px; font-weight: 730; cursor: pointer; background: none; border: 0; padding: 0; }
.text-link:hover { text-decoration: underline; }
.empty { padding: 55px 20px; text-align: center; color: var(--muted); }
.empty-icon { background: var(--green-pale); color: var(--green); width: 51px; height: 51px; border-radius: 15px; display: grid; place-items: center; margin: 0 auto 14px; }
.empty h3 { color: var(--ink); margin-bottom: 7px; }
.empty p { max-width: 370px; margin: 0 auto 15px; line-height: 1.7; }
.muted { color: var(--muted); }

/* Banner and dashboard */
.welcome-banner { overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px; position: relative; background: linear-gradient(110deg,#087b43 0%,#0da34f 59%,#32bc78 100%); color: white; border-radius: 15px; padding: 25px 29px; margin-bottom: 21px; min-height: 145px; }
.welcome-banner:after { content:""; position: absolute; right: -42px; top: -110px; width: 320px; height: 320px; border: 32px solid rgba(255,255,255,.085); border-radius: 50%; }
.welcome-banner:before { content:""; position: absolute; right: 155px; bottom: -130px; width: 250px; height: 250px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.welcome-banner > * { position: relative; z-index: 1; }
.welcome-banner .banner-kicker { font-size: 10px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: #bdffdb; margin-bottom: 9px; }
.welcome-banner h2 { font-size: clamp(20px,2.3vw,28px); letter-spacing: -.04em; margin-bottom: 8px; line-height: 1.2; }
.welcome-banner p { font-size: 11.5px; line-height: 1.65; margin: 0; color: #e4ffef; max-width: 540px; }
.banner-mark { width: 110px; height: 110px; border-radius: 25px; background: rgba(255,255,255,.14); display: grid; place-items: center; transform: rotate(-11deg); margin-right: 45px; }
.banner-mark .icon { width: 58px; height: 58px; color: #dcffea; transform: rotate(11deg); stroke-width: 1.3; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; margin-bottom: 17px; }
.metric-card { padding: 18px 18px 16px; min-width: 0; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.metric-top span { color: var(--muted-dark); font-size: 11.5px; font-weight: 650; }
.metric-icon { display: grid; place-items: center; border-radius: 10px; height: 36px; width: 36px; }
.metric-icon .icon { width: 18px; height: 18px; }
.metric-icon.green { background: #e6f7ed; color: #11a25a; }
.metric-icon.red { background: #ffebef; color: #d74459; }
.metric-icon.blue { background: #e8f2ff; color: #2c74df; }
.metric-icon.purple { background: #f4ecfa; color: #8f56ad; }
.metric-number { font-size: 29px; letter-spacing: -.055em; font-weight: 820; line-height: 1.15; }
.metric-desc { color: #9aa5b4; font-size: 10px; margin-top: 7px; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0,1.62fr) minmax(270px,1fr); align-items: start; gap: 17px; }
.dashboard-left, .dashboard-right { min-width: 0; display: grid; gap: 17px; }
.progress-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 17px 0 11px; gap: 10px; }
.progress-head strong { font-size: 29px; font-weight: 820; letter-spacing: -.05em; line-height: 1; color: var(--green-dark); }
.progress-track { background: #eaf0ee; height: 11px; border-radius: 20px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg,#17a557,#6cd69d); border-radius: inherit; }
.progress-foot { color: var(--muted); font-size: 11px; display: flex; justify-content: space-between; margin-top: 10px; }
.category-row { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; }
.category-row .category-label { font-size: 10.5px; color: #627085; width: 121px; flex-shrink: 0; }
.category-track { height: 7px; flex: 1; background: #edf1f6; border-radius: 99px; overflow: hidden; }
.category-fill { height: 100%; background: #48b980; border-radius: inherit; }
.category-row strong { width: 20px; text-align: right; font-size: 10px; color: #42526a; }
.section-description { font-size: 11px; color: var(--muted); margin-top: 5px; }
.list-ticket { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #f0f2f6; }
.list-ticket:last-child { border-bottom: 0; padding-bottom: 0; }
.ticket-mini-icon { width: 35px; height: 35px; display: grid; place-items: center; background: #f0f6f2; color: var(--green-dark); border-radius: 10px; }
.list-ticket-detail { min-width: 0; flex: 1; }
.list-ticket-detail strong { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-ticket-detail span { color: var(--muted); display: block; margin-top: 5px; font-size: 10px; }
.list-ticket .pill { margin-left: auto; }
.list-ticket .icon-button { width: 22px; height: 30px; }
.list-ticket .icon-button .icon { width: 15px; height: 15px; }
.activity-list { display: grid; gap: 14px; }
.activity-item { display: flex; gap: 10px; }
.activity-dot { width: 29px; height: 29px; background: #edf7f0; border-radius: 50%; color: #21a461; display: grid; place-items: center; flex-shrink: 0; }
.activity-dot .icon { width: 14px; height: 14px; }
.activity-item p { color: #647187; font-size: 10.5px; line-height: 1.55; margin-bottom: 4px; }
.activity-item strong { color: #344154; }
.activity-item small { font-size: 9.5px; color: #a6adba; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.quick-action { background: #f6f9fc; border: 1px solid #edf1f5; border-radius: 11px; padding: 13px; text-align: left; display: grid; gap: 9px; color: #546378; font-size: 10.5px; font-weight: 730; }
.quick-action:hover { background: var(--green-pale); border-color: #c0e2ce; }
.quick-action .icon { color: var(--green); }
.notice-inline { display: flex; gap: 10px; align-items: flex-start; background: #fffaea; border: 1px solid #f7e8b4; border-radius: 11px; color: #856017; padding: 12px 13px; font-size: 11px; line-height: 1.65; margin-bottom: 18px; }
.notice-inline .icon { width: 16px; height: 16px; margin-top: 2px; }
.notice-inline.blue { background: #eff6ff; border-color: #d9eafd; color: #315b92; }

/* Tickets and table */
.toolbar { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.filter-tabs { display: flex; gap: 5px; padding: 5px; background: white; border: 1px solid #edf0f3; border-radius: 11px; }
.filter-tab { font-size: 11px; font-weight: 720; background: transparent; border: 0; border-radius: 8px; color: #758196; padding: 9px 13px; white-space: nowrap; }
.filter-tab.active { color: #08783b; background: #e8f8ef; }
.toolbar-right { display: flex; gap: 9px; align-items: center; }
.filter-select, .text-field, .select-field, .textarea-field { width: 100%; border: 1px solid #e0e6ed; color: #2c384c; background: #fff; border-radius: 9px; padding: 11px 12px; outline: none; font-size: 12px; min-height: 41px; }
.filter-select { min-width: 150px; width: auto; }
.text-field:focus, .select-field:focus, .textarea-field:focus, .filter-select:focus { border-color: #3ab56f; box-shadow: 0 0 0 3px rgba(14,161,75,.1); }
.textarea-field { min-height: 106px; resize: vertical; line-height: 1.65; }
.table-card { background: white; border: 1px solid #edf0f4; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.ticket-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.ticket-table th { text-align: left; background: #f9fafc; color: #8390a0; letter-spacing: .035em; padding: 15px 17px; font-weight: 740; font-size: 10px; white-space: nowrap; }
.ticket-table td { padding: 15px 17px; border-top: 1px solid #f0f2f5; color: #526074; vertical-align: middle; }
.ticket-table tbody tr:hover { background: #fcfdfd; }
.ticket-table strong { color: #27354b; font-size: 11px; }
.ticket-table .id-text { color: var(--green-dark); font-weight: 800; }
.ticket-table .ticket-summary { display: block; margin-top: 4px; max-width: 280px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; color: #8692a0; font-size: 10px; }
.ticket-table .cell-button { background: #f3f7f5; color: var(--green-dark); border: 0; width: 29px; height: 29px; border-radius: 8px; display: grid; place-items: center; }
.ticket-table .cell-button:hover { background: #e0f3e8; }
.ticket-table .cell-button .icon { width: 14px; height: 14px; }
.table-footer { display: flex; justify-content: space-between; align-items: center; color: #8c97a6; font-size: 10.5px; border-top: 1px solid #edf0f4; padding: 13px 18px; }
.mobile-ticket-list { display: none; }

/* Forms */
.form-layout { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(245px,.85fr); gap: 18px; align-items: start; }
.form-section-heading { display: flex; align-items: center; gap: 11px; padding-bottom: 16px; border-bottom: 1px solid #eef1f4; margin-bottom: 18px; }
.section-number { background: #eaf8ef; color: var(--green-dark); display: grid; place-items: center; width: 30px; height: 30px; font-size: 12px; font-weight: 800; border-radius: 8px; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.field { min-width: 0; margin-bottom: 17px; }
.field label { font-size: 11.5px; font-weight: 740; color: #415066; display: block; margin-bottom: 8px; }
.field label .required { color: #d7445c; }
.field-help { color: #9ba4b2; font-size: 10px; line-height: 1.55; margin-top: 6px; }
.field-error { color: #cc2944; font-size: 11px; margin-top: 6px; }
.upload-drop { display: block; border: 1.5px dashed #cbd9cf; border-radius: 12px; background: #fbfdfa; text-align: center; padding: 23px 15px; cursor: pointer; }
.upload-drop:hover { border-color: var(--green); background: #f6fff9; }
.upload-drop .upload-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #e8f8ef; color: var(--green-dark); margin: 0 auto 11px; }
.upload-drop strong { color: #4b5b6f; font-size: 11.5px; display: block; }
.upload-drop span { font-size: 10px; color: #99a3b1; display: block; margin-top: 7px; }
.upload-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-preview { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 11px; }
.upload-preview span { border-radius: 7px; padding: 7px 9px; background: #eef7f1; color: #267047; font-size: 10px; word-break: break-word; max-width: 100%; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: 10.5px; color: #6e7c8d; line-height: 1.6; }
.check-line input { accent-color: var(--green); margin-top: 3px; width: 14px; height: 14px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding-top: 18px; margin-top: 17px; border-top: 1px solid var(--line); }
.help-step { display: flex; align-items: flex-start; gap: 11px; margin: 18px 0; }
.help-step .num { width: 27px; height: 27px; flex-shrink: 0; border-radius: 50%; color: #0b8945; background: #e6f7ed; display: grid; place-items: center; font-size: 11px; font-weight: 850; }
.help-step strong { display: block; font-size: 11px; margin: 1px 0 4px; }
.help-step p { font-size: 10.5px; color: #8995a4; line-height: 1.6; margin-bottom: 0; }
.info-card { background: #eef9f2; border-color: #d8eee1; box-shadow: none; }
.info-card p { line-height: 1.7; font-size: 11px; color: #47735c; margin-bottom: 0; }

/* Tenant home */
.tenant-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-bottom: 18px; }
.tenant-cta { border: 1px solid #d8eede; border-radius: 13px; background: linear-gradient(120deg,#f0faf3,#ffffff); padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.tenant-cta h2 { margin-bottom: 7px; }
.tenant-cta p { font-size: 11px; margin-bottom: 0; color: #738476; }
.tenant-ticket-card { display: flex; gap: 12px; align-items: flex-start; border-bottom: 1px solid #edf0f3; padding: 16px 0; }
.tenant-ticket-card:last-child { border-bottom: none; padding-bottom: 0; }
.tenant-ticket-card .ticket-mini-icon { flex-shrink: 0; }
.tenant-ticket-content { flex: 1; min-width: 0; }
.tenant-ticket-content h3 { margin: 0 0 6px; }
.tenant-ticket-content p { color: var(--muted); font-size: 11px; line-height: 1.5; margin-bottom: 8px; }
.tenant-ticket-content small { color: #9ca6b5; font-size: 10px; }

/* Units */
.unit-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.unit-card { text-align: left; width: 100%; cursor: pointer; border: 1px solid #edf0f4; }
.unit-card:hover { border-color: #bbe4ca; transform: translateY(-2px); }
.unit-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.unit-block { background: #e7f7ed; color: #129653; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; }
.unit-block .icon { width: 21px; height: 21px; }
.unit-card h3 { font-size: 16px; letter-spacing: -.02em; margin-bottom: 5px; }
.unit-card p { margin-bottom: 14px; color: #8b97a6; font-size: 10px; }
.unit-stat-row { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid #f0f2f4; font-size: 10px; color: #788697; }
.unit-stat-row strong { color: #3f5065; font-weight: 740; }

/* Reports */
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.report-stat { padding: 13px 0; border-bottom: 1px solid #eff2f5; display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #657388; }
.report-stat:last-child { border: 0; }
.report-stat strong { font-size: 12px; color: #334155; }
.horizontal-bar { margin-top: 7px; background: #eef1f5; height: 8px; border-radius: 99px; overflow: hidden; }
.horizontal-bar > div { background: #5cbf8a; border-radius: inherit; height: 100%; }
.report-print-title { display: none; }

/* Notifications */
.notification-list { display: grid; gap: 0; }
.notification-item { border-bottom: 1px solid #eef1f5; padding: 16px 3px; display: flex; align-items: flex-start; gap: 13px; }
.notification-item:last-child { border-bottom: 0; }
.notification-symbol { background: #e7f6ed; color: var(--green); display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; }
.notification-main { flex: 1; min-width: 0; }
.notification-main strong { font-size: 11.5px; color: #344358; display: block; }
.notification-main p { font-size: 10.5px; color: #8290a1; line-height: 1.65; margin: 6px 0; }
.notification-channels { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.channel-tag { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #e8ecf0; padding: 4px 7px; border-radius: 6px; color: #758398; font-size: 9.5px; font-weight: 660; }
.channel-tag .icon { width: 12px; height: 12px; }
.notification-meta { color: #a0adba; font-size: 10px; white-space: nowrap; }
.notification-demo { border-radius: 10px; border: 1px solid #d6e5f3; background: #f0f7ff; padding: 13px; color: #41678d; font-size: 11px; margin-bottom: 18px; line-height: 1.6; }

/* Settings */
.setting-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(260px,.8fr); gap: 17px; }
.setting-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 15px 0; border-bottom: 1px solid #f0f2f4; }
.setting-line:last-child { border-bottom: 0; }
.setting-line strong { font-size: 11.5px; }
.setting-line p { margin: 5px 0 0; font-size: 10.5px; color: #8b96a7; line-height: 1.6; }
.setting-value { flex-shrink: 0; font-size: 11px; color: var(--green-dark); font-weight: 760; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(11,24,40,.62); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 20px; }
.modal { width: min(100%, 760px); max-height: min(94vh,900px); overflow: auto; background: #fff; box-shadow: 0 30px 120px rgba(0,0,0,.22); border-radius: 17px; }
.modal-header { position: sticky; top: 0; z-index: 1; background: white; border-bottom: 1px solid #eaf0f3; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 24px; }
.modal-header h2 { font-size: 18px; margin: 5px 0 0; }
.modal-body { padding: 22px 24px; }
.modal-footer { padding: 17px 24px; background: #fbfcfd; border-top: 1px solid #edf0f2; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.detail-label { font-size: 10px; color: #93a0af; font-weight: 700; display: block; margin-bottom: 5px; }
.detail-value { font-size: 11.5px; font-weight: 700; color: #3f4d61; word-break: break-word; }
.detail-text { white-space: pre-wrap; line-height: 1.7; font-size: 12px; color: #5e6e80; }
.detail-section { border-top: 1px solid #eef1f5; padding-top: 17px; margin-top: 19px; }
.detail-section h3 { font-size: 12.5px; margin-bottom: 14px; }
.timeline { display: grid; gap: 0; padding-left: 7px; }
.timeline-entry { border-left: 2px solid #e7edf0; padding: 0 0 18px 20px; position: relative; }
.timeline-entry:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-entry:before { position: absolute; content: ""; left: -6px; top: 2px; height: 9px; width: 9px; background: white; border: 2px solid var(--green); border-radius: 50%; }
.timeline-entry strong { color: #48596d; font-size: 11px; display: block; }
.timeline-entry span { color: #9da8b6; font-size: 9.5px; display: block; margin-top: 4px; }
.timeline-entry p { color: #6d7b8e; font-size: 10.5px; margin: 5px 0 0; line-height: 1.55; }
.proof-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.proof-photo { position: relative; display: block; width: 100px; height: 88px; object-fit: cover; border-radius: 9px; border: 1px solid #e3e9ef; }
.proof-caption { color: #8f9aab; font-size: 10px; }
.modal-form { margin: 15px 0 0; border: 1px solid #ecf0f3; background: #f9fafb; padding: 15px; border-radius: 11px; }
.modal-form .field { margin-bottom: 12px; }
.modal-form .field:last-of-type { margin-bottom: 0; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.modal-help { font-size: 10px; color: #8995a4; line-height: 1.6; }

/* Toast */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: grid; gap: 9px; max-width: min(370px,calc(100vw - 40px)); }
.toast { color: #fff; background: #28374c; padding: 13px 17px; border-radius: 11px; box-shadow: 0 9px 35px rgba(0,0,0,.18); font-size: 11.5px; line-height: 1.55; animation: fade-in .2s ease-out; }
.toast.error { background: #ad2940; }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Breakpoints */
@media (max-width: 1250px) {
  :root { --sidebar-width: 238px; }
  .page-content { padding-left: 24px; padding-right: 24px; }
  .topbar { padding-left: 24px; padding-right: 24px; }
  .metric-grid { gap: 12px; }
  .metric-card { padding: 15px; }
  .dashboard-columns { grid-template-columns: minmax(0,1.5fr) minmax(250px,1fr); gap: 12px; }
  .card { padding: 17px; }
  .ticket-table th, .ticket-table td { padding-left: 11px; padding-right: 11px; }
}
@media (max-width: 1020px) {
  .sidebar { position: fixed; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 7px 0 28px rgba(8,16,28,.1); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-scrim.is-open { display: block; position: fixed; inset: 0; background: rgba(14,28,44,.55); z-index: 24; }
  .menu-toggle { display: grid; }
  .dashboard-columns { grid-template-columns: minmax(0,1.5fr) minmax(250px,1fr); }
}
@media (max-width: 760px) {
  .topbar { min-height: 65px; padding: 10px 16px; }
  .topbar-left, .topbar-right { gap: 9px; }
  .header-search, .topbar-divider, .user-label { display: none; }
  .user-pill .avatar { width: 32px; height: 32px; }
  .breadcrumb { font-size: 11px; }
  .page-content { padding: 21px 15px 30px; }
  .page-heading { flex-direction: column; align-items: stretch; }
  .page-heading .btn { align-self: flex-start; }
  .welcome-banner { padding: 21px; min-height: 0; }
  .welcome-banner p { max-width: 330px; }
  .banner-mark { display: none; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tenant-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dashboard-columns, .form-layout, .setting-grid, .report-grid { grid-template-columns: 1fr; }
  .unit-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .table-card { display: none; }
  .mobile-ticket-list { display: grid; gap: 10px; }
  .mobile-ticket-card { text-align: left; border: 1px solid #ebeff3; background: white; width: 100%; border-radius: 12px; padding: 16px; }
  .mobile-ticket-card .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; gap: 8px; }
  .mobile-ticket-card strong { font-size: 12px; color: #344155; display: block; }
  .mobile-ticket-card .id { color: var(--green-dark); font-weight: 760; font-size: 10px; }
  .mobile-ticket-card .meta { color: #8d98a8; font-size: 10px; margin-top: 7px; }
  .toolbar { align-items: stretch; }
  .toolbar-right { justify-content: flex-end; }
  .filter-tabs { width: 100%; overflow-x: auto; }
  .filter-tab { flex: 1; }
  .site-footer { padding: 14px 16px; flex-wrap: wrap; line-height: 1.5; }
}
@media (max-width: 480px) {
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .unit-grid { grid-template-columns: 1fr; }
  .card { padding: 15px; }
  .metric-card { padding: 15px 13px; }
  .metric-number { font-size: 27px; }
  .metric-top span { font-size: 10px; }
  .metric-icon { width: 31px; height: 31px; }
  .tenant-metrics { grid-template-columns: 1fr 1fr; }
  .tenant-cta { align-items: flex-start; flex-direction: column; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .btn { width: 100%; }
  .filter-tab { padding: 9px 10px; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .notification-meta { white-space: normal; }
  .modal-backdrop { padding: 0; align-items: stretch; }
  .modal { border-radius: 0; height: 100vh; max-height: 100vh; width: 100%; }
  .modal-header, .modal-body, .modal-footer { padding-left: 16px; padding-right: 16px; }
  .detail-grid { gap: 13px; }
  .welcome-banner h2 { font-size: 21px; }
}

@media print {
  :root { --canvas: white; }
  .sidebar, .sidebar-scrim, .topbar, .site-footer, .page-heading .btn, .print-hide, .toolbar, .btn, .toast-stack, #modalRoot { display: none !important; }
  .main-layout { display: block; }
  .page-content { padding: 0; width: 100%; }
  .report-print-title { display: block; margin-bottom: 22px; }
  .report-print-title h1 { font-size: 20px; }
  .card { box-shadow: none; border: 1px solid #dae1e8; break-inside: avoid; }
  .report-grid { grid-template-columns: 1fr 1fr; }
  body { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* Connected application additions */
[hidden] { display: none !important; }
.login-screen {min-height:100vh; display:flex; justify-content:center; align-items:center; padding:26px; background:radial-gradient(circle at 20% 20%,#d8f5e5 0,transparent 36%),linear-gradient(145deg,#f8fafc,#eaf0fa);}
.login-card {width:min(100%,490px); background:#fff; box-shadow:0 25px 75px rgba(15,35,53,.12); border:1px solid #e6edf2; padding:40px; border-radius:24px;}
.login-brand {display:flex; align-items:center; gap:12px; margin-bottom:34px; color:#172439;}
.login-brand strong {font-size:17px;letter-spacing:.6px;display:block;}
.login-brand small {font-size:11px;letter-spacing:2px; color:#6e7d8a;display:block;margin-top:3px;}
.login-mark{display:grid;place-items:center;background:#0ea14b;color:white;font-size:23px;font-weight:800;width:48px;height:48px;border-radius:15px;}
.login-kicker{color:#0a8a40;font-size:11px;font-weight:800;letter-spacing:1.5px;margin-bottom:8px;}
.login-card h1{font-size:28px;letter-spacing:-.6px;color:#172439;margin:0 0 10px;}
.login-description{color:#6b7988;font-size:14px;line-height:1.6;margin-bottom:28px;}
.login-form{display:grid;gap:17px;}.login-form .field{margin:0;}.login-button{width:100%;justify-content:center;min-height:47px;margin-top:7px;}
.login-error{color:#bb2020;background:#fff0f0;border-radius:9px;padding:11px;font-size:13px;}
.login-note{font-size:12px;color:#8795a2;text-align:center;line-height:1.5;margin-top:22px;}
.text-field[readonly]{background:#f5f8fa;color:#5e6e79;cursor:not-allowed;}
@media(max-width:520px){.login-card{padding:27px 22px;border-radius:20px;}.login-card h1{font-size:25px;}}

/* ==============================================================
   V4 — Manager Theme Studio and shared branding.
   All editable theme tokens are assigned by app.js from Cloudflare D1.
   ============================================================== */
.brand-symbol,.login-mark {overflow:hidden}
.custom-brand-image {display:block;width:100%;height:100%;object-fit:contain;padding:3px;background:transparent}
.brand-symbol:has(.custom-brand-image),.login-mark:has(.custom-brand-image) {background:transparent;border:1px solid rgba(255,255,255,.22)}
.sidebar {background:var(--navy)}
.nav-item.active {background:var(--green-dark);box-shadow:inset 3px 0 0 var(--green)}
.brand-symbol i{background:var(--purple)}
.welcome-banner {background:linear-gradient(115deg,var(--green-dark),var(--green) 75%,var(--purple))}
.welcome-banner .banner-kicker,.welcome-banner p{color:rgba(255,255,255,.85)}
.login-mark{background:var(--green)}
.login-brand{color:var(--ink)}
.login-kicker{color:var(--green-dark)}
.login-screen{background:radial-gradient(circle at 20% 20%,color-mix(in srgb,var(--green) 12%,white),transparent 38%),linear-gradient(145deg,var(--canvas),#fff)}
.metric-number,.theme-mini-content strong{color:var(--ink)}
.progress-fill,.horizontal-bar>div{background:var(--green)}
.brand-name strong{color:color-mix(in srgb,var(--green) 45%,white)}
.theme-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(295px,.9fr);gap:20px;align-items:start}
.theme-editor,.theme-preview-col{display:grid;gap:17px;min-width:0}
.theme-panel{padding:22px}
.theme-panel-heading{display:flex;gap:12px;align-items:flex-start;margin-bottom:19px}
.theme-panel-heading h2{font-size:16px;line-height:1.5}
.theme-panel-heading p{color:var(--muted);font-size:11px;line-height:1.55;margin:4px 0 0}
.theme-section-icon{width:40px;height:40px;border-radius:11px;display:grid;place-items:center;color:var(--green-dark);background:color-mix(in srgb,var(--green) 10%,white);flex-shrink:0}
.theme-color-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.theme-color-field{border:1px solid #e8edf2;padding:14px;border-radius:12px;display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;min-width:0}
.theme-color-label{display:grid;gap:4px;min-width:0}
.theme-color-label strong{font-size:12px;color:#29374b}
.theme-color-label small{font-size:10px;color:#93a0ae;line-height:1.35}
.theme-color-control{display:flex;align-items:center;gap:8px}
.theme-color-control input[type=color]{border:1px solid #e2e8ee;cursor:pointer;border-radius:9px;padding:3px;width:43px;height:42px;background:#fff;flex-shrink:0}
.theme-color-control input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.theme-color-control input[type=color]::-webkit-color-swatch{border:0;border-radius:5px}
.theme-color-control code{font-size:10px;color:#516077;white-space:nowrap}
.theme-panel-actions{display:flex;justify-content:flex-end;padding-top:18px}
.theme-assets{display:grid;gap:15px}
.theme-asset{display:flex;gap:15px;align-items:center;padding:13px;border:1px solid #e9edf3;border-radius:12px;min-width:0}
.theme-image-preview{display:grid;place-items:center;width:94px;height:78px;background:#edf4f0;border-radius:12px;flex-shrink:0;overflow:hidden;border:1px solid #e2eae5;color:var(--green);font-size:28px;font-weight:850}
.theme-image-preview.small{width:75px;height:75px}
.theme-image-preview img{width:100%;height:100%;object-fit:contain}
.theme-asset-body{min-width:0;flex:1;display:grid;gap:6px}
.theme-asset-body strong{font-size:12px}
.theme-asset-body small{font-size:10px;color:var(--muted);line-height:1.5}
.theme-asset-body input[type=file]{font-size:10px;width:100%;max-width:320px}
.theme-remove{font-size:10px;color:#64748b;display:flex;align-items:center;gap:6px;cursor:pointer}
.theme-toggle-row{border:1px solid #e5e9ef;background:var(--canvas);padding:16px;border-radius:12px;display:flex;align-items:center;justify-content:space-between;gap:15px;cursor:pointer}
.theme-toggle-row>span:first-child{min-width:0;display:grid;gap:6px}
.theme-toggle-row strong{font-size:13px}
.theme-toggle-row small{font-size:11px;color:var(--muted);line-height:1.6}
.theme-switch{display:inline-block;position:relative;flex-shrink:0;width:49px;height:28px}
.theme-switch input{opacity:0;position:absolute;inset:0;width:100%;height:100%;cursor:pointer;margin:0;z-index:1}
.theme-switch>span{display:block;width:100%;height:100%;background:#c5ceda;border-radius:30px;transition:background .2s}
.theme-switch>span:before{content:"";position:absolute;width:21px;height:21px;border-radius:50%;background:white;top:3.5px;left:4px;box-shadow:0 1px 5px #0002;transition:transform .2s}
.theme-switch input:checked+span{background:var(--green)}
.theme-switch input:checked+span:before{transform:translateX(20px)}
.theme-switch input:focus-visible+span{outline:3px solid var(--purple);outline-offset:3px}
.theme-status{font-size:11px;color:var(--muted);margin:12px 0 0}
.theme-save-bar{border:1px solid #e6ebf0;border-radius:12px;background:#fff;padding:14px 16px;display:flex;gap:15px;align-items:center;justify-content:space-between;position:sticky;bottom:15px;z-index:2;box-shadow:0 10px 26px #15293f0d}
.theme-save-bar>div{display:flex;gap:8px;flex-shrink:0}
.theme-preview-card{position:sticky;top:16px}
.theme-preview-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px;gap:10px}
.theme-mini-window{height:258px;border:1px solid #e6ecf0;border-radius:12px;overflow:hidden;display:flex;background:var(--canvas)}
.theme-mini-side{width:82px;background:var(--navy);padding:12px;display:flex;flex-direction:column;align-items:center;gap:12px;color:white;font-weight:800;font-size:8px}
.theme-mini-logo{height:32px;width:32px;border-radius:9px;background:var(--green);display:grid;place-items:center;color:white;font-size:18px;overflow:hidden}
.theme-mini-logo img{height:100%;width:100%;object-fit:contain}
.theme-mini-menu{height:10px;width:51px;border-radius:3px;background:#ffffff30;margin-top:4px}
.theme-mini-menu.selected{background:var(--green);height:15px}
.theme-mini-menu.short{width:36px}
.theme-mini-main{display:flex;flex-direction:column;flex:1;min-width:0}
.theme-mini-top{height:35px;background:#fff;border-bottom:1px solid #e8edf2;padding:11px 12px;color:#738294;font-size:9px}
.theme-mini-content{padding:16px;display:grid;gap:8px;align-content:start}
.theme-mini-content strong{font-size:14px}
.theme-mini-content p{color:#8591a0;font-size:10px;margin:0}
.theme-mini-cards{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:7px 0}
.theme-mini-cards div{background:#fff;border:1px solid #e8ebf0;height:44px;border-radius:6px;border-top:4px solid var(--purple)}
.theme-mini-cards div:nth-child(2){border-top-color:var(--green)}
.theme-preview-button{border:0;border-radius:7px;padding:10px 12px;background:var(--green);color:#fff;font-size:10px;font-weight:700;justify-self:start;cursor:default}
.theme-preview-note{font-size:10px;line-height:1.6;color:var(--muted);margin:12px 0 0}
.theme-settings-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:12px}
@media(max-width:1100px){.theme-layout{grid-template-columns:1fr}.theme-preview-col{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-preview-card{position:static}}
@media(max-width:650px){.theme-color-grid{grid-template-columns:1fr}.theme-preview-col{grid-template-columns:1fr}.theme-save-bar{align-items:stretch;flex-direction:column}.theme-save-bar>div{justify-content:flex-end}.theme-asset{align-items:flex-start}.theme-image-preview{width:65px;height:65px}.theme-panel{padding:16px}}
@media print{.theme-save-bar,.theme-preview-col{display:none!important}}

/* V6: Tenant My Account — personal information only */
.account-profile-hero{display:flex;align-items:center;gap:19px;padding:23px 27px;margin-bottom:19px;border-radius:17px;color:#fff;background:linear-gradient(105deg,var(--navy),#23553d);position:relative;overflow:hidden}
.account-profile-hero:after{content:"";position:absolute;width:190px;height:190px;border:1px solid #ffffff22;border-radius:50%;right:-50px;top:-85px;pointer-events:none}
.account-profile-avatar{height:70px;width:70px;flex-shrink:0;display:grid;place-items:center;border-radius:20px;background:#ffffff24;color:#fff;font-size:23px;font-weight:800;border:1px solid #ffffff33}
.account-profile-welcome{min-width:0;flex:1}.account-profile-welcome>span{display:block;font-size:10px;font-weight:800;letter-spacing:.15em;color:#b5f1ce;margin-bottom:5px}.account-profile-welcome h2{color:white;font-size:22px;font-weight:790;line-height:1.25;overflow-wrap:anywhere}.account-profile-welcome p{margin:7px 0 0;color:#d1e9dc;font-size:12px;overflow-wrap:anywhere}
.account-profile-status{background:#ffffff1a;border:1px solid #ffffff30;border-radius:30px;padding:9px 12px;font-size:11px;font-weight:750;white-space:nowrap;display:flex;align-items:center;gap:6px;position:relative;z-index:1}.account-profile-status .icon{width:14px;height:14px}
.account-view-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px;align-items:start}.account-view-layout>.card:last-child{grid-column:1/-1}.account-info-card,.account-edit-card{padding:23px}
.account-card-head{display:flex;align-items:center;gap:13px;margin-bottom:23px}.account-section-emblem{width:42px;height:42px;border-radius:12px;background:var(--green-pale);color:var(--green-dark);display:grid;place-items:center;flex-shrink:0}.account-section-emblem .icon{width:21px;height:21px}.account-card-head h2{font-size:15px}.account-card-head p{font-size:11px;color:var(--muted);margin:4px 0 0;line-height:1.5}
.account-information-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.account-information-item{min-width:0;display:flex;align-items:flex-start;gap:11px;padding:14px;border:1px solid #e8edf1;border-radius:12px;background:#fafcfd}.account-information-icon{height:34px;width:34px;flex-shrink:0;border-radius:9px;display:grid;place-items:center;background:#edf6f1;color:var(--green-dark)}.account-information-icon .icon{height:17px;width:17px}.account-information-text{min-width:0}.account-information-text span{display:block;color:#8492a3;font-size:10.5px;line-height:1.3;margin-bottom:5px}.account-information-text strong{font-size:12px;color:var(--ink);font-weight:720;line-height:1.5;overflow-wrap:anywhere;display:block}.account-information-text strong.is-empty{color:#a0aaba;font-weight:500}
.account-notification-list{display:grid;gap:11px}.account-notification-row{display:flex;align-items:center;gap:13px;padding:15px;border:1px solid #e8edf1;border-radius:13px;background:#fafcfd}.account-notification-icon,.account-toggle-icon{height:40px;width:40px;border-radius:12px;display:grid;place-items:center;background:#e9f6ed;color:var(--green-dark);flex-shrink:0}.account-notification-icon .icon,.account-toggle-icon .icon{width:20px;height:20px}.account-notification-text,.account-toggle-desc{min-width:0;flex:1}.account-notification-text strong,.account-toggle-desc strong{display:block;font-size:12px;font-weight:770}.account-notification-text p,.account-toggle-desc small{display:block;color:#8390a0;font-size:11px;line-height:1.55;margin:3px 0 0}.account-preference-badge{font-size:10px;font-weight:770;border-radius:30px;padding:6px 11px;white-space:nowrap}.account-preference-badge.on{background:#e5f8ec;color:#078443}.account-preference-badge.off{background:#eef1f5;color:#637186}
.account-helper{color:#8a97a5;font-size:10.8px;line-height:1.65;margin:12px 0 0}.account-edit-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px;align-items:start}.account-edit-layout .account-edit-card:first-child{grid-row:span 2}.account-edit-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.account-edit-fields .field{margin:0}.account-edit-fields .text-field{font-size:12.5px;min-height:43px}.account-edit-fields label{font-size:11.5px}.account-edit-fields small{display:block}
.account-security-box{background:#fff8e6;border:1px solid #f0dfaf;border-radius:12px;padding:15px;margin-top:18px}.account-security-box[hidden]{display:none}.account-security-box>div{display:flex;align-items:center;gap:8px;font-size:12px;color:#775713}.account-security-box .icon{width:18px;height:18px}.account-security-box p{color:#7d693f;font-size:11px;line-height:1.55;margin:9px 0 12px}.account-security-box label{display:block;font-size:11px;font-weight:700;margin-bottom:7px}.account-security-box input{max-width:420px}
.account-toggle{padding:14px 13px;margin-bottom:10px;border:1px solid #e7ecef;background:#fafcfd;border-radius:13px;display:flex;align-items:center;gap:13px;cursor:pointer}.account-toggle .theme-switch{margin-left:auto}.account-privacy{font-size:10.5px;line-height:1.7;color:#8591a0;margin:11px 0 0}.account-warning{padding:10px 12px;color:#9a6500;background:#fff6df;border-radius:9px;font-size:10.8px;line-height:1.55}.account-save-bar{grid-column:1/-1;background:#fff;border:1px solid #e8eef2;border-radius:13px;padding:15px;display:flex;align-items:center;gap:15px;justify-content:space-between;box-shadow:0 5px 23px #15293f0a;position:sticky;bottom:12px;z-index:3}.account-save-bar>span{font-size:10.5px;color:#80909e;display:flex;align-items:center;gap:8px}.account-save-bar .icon{width:15px;height:15px}.account-save-bar>div{display:flex;gap:8px}
.account-alert{margin-bottom:17px;display:flex;align-items:center;flex-wrap:wrap;gap:7px;padding:12px 15px;background:#ebf8f0;border:1px solid #bce9cc;border-radius:11px;color:#166336;font-size:11.5px;line-height:1.6;overflow-wrap:anywhere}.account-alert .icon{width:16px;height:16px;flex-shrink:0}
.account-request-note{display:flex;align-items:center;gap:9px;padding:13px;border:1px solid #dcebe2;background:#f4faf6;border-radius:11px;color:#4b6857;font-size:11px;line-height:1.6}.account-request-note .icon{height:18px;width:18px;flex-shrink:0}.account-request-note .text-link{display:inline;font-size:11px}
@media(max-width:1100px){.account-view-layout,.account-edit-layout{grid-template-columns:1fr}.account-edit-layout .account-edit-card:first-child{grid-row:auto}.account-view-layout>.card:last-child{grid-column:auto}}
@media(max-width:650px){.account-profile-hero{padding:18px;gap:13px}.account-profile-avatar{height:53px;width:53px;font-size:17px;border-radius:15px}.account-profile-welcome h2{font-size:18px}.account-profile-status{font-size:9px;padding:6px 8px}.account-info-card,.account-edit-card{padding:17px}.account-information-grid,.account-edit-fields{grid-template-columns:1fr}.account-notification-row,.account-toggle{gap:10px;padding:12px}.account-notification-icon,.account-toggle-icon{height:35px;width:35px}.account-save-bar{flex-direction:column;align-items:stretch}.account-save-bar>div{justify-content:flex-end}.account-profile-welcome p{font-size:10px}}
@media(max-width:390px){.account-profile-hero{flex-wrap:wrap}.account-profile-status{margin-left:66px}}
@media print{.account-save-bar{display:none!important}}
@media(max-width:650px){
  .account-profile-hero{display:grid;grid-template-columns:53px minmax(0,1fr);align-items:center;gap:10px 13px}
  .account-profile-avatar{grid-column:1;grid-row:1}
  .account-profile-welcome{grid-column:2;grid-row:1}
  .account-profile-status{grid-column:2;grid-row:2;justify-self:start;margin-left:0}
  .account-profile-welcome h2{overflow-wrap:normal;word-break:normal}
}
@media(max-width:390px){.account-profile-status{margin-left:0}}

/* V7 — Manager CRM / Setup, streamlined tenant portal */
[hidden] {display:none!important}
.nav-subheading{font-size:10px!important;font-weight:800;letter-spacing:.16em;color:#97adbf!important;margin:20px 12px 8px!important;padding:0!important}
.nav-list{gap:4px}.nav-list .nav-item{min-height:43px}.nav-list .nav-item span{line-height:1.3}
.crm-stats{margin-bottom:19px}
.crm-database{padding:24px}
.crm-table-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}
.crm-table-head h2{font-size:16px;margin:0 0 5px}
.crm-search{max-width:340px;width:100%;min-width:185px}
.table-scroll{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.crm-table{min-width:650px}
.crm-person,.crm-mobile-head{display:flex;align-items:center;gap:11px;min-width:0}
.crm-person strong,.crm-mobile-head strong{display:block;color:var(--ink);font-size:12px}
.crm-person small,.crm-mobile-head small{display:block;color:var(--muted);font-size:11px;margin-top:4px;overflow-wrap:anywhere}
.crm-avatar{background:linear-gradient(135deg,var(--green),#167e70);color:#fff;border-radius:12px;width:38px;height:38px;flex-shrink:0;display:grid;place-items:center;font-weight:800}
.crm-tag{display:inline-block;font-size:10px;font-weight:750;padding:6px 10px;border-radius:100px;white-space:nowrap}
.crm-tag.active{background:#e2f7e9;color:#0a8240}.crm-tag.archived{background:#fff0f0;color:#b32a2a}
.crm-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.btn-sm{font-size:11px!important;padding:9px 13px!important;min-height:33px!important}
.btn-danger{color:#bd2c3b!important;background:#fff4f5!important;border:1px solid #f5cdd3!important}.btn-danger:hover{background:#ffe7ea!important}
.crm-note{font-size:11px;color:var(--muted);line-height:1.7;margin:16px 0 0}
.crm-mobile-list{display:none}
.crm-form{display:grid;gap:16px}.crm-form>.field{margin-bottom:0}.crm-form .field-grid{margin:0}
.crm-form .text-field,.crm-form .textarea-field{max-width:100%}
.modal-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 18px;gap:10px}.modal-heading h2{font-size:19px;margin:5px 0 0}
.modal-buttons{display:flex;justify-content:flex-end;gap:9px;margin-top:8px}
.crm-two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:19px;align-items:start}
.crm-two-col>.card{padding:23px}.crm-two-col h2{margin-bottom:9px;font-size:17px}.crm-two-col .section-description{margin:8px 0 17px}
.status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin:20px 0 24px}
.status-config-row{display:grid;grid-template-columns:minmax(90px,.85fr) minmax(120px,1.4fr) 70px;align-items:end;gap:11px;padding:14px;border:1px solid #e7ebf1;background:#fafcfe;border-radius:13px}
.status-config-row>div small{display:block;color:var(--muted);font-size:10px;margin-bottom:6px}.status-config-row strong{font-size:12px}
.status-config-row label{font-size:11px;color:var(--muted);font-weight:650}.status-config-row label .text-field{margin-top:6px}
.status-config-row input[type=color]{display:block;width:58px;height:42px;padding:4px;border:1px solid #e5e9ef;border-radius:9px;margin-top:6px;background:#fff;cursor:pointer}
.setup-after{margin-top:26px}.setup-after h2{margin-bottom:8px}.setup-after .section-description{margin-bottom:17px}
.account-extra-fields{margin-top:16px}.account-password-section{margin-top:22px;max-width:700px}
.account-password-section>.card{padding:23px}.account-password-section h2{margin-bottom:8px}
.tenant-history{margin-top:20px}.tenant-history .mobile-ticket-card{display:block;width:100%;text-align:left;margin-bottom:10px;border:1px solid #e8edf1;border-radius:12px;padding:15px;background:#fafcfd;cursor:pointer}
.tenant-history .mobile-ticket-card .top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}
.tenant-history .mobile-ticket-card>strong{display:block;font-size:13px}.tenant-history .meta{font-size:11px;color:var(--muted);margin-top:7px}
@media(max-width:1200px){.status-grid{grid-template-columns:1fr}}
@media(max-width:900px){.crm-two-col{grid-template-columns:1fr}}
@media(max-width:760px){
 .crm-table-head{flex-direction:column;align-items:stretch}.crm-search{max-width:none}
 .crm-database{padding:16px}.crm-database .table-scroll{display:none}.crm-mobile-list{display:grid;gap:12px}
 .crm-mobile-card{padding:14px;border:1px solid #e8ecf2;border-radius:13px;background:#fafcfd;min-width:0}
 .crm-mobile-head>div{min-width:0}.crm-mobile-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px 13px;padding:12px 0;font-size:11px;color:var(--muted)}
 .crm-mobile-meta .crm-tag{margin-left:auto}.crm-actions .btn{flex:1}
 .crm-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-stats .metric-card{min-width:0}
 .status-config-row{grid-template-columns:minmax(72px,.7fr) minmax(110px,1.3fr) 64px;padding:12px 9px;gap:7px}
 .crm-two-col>.card{padding:17px}
}
@media(max-width:420px){.crm-stats{gap:9px}.crm-stats .metric-card{padding:13px}.crm-stats .metric-number{font-size:24px}.status-config-row{grid-template-columns:1fr 1fr}.status-config-row>div{grid-column:1/-1}.status-config-row label:last-child{justify-self:end}}

/* V8 MANAGER NAVIGATION, UNIT DIRECTORY AND TASK WORKLIST */
.directory-toolbar{align-items:flex-end;gap:16px;flex-wrap:wrap}
.directory-filters{display:flex;flex-wrap:wrap;gap:10px;min-width:260px}
.directory-filters .text-field{min-width:200px;flex:1}
.directory-filters .select-field{width:auto;min-width:144px}
.directory-table td{vertical-align:middle}
.directory-table .ticket-summary{display:block;margin-top:5px;font-weight:400}
.unit-action-buttons{flex-wrap:wrap;gap:5px}
.directory-mobile-card{display:none}
.directory-meta{display:flex;flex-wrap:wrap;align-items:center;gap:10px;font-size:.82rem;color:var(--ink-muted,#6b7280);margin:10px 0}
.directory-notes{font-size:.87rem;color:var(--ink-muted,#6b7280);margin:0 0 12px}
.directory-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 18px}
.directory-detail-grid>div{padding:14px;background:var(--canvas,#f6f8fb);border-radius:10px;display:grid;gap:4px}
.directory-detail-grid small{color:#64748b;font-size:.78rem}.directory-detail-grid strong{overflow-wrap:anywhere}
.task-worklist{padding:20px}.task-toolbar{display:flex;gap:9px;margin:15px 0}.task-toolbar input{flex:1;min-width:0}
.task-tabs{margin-bottom:14px}.task-count{margin:0 0 13px}
[data-directory-row][hidden]{display:none!important}
@media(max-width:850px){.directory-table{display:none}.directory-mobile-card{display:block}.directory-toolbar{display:grid}.directory-filters{width:100%;min-width:0}.directory-filters .text-field{min-width:0}}
@media(max-width:520px){.directory-filters{flex-direction:column}.directory-filters .text-field,.directory-filters .select-field{width:100%}.directory-detail-grid{grid-template-columns:1fr 1fr}.task-worklist{padding:14px}.task-toolbar{flex-wrap:wrap}.task-toolbar input{flex-basis:100%}}

/* ==============================================================
   V8.1 — Responsive open/close sidebar.
   Desktop: full navigation ↔ icon-only compact navigation.
   Tablets/phones: off-canvas drawer with backdrop and close control.
   This is a visual preference only: no ticket data is stored locally.
   ============================================================== */
.menu-toggle { display: grid; flex: 0 0 37px; }
.menu-toggle:focus-visible, .sidebar-close:focus-visible, .nav-item:focus-visible, .role-switch:focus-visible { outline: 3px solid #8be2b0; outline-offset: 2px; }
.sidebar-close { flex: 0 0 32px; width: 32px; height: 32px; margin-left: auto; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); color: #e9f4ef; border-radius: 9px; cursor: pointer; }
.sidebar-close:hover { background: rgba(255,255,255,.18); }
.sidebar-close .icon { width: 18px; height: 18px; }
.sidebar .brand-symbol { flex: 0 0 40px; }
.sidebar .nav-item .icon { flex: 0 0 18px; }
@media (min-width: 1021px) {
  .sidebar { transition: width .22s ease, flex-basis .22s ease, padding .22s ease; }
  .app-shell.sidebar-collapsed .sidebar { width: 76px; flex: 0 0 76px; padding: 28px 10px 18px; }
  .app-shell.sidebar-collapsed .brand { padding: 0 0 26px; justify-content: center; }
  .app-shell.sidebar-collapsed .brand-copy,
  .app-shell.sidebar-collapsed .sidebar-property,
  .app-shell.sidebar-collapsed .sidebar-close,
  .app-shell.sidebar-collapsed .nav-section-label,
  .app-shell.sidebar-collapsed .nav-item span,
  .app-shell.sidebar-collapsed .role-switch span,
  .app-shell.sidebar-collapsed .role-switch .chevron { display: none; }
  .app-shell.sidebar-collapsed .nav-item { justify-content: center; padding: 13px 0; min-height: 46px; }
  .app-shell.sidebar-collapsed .sidebar-footer { padding-top: 16px; }
  .app-shell.sidebar-collapsed .role-switch { justify-content: center; padding: 13px 0; }
}
@media (max-width: 1020px) {
  .sidebar, .app-shell.sidebar-collapsed .sidebar { width: min(290px, 86vw); flex: 0 0 min(290px, 86vw); padding: 22px 15px 18px; }
  .sidebar .brand-copy,
  .sidebar .sidebar-property,
  .sidebar .nav-section-label,
  .sidebar .nav-item span,
  .sidebar .role-switch span { display: initial; }
  .sidebar .brand-copy { display: block; }
  .sidebar .sidebar-property { display: flex; }
  .sidebar .nav-section-label { display: block; }
  .sidebar .nav-item { justify-content: flex-start; padding: 12px 13px; }
  .sidebar .role-switch { justify-content: flex-start; padding: 12px 11px; }
  .sidebar .role-switch .chevron { display: block; }
  .sidebar-close { display: grid; }
  body.sidebar-drawer-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none !important; }
}

/* ==============================================================
   V8.2 — App-style fixed mobile bottom navigation (reference design)
   Desktop and tablet sidebar behavior remains unchanged.
   ============================================================== */
.mobile-bottom-nav { display: none; }
@media (max-width: 760px) {
  /* Reserve space for the bottom bar so the last card/Save button never hides beneath it. */
  .app-shell .main-layout {
    padding-bottom: calc(73px + env(safe-area-inset-bottom, 0px));
  }
  .app-shell .site-footer { display: none; }
  .mobile-bottom-nav:not([hidden]) {
    position: fixed;
    display: flex;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 22;
    isolation: isolate;
    align-items: stretch;
    justify-content: space-around;
    padding: 5px max(6px, env(safe-area-inset-right, 0px)) calc(5px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
    background: #fff;
    border-top: 1px solid #e0e6eb;
    box-shadow: 0 -4px 18px rgba(17, 31, 48, .07);
    width: 100%;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-bottom-tab {
    -webkit-appearance: none;
    appearance: none;
    flex: 1 1 0;
    min-width: 0;
    min-height: 63px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #87919e;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 7px 2px 5px;
    font: inherit;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    touch-action: manipulation;
  }
  .mobile-bottom-tab::before {
    content: '';
    position: absolute;
    height: 3px;
    left: 13%;
    right: 13%;
    top: -5px;
    background: transparent;
    border-radius: 0 0 5px 5px;
  }
  .mobile-bottom-tab.is-active { color: var(--green); font-weight: 750; }
  .mobile-bottom-tab.is-active::before { background: var(--green); }
  .mobile-bottom-tab .icon { height: 23px; width: 23px; stroke-width: 1.85; }
  .mobile-tab-icon { display: flex; justify-content: center; align-items: center; width: 30px; height: 26px; position: relative; }
  .mobile-tab-label { font-size: clamp(9px, 2.6vw, 11.5px); line-height: 1.1; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .mobile-tab-badge { position: absolute; top: -6px; right: -12px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border-radius: 99px; background: #e33737; border: 1.5px solid white; color: white; font-size: 9px; font-weight: 760; line-height: 1; }
  .mobile-bottom-tab:focus-visible { outline: 3px solid #70dca2; outline-offset: -4px; border-radius: 10px; }
  .toast-stack { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  /* Full-screen mobile sheets must not be obscured by navigation. */
  body:has(#modalRoot .modal-backdrop) .mobile-bottom-nav { visibility: hidden; }
}
@media print {
  .mobile-bottom-nav { display: none !important; }
  .app-shell .main-layout { padding-bottom: 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-bottom-tab { transition: none; }
}


/* V9 — role-based desktop and mobile workspaces */
.v9-card-list{display:grid;gap:11px;margin-top:18px}
.v9-record{display:flex;gap:13px;align-items:center;background:#fcfdfd;border:1px solid #e8edf2;padding:13px 15px;border-radius:13px;min-width:0;flex-wrap:wrap}
.v9-record-leading{width:46px;height:46px;flex-shrink:0;display:grid;place-items:center;border-radius:14px;background:#e7f7ed;color:#157b48;font-size:18px;font-weight:800;overflow:hidden}
.v9-record-leading img{width:100%;height:100%;object-fit:cover}
.v9-record-info{min-width:130px;flex:1;display:grid;gap:5px}.v9-record-info strong{font-size:13px;overflow-wrap:anywhere}
.v9-record-info small{font-size:11px;color:var(--muted);overflow-wrap:anywhere}
.v9-record .crm-actions{margin-left:auto}
.v9-order-id{display:inline-flex;padding:9px;border-radius:9px;background:#eef5fe;color:#22568a;font-size:12px;font-weight:800}
.v9-space{margin-top:18px}.v9-quick-actions{display:flex;gap:10px;margin:16px 0;flex-wrap:wrap}
.profile-image{width:100%;height:100%;object-fit:cover;display:block;border-radius:inherit}
.profile-image.tiny{border-radius:50%}
.profile-photo-form{padding:19px;margin:18px 0}.profile-photo-form .crm-form{display:grid;gap:13px;margin:15px 0}
.profile-photo-preview{height:96px;width:96px;border-radius:20px;display:grid;place-items:center;background:#e2f7eb;color:#14673f;font-size:25px;font-weight:750;overflow:hidden;margin:13px 0}
.profile-photo-preview .profile-image{height:100%;width:100%}
.mobile-logout-block{margin-top:18px;display:none}
@media(max-width:760px){
  /* Mobile keeps four bottom tabs AND the full role-specific off-canvas sidebar. */
  .menu-toggle{display:grid;touch-action:manipulation}
  .sidebar-close{min-height:42px;min-width:42px;touch-action:manipulation}
  .page-content{padding-bottom:calc(88px + env(safe-area-inset-bottom,0px))!important}
  .mobile-logout-block{display:block}.mobile-logout-block .btn{width:100%}
  .desktop-edit-only,.profile-photo-form,.account-password-section{display:none!important}
  .v9-record{align-items:flex-start;padding:13px}.v9-record .crm-actions{width:100%;margin-left:0}
  .v9-record .crm-actions .btn{flex:1;min-width:110px}
  .v9-quick-actions>.btn{flex:1 1 125px}
  .profile-image.tiny{height:100%;width:100%}
  .page-heading h1{font-size:clamp(23px,7vw,31px)}
}
@media print{.mobile-bottom-nav,.mobile-logout-block,.v9-quick-actions{display:none!important}}

/* V9.1 — notification channel policy settings, responsive on phones */

/* V9.3 sidebar reliability: visible toggle at mobile/tablet sizes, proper overlay. */
@media(max-width:1020px){
  #sidebar{visibility:visible;max-width:86vw;}
  #sidebar.is-open{transform:translateX(0);}
  #menuToggle{display:grid;min-width:42px;min-height:42px;touch-action:manipulation;}
  #sidebarScrim.is-open{display:block;}
}
@media(max-width:760px){
  .topbar-left{gap:8px;}
  #menuToggle{flex:0 0 42px;}
}

/* V9.5 — Account editing and password management are available in the installed mobile web app. */
.account-core-form { max-width: 760px; }
.account-core-form .field input { width: 100%; }
@media (max-width: 760px) {
  .account-password-section, .profile-photo-form.desktop-edit-only { display: block !important; }
  .account-save-bar { flex-wrap:wrap; gap:12px; }
  .account-core-form .btn { min-height:44px; }
  .page-content { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; }
}
