/* ====================================================================
   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;}}
