/* AqarOS workspace: a shared hierarchy for daily work, records and settings. */
.app-shell { --shadow:0 2px 6px #18223006; grid-template-columns:232px minmax(0,1fr); }
.app-shell .sidebar { padding:22px 14px 14px; gap:22px; overflow:hidden; }
.sidebar .brand { padding-inline:8px; gap:10px; flex-shrink:0; }
.sidebar .brand small { font-size:.73rem; }
.side-nav { display:flex; flex-direction:column; gap:3px; min-height:0; overflow-y:auto; scrollbar-width:thin; scrollbar-color:#536278 transparent; padding:2px; }
.sidebar .nav-link,.nav-group>summary { min-height:40px; padding:9px 10px; font-size:.875rem; line-height:1.4; border-radius:7px; gap:10px; }
.sidebar .nav-link { font-weight:500; }
.sidebar .nav-link.active { background:#27454f; box-shadow:inset 3px 0 #60b8b3; color:#fff; font-weight:650; }
[dir=rtl] .sidebar .nav-link.active { box-shadow:inset -3px 0 #60b8b3; }
.nav-section-label { color:#a0b1c0; font-size:.65rem; font-weight:700; text-transform:uppercase; letter-spacing:.08em; padding:16px 12px 6px; }
[dir=rtl] .nav-section-label { letter-spacing:0; }
.nav-group { margin-top:5px; }
.nav-group>summary { display:flex; align-items:center; cursor:pointer; color:#d3dde7; list-style:none; font-weight:500; }
.nav-group>summary::-webkit-details-marker { display:none; }
.nav-group>summary::after { content:'›'; font-size:1.2rem; margin-inline-start:auto; transition:transform .15s; }
[dir=rtl] .nav-group>summary::after { transform:rotate(180deg); }
.nav-group[open]>summary::after { transform:rotate(90deg); }
.nav-group>summary:hover { background:#ffffff0d; }
.nav-group>.nav-link { margin-inline-start:18px; padding-inline-start:20px; border-inline-start:1px solid #3b485b; border-start-start-radius:0; border-end-start-radius:0; }
.sidebar .sidebar-note { margin-top:auto; padding:12px 10px 0; border:0; border-top:1px solid #ffffff1f; border-radius:0; background:none; flex-shrink:0; }
.sidebar-note>span { font-size:.68rem; }
.sidebar-note>strong { font-size:.78rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-close,.navigation-backdrop { display:none; }
.app-shell .topbar { min-height:76px; padding:14px 28px; background:#fff; backdrop-filter:none; gap:20px; z-index:20; }
.topbar .global-search { width:min(420px,100%); height:42px; background:#f8fafb; border-color:#e3e8ed; }
.global-search input { font-size:.82rem; }
.topbar-actions { margin-inline-start:auto; gap:12px; }
.topbar .language-switcher { display:flex; gap:2px; padding:3px; border:1px solid var(--line); border-radius:7px; }
.topbar .language-switcher button { border:0; min-height:30px; padding:4px 8px; font-size:.73rem; border-radius:5px; }
.topbar .currency-view { font-size:.72rem; gap:7px; }
.currency-view select { min-height:38px; border-radius:7px; }
.topbar .workspace-badge { background:transparent; border:0; border-inline-start:1px solid var(--line); border-radius:0; padding-inline:12px; }
.workspace-badge strong { max-width:160px; }
.topbar .user-chip { width:36px; height:36px; }
.app-shell .content-area { width:100%; max-width:1440px; padding:28px; }
.content-area .page-heading { align-items:center; margin-bottom:24px; gap:18px; }
.content-area .page-heading h1 { font-size:1.75rem; line-height:1.35; font-weight:700; }
.page-heading p { margin:5px 0 0; font-size:.875rem; line-height:1.65; color:var(--muted); max-width:65ch; }
.content-area .eyebrow { font-size:.7rem; margin-bottom:4px; letter-spacing:.04em; }
.content-area h2 { font-size:1.1rem; line-height:1.5; font-weight:650; margin-bottom:10px; }
.content-area h3 { font-size:1rem; line-height:1.5; }
.content-area .panel { padding:20px; border-color:#e2e8ee; border-radius:12px; margin-bottom:18px; }
.content-area .panel-header { margin-bottom:18px; align-items:start; }
.panel p,.contract-editor p { line-height:1.7; }
.panel>p { font-size:.875rem; color:var(--muted); }
.app-shell .btn { font-size:.875rem; font-weight:650; min-height:38px; padding:8px 14px; line-height:1.5; }
.app-shell .btn-small { min-height:32px; padding:5px 10px; font-size:.75rem; }
.app-shell .btn-primary { box-shadow:0 1px 2px #15565e15; }
.app-shell .btn-light:hover { background:#f5f8fa; border-color:#bdcbd6; }
.content-area .quick-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:22px; }
.content-area .metric { min-height:116px; padding:18px; border-radius:10px; box-shadow:none; }
.metric::before { width:3px; }
.metric>span { font-size:.78rem; }
.metric strong { font-size:1.55rem; margin:10px 0 6px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.metric small { font-size:.73rem; line-height:1.6; }
.content-area .empty-state { padding:32px 20px; margin:0; }
.empty-state h2 { font-size:1.2rem; color:var(--ink); }
.empty-state p { font-size:.875rem; max-width:56ch; margin:8px auto 20px; }
.empty-state .heading-actions { justify-content:center; flex-wrap:wrap; }
.content-area .data-table { font-size:.875rem; }
.data-table th { font-size:.75rem; letter-spacing:.02em; font-weight:700; padding:11px 12px; }
.data-table td { padding:13px 12px; }
.data-table tbody tr:hover { background:#f9fbfc; }
.data-table td span,.cell-subtext { font-size:.74rem; line-height:1.6; }
.content-area .filter-bar { display:flex; flex-wrap:wrap; gap:12px; align-items:end; padding:0 0 18px; margin:0; }
.filter-bar>label { flex:1 1 140px; min-width:0; }
.filter-bar>label:first-of-type { flex:2 1 220px; }
.filter-bar>.btn { flex:0 0 auto; }
.filter-bar label,.form-grid label,.stacked-form label { font-size:.8rem; font-weight:600; gap:6px; }
.content-area :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) { border-radius:7px; }
.filter-bar :is(input,select),.form-grid :is(input:not([type=checkbox]):not([type=radio]),select) { min-height:42px; padding:9px 11px; font-size:.875rem; }
.form-grid { gap:18px; }
.form-grid .field-hint { font-size:.76rem; font-weight:400; line-height:1.65; }
.form-grid textarea { padding:10px 11px; font-size:.875rem; }
.content-area .inline-alert { border-radius:8px; padding:12px 16px; font-size:.8rem; line-height:1.65; }
.help-disclosure { color:var(--muted); font-size:.78rem; margin:18px 0; }
.help-disclosure summary { cursor:pointer; color:var(--primary); font-weight:600; }
.help-disclosure p { padding:12px 14px; margin:8px 0; border-inline-start:2px solid #bdd8d9; background:#edf5f4; }
.welcome-panel { padding:28px!important; background:linear-gradient(115deg,#fff,#f2f8f7)!important; }
.welcome-panel>p { max-width:62ch; margin-bottom:22px; }
.setup-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.setup-step { display:flex; gap:12px; align-items:flex-start; background:#fff; border:1px solid #dce7e8; border-radius:10px; padding:18px; text-decoration:none; }
.setup-step:hover { border-color:var(--primary); color:var(--ink); }
.setup-step-number { display:grid; place-items:center; flex:0 0 28px; height:28px; border-radius:50%; background:#e5f2ef; color:var(--primary); font-size:.8rem; font-weight:700; }
.setup-step strong { display:block; font-size:.9rem; margin-bottom:6px; }
.setup-step p { margin:0; color:var(--muted); font-size:.78rem; line-height:1.65; }
.empty-overview { display:flex; align-items:center; gap:24px; flex-wrap:wrap; padding:14px 4px; font-size:.8rem; color:var(--muted); }
.empty-overview .text-link { margin-inline-start:auto; }
.owner-action-grid { margin-bottom:20px; }
.content-area .owner-action { margin:0; padding:18px; gap:8px; }
.owner-action>span { font-size:.8rem; }
.owner-action strong { font-size:1.45rem; font-variant-numeric:tabular-nums; }
.owner-action small { font-size:.75rem; }
.attention-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; align-items:start; }
.attention-grid .panel { margin:0; }
.attention-grid .data-table { min-width:420px; }
.attention-empty { display:flex; gap:12px; align-items:center; color:var(--muted); font-size:.875rem; background:#f6faf9; border-radius:8px; padding:14px; }
.attention-empty p { margin:0; }
.attention-empty strong { color:var(--primary); font-size:.875rem; }
.property-delegation { max-width:960px; }
.page-step-form .page-step { min-height:235px; padding:20px 0; }
.page-step-form [hidden] { display:none!important; }
.page-step-form .guided-progress { padding:12px; border:1px solid #e0e8ec; border-radius:8px; margin-top:18px; }
.page-step-form .form-actions { border-top:1px solid var(--line); padding-top:16px; display:flex; gap:10px; justify-content:flex-end; }
.page-step-form .form-actions .step-back { margin-inline-end:auto; }
.page-step-form .review-details { margin:12px 0; }
.content-area .contract-editor,.content-area .working-mode-form { width:100%; max-width:none; margin-inline:0; }
.content-area .contract-editor-actions { border-top:1px solid var(--line); padding:18px 0 0; margin-top:24px; }
.editor-progress { display:flex; gap:10px; list-style:none; padding:0; margin:0 0 22px; }
.editor-progress li { display:flex; align-items:center; gap:8px; flex:1; padding:10px 12px; border-radius:8px; background:#edf1f4; color:var(--muted); font-size:.8rem; }
.editor-progress [aria-current=step] { background:#e2f0ee; color:var(--primary); font-weight:700; }
.editor-progress .guided-number { font-size:.75rem; }
.app-shell .modal-header { padding:18px 22px; }
.app-shell .modal-title { font-size:1.25rem; line-height:1.5; }
.app-shell .modal-content { border-radius:12px; box-shadow:0 20px 70px #15223833; }
.app-shell .modal-body { padding:22px; }
.app-shell .guided-progress { background:#f8fafb; }
.app-shell .modal-footer { padding:14px 22px; background:#fafcfc; }
@media(min-width:901px) and (max-width:1250px) { .topbar .currency-view>.ui-text { display:none!important; } .topbar .global-search { width:300px; } .topbar-actions { gap:8px; } .workspace-badge strong { max-width:100px; } }
@media(min-width:901px) and (max-width:1150px) { .topbar-actions>.language-switcher { display:none; } }
@media(max-width:1100px) { .setup-steps { gap:10px; } .setup-step { flex-direction:column; } .attention-grid { grid-template-columns:1fr; } }
@media(max-width:900px) {
  .app-shell .sidebar.mobile-open { display:flex!important; inset:0 auto 0 0; width:280px!important; height:100dvh; max-height:100dvh; border-radius:0; z-index:1060; padding:22px 14px; }
  [dir=rtl] .app-shell .sidebar.mobile-open { inset:0 0 0 auto; }
  .app-shell .sidebar.mobile-open .brand,.app-shell .sidebar.mobile-open .sidebar-note { display:flex; }
  .app-shell .sidebar.mobile-open .sidebar-note { display:block; }
  .app-shell .sidebar.mobile-open .side-nav { display:flex; grid-template-columns:none; }
  .sidebar-close { display:block; flex-shrink:0; align-self:stretch; }
  .navigation-backdrop:not([hidden]) { display:block; position:fixed; inset:0; background:#15223880; z-index:1050; }
  body.navigation-open { overflow:hidden; }
  .app-shell .topbar { gap:8px!important; padding:10px 16px!important; }
  .topbar .currency-view { flex-direction:row; }
  .topbar .currency-view>.ui-text { display:none!important; }
  .topbar .language-switcher { display:none; }
  .topbar .account-menu-panel .language-switcher { display:flex; }
  .topbar .workspace-badge { padding:0 8px; }
  .topbar-actions { margin:0; gap:8px; flex-wrap:nowrap; }
  .topbar:not(:has(.global-search)) .topbar-actions { grid-column:1/-1; }
  .topbar .global-search { width:100%; }
  .app-shell .content-area { padding:22px 16px; }
  .content-area .page-heading h1 { font-size:1.5rem; }
  .content-area .page-heading { align-items:flex-start; flex-wrap:wrap; gap:14px; }
  .setup-steps { grid-template-columns:1fr; }
  .setup-step { flex-direction:row; }
  .content-area .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .metric small { font-size:.72rem; }
}
@media(max-width:600px) {
  .content-area .panel { padding:16px; margin-bottom:16px; }
  .content-area .quick-actions .btn { flex:1 1 auto; min-height:42px; }
  .app-shell .btn { min-height:44px; }
  .content-area :is(input:not([type=checkbox]):not([type=radio]),select,textarea),.app-shell .modal :is(input,select,textarea) { font-size:16px; }
  .topbar .workspace-badge strong { max-width:105px; }
  .topbar-actions { gap:4px; }
  .topbar .currency-view select { max-width:70px; font-size:.78rem; }
  .currency-view { font-size:0; }
  .content-area .metric { min-height:118px; padding:14px; }
  .metric strong { font-size:1.15rem; }
  .owner-action-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .owner-action strong { font-size:1.2rem; }
  .content-area .welcome-panel { padding:20px!important; }
  .content-area .form-grid-two { grid-template-columns:1fr; }
  .content-area .form-span-two { grid-column:auto; }
  .empty-overview { gap:12px; }
  .empty-overview .text-link { margin:0; }
  .content-area .empty-state { padding:24px 12px; }
  .editor-progress li { padding:8px 6px; font-size:.72rem; gap:5px; }
  .editor-progress { gap:5px; }
}
@media(prefers-reduced-motion:reduce) { .nav-group>summary::after { transition:none; } }
@media print { .navigation-backdrop,.sidebar-close,.editor-progress { display:none!important; } .content-area .panel { box-shadow:none; } }

/* Shared workspace patterns: one rhythm for lists, editors and review screens. */
.app-shell .nav-glyph { display:inline-block; width:22px; height:22px; flex:0 0 22px; background:currentColor; mask:var(--nav-icon) center/contain no-repeat; -webkit-mask:var(--nav-icon) center/contain no-repeat; border:0; border-radius:0; opacity:.9; }
.app-shell .nav-glyph::before,.app-shell .nav-glyph::after { display:none; }
.nav-glyph.dashboard { --nav-icon:url('/images/landing/icons/house.svg'); }
.nav-glyph.actions { --nav-icon:url('/images/landing/icons/list.svg'); }
.nav-glyph.ai { --nav-icon:url('/images/landing/icons/sparkle.svg'); }
.nav-glyph.chat,.nav-glyph.tenants { --nav-icon:url('/images/landing/icons/users.svg'); }
.nav-glyph.units { --nav-icon:url('/images/landing/icons/house.svg'); }
.nav-glyph.contracts { --nav-icon:url('/images/landing/icons/calendar-blank.svg'); }
.nav-glyph.receipts { --nav-icon:url('/images/landing/icons/receipt.svg'); }
.nav-glyph.expenses,.nav-glyph.banking { --nav-icon:url('/images/landing/icons/coins.svg'); }
.nav-glyph.users { --nav-icon:url('/images/landing/icons/gear.svg'); }
.content-area :is(.field-hint,.heading-note,.cell-subtext,.modal-footer-note),.modal :is(.field-hint,.modal-footer-note) { font-size:13px; line-height:1.65; }
.app-shell input:is([type=checkbox],[type=radio]) { width:19px; height:19px; min-height:19px; padding:0; flex:0 0 19px; accent-color:var(--primary); vertical-align:middle; }
.confirmation-row,.switch-list label { min-height:44px; gap:10px; align-items:center; }
.toggle-target { display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; margin:0; cursor:pointer; }
.field-title { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px; }
.field-title .required-marker { margin:0; font-size:11px; font-weight:500; }
.modal .settings-disclosure { margin:14px 0 0; border-top:1px solid var(--line); padding-top:6px; }
.modal .settings-disclosure>.form-grid { padding-top:14px; }
.workspace-status,.draft-restore { background:#eaf5f2; border:1px solid #beded4; border-radius:9px; padding:12px 16px; margin:0 0 18px; line-height:1.6; }
.workspace-status { color:#19594b; font-size:14px; }
.context-back { display:inline-flex; margin-bottom:16px; font-size:14px; }
.draft-status:empty { display:none; }
.draft-status { margin:0 0 12px; font-size:13px; color:var(--muted); }
.draft-restore { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.draft-restore>span { flex:1 1 280px; }
.progressive-filters { align-items:end; }
.filter-advanced { flex:1 0 100%; border-top:1px solid var(--line); padding-top:12px; }
.filter-advanced>summary,.entry-presets>summary,.settings-disclosure>summary { cursor:pointer; font-weight:600; font-size:14px; min-height:36px; padding:6px 0; color:var(--primary); }
.filter-advanced-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; padding-top:10px; }
.filter-chips { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 18px; }
.filter-chip { border:1px solid #d1dfdc; background:#edf5f2; color:#245b4c; border-radius:100px; padding:7px 12px; font-size:13px; min-height:36px; }
.filter-chip:hover { background:#dfeee8; }
.entry-presets { padding:5px 22px; background:#f7faf9; border-bottom:1px solid var(--line); }
.entry-presets-controls { display:grid; grid-template-columns:1.2fr 1fr auto; gap:10px; padding:4px 0 12px; }
.entry-presets-controls :is(input,select) { min-width:0; }
.job-progress { border-inline-start:3px solid var(--primary); padding:8px 12px; background:#eff7f5; }
.job-progress::before { content:''; display:inline-block; width:10px; height:10px; margin-inline-end:9px; border-radius:50%; background:var(--primary); }
.suggestion-note { padding:10px 12px; background:#f0f6f4; border-radius:8px; font-size:13px; }
.suggestion-note .btn { margin-inline-start:8px; }
.dashboard-focus { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:22px 24px; margin-bottom:22px; border:1px solid #c6dfd8; border-radius:12px; background:linear-gradient(115deg,#e9f5ef,#f6faf8); }
.dashboard-focus h2 { margin:4px 0 8px; font-size:1.35rem; }
.dashboard-focus p { margin:0; color:var(--muted); font-size:14px; }
.dashboard-focus .heading-actions { flex-wrap:wrap; }
.task-icon { display:grid; place-items:center; width:44px; height:44px; flex-shrink:0; background:#e2f0ea; border-radius:12px; }
.task-icon img { width:28px; height:28px; }
.metric-link { color:inherit; text-decoration:none; display:flex; flex-direction:column; height:100%; gap:10px; }
.metric-link>span { font-size:13px; color:var(--muted); }
.metric-link strong { margin:0; }
.metric-link:hover { color:inherit; }
.metric:has(.metric-link):hover { border-color:#8ab8a4; box-shadow:0 4px 14px #1f534b0a; }
.settings-disclosure { margin-bottom:18px; }
.settings-disclosure>summary { padding:12px 0; }
.settings-disclosure>div { padding:8px 0; }
.source-comparison { display:grid; grid-template-columns:minmax(300px,.85fr) minmax(0,1.15fr); gap:20px; align-items:start; }
.source-preview { position:sticky; top:20px; min-width:0; }
.source-preview iframe { width:100%; height:72vh; min-height:440px; border:1px solid var(--line); border-radius:8px; background:#f6f7f8; }
.source-comparison .data-table { width:100%; min-width:0; table-layout:fixed; }
.source-comparison .data-table :is(th,td) { padding:10px 8px; white-space:normal; overflow-wrap:anywhere; font-size:13px; }
.source-comparison .data-table th { letter-spacing:0; }
.source-comparison .data-table th label { display:flex; align-items:center; gap:6px; min-height:44px; text-transform:none; }
.source-comparison .data-table :is(th,td):last-child { width:24%; }
.print-live-preview iframe { width:100%; height:760px; border:1px solid var(--line); border-radius:8px; background:white; }
.content-area .report-output-bar { flex-wrap:wrap; gap:14px; }
@media(min-width:901px) {
 .app-shell .modal-dialog.modal-lg { --bs-modal-width:960px; max-width:min(960px,calc(100vw - 80px)); }
 .app-shell .guided-modal .modal-body { max-height:65vh; }
 .app-shell .modal-dialog-scrollable { height:calc(100% - 3rem); }
}
@media(max-width:900px) { .source-comparison { grid-template-columns:1fr; } .source-preview { position:static; } .source-preview iframe { height:440px; min-height:0; } }
@media(max-width:600px) {
 .dashboard-focus { padding:18px; flex-direction:column; align-items:stretch; gap:16px; }
 .dashboard-focus .heading-actions { display:flex; }
 .dashboard-focus .btn { flex:1 1 auto; }
 .entry-presets { padding-inline:16px; }
 .entry-presets-controls { grid-template-columns:1fr; }
 .filter-advanced-grid { grid-template-columns:1fr; }
 .content-area .filter-bar>label { flex:1 1 100%; min-width:0; }
 .content-area .filter-bar>.btn { flex:1; }
 .metric small,.content-area .editor-progress li { font-size:13px; }
 .content-area .report-metric-grid,.content-area .summary-strip,.content-area .profile-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
 .content-area .profile-metrics>div { min-width:0; padding:14px; border:0; border-bottom:1px solid var(--line); }
 .content-area .profile-metrics>div:nth-child(odd) { border-inline-end:1px solid var(--line); }
 .content-area .profile-metrics>div:nth-last-child(-n+2) { border-bottom:0; }
 .content-area .profile-metrics strong { font-size:16px; overflow-wrap:anywhere; }
 .content-area .access-metric-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
 .content-area .access-metric-grid article { min-width:0; padding:12px; }
 .content-area .access-metric-grid strong { font-size:22px; }
 .content-area .access-metric-grid span { font-size:12px; }
 .mobile-records .member-identity,.mobile-records .member-identity>span { min-width:0; }
 .mobile-records .member-identity { align-items:flex-start; flex-wrap:wrap; }
 .mobile-records .member-identity small { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
 .content-area .table-shell:has(.mobile-records) { overflow:visible; border:0; }
 .content-area table.mobile-records { display:block; min-width:0!important; width:100%; background:transparent; }
 .mobile-records thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
 .mobile-records tbody { display:grid; gap:14px; }
 .mobile-records tbody tr { display:grid; grid-template-columns:1fr; padding:10px 14px; border:1px solid var(--line); border-radius:10px; background:white; }
 .mobile-records tbody :is(td,th) { display:grid; grid-template-columns:minmax(85px,.4fr) minmax(0,1fr); gap:10px; padding:10px 0; border-bottom:1px solid #edf0f2; text-align:start; white-space:normal; overflow-wrap:anywhere; }
 .mobile-records tbody :is(td,th)::before { content:attr(data-label); color:var(--muted); font-size:13px; font-weight:500; }
 .mobile-records tbody :is(td,th)>span,.mobile-records tbody :is(td,th)>.cell-subtext { grid-column:2; }
 .mobile-records tbody :is(td,th):first-child { font-weight:600; }
 .mobile-records tbody :is(td,th):last-child { border-bottom:0; }
 .mobile-records tbody :is(td,th)[colspan] { display:block; }
 .mobile-records tbody :is(td,th)[colspan]::before { display:none; }
 .mobile-records tfoot { display:block; }
 .mobile-records tfoot tr { display:flex; flex-wrap:wrap; }
 .mobile-records tfoot td { padding:10px; }
 .print-live-preview iframe { height:550px; }
}
@media print { .draft-status,.draft-restore,.context-back,.filter-chips,.entry-presets,.workspace-status { display:none!important; } }
.app-shell .modal [hidden] { display:none!important; }
/* Task dialogs share one compact header, one scrolling body and reachable actions. */
.app-shell .modal-dialog { height:auto; padding:0; margin:24px auto; min-height:calc(100dvh - 48px); }
.app-shell .modal-dialog.modal-lg { max-width:min(820px,calc(100vw - 48px)); --bs-modal-width:820px; }
.app-shell .modal-dialog-scrollable { height:auto; }
.app-shell .modal-content { max-height:calc(100dvh - 48px); width:100%; }
.app-shell .modal-content>.modal-form { flex:1 1 auto; }
.app-shell .modal-header { padding:16px 20px; align-items:center; flex-shrink:0; }
.app-shell .modal-header h2 { font-size:1.2rem; margin:0; }
.app-shell .modal-kicker { display:none; }
.app-shell .modal .btn-close { box-sizing:border-box; flex:0 0 44px; width:44px; height:44px; margin:-8px -8px -8px auto; padding:14px; background-size:14px; }
html[dir=rtl] .app-shell .modal .btn-close { margin:-8px auto -8px -8px; }
.app-shell .modal .modal-body { padding:20px; max-height:none; min-height:0; overflow-y:auto; flex:1 1 auto; }
.app-shell .modal-footer { flex:0 0 auto; display:flex; flex-direction:row; flex-wrap:wrap; gap:8px; padding:12px 20px; }
.app-shell .modal-footer .btn { width:auto; min-height:44px; margin:0; }
.app-shell .modal-footer>[data-bs-dismiss] { margin-inline-end:auto; }
.app-shell .modal-footer-note { flex-basis:100%; margin:0; }
.app-shell .modal .guided-progress { padding:8px 20px; background:#f8fafb; }
.app-shell .modal .guided-status { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.app-shell .modal .guided-steps button { font-size:13px; min-height:36px; padding:6px 10px; }
.app-shell .modal .guided-number { flex-basis:21px; height:21px; }
.app-shell .modal .form-grid { gap:14px 18px; }
.app-shell .modal .form-grid>label { align-self:start; }
.app-shell .modal .guided-step:not([hidden]) { display:grid; gap:16px; }
.app-shell .modal .guided-form .autofill-summary { display:none; }
.app-shell .modal .switch-list:empty { display:none; }
.app-shell .modal .amount-entry { min-width:0; }
.app-shell .modal .btn-primary:disabled { background:#dbe8e9; color:#647d80; border-color:#dbe8e9; opacity:1; }
.app-shell .modal .form-options { grid-column:1 / -1; margin:0; padding:0; border-top:1px solid #e0e8ec; }
.app-shell .modal .form-options>summary,.app-shell .modal .entry-presets>summary { min-height:44px; padding:12px 0; color:#246c73; font-size:14px; font-weight:600; cursor:pointer; }
.app-shell .modal .form-options>.form-grid { padding:4px 0 12px; }
.app-shell .modal .entry-presets { margin:14px 0 0; padding:0; border:0; border-top:1px solid #e0e8ec; background:transparent; }
.app-shell .modal .entry-presets-controls { padding:0 0 12px; }
.app-shell .modal .required-marker { margin-inline-start:4px; font-size:14px; }
.app-shell .modal .selected-record { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px; margin-bottom:18px; background:#f1f7f7; border:1px solid #d2e4e5; border-radius:8px; }
.app-shell .modal .selected-record>div { display:grid; gap:4px; min-width:0; overflow-wrap:anywhere; }
.app-shell .modal .selected-record strong { font-size:15px; color:#182c3a; }
.app-shell .modal .selected-record span { font-size:13px; color:#526378; }
.app-shell .modal .selected-record button { flex:0 0 auto; min-height:44px; }
.app-shell .modal .receipt-payment-details { display:grid; gap:16px; }
.app-shell .modal .allocation-summary { border-inline-start:3px solid #a8cccc; padding:8px 12px; color:#3b5361; font-size:14px; }
.app-shell .modal .allocation-summary .field-title { display:block; font-weight:600; margin-bottom:4px; }
.app-shell .modal .allocation-summary p { white-space:pre-wrap; margin:8px 0 0; }
.app-shell .modal .payment-title { flex-basis:100%; font-size:14px; font-weight:600; }
.app-shell .modal .payment-choices .btn { flex:1 1 100px; font-size:14px; }
.app-shell .modal .amount-presets .btn { min-height:40px; }
.app-shell .modal .rental-results { max-height:260px; margin:8px 0 0; }
.app-shell .modal .rental-result { padding:12px; gap:3px; }
.app-shell .modal .rental-result small { font-size:13px; }
.app-shell .modal .review-payment { display:grid; gap:4px; padding-bottom:12px; }
.app-shell .modal .review-payment strong { font-size:28px; color:#176b75; }
.app-shell .modal .review-edit { min-height:44px; margin-top:18px; }
.app-shell .modal .review-group:first-of-type { padding-top:8px; }
.app-shell .modal .banking-autofill { display:none; }
.app-shell .modal .form-section { padding:0; border:0; }
.app-shell .modal .form-section+.form-section { margin-top:16px; }
@media(max-width:600px) {
 .app-shell .modal-dialog,.app-shell .modal-dialog.modal-lg { margin:8px; min-height:calc(100dvh - 16px); max-width:calc(100vw - 16px); }
 .app-shell .modal-content { max-height:calc(100dvh - 16px); }
 .app-shell .modal-header,.app-shell .modal .modal-body { padding:14px; }
 .app-shell .modal-footer { padding:10px 14px; }
 .app-shell .modal .guided-progress { padding:6px 14px; }
 .app-shell .modal .guided-steps { gap:4px; }
 .app-shell .modal .guided-steps button { padding:5px; font-size:12px; }
 .app-shell .modal .guided-steps button>span:last-child { display:block; }
 .app-shell .modal .guided-number { flex-basis:19px; height:19px; }
 .app-shell .modal .selected-record { align-items:flex-start; flex-wrap:wrap; margin-bottom:14px; }
 .app-shell .modal .selected-record button { margin-inline-start:auto; }
 .app-shell .modal .payment-choices .btn { flex-basis:calc(50% - 8px); }
 .app-shell .modal .rental-results { max-height:240px; }
}
@media(max-height:450px) {
 .app-shell .modal-dialog { margin:6px auto; min-height:calc(100dvh - 12px); }
 .app-shell .modal-content { max-height:calc(100dvh - 12px); }
 .app-shell .modal-content>.modal-form { min-height:0; overflow:hidden; flex:1 1 auto; }
 .app-shell .modal .modal-body { flex:1 1 auto; overflow-y:auto; }
}

/* Keep technical values readable in Arabic without changing their contents. */
.data-isolate { direction:ltr; unicode-bidi:isolate; }
.app-shell input[type="tel"] { direction:ltr; text-align:match-parent; }
.profile-identity > div { min-width:0; }
.profile-title-row h1 { overflow-wrap:anywhere; }
.profile-avatar-building svg { flex:none; }

/* A reversal remains available without competing with the normal next action. */
.record-actions { flex-wrap:wrap; }
.btn-danger-outline { color:#a32d35; background:#fff; border:1px solid #d7a8ad; }
.btn-danger-outline:hover,.btn-danger-outline:focus-visible { color:#8b2028; background:#fff1f2; border-color:#a32d35; }
.contract-summary .field-hint { margin-top:14px; }
@media(max-width:600px) {
 .profile-header .record-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; width:100%; }
 .record-actions > .record-primary-action { order:-1; grid-column:1 / -1; }
 .record-actions > .record-primary-action .btn { width:100%; }
 .record-actions > .record-destructive-action { grid-column:1 / -1; justify-self:end; width:auto; }
}
