/* Dashdealer identity; scoped Universal Theme variables, no global reset. */
:root { --dd-primary:#0B1F3A; --dd-accent:#1F6FEB; --dd-yellow:#F2B705;
--a-base-font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
--ut-header-background-color:var(--dd-primary); --ut-header-text-color:#fff;
--ut-nav-background-color:var(--dd-primary); --ut-nav-text-color:#fff;
--ut-body-background-color:#F4F6F8; --a-button-hot-background-color:var(--dd-accent);
--a-button-hot-text-color:#fff; --a-link-text-color:var(--dd-accent); }
.t-Header-logo img { max-height:36px; width:auto; }
img.t-Login-logo { width:220px!important; height:auto!important; max-width:80%; object-fit:contain; aspect-ratio:auto; background:transparent!important; border-radius:0; }
.t-Login-logo:not(img):empty { display:none; }
.t-Button--hot { background-color:var(--dd-accent); border-color:var(--dd-accent); color:#fff; }
.t-Header, .t-Header-branding, .t-Header-navBar { background-color:var(--dd-primary); color:#fff; }
.t-Region { border-radius:8px; }
.t-Body-title { background:#fff; }
.t-Button:focus-visible, a:focus-visible { outline:3px solid var(--dd-accent); outline-offset:3px; }
@media (prefers-reduced-motion:reduce) { .t-Region { transition:none; } }

/* Contextual UX: shared native regions, compact heroes and task home. */
:root { --dd-navy:#0B1F3A; --dd-blue:#1F6FEB; --dd-yellow:#F2B705; --dd-muted:#526277; }
.t-Body-contentInner { max-width:1440px; margin-inline:auto; }
.t-BreadcrumbRegion { padding-block:10px; }
.dd-hero { display:flex; justify-content:space-between; align-items:center; gap:24px; border:1px solid #d8e3ef; border-left:5px solid var(--dd-yellow); border-radius:14px; padding:24px 28px; margin:4px 0 22px; background:linear-gradient(115deg,#fff,#edf3fb); color:var(--dd-navy); }
.dd-eyebrow { display:block; font-size:11px; font-weight:750; letter-spacing:.12em; color:var(--dd-muted); margin-bottom:10px; }
.dd-hero h1 { font-size:clamp(24px,2.5vw,34px); line-height:1.18; letter-spacing:-.035em; margin:0 0 10px; font-weight:750; }
.dd-hero p { margin:0; max-width:770px; color:var(--dd-muted); font-size:15px; line-height:1.6; }
.dd-hero-symbol { font-size:46px!important; color:var(--dd-blue); background:#e3edfb; border-radius:16px; padding:23px; }
.dd-hero-home { background:var(--dd-navy); color:#fff; border:0; border-left:5px solid var(--dd-yellow); padding-block:30px; }
.dd-hero-home p,.dd-hero-home .dd-eyebrow { color:#cad7e8; }
.dd-hero-home .dd-hero-symbol { background:#193757; color:var(--dd-yellow); }
.dd-flow { display:flex; flex-wrap:wrap; gap:8px; margin-top:17px; align-items:center; color:var(--dd-muted); font-size:12px; }
.dd-flow span { display:inline-flex; align-items:center; gap:8px; }
.dd-flow span:not(:last-child)::after { content:'›'; opacity:.65; font-size:18px; }
.dd-hero-home .dd-flow { color:#c9d9eb; }
.dd-environment { display:flex; align-items:center; gap:9px; flex-wrap:wrap; padding:9px 13px; margin-bottom:12px; background:#fff8df; border:1px solid #f0dfa3; border-radius:8px; font-size:12px; color:#5d4c18; }
.dd-environment span:last-child { color:#6f623d; }
.dd-home-section { margin:25px 0 30px; }
.dd-section-heading h2 { font-size:20px; color:var(--dd-navy); margin:0 0 6px; }
.dd-section-heading p { color:var(--dd-muted); margin:0 0 16px; }
.dd-task-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.dd-task { display:flex; align-items:center; gap:14px; background:#fff; color:var(--dd-navy); border:1px solid #dce3ec; border-radius:12px; padding:19px; text-decoration:none; min-height:108px; box-shadow:0 2px 5px #0b1f3a05; }
.dd-task:hover { border-color:var(--dd-blue); background:#f8fbff; text-decoration:none; }
.dd-task:focus-visible,.dd-context-action:focus-visible { outline:3px solid var(--dd-blue); outline-offset:3px; }
.dd-task-icon { flex-shrink:0; color:var(--dd-blue); background:#edf3fc; padding:12px; border-radius:10px; font-size:22px!important; }
.dd-task-body { flex:1; display:flex; flex-direction:column; gap:7px; }
.dd-task-body strong { font-size:16px; }
.dd-task-body>span { color:var(--dd-muted); font-size:13px; line-height:1.5; }
.dd-task-count { font-size:25px; font-weight:750; color:var(--dd-navy); }
.dd-financial-strip { display:flex; justify-content:space-between; gap:24px; border-top:1px solid #dbe3ec; margin-top:30px; padding:25px 5px; color:var(--dd-navy); }
.dd-financial-strip h2 { font-size:17px; margin:0 0 6px; }
.dd-financial-strip p { max-width:650px; color:var(--dd-muted); font-size:13px; margin:0; }
.dd-financial-strip>div:last-child { display:flex; flex-direction:column; justify-content:center; gap:5px; text-align:right; }
.dd-financial-strip strong { font-size:26px; white-space:nowrap; }
.dd-financial-strip span { font-size:12px; color:var(--dd-muted); }
.dd-badge { display:inline-flex; align-items:center; padding:4px 9px; border-radius:6px; background:#edf0f4; color:#354359; font-size:12px; line-height:1.4; font-weight:650; white-space:normal; }
.dd-badge-ok { background:#e3f3e9; color:#216040; }
.dd-badge-alert { background:#fbe7e6; color:#972c29; }
.dd-badge-wait { background:#fff2ce; color:#785500; }
.dd-form-intro { padding:14px 18px; margin:0 0 16px; background:#edf3fb; border-left:3px solid var(--dd-blue); border-radius:6px; line-height:1.6; color:var(--dd-muted); }
.dd-fact { display:flex; flex-direction:column; gap:6px; padding:8px 0; }
.dd-fact>span { font-size:12px; color:var(--dd-muted); }
.dd-fact strong { font-size:15px; color:var(--dd-navy); overflow-wrap:anywhere; }
.t-Report:has(.dd-fact) thead,.t-Report:has(.dd-context-action) thead,.t-Report:has(.dd-environment) thead { display:none; }
.t-Report:has(.dd-fact) tbody { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px 24px; }
.t-Report:has(.dd-fact) tr,.t-Report:has(.dd-fact) td { display:block; border:0!important; }
.t-Report:has(.dd-context-action) tbody { display:flex; gap:9px; flex-wrap:wrap; margin:2px 0 14px; }
.t-Report:has(.dd-context-action) tr,.t-Report:has(.dd-context-action) td { display:block; padding:0!important; border:0!important; }
.t-Report:has(.dd-environment) td { padding:0!important; border:0!important; }
@media(max-width:760px) {
 .dd-hero { padding:19px; gap:10px; }.dd-hero-symbol { display:none; }.dd-hero p { font-size:14px; }
 .dd-task-grid { grid-template-columns:1fr; }.dd-task { padding:16px; min-height:94px; }
 .dd-financial-strip { flex-direction:column; gap:16px; }.dd-financial-strip>div:last-child { text-align:left; }
 .t-Report:has(.dd-fact) tbody { grid-template-columns:1fr; gap:4px; }
 .dd-environment { align-items:flex-start; }.dd-environment span:last-child { flex-basis:100%; }
 .dd-context-action { min-height:42px; white-space:normal; }
}
.t-Region:has(.dd-environment) { border:0; box-shadow:none; background:transparent; margin-bottom:0; }
.t-Region:has(.dd-environment)>.t-Region-header { display:none; }
.t-Region:has(.dd-environment)>.t-Region-bodyWrap>.t-Region-body { padding:0; }
.dd-scope { display:flex; align-items:flex-start; gap:12px; padding:14px 17px; background:#edf3fb; color:#284a74; border-left:3px solid var(--dd-blue); border-radius:7px; }
.dd-scope>div { display:flex; flex-direction:column; gap:6px; line-height:1.5; }
.dd-scope span { font-size:13px; }.dd-scope>.fa { margin-top:3px; }
.t-Region:has(.dd-scope) { border:0; box-shadow:none; background:transparent; }
.t-Region:has(.dd-scope)>.t-Region-header,.t-Report:has(.dd-scope) thead { display:none; }
.t-Region:has(.dd-scope)>.t-Region-bodyWrap>.t-Region-body,.t-Report:has(.dd-scope) td { padding:0!important; border:0!important; }

/* Quiet row actions, with an explicit keyboard focus ring. */
.dd-record-link { display:inline-flex; align-items:center; justify-content:center; width:1.5rem; height:1.5rem; padding:.125rem; border:0; background:transparent; box-shadow:none; color:#42617e; text-decoration:none; vertical-align:middle; }
.dd-record-link .fa { font-size:1rem; }
.dd-record-link:hover { color:#1F6FEB; background:transparent; }
.dd-record-link:focus-visible { outline:2px solid #1F6FEB; outline-offset:2px; border-radius:3px; }
.dd-overdue { color:#8a4b00; }
.dd-muted { color:#526277; }
@media (pointer:coarse) { .dd-record-link { width:2.75rem; height:2.75rem; } }

/* Financial document shortcuts and due dates. */
.dd-document-icons{display:inline-flex;align-items:center;gap:.375rem;white-space:nowrap}
.dd-document-unavailable{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;color:#C9CFD5;cursor:default}
.dd-document-unavailable .fa{font-size:1rem}
.dd-due-overdue{color:#B42318;font-weight:600}
.dd-due-today{color:#0B2545;font-weight:600}
@media(pointer:coarse){.dd-document-unavailable{width:2.75rem;height:2.75rem}}

/* Availability must be clear without a button frame. */
.dd-document-icons .dd-document-link{color:#0076B5}
.dd-document-icons .dd-document-link:hover{color:#004D78}

/* Task-oriented drawers. Scoped to the new form sections and dialog class. */
.ui-dialog.dd-form-dialog { max-width:100vw!important; width:min(960px,100vw)!important; }
.dd-form-dialog .ui-dialog-content { padding:0; }
body:has(.dd-form-heading) { background:#f4f6fa; }
body:has(.dd-form-heading) .t-Dialog-body { padding:24px 28px 0; }
.dd-form-heading { padding:4px 0 20px; color:#0b1f3a; }
.dd-form-heading h1 { margin:8px 0 10px; font-size:1.75rem; line-height:1.2; font-weight:700; letter-spacing:-.025em; }
.dd-form-heading p { margin:0; max-width:70ch; color:#45556c; font-size:.95rem; line-height:1.65; }
.dd-form-required { display:block; margin-top:14px; color:#53647b; font-size:.8rem; }
.dd-form-warning { margin:0 0 20px; padding:14px 18px; border:1px solid #e7c786; border-left:4px solid #b67b10; border-radius:10px; background:#fff8e8; color:#62430d; }
.dd-form-warning strong { font-size:.875rem; }
.dd-form-warning p { margin:5px 0 0; line-height:1.55; font-size:.875rem; }
.dd-form-section { margin-bottom:20px; border:1px solid #dbe3ee; border-radius:12px; background:#fff; box-shadow:0 2px 5px #0b1f3a05; overflow:visible; }
.dd-form-section .t-Region-header { background:#fff; border-radius:12px 12px 0 0; border-bottom:1px solid #edf1f6; padding:5px 8px; }
.dd-form-section .t-Region-title { font-size:1rem; font-weight:650; color:#0b1f3a; }
.dd-form-section .t-Region-body { padding:18px 22px 12px; }
.dd-section-help { margin:0 0 14px; color:#53647b; font-size:.875rem; line-height:1.55; }
.dd-form-section .t-Form-fieldContainer { padding-top:8px; padding-bottom:14px; }
.dd-form-section .t-Form-label { font-weight:600; color:#243751; font-size:.875rem; }
.dd-form-section .apex-item-text,.dd-form-section .apex-item-select,.dd-form-section .apex-item-textarea,.dd-form-section .apex-item-popup-lov { border-radius:7px; min-height:44px; background:#fff; border-color:#becbdc; }
.dd-form-section .apex-item-textarea { min-height:100px; resize:vertical; }
.dd-form-section .t-Form-inlineHelp { color:#53647b; font-size:.8rem; line-height:1.5; margin-top:6px; }
.dd-form-section .apex-item-group--checkbox label { padding:8px; line-height:1.5; }
.dd-form-section :is(input,select,textarea,button):focus-visible { outline:3px solid #1f6feb; outline-offset:2px; }
.dd-form-footer { position:sticky; bottom:0; z-index:20; margin:8px -28px 0; padding:12px 28px max(12px,env(safe-area-inset-bottom)); border:0; border-top:1px solid #dbe3ee; border-radius:0; box-shadow:0 -4px 16px #0b1f3a08; background:#fff; }
.dd-form-footer .t-Button { min-height:44px; padding:10px 20px; border-radius:8px; font-weight:600; }
body:has(.dd-form-heading) { scroll-padding-bottom:100px; }
.dd-form-section :is(input,select,textarea) { scroll-margin-block:80px 110px; }
@media(max-width:640px) {
 body:has(.dd-form-heading) .t-Dialog-body { padding:18px 14px 0; }
 .dd-form-heading h1 { font-size:1.45rem; }
 .dd-form-section .t-Region-body { padding:14px 14px 8px; }
 .dd-form-section .col { width:100%; max-width:100%; flex-basis:100%; }
 .dd-form-footer { margin-inline:-14px; padding-inline:14px; }
 .dd-form-footer .t-Button { padding-inline:14px; white-space:normal; }
}

/* Refined drawer density: use the available width and keep task guidance brief. */
body:has(.dd-form-heading) .t-Dialog-body { background:#f5f7fa; padding:20px 24px 0; }
.dd-form-heading { padding:0 0 18px; }
.dd-form-heading .dd-eyebrow,.dd-form-heading h1 { display:none; }
.dd-form-heading p { font-size:.875rem; line-height:1.55; color:#4c5e75; max-width:72ch; }
.dd-form-required { margin-top:8px; font-size:.75rem; color:#64748b; }
.dd-form-section { margin-bottom:16px; border-color:#e0e6ee; border-radius:10px; box-shadow:0 2px 8px #0b1f3a04; }
.dd-form-section .t-Region-header { padding:0 4px; min-height:44px; border-radius:10px 10px 0 0; background:#fafbfd; }
.dd-form-section .t-Region-headerItems--title { padding-block:12px; }
.dd-form-section .t-Region-title { font-size:.875rem; font-weight:650; }
.dd-form-section .t-Region-body { padding:14px 18px 12px; }
.dd-section-help { font-size:.8125rem; line-height:1.45; margin:0 0 10px; color:#64748b; }
.dd-form-section .t-Form-fieldContainer { padding:4px 0 10px; margin:0; }
.dd-form-section .t-Form-labelContainer { padding-top:0; padding-bottom:6px; }
.dd-form-section .t-Form-label { font-size:.8125rem; font-weight:600; line-height:1.4; }
.dd-form-section .t-Form-inputContainer { padding-top:0; padding-bottom:0; }
.dd-form-section .t-Form-itemWrapper { width:100%; min-width:0; }
.dd-form-section :is(.apex-item-text,.apex-item-select,.apex-item-textarea,.apex-item-popup-lov,.apex-item-group,.apex-item-multi) { width:100%!important; max-width:100%; box-sizing:border-box; }
.dd-form-section :is(.apex-item-text,.apex-item-select,.apex-item-popup-lov) { min-height:40px; height:40px; font-size:.875rem; }
.dd-form-section .apex-item-textarea { min-height:80px; font-size:.875rem; }
.dd-form-section .t-Form-inlineHelp { margin-top:5px; font-size:.75rem; line-height:1.45; color:#64748b; }
.dd-form-section .t-Form-helpButton { opacity:1; }
.dd-form-footer { margin-inline:-24px; padding:12px 24px; }
.dd-form-footer .t-Button { min-height:40px; padding:9px 18px; font-size:.8125rem; }
@media(max-width:640px) {
 body:has(.dd-form-heading) .t-Dialog-body { padding:16px 14px 0; }
 .dd-form-section .t-Region-body { padding:12px 14px 10px; }
 .dd-form-footer { margin-inline:-14px; padding-inline:14px; }
}
/* Universal Theme's drawer uses its own body, distinct from modal dialogs. */
body.dd-form-dialog .t-Drawer-body { background:#f5f7fa; padding:20px 24px 100px; }
body.dd-form-dialog .t-Drawer-bodyWrapperIn { background:#f5f7fa; }
body.dd-form-dialog .dd-form-footer { position:fixed; bottom:0; left:0; right:0; margin:0; padding:12px 24px max(12px,env(safe-area-inset-bottom)); border-top:1px solid #dbe3ee; background:#fff; }
@media(max-width:640px) { body.dd-form-dialog .t-Drawer-body { padding:16px 14px 100px; } body.dd-form-dialog .dd-form-footer { padding-inline:14px; } }
/* Expand lone grid cells and native date-picker hosts, retaining paired rows. */
.dd-form-section .col.col-start.col-end { width:100%; max-width:100%; flex-basis:100%; }
.dd-form-section :is(a-date-picker,.apex-item-datepicker) { display:flex; width:100%; max-width:100%; }
.dd-form-section .row > .col:only-child { width:100%; max-width:100%; flex-basis:100%; }

/* DASH-33: common presentation, preserving native controls and behavior. */
body:has(.dd-hero) .t-BreadcrumbRegion-title { display:none; }
.dd-form-section .t-Form-helpButton { display:inline-flex; opacity:1; }
:is(.t-Body-content,.t-Dialog-body,.t-Drawer-body) :where(a,button,input,select,textarea,[tabindex]):focus-visible {
 outline:3px solid var(--dd-blue); outline-offset:3px;
}
:is(.t-Body-content,.t-Dialog-body,.t-Drawer-body) .t-Button { min-height:40px; }
:is(.t-Dialog-body,.t-Drawer-body) .t-Form-error { line-height:1.5; overflow-wrap:anywhere; }
.t-Alert-body { line-height:1.5; overflow-wrap:anywhere; }
.t-Report-wrap { max-width:100%; overflow-x:auto; }
.dd-form-footer .t-Button { white-space:normal; }
@media(max-width:640px) {
 :is(.t-Body-content,.t-Dialog-body,.t-Drawer-body) .t-Button { min-height:44px; }
 .dd-form-section .t-Form-helpButton { min-width:36px; min-height:36px; }
 .dd-form-footer .t-Button { min-height:44px; }
}

/* SofIA: only the existing home assistant entry. Native button/DA preserved. */
.dd-sofia-entry.t-Region { width:fit-content; margin:0 0 1rem; padding:0; border:0; background:transparent; box-shadow:none; }
.dd-sofia-entry .t-Region-header { display:none; }
.dd-sofia-entry .t-Region-body { padding:0; }
.dd-sofia-entry .t-Region-buttons { display:flex; justify-content:flex-start; padding:0; border:0; background:transparent; }
.dd-sofia-entry .t-Region-buttons-right { float:none; margin:0; padding:0; }
.dd-sofia-button.t-Button { display:inline-flex; flex-direction:column; align-items:center; justify-content:center; gap:.5rem; box-sizing:border-box; width:6rem; min-width:6rem; height:6rem; min-height:6rem; aspect-ratio:1; padding:.75rem; border:1px solid var(--dd-navy); border-radius:1rem; background:var(--dd-navy); color:#fff; font-size:1rem; line-height:1.2; box-shadow:0 2px 6px #0b1f3a18; }
.dd-sofia-button.t-Button:hover { background:#193757; border-color:var(--dd-blue); color:#fff; }
.dd-sofia-button.t-Button:focus-visible { outline:3px solid var(--dd-blue); outline-offset:3px; }
.dd-sofia-button .t-Button-label { font-weight:700; white-space:nowrap; }
.dd-sofia-button .t-Icon--right { display:none; }
.dd-sofia-button .t-Icon:not(.t-Icon--right) { display:block; position:relative; flex:none; width:2rem; height:2rem; margin:0; color:var(--dd-yellow); }
.dd-sofia-button .t-Icon:not(.t-Icon--right)::before { content:"✦"; display:block; font:normal 2rem/1 system-ui,sans-serif; }
.dd-sofia-button .t-Icon:not(.t-Icon--right)::after { content:"✦"; position:absolute; top:-.1rem; right:-.3rem; font:normal .75rem/1 system-ui,sans-serif; text-shadow:-2rem 1.3rem currentColor; }
@media(forced-colors:active) { .dd-sofia-button.t-Button { border-color:ButtonText; background:ButtonFace; color:ButtonText; } .dd-sofia-button .t-Icon { color:ButtonText; } }
