*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:var(--font,Arial,sans-serif);font-size:var(--base-size,16px);color:var(--text,#132033);background:var(--bg,#f4f7fb);line-height:1.55}h1,h2,h3,h4{font-family:var(--heading-font,var(--font));line-height:1.15;margin:0 0 .75rem}h1{font-size:clamp(2.1rem,var(--heading-size,34px),4.8rem)}h2{font-size:clamp(1.65rem,2.6vw,2.7rem)}h3{font-size:1.15rem}p{margin:.4rem 0 1rem;color:var(--muted)}a{color:inherit}.container{width:min(1180px,calc(100% - 32px));margin:auto}.public-body{background:linear-gradient(180deg,#eef3f8 0,#fff 28%,#f6f8fb 100%)}.public-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.88);backdrop-filter:blur(18px);border-bottom:1px solid rgba(17,38,61,.09)}.nav-wrap{min-height:78px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;font-weight:800;letter-spacing:-.02em}.brand img{max-height:46px;max-width:180px;object-fit:contain}.brand-mark{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,var(--primary),var(--secondary));color:#fff;box-shadow:0 10px 24px rgba(17,38,61,.2)}.public-nav{display:flex;align-items:center;gap:6px}.public-nav>a{padding:10px 13px;text-decoration:none;border-radius:10px;font-size:.93rem;font-weight:650}.public-nav>a:hover{background:#edf2f7}.mobile-nav-toggle{display:none;border:0;background:transparent;font-size:1.5rem}.hero{padding:92px 0 74px;position:relative;overflow:hidden}.hero:before{content:"";position:absolute;width:520px;height:520px;border-radius:50%;background:radial-gradient(circle,rgba(217,164,65,.28),rgba(217,164,65,0) 68%);right:-110px;top:-190px}.hero-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:60px;align-items:center;position:relative}.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:.72rem;font-weight:850;color:#9a7229}.hero-copy p{font-size:1.1rem;max-width:660px}.hero-actions,.actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.hero-panel{background:linear-gradient(145deg,var(--primary),#183d61);color:#fff;border-radius:32px;padding:30px;box-shadow:0 30px 80px rgba(17,38,61,.3);position:relative;overflow:hidden}.hero-panel:after{content:"";position:absolute;width:200px;height:200px;border-radius:50%;background:rgba(217,164,65,.22);right:-60px;top:-70px}.hero-stat{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin-top:26px}.hero-stat div{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);padding:16px;border-radius:16px}.hero-stat strong{display:block;font-size:1.4rem}.section{padding:76px 0}.section-head{max-width:720px;margin-bottom:28px}.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.card{background:var(--surface);border:1px solid rgba(17,38,61,.09);border-radius:var(--radius);padding:22px;box-shadow:0 14px 40px rgba(22,42,67,.07)}.card.soft{background:rgba(255,255,255,.65);box-shadow:none}.card h3{margin-bottom:.5rem}.service-card{min-height:190px}.icon-box{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:rgba(217,164,65,.16);color:#8d6828;font-size:1.35rem;margin-bottom:18px}.btn{border:0;border-radius:12px;background:var(--primary);color:#fff;padding:12px 18px;font-weight:750;text-decoration:none;display:inline-flex;justify-content:center;align-items:center;gap:7px;cursor:pointer;box-shadow:0 9px 22px rgba(17,38,61,.18)}.btn:hover{transform:translateY(-1px)}.btn-secondary{background:var(--accent);color:#172333}.btn-ghost{background:transparent;color:var(--primary);box-shadow:none;border:1px solid rgba(17,38,61,.18)}.btn-danger{background:#b42318}.btn-success{background:#157347}.btn-warning{background:#d97706;color:#fff}.btn-sm{padding:8px 12px;border-radius:9px;font-size:.84rem}.form-shell{max-width:1040px;margin:44px auto;padding:0 16px}.form-card{background:#fff;border:1px solid rgba(17,38,61,.09);border-radius:26px;padding:28px;box-shadow:0 24px 70px rgba(17,38,61,.09)}.form-section{padding:22px 0;border-top:1px solid #e8edf3}.form-section:first-child{border-top:0;padding-top:0}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.field-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.field{display:flex;flex-direction:column;gap:7px}.field.full{grid-column:1/-1}.field label{font-weight:750;font-size:.89rem}.field small{color:var(--muted)}input,select,textarea{width:100%;border:1px solid #d8e0ea;background:#fff;color:var(--text);border-radius:11px;padding:11px 12px;font:inherit;outline:none}input:focus,select:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(217,164,65,.16)}textarea{min-height:110px;resize:vertical}input[readonly]{background:#f3f5f8}.checkbox-row{display:flex;flex-wrap:wrap;gap:10px}.checkbox-pill{display:flex;align-items:center;gap:8px;border:1px solid #dfe5ed;padding:9px 12px;border-radius:999px;background:#fff}.checkbox-pill input{width:auto}.shift-card{border:1px solid #dfe6ee;border-radius:16px;padding:17px;margin-top:14px;background:#f9fbfd;position:relative}.shift-remove{position:absolute;right:12px;top:12px}.flash{margin-top:16px;border-radius:12px;padding:13px 16px;font-weight:650}.flash-success{background:#e9f8ef;color:#146c3c;border:1px solid #bce8cb}.flash-danger{background:#fff0ef;color:#9f231c;border:1px solid #f1c7c4}.flash-warning{background:#fff8e5;color:#7a5712;border:1px solid #f4dda4}.flash-info{background:#edf6ff;color:#235987;border:1px solid #c9e4fb}.public-footer{background:#0f2236;color:#dbe6ef;margin-top:70px;padding:54px 0 18px}.public-footer p,.public-footer span{color:#aebdcb}.footer-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:30px}.footer-grid>div{display:flex;flex-direction:column;gap:8px}.footer-grid a{text-decoration:none;color:#c9d5df}.footer-bottom{border-top:1px solid rgba(255,255,255,.1);margin-top:30px;padding-top:18px;color:#9babb9;font-size:.86rem}.footer-brand{color:#fff}.content-page{padding:60px 0}.content-page .content{background:#fff;border-radius:24px;padding:34px;border:1px solid #e4e9ef}.quote-shell{max-width:1040px;margin:44px auto;padding:0 16px}.quote-header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.quote-brand{background:var(--primary);color:#fff;border-radius:18px;padding:20px}.summary-box{background:#f5f7fa;border-radius:16px;padding:18px}.data-list{display:grid;grid-template-columns:170px 1fr;gap:9px 16px}.data-list dt{color:var(--muted)}.data-list dd{margin:0;font-weight:650}.status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:.78rem;font-weight:800;background:#e8eef5;color:#35516d;text-transform:capitalize}.status-paid,.status-approved,.status-active,.status-success{background:#e4f5eb;color:#146c3c}.status-pending,.status-sent,.status-viewed{background:#fff5d8;color:#805d17}.status-rejected,.status-declined,.status-failed,.status-overdue,.status-inactive{background:#fde9e7;color:#9c2720}.table-wrap{overflow:auto;border:1px solid #e0e6ee;border-radius:15px;background:#fff}.table{width:100%;border-collapse:collapse;min-width:760px}.table th,.table td{text-align:left;padding:12px 14px;border-bottom:1px solid #e9edf2;vertical-align:top}.table th{font-size:.76rem;text-transform:uppercase;letter-spacing:.06em;color:#6d7c8e;background:#f7f9fb}.table tr:last-child td{border-bottom:0}.table .actions{white-space:nowrap}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.metric-card{padding:20px;background:#fff;border:1px solid #e2e8ef;border-radius:18px}.metric-card span{display:block;color:var(--muted);font-size:.83rem}.metric-card strong{font-size:1.65rem}.portal-shell{display:grid;grid-template-columns:270px minmax(0,1fr);min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:270px;background:linear-gradient(180deg,#10263c,#0c1b2a);color:#dce7f0;padding:20px 14px;overflow:auto;z-index:60}.sidebar-brand{padding:4px 8px 18px;color:#fff}.sidebar-role{font-size:.7rem;text-transform:uppercase;letter-spacing:.14em;color:#89a0b4;padding:8px 10px}.sidebar-nav{display:flex;flex-direction:column;gap:3px}.sidebar-nav a{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;text-decoration:none;color:#b9c8d5;font-size:.9rem;font-weight:650}.sidebar-nav a:hover,.sidebar-nav a.active{background:rgba(255,255,255,.09);color:#fff}.nav-dot{width:7px;height:7px;border-radius:50%;background:#71879a}.sidebar-nav a.active .nav-dot{background:var(--accent);box-shadow:0 0 0 4px rgba(217,164,65,.14)}.portal-main{grid-column:2;min-width:0}.topbar{height:78px;background:rgba(255,255,255,.9);backdrop-filter:blur(16px);border-bottom:1px solid #e3e9f0;display:flex;align-items:center;justify-content:space-between;padding:0 24px;position:sticky;top:0;z-index:40}.topbar-actions{display:flex;align-items:center;gap:9px}.topbar form{margin:0}.user-chip{display:flex;align-items:center;gap:8px;font-size:.85rem;font-weight:700}.user-chip>span{width:32px;height:32px;border-radius:10px;background:#e8eef5;display:grid;place-items:center}.sidebar-toggle{display:none;background:transparent;border:0;font-size:1.4rem}.portal-content{padding:24px;max-width:1600px;margin:auto}.page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.page-head p{margin:0}.panel{background:#fff;border:1px solid #e2e8ef;border-radius:18px;padding:20px;margin-bottom:18px}.panel-head{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:15px}.split{display:grid;grid-template-columns:1fr 1fr;gap:18px}.stack{display:flex;flex-direction:column;gap:14px}.empty{padding:28px;text-align:center;color:var(--muted);border:1px dashed #cfd8e2;border-radius:14px}.chat{display:flex;flex-direction:column;gap:10px;max-height:420px;overflow:auto;padding:10px;background:#f3f6f9;border-radius:14px}.chat-message{max-width:80%;background:#fff;border:1px solid #dde5ed;padding:10px 12px;border-radius:13px}.chat-message.mine{align-self:flex-end;background:#eaf1f7}.chat-meta{font-size:.72rem;color:var(--muted);margin-bottom:3px}.tabs{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:16px}.tab-btn{border:1px solid #dfe6ee;background:#fff;padding:9px 12px;border-radius:10px;cursor:pointer;font-weight:700}.tab-btn.active{background:var(--primary);color:#fff}.tab-pane{display:none}.tab-pane.active{display:block}.auth-wrap{min-height:calc(100vh - 80px);display:grid;place-items:center;padding:40px 16px}.auth-card{width:min(470px,100%);background:#fff;border:1px solid #e0e7ee;border-radius:24px;padding:28px;box-shadow:0 30px 80px rgba(17,38,61,.13)}.auth-card .brand{margin-bottom:22px}.notice{padding:14px;border-radius:12px;background:#edf4f9;color:#38536d}.code-box{font-family:ui-monospace,monospace;background:#101c2b;color:#d9e4ee;padding:14px;border-radius:12px;overflow:auto}.text-right{text-align:right}.muted{color:var(--muted)}.mb-0{margin-bottom:0}.mt-2{margin-top:12px}.mt-3{margin-top:20px}.w-full{width:100%}.danger-zone{border-color:#efc7c4;background:#fff9f8}
@media(max-width:1100px){.metric-grid{grid-template-columns:repeat(2,1fr)}.grid-4{grid-template-columns:repeat(2,1fr)}.hero-grid{gap:30px}.portal-shell{grid-template-columns:240px minmax(0,1fr)}.sidebar{width:240px}.portal-main{grid-column:2}}
@media(max-width:820px){.public-nav{display:none;position:absolute;left:16px;right:16px;top:72px;background:#fff;border:1px solid #e1e7ee;border-radius:16px;padding:12px;box-shadow:0 20px 50px rgba(17,38,61,.14);flex-direction:column;align-items:stretch}.public-nav.open{display:flex}.mobile-nav-toggle{display:block}.hero{padding:58px 0}.hero-grid,.grid-2,.grid-3,.footer-grid,.split{grid-template-columns:1fr}.hero-panel{border-radius:24px}.field-grid,.field-grid-3{grid-template-columns:1fr}.portal-shell{display:block}.sidebar{transform:translateX(-102%);transition:.25s}.sidebar.open{transform:translateX(0)}.portal-main{margin-left:0}.sidebar-toggle{display:block}.topbar{padding:0 14px}.user-chip{display:none}.portal-content{padding:16px}.page-head{align-items:flex-start;flex-direction:column}.quote-header{flex-direction:column}.data-list{grid-template-columns:1fr}.data-list dt{margin-top:8px}}
@media(max-width:560px){.container{width:min(100% - 20px,1180px)}.metric-grid,.grid-4,.hero-stat{grid-template-columns:1fr}.form-card,.card,.panel{padding:16px;border-radius:15px}.hero-actions .btn,.actions.mobile-stack .btn{width:100%}.topbar-actions .btn{font-size:0;padding:8px}.topbar-actions .btn:after{content:'↗';font-size:14px}.portal-content{padding:11px}.table th,.table td{padding:10px}.public-footer{padding-top:38px}}
.table-responsive{overflow:auto;border:1px solid #e0e6ee;border-radius:15px}.table-responsive table{width:100%;border-collapse:collapse;min-width:980px}.table-responsive th,.table-responsive td{text-align:left;padding:12px 14px;border-bottom:1px solid #e9edf2;vertical-align:top}.table-responsive th{font-size:.76rem;text-transform:uppercase;letter-spacing:.06em;color:#6d7c8e;background:#f7f9fb}.table-responsive tr:last-child td{border-bottom:0}.table-card{padding:0;overflow:hidden}.inline-actions{display:flex;align-items:center;flex-wrap:wrap;gap:7px}.review-form{display:flex;align-items:center;gap:6px;margin:0}.mini-input{width:150px;padding:8px 9px;font-size:.82rem}.badge{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:.76rem;font-weight:800;background:#edf2f7;color:#35516d}.block{display:block}.empty-state{padding:32px;text-align:center;color:var(--muted)}
@media(max-width:820px){.review-form{width:100%}.mini-input{flex:1;width:auto}.inline-actions{min-width:220px}}

/* Premium workflow additions */
:focus-visible{outline:3px solid color-mix(in srgb,var(--accent) 65%,transparent);outline-offset:2px}.section-tint{background:linear-gradient(180deg,color-mix(in srgb,var(--primary) 5%,#fff),color-mix(in srgb,var(--accent) 5%,#fff))}.lift-card{transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}.lift-card:hover{transform:translateY(-5px);box-shadow:0 24px 60px rgba(17,38,61,.13);border-color:color-mix(in srgb,var(--accent) 32%,#dbe3ec)}.hero-premium{min-height:690px;display:grid;align-items:center;background:#0d2032;color:#fff}.hero-slider-bg{position:absolute;inset:0;z-index:0}.hero-slider-bg:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(5,19,31,.94) 0%,rgba(8,27,43,.78) 47%,rgba(8,27,43,.45) 100%),linear-gradient(0deg,rgba(7,20,32,.6),transparent 55%)}.hero-bg{position:absolute;inset:0;opacity:0;transform:scale(1.035);transition:opacity .8s ease,transform 6s ease;background-image:var(--desktop-image);background-size:cover;background-position:center}.hero-bg.active{opacity:1;transform:scale(1)}.hero-bg[style*="url('')"]{background:radial-gradient(circle at 75% 15%,rgba(217,164,65,.3),transparent 32%),linear-gradient(125deg,#10263c,#1c4b70 58%,#0c1c2b)}.hero-slider-content{z-index:2}.hero-glass{position:relative;min-height:410px;display:flex;align-items:center;padding:28px;border:1px solid rgba(255,255,255,.1);border-radius:28px;background:rgba(6,21,34,.38);backdrop-filter:blur(10px);box-shadow:0 24px 75px rgba(0,0,0,.2)}.hero-slide-copy{display:none}.hero-slide-copy.active{display:block;animation:heroFade .55s ease}.hero-slide-copy p{color:#d6e0e9}.hero-ghost{border-color:rgba(255,255,255,.35);color:#fff;background:rgba(255,255,255,.06)}.hero-dots{position:absolute;left:28px;bottom:20px;display:flex;gap:8px}.hero-dot{width:10px;height:10px;padding:0;border:0;border-radius:999px;background:rgba(255,255,255,.4);cursor:pointer;transition:.25s}.hero-dot.active{width:32px;background:var(--accent)}@keyframes heroFade{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}.cta-panel{isolation:isolate}.workflow-tabs>.tabs{position:sticky;top:88px;z-index:25;padding:8px;background:rgba(244,247,251,.92);backdrop-filter:blur(14px);border-radius:14px}.check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px;border:1px solid #dfe6ee;border-radius:12px;background:#f8fafc}.check-grid label{display:flex;gap:8px;align-items:flex-start}.timeline{display:grid;gap:18px}.timeline>div{position:relative;padding-left:34px}.timeline>div:before{content:"";position:absolute;left:4px;top:4px;width:14px;height:14px;border:4px solid color-mix(in srgb,var(--accent) 42%,#fff);background:var(--accent);border-radius:50%}.timeline>div:not(:last-child):after{content:"";position:absolute;left:13px;top:24px;bottom:-17px;width:2px;background:#dfe6ee}.text-center{text-align:center}.admin-image-preview{display:block;width:min(100%,520px);max-height:240px;object-fit:cover;border-radius:14px;border:1px solid #dfe6ee;margin-bottom:10px}.sidebar-backdrop{display:none}.btn:disabled{opacity:.5;cursor:not-allowed;transform:none}.status-returned,.status-revision_requested,.status-needs_information,.status-late{background:#fff1d6;color:#8a5b07}.status-submitted,.status-pending_review,.status-under_review{background:#e8efff;color:#274f9d}.status-archived,.status-cancelled,.status-withdrawn{background:#edf0f4;color:#536273}.portal-content .chat-message{margin:8px 0}.portal-content pre{white-space:pre-wrap;word-break:break-word}.page-head>.actions{justify-content:flex-end}.panel form{max-width:100%}.field input[type=checkbox]{width:auto}.public-footer a{color:inherit;text-decoration:none}.public-footer a:hover{text-decoration:underline}.footer-grid>div{display:flex;flex-direction:column;gap:8px}.footer-brand{margin-bottom:6px}.footer-bottom{border-top:1px solid rgba(255,255,255,.12);margin-top:28px;padding:18px 0;color:#aebdca}.public-footer{background:#0c1b2a;color:#dce7f0;padding:55px 0 0}.public-footer p,.public-footer span{color:#9fb0bf}.footer-grid{display:grid;grid-template-columns:1.7fr 1fr 1fr;gap:38px}.hero-copy h1{letter-spacing:-.04em}.status{white-space:nowrap}.mini-input[type=date]{min-width:145px}
@media(max-width:980px){.hero-premium{min-height:unset}.hero-glass{min-height:360px}.workflow-tabs>.tabs{top:78px;overflow:auto;flex-wrap:nowrap}.workflow-tabs>.tabs .tab-btn{white-space:nowrap}.check-grid{grid-template-columns:1fr}}
@media(max-width:820px){.hero-slider-bg:after{background:linear-gradient(180deg,rgba(5,19,31,.83),rgba(5,19,31,.94))}.hero-bg{background-image:var(--mobile-image);background-position:center}.hero-glass{min-height:420px;padding:22px}.sidebar-backdrop{position:fixed;inset:0;z-index:55;border:0;background:rgba(5,15,25,.55);backdrop-filter:blur(2px)}.sidebar-backdrop.open{display:block}.sidebar{box-shadow:25px 0 65px rgba(0,0,0,.24)}.footer-grid{grid-template-columns:1fr}.topbar{height:auto;min-height:72px}.topbar>div:nth-child(2){max-width:65%}.topbar strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.inline-actions{align-items:stretch}.inline-actions>input,.inline-actions>select{min-width:150px}.workflow-tabs>.tabs{top:72px}}
@media(max-width:560px){.hero-premium{padding:35px 0}.hero-glass{min-height:470px;padding:18px}.hero-dots{left:18px}.hero-panel{padding:20px}.check-grid{padding:9px}.workflow-tabs>.tabs{margin-left:-4px;margin-right:-4px}.tab-btn{font-size:.82rem}.inline-actions{flex-direction:column;align-items:stretch}.inline-actions form.inline-actions{width:100%}.inline-actions .btn{width:100%}.mini-input{width:100%;min-width:0}.page-head>.actions{width:100%}.page-head>.actions .btn{flex:1}.auth-card h1{font-size:1.9rem}.data-list{gap:5px}.public-footer{padding-top:38px}}
.ticket-thread{margin-bottom:16px}.thread-list{display:grid;gap:10px;max-height:440px;overflow:auto}.thread-message{padding:12px 14px;border:1px solid var(--border,#dde4ec);border-radius:calc(var(--radius) * .7);background:var(--surface,#fff)}.thread-message.mine{margin-left:8%;background:color-mix(in srgb,var(--accent) 9%,var(--surface))}@media(max-width:700px){.thread-message.mine{margin-left:0}.ticket-thread .panel-head{align-items:flex-start}}
.ticket-admin-card summary{cursor:pointer;display:flex;align-items:center;gap:10px;flex-wrap:wrap;list-style:none}.ticket-admin-card summary::-webkit-details-marker{display:none}.ticket-admin-card summary small{display:block;width:100%;color:var(--muted)}.internal-note{border-style:dashed;background:color-mix(in srgb,var(--warning,#d9a441) 10%,var(--surface))}
.notification-card.unread{border-left:4px solid var(--accent);box-shadow:0 10px 28px color-mix(in srgb,var(--accent) 12%,transparent)}.notification-meta{color:var(--muted);font-size:.88rem;margin-top:8px}.notification-bell{position:relative;text-decoration:none;font-size:1.2rem;padding:8px}.notification-bell [data-notification-count]{position:absolute;right:-2px;top:-2px;min-width:18px;height:18px;padding:0 4px;border-radius:20px;background:var(--accent);color:#101820;font-size:11px;font-weight:800;display:grid;place-items:center}

.audit-json{max-width:520px;max-height:260px;overflow:auto;white-space:pre-wrap;word-break:break-word;background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:12px;font-size:.78rem}.status-muted{background:rgba(148,163,184,.15);color:var(--muted)}


/* Theme designer and branding controls */
.footer-brand img{width:auto;height:42px;max-width:190px;object-fit:contain}.check-line{display:flex!important;align-items:center;gap:8px;font-weight:600!important;margin-top:8px}.check-line input{width:auto}.favicon-preview{width:64px;height:64px;object-fit:contain;border-radius:14px;border:1px solid var(--line,#dfe6ee);padding:7px;background:#fff;margin-bottom:10px}.brand-preview{object-fit:contain;background:linear-gradient(135deg,#f8fafc,#e8eef5)}.theme-editor-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,.7fr);gap:24px;align-items:start}.theme-preview{position:sticky;top:92px;padding:28px;border-radius:var(--radius);background:var(--surface);color:var(--text);border:1px solid color-mix(in srgb,var(--primary) 14%,transparent);box-shadow:0 24px 65px color-mix(in srgb,var(--primary) 15%,transparent);font-family:var(--font)}.theme-preview h2{font-family:var(--heading-font);font-size:clamp(28px,var(--heading-size),46px);line-height:1.05;margin:10px 0}.theme-preview p{color:var(--muted)}.preview-metrics{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:22px}.preview-metrics span{padding:14px;border-radius:calc(var(--radius) * .7);background:var(--bg);color:var(--muted)}.preview-metrics strong{display:block;color:var(--primary);font-size:1.25rem}.sticky-save{position:sticky;bottom:14px;z-index:20;display:flex;justify-content:flex-end;padding:12px;border:1px solid color-mix(in srgb,var(--primary) 12%,transparent);border-radius:16px;background:color-mix(in srgb,var(--surface) 88%,transparent);backdrop-filter:blur(16px);box-shadow:0 16px 40px rgba(17,38,61,.12)}code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;background:color-mix(in srgb,var(--primary) 7%,transparent);padding:2px 5px;border-radius:5px}
@media(max-width:980px){.theme-editor-grid{grid-template-columns:1fr}.theme-preview{position:relative;top:auto}.sticky-save{bottom:8px}}
@media(max-width:560px){.preview-metrics{grid-template-columns:1fr}.sticky-save .btn{width:100%}}

/* Managed nested navigation */
.nav-group{position:relative;display:flex;align-items:center}
.nav-parent-link{padding-right:2px!important}
.nav-submenu-toggle{width:28px;height:28px;padding:0;border:0;background:transparent;color:inherit;display:grid;place-items:center;border-radius:8px;cursor:pointer;font-size:1rem;transition:transform .2s ease,background .2s ease}
.nav-group:hover>.nav-submenu-toggle,.nav-group:focus-within>.nav-submenu-toggle,.nav-group.open>.nav-submenu-toggle{transform:rotate(180deg);background:color-mix(in srgb,var(--primary) 7%,transparent)}
.nav-dropdown{position:absolute;left:0;top:calc(100% + 10px);min-width:230px;padding:9px;background:#fff;border:1px solid #e0e7ee;border-radius:14px;box-shadow:0 22px 55px rgba(17,38,61,.16);display:none;z-index:90}
.nav-group:hover>.nav-dropdown,.nav-group:focus-within>.nav-dropdown,.nav-group.open>.nav-dropdown{display:grid;gap:3px}
.nav-dropdown a{display:block;padding:10px 12px;border-radius:9px;white-space:nowrap}
.nav-dropdown a:hover{background:#f2f6fa}
.nav-dropdown .nav-subgroup{display:grid;grid-template-columns:1fr auto}
.nav-dropdown .nav-subgroup>.nav-dropdown{left:calc(100% + 8px);top:-8px}
.restricted-value{font-size:.8rem;color:var(--muted);font-weight:700}
.health-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:18px}
.health-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.health-item{display:flex;align-items:flex-start;gap:12px;padding:14px;border:1px solid #e0e7ee;border-radius:14px;background:#fff}
.health-icon{width:30px;height:30px;display:grid;place-items:center;border-radius:10px;font-weight:900;flex:0 0 auto}
.health-item small{display:block;color:var(--muted);margin-top:3px;word-break:break-word}
.health-ok .health-icon{background:#e4f5eb;color:#146c3c}
.health-warn .health-icon{background:#fff0df;color:#98551a}
@media(max-width:820px){
  .nav-group{display:grid;grid-template-columns:1fr auto;width:100%}
  .nav-group>.nav-parent-link{width:100%}
  .nav-dropdown{position:static;grid-column:1/-1;min-width:0;margin:3px 0 4px 12px;padding:5px;border:0;border-left:2px solid #dce4ec;border-radius:0;box-shadow:none;background:transparent}
  .nav-group:hover>.nav-dropdown,.nav-group:focus-within>.nav-dropdown{display:none}
  .nav-group.open>.nav-dropdown{display:grid}
  .nav-dropdown .nav-subgroup{grid-template-columns:1fr auto}
  .nav-dropdown .nav-subgroup>.nav-dropdown{position:static;margin-left:12px}
  .health-summary,.health-grid{grid-template-columns:1fr}
}

/* Secure profile images, live presence and portal assistant */
.user-avatar{width:32px;height:32px;border-radius:10px;object-fit:cover;border:1px solid color-mix(in srgb,var(--primary) 12%,transparent)}
.profile-identity{display:flex;align-items:center;gap:16px}.profile-photo-large,.profile-photo-fallback{width:86px;height:86px;border-radius:24px;object-fit:cover;flex:0 0 auto}.profile-photo-large{border:1px solid #dfe6ee;box-shadow:0 12px 28px rgba(17,38,61,.12)}.profile-photo-fallback{display:grid;place-items:center;background:linear-gradient(135deg,var(--primary),var(--secondary));color:#fff;font-size:2rem;font-weight:850}
.chat-presence{min-height:28px;margin-bottom:8px;color:var(--muted);font-size:.82rem;font-weight:700}.chat[data-chat-list]{max-height:480px;overflow:auto;scroll-behavior:smooth}.chat-message[data-message-id]{white-space:pre-wrap;overflow-wrap:anywhere}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.ai-assistant{position:fixed;right:22px;bottom:22px;z-index:120}.ai-assistant-toggle{width:58px;height:58px;border:0;border-radius:20px;background:linear-gradient(135deg,var(--primary),var(--secondary));color:#fff;font-weight:900;letter-spacing:.04em;box-shadow:0 20px 45px rgba(17,38,61,.3);cursor:pointer}.ai-assistant-panel{position:absolute;right:0;bottom:70px;width:min(390px,calc(100vw - 28px));height:min(570px,calc(100vh - 120px));background:var(--surface);border:1px solid color-mix(in srgb,var(--primary) 13%,transparent);border-radius:22px;box-shadow:0 28px 80px rgba(17,38,61,.28);overflow:hidden}.ai-assistant-head{height:66px;padding:13px 16px;background:linear-gradient(135deg,var(--primary),var(--secondary));color:#fff;display:flex;align-items:center;justify-content:space-between}.ai-assistant-head small{display:block;color:rgba(255,255,255,.72)}.ai-assistant-head button{border:0;background:rgba(255,255,255,.12);color:#fff;width:34px;height:34px;border-radius:11px;font-size:1.25rem;cursor:pointer}.ai-assistant-messages{height:calc(100% - 132px);padding:15px;overflow:auto;background:color-mix(in srgb,var(--bg) 72%,#fff)}.ai-bubble{max-width:88%;padding:11px 13px;border-radius:15px;margin-bottom:10px;background:#fff;border:1px solid #e0e7ee;white-space:pre-wrap;overflow-wrap:anywhere;font-size:.9rem}.ai-bubble.user{margin-left:auto;background:var(--primary);color:#fff;border-color:transparent}.ai-bubble.pending{opacity:.7}.ai-actions{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 12px}.ai-assistant-form{height:66px;padding:10px;display:grid;grid-template-columns:1fr auto;gap:8px;border-top:1px solid #e0e7ee;background:#fff}.ai-assistant-form input{min-width:0}
@media(max-width:560px){.ai-assistant{right:12px;bottom:12px}.ai-assistant-toggle{width:52px;height:52px;border-radius:17px}.ai-assistant-panel{position:fixed;inset:12px 12px 74px;width:auto;height:auto}.profile-identity{align-items:flex-start}.profile-photo-large,.profile-photo-fallback{width:68px;height:68px;border-radius:19px}.topbar .user-chip{max-width:120px}.topbar .user-chip{font-size:0}.topbar .user-chip img,.topbar .user-chip>span{font-size:.85rem}}

/* v4 premium theme presets, responsive preview and CMS HTML editor */
.theme-preset-bar{display:flex;align-items:center;flex-wrap:wrap;gap:9px;padding:13px 14px;margin-bottom:20px;border:1px solid color-mix(in srgb,var(--primary) 12%,transparent);border-radius:15px;background:color-mix(in srgb,var(--bg) 80%,var(--surface))}.theme-preset-bar>span{font-weight:850;font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin-right:4px}.theme-preset{border:1px solid color-mix(in srgb,var(--primary) 16%,transparent);background:var(--surface);color:var(--text);padding:8px 11px;border-radius:10px;font:inherit;font-size:.8rem;font-weight:750;cursor:pointer;transition:.2s ease}.theme-preset:hover,.theme-preset:focus{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent);transform:translateY(-1px)}.preview-device-switch{display:flex;justify-content:flex-end;gap:5px;margin-bottom:8px}.preview-device-switch button{border:1px solid var(--line,#dfe6ee);background:var(--surface);padding:7px 11px;border-radius:9px;font:inherit;font-size:.78rem;font-weight:800;color:var(--muted);cursor:pointer}.preview-device-switch button.active{background:var(--primary);color:#fff;border-color:var(--primary)}.theme-preview{transition:max-width .25s ease,transform .25s ease}.theme-preview.preview-mobile{max-width:360px;margin-left:auto;min-height:520px}.theme-preview.preview-mobile .preview-metrics{grid-template-columns:1fr}.theme-preview.preview-mobile .actions{align-items:stretch;flex-direction:column}.theme-preview.preview-mobile .actions .btn{width:100%}.preview-header{display:flex;align-items:center;gap:8px;margin:-10px -10px 22px;padding:10px;border-radius:calc(var(--radius) * .7);background:color-mix(in srgb,var(--primary) 7%,var(--surface));font-size:.82rem}.preview-brand-dot{width:24px;height:24px;border-radius:8px;background:linear-gradient(135deg,var(--primary),var(--secondary));box-shadow:0 5px 12px color-mix(in srgb,var(--primary) 22%,transparent)}.preview-nav-lines{margin-left:auto;width:58px;height:7px;border-radius:10px;background:linear-gradient(90deg,var(--muted) 0 42%,transparent 42% 50%,var(--muted) 50% 100%);opacity:.45}
.html-editor{border:1px solid #d8e0ea;border-radius:14px;background:#fff;overflow:hidden;box-shadow:0 8px 24px rgba(17,38,61,.05)}.html-editor:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 16%,transparent)}.html-editor-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:5px;padding:9px;background:#f4f7fa;border-bottom:1px solid #dfe6ee}.editor-tool{min-width:34px;border:1px solid #d4dde6;background:#fff;color:#263746;border-radius:8px;padding:7px 9px;font:inherit;font-size:.78rem;font-weight:800;cursor:pointer}.editor-tool:hover,.editor-tool:focus{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,#fff)}.editor-preview-toggle{margin-left:auto;background:var(--primary);border-color:var(--primary);color:#fff}.html-editor textarea{border:0!important;border-radius:0!important;box-shadow:none!important;min-height:360px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.88rem;line-height:1.65;resize:vertical}.html-editor-preview{background:#eef3f8;padding:12px}.html-editor-preview iframe{width:100%;min-height:430px;border:1px solid #d8e0ea;border-radius:12px;background:#fff}.html-editor.previewing textarea{display:none}.html-editor.previewing .html-editor-preview{display:block!important}.html-editor.previewing .editor-preview-toggle{background:var(--accent);color:#15202c;border-color:var(--accent)}
@media(max-width:700px){.theme-preset-bar{align-items:stretch}.theme-preset-bar>span{width:100%}.theme-preset{flex:1 1 45%}.preview-device-switch{justify-content:flex-start}.theme-preview.preview-mobile{max-width:100%}.html-editor-toolbar{gap:4px}.editor-tool{padding:7px;min-width:31px}.editor-preview-toggle{margin-left:0}.html-editor textarea{min-height:300px}}

/* v5 public branding, accessibility and premium footer */
.skip-link{position:fixed;left:14px;top:14px;z-index:9999;transform:translateY(-180%);padding:10px 14px;border-radius:10px;background:var(--accent);color:#132033;font-weight:850;text-decoration:none;box-shadow:0 12px 30px rgba(0,0,0,.24);transition:transform .18s ease}.skip-link:focus{transform:translateY(0)}
.announcement-bar{position:relative;z-index:55;background:linear-gradient(90deg,var(--accent),color-mix(in srgb,var(--accent) 72%,#fff));color:#172231;text-align:center;font-size:.84rem;font-weight:800;letter-spacing:.01em}.announcement-bar .container{min-height:38px;display:flex;align-items:center;justify-content:center;padding-top:7px;padding-bottom:7px}.announcement-bar a{color:inherit;text-decoration:none}.announcement-bar a:hover{text-decoration:underline;text-underline-offset:3px}
.footer-grid-premium{grid-template-columns:1.45fr .8fr 1fr 1fr}.footer-intro p{max-width:440px}.footer-security-badge{display:inline-flex;align-items:center;gap:8px;margin-top:10px;padding:7px 10px;border:1px solid rgba(255,255,255,.12);border-radius:999px;color:#dbe6ef;font-size:.76rem;font-weight:800}.footer-security-badge span{color:var(--accent)}.footer-contact span{line-height:1.65}.footer-social{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.public-footer .footer-social a{display:inline-flex;margin:0;padding:6px 9px;border:1px solid rgba(255,255,255,.13);border-radius:9px;font-size:.74rem;font-weight:800}.public-footer .footer-social a:hover{border-color:var(--accent);color:#fff}.footer-bottom{display:flex;justify-content:space-between;align-items:center;gap:18px}.footer-bottom a{color:inherit;text-decoration:none;font-weight:750}.footer-bottom a:hover{color:#fff}
.content img{max-width:100%;height:auto;border-radius:calc(var(--radius) * .75)}.content table{width:100%;border-collapse:collapse;margin:20px 0}.content th,.content td{padding:11px 12px;border:1px solid color-mix(in srgb,var(--primary) 14%,transparent);text-align:left}.content th{background:color-mix(in srgb,var(--primary) 7%,var(--surface))}.content blockquote{margin:20px 0;padding:16px 20px;border-left:4px solid var(--accent);background:color-mix(in srgb,var(--accent) 8%,var(--surface));border-radius:0 var(--radius) var(--radius) 0}
@media(max-width:980px){.footer-grid-premium{grid-template-columns:1.3fr 1fr 1fr}.footer-grid-premium>div:last-child{grid-column:2/4}}
@media(max-width:700px){.announcement-bar{font-size:.78rem}.footer-grid-premium{grid-template-columns:1fr}.footer-grid-premium>div:last-child{grid-column:auto}.footer-bottom{align-items:flex-start;flex-direction:column}.footer-security-badge{white-space:normal}.content table{display:block;overflow-x:auto}}

/* Portal sidebar folding and accessible navigation controls */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.sidebar-toggle{display:inline-grid;place-items:center;width:42px;height:42px;flex:0 0 auto;border:1px solid #dce4ec;border-radius:11px;background:#fff;color:var(--primary);font-size:1.35rem;cursor:pointer;transition:background .2s ease,border-color .2s ease,transform .2s ease}
.sidebar-toggle:hover{background:#f4f7fa;border-color:#cbd6e2}.sidebar-toggle:active{transform:scale(.97)}
.portal-shell,.sidebar,.portal-main{transition:grid-template-columns .24s ease,width .24s ease,margin .24s ease}
.portal-shell.sidebar-collapsed{grid-template-columns:88px minmax(0,1fr)}
.portal-shell.sidebar-collapsed .sidebar{width:88px;padding-left:10px;padding-right:10px}
.portal-shell.sidebar-collapsed .portal-main{grid-column:2}
.portal-shell.sidebar-collapsed .sidebar-brand{justify-content:center;padding-left:0;padding-right:0}
.portal-shell.sidebar-collapsed .sidebar-brand>span:last-child,.portal-shell.sidebar-collapsed .sidebar-role,.portal-shell.sidebar-collapsed .nav-label{display:none}
.portal-shell.sidebar-collapsed .sidebar-nav a{justify-content:center;padding-left:10px;padding-right:10px}
.portal-shell.sidebar-collapsed .sidebar-nav a .nav-dot{width:10px;height:10px}
@media(max-width:820px){
  .portal-shell.sidebar-collapsed{display:block}
  .portal-shell.sidebar-collapsed .sidebar,.sidebar{width:min(290px,86vw);padding:20px 14px}
  .portal-shell.sidebar-collapsed .sidebar-brand{justify-content:flex-start;padding:4px 8px 18px}
  .portal-shell.sidebar-collapsed .sidebar-brand>span:last-child,.portal-shell.sidebar-collapsed .sidebar-role,.portal-shell.sidebar-collapsed .nav-label{display:inline}
  .portal-shell.sidebar-collapsed .sidebar-role{display:block}
  .portal-shell.sidebar-collapsed .sidebar-nav a{justify-content:flex-start;padding:10px 12px}
}

/* v6.1.0 grouped portal navigation */
.sidebar-nav{gap:5px}
.sidebar-nav .sidebar-link,.sidebar-group-toggle{min-height:44px;border-radius:12px}
.sidebar-nav .sidebar-link{padding:7px 9px}
.sidebar-group{position:relative}
.sidebar-group-toggle{width:100%;display:flex;align-items:center;gap:10px;padding:7px 9px;border:0;background:transparent;color:#b9c8d5;font:inherit;font-size:.9rem;font-weight:720;text-align:left;cursor:pointer;transition:background .2s ease,color .2s ease,transform .2s ease}
.sidebar-group-toggle:hover,.sidebar-group.open>.sidebar-group-toggle{background:rgba(255,255,255,.09);color:#fff}
.sidebar-group-toggle:active{transform:scale(.985)}
.nav-icon{width:31px;height:31px;flex:0 0 31px;display:inline-grid!important;place-items:center;border:1px solid rgba(255,255,255,.1);border-radius:10px;background:rgba(255,255,255,.055);color:#8fa6b9;transition:background .2s ease,border-color .2s ease,color .2s ease}
.nav-icon svg{width:17px;height:17px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sidebar-link:hover .nav-icon,.sidebar-link.active .nav-icon,.sidebar-group-toggle:hover .nav-icon,.sidebar-group.open>.sidebar-group-toggle .nav-icon{background:rgba(217,164,65,.15);border-color:rgba(217,164,65,.28);color:var(--accent)}
.sidebar-link.active{box-shadow:inset 3px 0 0 var(--accent)}
.nav-chevron{width:20px;height:20px;margin-left:auto;display:inline-grid!important;place-items:center;color:#7890a4;transition:transform .22s ease,color .22s ease}
.nav-chevron svg{width:16px;height:16px;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sidebar-group.open .nav-chevron{transform:rotate(180deg);color:#dce7f0}
.sidebar-subnav{max-height:0;overflow:hidden;opacity:0;visibility:hidden;margin:0 0 0 24px;padding:0 0 0 16px;border-left:1px solid rgba(255,255,255,.1);transition:max-height .28s ease,opacity .2s ease,padding .28s ease,margin .28s ease,visibility .2s ease}
.sidebar-group.open .sidebar-subnav{max-height:640px;opacity:1;visibility:visible;margin-top:5px;margin-bottom:7px;padding-top:3px;padding-bottom:3px}
.sidebar-nav .sidebar-subnav a{position:relative;min-height:37px;padding:8px 10px;font-size:.84rem;border-radius:9px;color:#aebfcd}
.sidebar-nav .sidebar-subnav a:hover,.sidebar-nav .sidebar-subnav a.active{background:rgba(255,255,255,.075);color:#fff}
.sidebar-subnav .nav-dot{width:6px;height:6px;flex:0 0 6px}
.sidebar-subnav a.active .nav-dot{background:var(--accent);box-shadow:0 0 0 4px rgba(217,164,65,.13)}
.portal-shell.sidebar-collapsed .sidebar-group-toggle{justify-content:center;padding-left:10px;padding-right:10px}
.portal-shell.sidebar-collapsed .sidebar-group-toggle .nav-icon{width:36px;height:36px;flex-basis:36px}
.portal-shell.sidebar-collapsed .sidebar-subnav,.portal-shell.sidebar-collapsed .nav-chevron{display:none!important}
.portal-shell.sidebar-collapsed .sidebar-link .nav-icon{width:36px;height:36px;flex-basis:36px}
.portal-shell.sidebar-collapsed .sidebar-link{justify-content:center}

/* v6.1.0 clickable dashboard metric cards */
.dashboard-metric-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.dashboard-metric-card{--metric-accent:#b7892f;position:relative;min-height:190px;display:flex;flex-direction:column;padding:21px 22px 19px;overflow:hidden;text-decoration:none;border:1px solid color-mix(in srgb,var(--metric-accent) 17%,#dfe6ed);background:linear-gradient(145deg,#fff 0%,color-mix(in srgb,var(--metric-accent) 4%,#fff) 100%);box-shadow:0 14px 38px rgba(17,38,61,.075);transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}
.dashboard-metric-card:before{content:"";position:absolute;inset:0 0 auto;height:4px;background:linear-gradient(90deg,var(--metric-accent),color-mix(in srgb,var(--metric-accent) 45%,transparent))}
.dashboard-metric-card:after{content:"";position:absolute;width:135px;height:135px;right:-55px;top:-58px;border-radius:50%;background:color-mix(in srgb,var(--metric-accent) 8%,transparent);pointer-events:none}
.dashboard-metric-card.is-clickable:hover{transform:translateY(-5px);border-color:color-mix(in srgb,var(--metric-accent) 36%,#dfe6ed);box-shadow:0 24px 58px rgba(17,38,61,.13)}
.dashboard-metric-card.is-clickable:active{transform:translateY(-2px)}
.metric-card-top{position:relative;z-index:1;display:flex!important;align-items:center;justify-content:space-between;margin-bottom:20px}
.metric-icon{width:44px;height:44px;display:inline-grid!important;place-items:center;border-radius:14px;background:color-mix(in srgb,var(--metric-accent) 11%,#fff);border:1px solid color-mix(in srgb,var(--metric-accent) 19%,#fff);color:var(--metric-accent)}
.metric-icon svg{width:22px;height:22px;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.metric-open-icon{width:32px;height:32px;display:inline-grid!important;place-items:center;border-radius:10px;color:color-mix(in srgb,var(--metric-accent) 76%,#172333);background:rgba(255,255,255,.72);border:1px solid color-mix(in srgb,var(--metric-accent) 14%,#e2e8ef);transition:transform .2s ease,background .2s ease}
.metric-open-icon svg{width:16px;height:16px;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.dashboard-metric-card:hover .metric-open-icon{transform:translate(2px,-2px);background:#fff}
.dashboard-metric-card .metric-label{position:relative;z-index:1;margin-bottom:5px;color:#68788b;font-size:.78rem;font-weight:790;letter-spacing:.035em;text-transform:uppercase}
.dashboard-metric-card .metric-value{position:relative;z-index:1;display:block;margin:0;color:#172537;font-size:clamp(1.7rem,2.5vw,2.25rem);line-height:1.12;letter-spacing:-.035em}
.dashboard-metric-card .metric-hint{position:relative;z-index:1;margin-top:auto;padding-top:15px;display:flex!important;align-items:center;justify-content:space-between;gap:10px;color:color-mix(in srgb,var(--metric-accent) 70%,#536273);font-size:.82rem;font-weight:740}
.dashboard-metric-card.is-restricted{filter:saturate(.7);background:#f8fafc}
.metric-tone-gold{--metric-accent:#b8872c}.metric-tone-blue{--metric-accent:#2874b8}.metric-tone-violet{--metric-accent:#7558b7}.metric-tone-green{--metric-accent:#27805d}.metric-tone-cyan{--metric-accent:#23869a}.metric-tone-red{--metric-accent:#b84d47}
@media(max-width:1120px){.dashboard-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){
  .portal-shell.sidebar-collapsed .sidebar-group-toggle{justify-content:flex-start;padding:7px 9px}
  .portal-shell.sidebar-collapsed .sidebar-group-toggle .nav-icon,.portal-shell.sidebar-collapsed .sidebar-link .nav-icon{width:31px;height:31px;flex-basis:31px}
  .portal-shell.sidebar-collapsed .nav-chevron{display:inline-grid!important}
  .portal-shell.sidebar-collapsed .sidebar-group.open .sidebar-subnav{display:block!important}
}
@media(max-width:560px){.dashboard-metric-grid{grid-template-columns:1fr}.dashboard-metric-card{min-height:174px}}

/* Context filters opened from dashboard cards */
.filter-shortcuts{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding-top:12px;border-top:1px solid #e8edf3}
.filter-shortcuts-label{display:inline-block;color:var(--muted);font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.055em;margin-right:3px}
.filter-chip{display:inline-flex;align-items:center;min-height:33px;padding:7px 11px;border:1px solid #dce4ec;border-radius:999px;background:#fff;color:#536579;text-decoration:none;font-size:.8rem;font-weight:750;transition:.18s ease}
.filter-chip:hover{border-color:color-mix(in srgb,var(--accent) 45%,#dce4ec);color:var(--primary)}
.filter-chip.active{background:color-mix(in srgb,var(--accent) 14%,#fff);border-color:color-mix(in srgb,var(--accent) 35%,#dce4ec);color:#74551a}

/* v6.1 semantic themes and accessible profile menu */
:root{--border:#dce4ec;--shadow:0 14px 38px rgba(17,38,61,.08);--success-surface:#eaf8ef;--danger-surface:#fff0f0;--warning-surface:#fff7e6;--focus:#2b78c5}
html[data-theme="dark"],body[data-theme="dark"]{--bg:#0d1520;--surface:#152131;--text:#edf4fa;--muted:#9fb0c1;--border:#2b3b4d;--primary:#dbe8f4;--secondary:#b9ccdf;--shadow:0 16px 46px rgba(0,0,0,.28);color-scheme:dark}
body[data-theme="dark"]{background:var(--bg);color:var(--text)}
body[data-theme="dark"] .panel,body[data-theme="dark"] .topbar,body[data-theme="dark"] .dashboard-metric-card,body[data-theme="dark"] input,body[data-theme="dark"] select,body[data-theme="dark"] textarea,body[data-theme="dark"] .profile-dropdown{background:var(--surface)!important;color:var(--text);border-color:var(--border)!important}
body[data-theme="dark"] .dashboard-metric-card .metric-value,body[data-theme="dark"] h1,body[data-theme="dark"] h2,body[data-theme="dark"] h3,body[data-theme="dark"] h4,body[data-theme="dark"] strong{color:var(--text)}
body[data-theme="dark"] .dashboard-metric-card .metric-label,body[data-theme="dark"] small,body[data-theme="dark"] p,body[data-theme="dark"] .muted{color:var(--muted)}
.profile-menu{position:relative}.profile-menu-toggle{border:1px solid var(--border);cursor:pointer}.profile-dropdown{position:absolute;right:0;top:calc(100% + 10px);z-index:90;min-width:210px;padding:8px;border:1px solid var(--border);border-radius:14px;background:var(--surface);box-shadow:var(--shadow)}.profile-dropdown a,.profile-dropdown button{display:flex;width:100%;align-items:center;padding:10px 12px;border:0;border-radius:9px;background:transparent;color:var(--text);font:inherit;text-decoration:none;text-align:left;cursor:pointer}.profile-dropdown a:hover,.profile-dropdown button:hover,.profile-dropdown a:focus-visible,.profile-dropdown button:focus-visible{background:color-mix(in srgb,var(--accent) 12%,var(--surface));outline:none}.theme-toggle{width:40px;height:40px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text);cursor:pointer}.theme-toggle:focus-visible,.profile-menu-toggle:focus-visible{outline:3px solid color-mix(in srgb,var(--focus) 35%,transparent);outline-offset:2px}.audit-viewed{background:var(--success-surface)}body[data-theme="dark"] .audit-viewed{background:#143225}.audit-new{font-weight:600}.profile-card{max-width:760px}
@media(max-width:640px){.profile-menu-toggle>span:nth-last-child(2){display:none}.topbar-actions{gap:6px}.theme-toggle{width:36px;height:36px}}

/* Protected document preview */
.document-modal[hidden]{display:none}.document-modal{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:18px}.document-modal-backdrop{position:absolute;inset:0;background:rgba(5,12,20,.74);backdrop-filter:blur(5px)}.document-modal-dialog{position:relative;display:flex;flex-direction:column;width:min(1080px,96vw);height:min(840px,92vh);border:1px solid var(--border);border-radius:20px;background:var(--surface);box-shadow:0 30px 90px rgba(0,0,0,.35);overflow:hidden}.document-modal-head,.document-modal-actions{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 20px;border-bottom:1px solid var(--border)}.document-modal-actions{justify-content:flex-end;border-top:1px solid var(--border);border-bottom:0}.document-modal-close{width:42px;height:42px;border:0;border-radius:12px;background:color-mix(in srgb,var(--muted) 12%,transparent);color:var(--text);font-size:26px;cursor:pointer}.document-modal-body{flex:1;min-height:0;display:grid;place-items:center;background:color-mix(in srgb,var(--bg) 75%,var(--surface));overflow:auto}.document-preview-frame{width:100%;height:100%;border:0;background:#fff}.document-preview-image{max-width:100%;max-height:100%;object-fit:contain}.modal-open{overflow:hidden}

/* Premium Gemini / Smart Help widget */
.ai-assistant{--ai-primary:var(--primary);--ai-surface:var(--surface);--ai-text:var(--text)}.ai-assistant.ai-position-left{right:auto;left:22px}.ai-assistant.ai-position-left .ai-assistant-panel{right:auto;left:0}.ai-assistant-toggle{background:linear-gradient(135deg,var(--ai-primary),color-mix(in srgb,var(--ai-primary) 55%,var(--accent)));font-size:22px}.ai-assistant-panel{background:var(--ai-surface);color:var(--ai-text);border-color:color-mix(in srgb,var(--ai-primary) 20%,var(--border))}.ai-assistant-head{background:linear-gradient(135deg,var(--ai-primary),color-mix(in srgb,var(--ai-primary) 70%,#111))}.ai-safety-note{margin:4px 0 12px;padding:9px 11px;border-radius:12px;background:var(--warning-surface);color:#74551a;font-size:.75rem;line-height:1.4}.ai-suggestions{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:12px}.ai-suggestions button{border:1px solid var(--border);border-radius:999px;background:var(--ai-surface);color:var(--ai-text);padding:7px 10px;font:inherit;font-size:.76rem;cursor:pointer}.ai-suggestions button:hover{border-color:var(--accent)}body[data-theme="dark"] .ai-bubble{background:#1d2d40;border-color:#34485e;color:#eaf2f8}body[data-theme="dark"] .ai-assistant-messages{background:#111c29}body[data-theme="dark"] .ai-assistant-form{background:#172537;border-color:#324457}body[data-theme="dark"] .ai-safety-note{background:#3c2e13;color:#ffd98a}@media(max-width:560px){.ai-assistant.ai-position-left{left:12px}.ai-assistant.ai-position-left .ai-assistant-panel{left:12px;right:12px}}
.password-field{position:relative;display:flex;align-items:center}.password-field input{padding-right:74px}.password-toggle{position:absolute;right:7px;border:0;background:transparent;color:var(--primary);font-weight:800;padding:7px;border-radius:8px;cursor:pointer}.password-toggle:hover{background:color-mix(in srgb,var(--primary) 9%,transparent)}
.onboarding-checklist{position:sticky;top:90px;z-index:20;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:18px}.onboarding-check{border:1px solid #dfe6ee;border-radius:12px;padding:11px 13px;background:#fff;font-weight:750;font-size:.86rem}.onboarding-check.complete{background:#e8f8ef;border-color:#a8ddbd;color:#146c3c}.onboarding-check.invalid{background:#fff0ef;border-color:#efc7c4;color:#9f231c}.onboarding-card.complete{border-color:#a8ddbd;background:#f2fbf6}.onboarding-card.invalid{border-color:#efc7c4;background:#fff8f7}@media(max-width:720px){.onboarding-checklist{grid-template-columns:1fr;position:static}}
.readiness-ready{border-color:#9fd6b4;background:linear-gradient(135deg,#f0fbf5,#fff)}.readiness-pending{border-color:#f1d89c;background:linear-gradient(135deg,#fff9e8,#fff)}.status-expired,.status-revoked{background:#fde9e7;color:#9c2720}.status-used{background:#e8eef5;color:#35516d}
.metric-link,.block-link,.heading-link{text-decoration:none}.metric-link{display:block;transition:transform .2s ease,box-shadow .2s ease}.metric-link:hover,.metric-link:focus-visible{transform:translateY(-3px);box-shadow:0 20px 44px rgba(17,38,61,.12)}.metric-link small{display:block;margin-top:9px;color:var(--muted)}.block-link{display:block;margin-bottom:10px}.heading-link:hover{text-decoration:underline}.notification-preview{border-bottom:1px solid color-mix(in srgb,var(--text) 10%,transparent)}.notification-preview:last-child{border-bottom:0}.notification-preview a{display:grid;gap:3px;padding:12px 4px;text-decoration:none;border-radius:10px}.notification-preview a:hover{background:color-mix(in srgb,var(--primary) 6%,transparent)}.notification-preview span,.notification-preview small{color:var(--muted)}.notification-preview.unread{border-left:4px solid var(--accent);padding-left:8px}.notification-preview.unread strong:after{content:'New';font-size:.62rem;margin-left:8px;padding:3px 6px;border-radius:999px;background:var(--accent);color:#172333;text-transform:uppercase}
.address-suggestions{position:absolute;z-index:80;width:min(100%,720px);max-height:280px;overflow:auto;background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:0 18px 50px rgba(15,23,42,.18);padding:6px}.field:has(>[data-address-field]){position:relative}.address-suggestion{display:block;width:100%;border:0;background:transparent;color:var(--text);text-align:left;padding:10px 12px;border-radius:8px;cursor:pointer}.address-suggestion:hover,.address-suggestion:focus{background:var(--surface-soft);outline:2px solid var(--accent)}
.finance-tree{display:grid;gap:12px}.tree-node{border:1px solid var(--border,#dfe6ee);border-radius:14px;background:var(--surface,#fff);padding:0 16px 14px}.tree-node>summary{cursor:pointer;font-weight:800;padding:15px 0;list-style:none}.tree-node>summary::-webkit-details-marker{display:none}.tree-node>summary:before{content:'›';display:inline-block;margin-right:9px;transition:transform .2s}.tree-node[open]>summary:before{transform:rotate(90deg)}

/* v6.1.1 protected document review, responsive staff portal and topbar fixes */
.user-chip.profile-menu-toggle{min-height:42px;padding:5px 9px 5px 6px;border-radius:13px;background:var(--surface,#fff);color:var(--text,#132033);max-width:min(290px,30vw);overflow:hidden}
.user-chip.profile-menu-toggle>span{width:auto;height:auto;border-radius:0;background:transparent;display:inline;place-items:initial}
.user-chip .user-avatar,.user-chip .user-avatar-fallback{width:32px;height:32px;flex:0 0 32px;border-radius:10px;object-fit:cover}
.user-chip .user-avatar-fallback{display:grid!important;place-items:center!important;background:color-mix(in srgb,var(--primary) 10%,var(--surface,#fff))!important;color:var(--primary);font-weight:850}
.user-chip-name{min-width:0;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.user-chip-chevron{flex:0 0 auto;color:var(--muted)}
.topbar>div:nth-child(2){min-width:0;flex:1}.topbar-actions{flex:0 0 auto;min-width:0}.topbar .eyebrow,.topbar strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.document-review-panel{overflow:visible}
.document-review-table-wrap{overflow:auto;max-width:100%}
.document-review-table{width:100%;min-width:760px;border-collapse:collapse}
.document-review-table th,.document-review-table td{text-align:left;padding:13px 14px;border-bottom:1px solid var(--border,#e3e9ef);vertical-align:top}
.document-review-table th{font-size:.75rem;text-transform:uppercase;letter-spacing:.065em;color:var(--muted);background:color-mix(in srgb,var(--primary) 3%,var(--surface,#fff))}
.document-review-table tbody tr:last-child td{border-bottom:0}
.document-review-button{min-width:124px;white-space:nowrap}
.document-row-actions{display:flex;align-items:flex-start;flex-wrap:wrap;gap:8px;position:relative}
.document-resend-form{margin-bottom:0}.document-resend-form .btn{width:100%}
.document-more-menu{position:relative}.document-more-menu>summary{list-style:none}.document-more-menu>summary::-webkit-details-marker{display:none}
.document-more-menu .action-menu-panel{right:0;left:auto;min-width:min(360px,82vw);display:grid;gap:12px;padding:14px}
.document-more-menu .action-menu-panel form{display:grid;gap:9px;margin:0}.document-more-menu .action-menu-panel label{display:grid;gap:5px;font-size:.78rem;font-weight:750}

.document-modal{padding:18px}
.document-modal-dialog{width:min(1180px,calc(100vw - 36px));height:min(900px,calc(100vh - 36px));border-radius:22px}
.document-modal-heading{min-width:0}.document-modal-head h2{margin:2px 0 0;font-size:clamp(1.15rem,2vw,1.75rem);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.document-modal-meta{margin:4px 0 0;text-transform:capitalize;font-size:.84rem}
.document-modal-body{position:relative;min-height:300px;padding:0}
.document-preview-state{display:grid;place-items:center;align-content:center;gap:10px;min-height:260px;width:min(520px,90%);padding:28px;text-align:center;color:var(--muted)}
.document-preview-state p{margin:0 0 8px}.document-preview-unavailable strong{font-size:1.1rem;color:var(--text)}
.document-preview-frame{display:block;width:100%;height:100%;min-height:420px;background:#fff}
.document-preview-image{display:block;max-width:100%;max-height:100%;margin:auto;padding:14px;object-fit:contain}
.document-review-bar{display:grid;grid-template-columns:minmax(190px,.65fr) minmax(0,1.35fr);align-items:center;gap:18px;padding:15px 20px;border-top:1px solid var(--border,#dfe6ee);background:color-mix(in srgb,var(--accent) 6%,var(--surface,#fff))}
.document-review-copy{display:grid;gap:2px}.document-review-copy small{color:var(--muted)}
.document-review-controls{display:grid;grid-template-columns:auto minmax(310px,1fr);gap:10px;align-items:center;justify-content:end}
.document-review-controls form{margin:0}.document-decline-form{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:8px;align-items:center}.document-decline-form input{min-width:0}
.document-modal-actions{flex-wrap:wrap}

.staff-contract-grid{align-items:start}.contract-review-card{display:grid;gap:10px;margin-top:12px}.contract-review-card p{margin:0}
.contract-review-actions{align-items:stretch}.contract-review-actions>form{margin:0}.contract-review-actions .btn{height:100%}
.contract-return-form{display:grid!important;grid-template-columns:minmax(180px,1fr) auto;gap:8px;flex:1}.contract-return-form input{min-width:0}
.send-contract-panel textarea{min-height:260px}

.portal-role-staff .portal-content{max-width:1480px}
.portal-role-staff .page-head{position:relative;overflow:hidden;padding:24px 26px;border:1px solid color-mix(in srgb,var(--accent) 18%,var(--border,#dfe6ee));border-radius:22px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 7%,var(--surface,#fff)),var(--surface,#fff) 58%,color-mix(in srgb,var(--accent) 8%,var(--surface,#fff)));box-shadow:0 18px 48px rgba(17,38,61,.08)}
.portal-role-staff .page-head:after{content:"";position:absolute;width:190px;height:190px;right:-85px;top:-105px;border-radius:50%;background:color-mix(in srgb,var(--accent) 12%,transparent);pointer-events:none}
.portal-role-staff .page-head>div,.portal-role-staff .page-head>.status{position:relative;z-index:1}
.portal-role-staff .metric-grid{gap:18px;margin-top:20px}
.portal-role-staff .metric-card{position:relative;overflow:hidden;min-height:145px;padding:22px;border:1px solid color-mix(in srgb,var(--accent) 15%,var(--border,#dfe6ee));border-radius:20px;background:linear-gradient(145deg,var(--surface,#fff),color-mix(in srgb,var(--primary) 3%,var(--surface,#fff)));box-shadow:0 16px 42px rgba(17,38,61,.08)}
.portal-role-staff .metric-card:before{content:"";position:absolute;inset:0 0 auto;height:4px;background:linear-gradient(90deg,var(--accent),color-mix(in srgb,var(--accent) 30%,transparent))}
.portal-role-staff .metric-card strong{font-size:clamp(1.8rem,3vw,2.45rem);letter-spacing:-.04em}.portal-role-staff .metric-card small{margin-top:auto}
.portal-role-staff .panel,.portal-role-staff .card{border-color:color-mix(in srgb,var(--primary) 10%,var(--border,#dfe6ee));box-shadow:0 14px 38px rgba(17,38,61,.065)}
.portal-role-staff .card.soft{box-shadow:none;background:color-mix(in srgb,var(--primary) 2.5%,var(--surface,#fff))}
.portal-role-staff details>summary{cursor:pointer;font-weight:800;color:var(--primary)}

@media(max-width:1180px){
  .staff-contract-grid{grid-template-columns:1fr}
  .document-review-controls{grid-template-columns:1fr}.document-review-controls>form:first-child .btn{width:100%}
}
@media(max-width:980px){
  .user-chip-name{display:none}.user-chip.profile-menu-toggle{max-width:none}
  .document-review-bar{grid-template-columns:1fr}.document-review-controls{grid-template-columns:auto minmax(0,1fr)}
}
@media(max-width:760px){
  .document-review-table-wrap{overflow:visible;border:0;background:transparent}
  .document-review-table{display:block;min-width:0}.document-review-table thead{display:none}.document-review-table tbody{display:grid;gap:13px}
  .document-review-table tr{display:block;padding:8px 14px;border:1px solid var(--border,#dfe6ee);border-radius:16px;background:var(--surface,#fff);box-shadow:0 10px 28px rgba(17,38,61,.06)}
  .document-review-table td{display:grid;grid-template-columns:minmax(92px,36%) minmax(0,1fr);gap:12px;padding:10px 0;border-bottom:1px dashed var(--border,#dfe6ee);word-break:break-word}
  .document-review-table td:last-child{border-bottom:0}.document-review-table td:before{content:attr(data-label);font-size:.72rem;font-weight:850;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
  .document-row-actions{min-width:0}.document-review-button{width:100%}.document-more-menu{width:100%}.document-more-menu>summary{width:100%}
  .document-modal{padding:8px}.document-modal-dialog{width:calc(100vw - 16px);height:calc(100dvh - 16px);border-radius:16px}
  .document-modal-head{padding:12px 14px}.document-modal-head .eyebrow{display:none}.document-modal-close{width:38px;height:38px;flex:0 0 38px}
  .document-preview-frame{min-height:360px}.document-review-bar{padding:12px 14px;gap:10px}.document-review-controls{grid-template-columns:1fr}
  .document-decline-form{grid-template-columns:1fr}.document-decline-form .btn,.document-review-controls>form:first-child .btn{width:100%}
  .document-modal-actions{padding:11px 14px}.document-modal-actions .btn{flex:1}
  .contract-return-form{grid-template-columns:1fr}.contract-return-form .btn{width:100%}
  .portal-role-staff .page-head{padding:19px}.portal-role-staff .metric-grid{grid-template-columns:1fr}
}
@media(max-width:480px){
  .document-review-table td{grid-template-columns:1fr;gap:4px}
  .document-modal-actions{display:grid;grid-template-columns:1fr 1fr}.document-modal-actions .btn{width:100%}
}

/* v6.1.1 staff portal premium cards and mobile record layouts */
.staff-welcome-head .status{flex:0 0 auto}.staff-metric-grid .metric-link{display:flex;flex-direction:column;text-decoration:none}.staff-dashboard-sections>.panel{height:100%;margin-bottom:0}.staff-site-card,.staff-quick-grid>a{transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.staff-site-card:hover,.staff-quick-grid>a:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--accent) 42%,var(--border));box-shadow:0 14px 30px rgba(17,38,61,.09)}.staff-quick-grid>a{text-decoration:none;min-height:145px;display:flex;flex-direction:column}.staff-quick-grid>a small{margin-top:auto;color:var(--muted)}
.staff-document-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.staff-document-card{display:flex;flex-direction:column;gap:14px;min-width:0}.staff-document-card-top{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:start}.staff-document-icon{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:color-mix(in srgb,var(--accent) 17%,var(--surface));color:color-mix(in srgb,var(--accent) 72%,var(--text));font-size:1.2rem;font-weight:900}.staff-document-title{min-width:0}.staff-document-title h3{margin:1px 0 5px}.staff-document-title p{margin:0;font-size:.86rem}.staff-document-actions{display:flex;flex-wrap:wrap;gap:9px}.staff-renewal-box{margin-top:auto;border:1px solid var(--border,#dfe6ee);border-radius:15px;padding:13px 14px;background:color-mix(in srgb,var(--primary) 2.5%,var(--surface,#fff))}.staff-renewal-box>summary{cursor:pointer;font-weight:850}.staff-document-note{margin-top:auto;margin-bottom:0;padding-top:6px}
.staff-warning-list{gap:16px}.staff-warning-card{margin:0}.staff-status-stack{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}.staff-warning-reason{border:1px solid var(--border,#dfe6ee);border-radius:15px;padding:14px 16px;background:color-mix(in srgb,var(--primary) 2.5%,var(--surface,#fff))}.staff-warning-reason p{margin:.35rem 0 0}.staff-warning-actions{margin-top:14px}
@media(max-width:1080px){.staff-document-grid{grid-template-columns:1fr}.staff-dashboard-sections{grid-template-columns:1fr}}
@media(max-width:760px){
  .staff-responsive-table-wrap{overflow:visible;border:0;background:transparent}.staff-responsive-table{display:block;min-width:0}.staff-responsive-table thead{display:none}.staff-responsive-table tbody{display:grid;gap:13px}.staff-responsive-table tr{display:block;padding:8px 14px;border:1px solid var(--border,#dfe6ee);border-radius:16px;background:var(--surface,#fff);box-shadow:0 10px 28px rgba(17,38,61,.06)}.staff-responsive-table td{display:grid;grid-template-columns:minmax(95px,34%) minmax(0,1fr);gap:12px;padding:10px 0;border-bottom:1px dashed var(--border,#dfe6ee);word-break:break-word}.staff-responsive-table td:last-child{border-bottom:0}.staff-responsive-table td:before{content:attr(data-label);font-size:.72rem;font-weight:850;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}.staff-responsive-table .btn{width:100%}
  .staff-document-card-top{grid-template-columns:auto minmax(0,1fr)}.staff-document-card-top>.status{grid-column:1/-1;justify-self:start}.staff-warning-card .panel-head{align-items:flex-start;flex-direction:column}.staff-status-stack{justify-content:flex-start}.staff-warning-actions .btn{width:100%}
}
@media(max-width:480px){.staff-responsive-table td{grid-template-columns:1fr;gap:4px}.staff-document-icon{display:none}.staff-document-card-top{grid-template-columns:1fr}}

/* v6.1.2 protected preview: compact, scroll-safe layout on phones and short screens */
@media(max-width:760px), (max-height:680px){
  .document-modal-dialog{overflow:auto}
  .document-modal-head,.document-review-bar,.document-modal-actions{flex:0 0 auto}
  .document-modal-body{flex:1 1 240px;min-height:220px;overflow:auto}
  .document-preview-frame{height:100%;min-height:220px}
  .document-preview-state{min-height:210px;padding:20px}
}
@media(max-width:480px){
  .document-modal-dialog{height:calc(100dvh - 10px);width:calc(100vw - 10px)}
  .document-modal-body{min-height:200px}
  .document-preview-frame{min-height:200px}
}

/* v6.2.0-premiumreview.4 - staff document review, protected preview and scroll lock */
html.document-modal-open,
html.document-modal-open body{overflow:hidden!important;overscroll-behavior:none!important}
body.modal-open{touch-action:none!important}
body.modal-open .ai-assistant{visibility:hidden!important;pointer-events:none!important}

.staff-record-hero{position:relative;isolation:isolate;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;margin-bottom:22px;padding:28px;border:1px solid rgba(255,255,255,.13);border-radius:26px;background:linear-gradient(135deg,#0b2944 0%,#123f63 58%,#17364e 100%);box-shadow:0 24px 65px rgba(7,28,47,.22);color:#fff}
.staff-record-hero:before,.staff-record-hero:after{content:"";position:absolute;z-index:-1;border-radius:50%;pointer-events:none}
.staff-record-hero:before{width:330px;height:330px;right:-125px;top:-195px;border:46px solid rgba(255,255,255,.055)}
.staff-record-hero:after{width:210px;height:210px;right:180px;bottom:-160px;background:rgba(219,169,68,.09)}
.staff-record-hero-main{display:flex;align-items:center;gap:20px;min-width:0}
.staff-record-avatar-wrap{position:relative;flex:0 0 auto}
.staff-record-avatar{display:block;width:104px;height:104px;border-radius:24px;border:3px solid rgba(255,255,255,.78);background:#e9eef4;object-fit:cover;box-shadow:0 15px 38px rgba(0,0,0,.25)}
.staff-record-avatar-fallback{display:grid;place-items:center;background:linear-gradient(135deg,#d7a43f,#f2ce77);color:#11263d;font-size:2.45rem;font-weight:900}
.staff-record-avatar-state{position:absolute;right:-3px;bottom:-3px;width:23px;height:23px;border:4px solid #0f3554;border-radius:50%;background:#25a26f;box-shadow:0 5px 14px rgba(0,0,0,.25)}
.staff-record-avatar-state.is-missing{background:#d7a43f}
.staff-record-identity{min-width:0}.staff-record-identity .eyebrow{color:#f0c96d}.staff-record-identity h1{margin:4px 0 5px;color:#fff!important;font-size:clamp(1.8rem,3vw,2.65rem);letter-spacing:-.045em}.staff-record-identity>p{margin:0;color:rgba(255,255,255,.76);font-size:1rem}
.staff-record-chips{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:15px}.staff-record-chip,.staff-record-hero .status{display:inline-flex;align-items:center;min-height:31px;padding:6px 10px;border:1px solid rgba(255,255,255,.14)!important;border-radius:999px;background:rgba(255,255,255,.1)!important;color:#fff!important;font-size:.75rem;font-weight:800;text-transform:capitalize}.staff-record-chip strong{margin-right:5px;color:#f4ce78!important}
.staff-record-hero-actions{display:flex;align-items:flex-start;justify-content:flex-end;flex-wrap:wrap;gap:9px;max-width:390px}.staff-record-hero-actions form{margin:0}.staff-record-hero-actions .btn{min-height:42px;border-color:rgba(255,255,255,.18)!important}.staff-record-hero-actions .btn-secondary{background:#e0ad45!important;color:#172537!important}.staff-record-hero-actions .btn-ghost{background:rgba(255,255,255,.1)!important;color:#fff!important}
.staff-record-summary{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;padding-top:20px;border-top:1px solid rgba(255,255,255,.13)}.staff-record-summary>div{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 15px;border:1px solid rgba(255,255,255,.11);border-radius:15px;background:rgba(255,255,255,.07)}.staff-record-summary span{color:rgba(255,255,255,.69);font-size:.75rem;font-weight:800;text-transform:uppercase;letter-spacing:.045em}.staff-record-summary strong{color:#fff!important;font-size:.98rem;text-align:right}

.premium-document-review-panel{overflow:hidden;padding:0!important;border-radius:24px!important}.document-review-panel-head{padding:24px 25px;margin:0!important;border-bottom:1px solid var(--color-border,#d9e2ec);background:linear-gradient(135deg,var(--color-surface,#fff),var(--color-surface-alt,#edf2f7))}.document-review-panel-head h3{margin:4px 0 5px;font-size:1.4rem}.document-review-summary{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:8px}.document-review-summary span{display:inline-flex;align-items:center;gap:5px;min-height:34px;padding:7px 10px;border:1px solid var(--color-border,#d9e2ec);border-radius:999px;background:var(--color-surface,#fff);color:var(--color-text-muted,#607087);font-size:.75rem;font-weight:800}.document-review-summary strong{color:var(--color-text,#142033)!important}
.premium-document-review-panel .document-review-table-wrap{border:0!important;border-radius:0!important;box-shadow:none!important}.premium-document-review-panel .document-review-table{margin:0}.premium-document-review-panel .document-review-table th{height:52px;padding:13px 16px;background:#102f4a!important;color:#fff!important;border-color:#254762!important;font-size:.73rem;letter-spacing:.055em;text-transform:uppercase}.premium-document-review-panel .document-review-table td{padding:16px;vertical-align:middle}.premium-document-review-panel .document-review-row{transition:background .18s ease}.premium-document-review-panel .document-review-row:hover{background:var(--color-surface-alt,#edf2f7)}.premium-document-review-panel .document-review-row.is-missing{opacity:.8}
.document-name-cell{display:flex;align-items:center;gap:11px;min-width:220px}.document-type-icon{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border:1px solid #d6e2ec;border-radius:13px;background:#edf4f9;color:#164a70;font-size:.61rem;font-weight:900;letter-spacing:.05em}.document-name-cell>div{min-width:0}.document-name-cell strong,.document-name-cell small{overflow-wrap:anywhere}.document-row-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:225px}.document-row-actions .btn{margin:0}.document-missing-state{display:inline-flex;align-items:center;min-height:34px;padding:7px 10px;border:1px dashed var(--color-border-strong,#bcc9d6);border-radius:10px;color:var(--color-text-muted,#607087);font-size:.76rem;font-weight:750}

.document-modal[hidden]{display:none!important}.document-modal{position:fixed!important;inset:0!important;z-index:6000!important;display:grid!important;place-items:center!important;padding:16px!important;overflow:hidden!important;overscroll-behavior:contain!important;opacity:0;transition:opacity .12s ease}.document-modal.is-open{opacity:1}.document-modal-backdrop{position:absolute!important;inset:0!important;background:rgba(3,10,18,.8)!important;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);cursor:zoom-out}
.document-modal-dialog{position:relative!important;z-index:1!important;display:grid!important;grid-template-rows:auto minmax(250px,1fr) auto auto!important;width:min(1240px,calc(100vw - 32px))!important;height:min(920px,calc(100vh - 32px))!important;min-height:0!important;overflow:hidden!important;border:1px solid var(--color-border,#d9e2ec)!important;border-radius:24px!important;background:var(--color-surface,#fff)!important;color:var(--color-text,#142033)!important;box-shadow:0 35px 110px rgba(0,0,0,.48)!important;transform:translateY(8px) scale(.993);transition:transform .16s ease}.document-modal.is-open .document-modal-dialog{transform:translateY(0) scale(1)}
.document-modal-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:18px!important;padding:17px 20px!important;border-bottom:1px solid var(--color-border,#d9e2ec)!important;background:var(--color-surface,#fff)!important}.document-modal-heading{min-width:0}.document-modal-kicker{display:flex;align-items:center;gap:8px}.document-modal-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#e9f2f8;color:#16527d}.document-modal-icon svg{width:17px;height:17px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.document-modal-head .eyebrow{color:#9b6b15}.document-modal-head h2{max-width:760px;margin:3px 0 0!important;color:var(--color-text,#142033)!important;font-size:clamp(1.05rem,1.7vw,1.55rem)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.document-modal-meta-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:4px}.document-modal-meta{margin:0!important;color:var(--color-text-muted,#607087)!important;font-size:.78rem}.document-modal-status{display:inline-flex;align-items:center;min-height:25px;padding:4px 8px;border-radius:999px;background:var(--color-surface-alt,#edf2f7);color:var(--color-text-muted,#607087);font-size:.68rem;font-weight:850;text-transform:capitalize}.document-modal-status.status-pending{background:#fff3d1;color:#7e5711}.document-modal-status.status-approved{background:#e5f6ed;color:#176b47}.document-modal-status.status-declined{background:#fde8eb;color:#9f2f35}.document-modal-head-actions{display:flex;align-items:center;gap:9px;flex:0 0 auto}.document-download-button{display:inline-flex!important;align-items:center;gap:7px}.document-download-button svg{width:17px;height:17px;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.document-modal-close{display:grid!important;place-items:center!important;flex:0 0 42px!important;width:42px!important;height:42px!important;padding:0!important;border:1px solid var(--color-border,#d9e2ec)!important;border-radius:12px!important;background:var(--color-surface-alt,#edf2f7)!important;color:var(--color-text,#142033)!important;cursor:pointer}.document-modal-close:hover{background:#fde8eb!important;color:#9f2f35!important;border-color:#ecc1c5!important}.document-modal-close svg{width:19px;height:19px;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.document-modal-viewer-shell{min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden;background:#e7edf3}.document-modal-viewer-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;min-height:39px;padding:8px 15px;border-bottom:1px solid #cbd6e0;background:#f7f9fb;color:#536579;font-size:.72rem}.document-file-identity{display:flex;align-items:center;gap:8px;min-width:0;font-weight:800}.document-file-identity span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-file-dot{flex:0 0 8px;width:8px;height:8px;border-radius:50%;background:#25a26f;box-shadow:0 0 0 4px rgba(37,162,111,.14)}.document-viewer-note{white-space:nowrap;color:#738297}.document-modal-body{position:relative!important;min-height:0!important;display:grid!important;place-items:center!important;padding:0!important;overflow:auto!important;overscroll-behavior:contain;background:#dce4eb!important}.document-modal-body.is-frame{display:block!important;overflow:hidden!important}.document-preview-frame{display:block!important;width:100%!important;height:100%!important;min-height:0!important;border:0!important;background:#fff!important}.document-image-stage{width:100%;height:100%;min-height:250px;display:flex;align-items:center;justify-content:center;padding:18px;overflow:auto;background:linear-gradient(45deg,#e4ebf1 25%,#edf2f6 25%,#edf2f6 50%,#e4ebf1 50%,#e4ebf1 75%,#edf2f6 75%);background-size:22px 22px}.document-preview-image{display:block!important;width:auto!important;height:auto!important;max-width:min(900px,calc(100% - 10px))!important;max-height:calc(100% - 10px)!important;margin:auto!important;padding:0!important;border:1px solid rgba(17,38,61,.16);border-radius:13px;object-fit:contain!important;background:#fff;box-shadow:0 18px 48px rgba(17,38,61,.22)}.document-preview-state{display:grid;place-items:center;align-content:center;gap:10px;width:min(520px,90%);min-height:240px;padding:28px;text-align:center;color:var(--color-text-muted,#607087)}.document-preview-state strong{color:var(--color-text,#142033)!important;font-size:1.12rem}.document-preview-state p{margin:0 0 7px!important}.document-preview-unavailable-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:16px;background:#fde8eb;color:#9f2f35;font-size:1.4rem;font-weight:900}
.document-review-bar{display:grid!important;grid-template-columns:minmax(210px,.62fr) minmax(0,1.38fr)!important;align-items:center!important;gap:18px!important;padding:16px 20px!important;border-top:1px solid var(--color-border,#d9e2ec)!important;background:var(--color-surface-alt,#edf2f7)!important}.document-review-copy{display:grid;gap:3px}.document-review-copy .eyebrow{color:#9b6b15}.document-review-copy strong{font-size:1rem;color:var(--color-text,#142033)!important}.document-review-copy small{line-height:1.45;color:var(--color-text-muted,#607087)!important}.document-review-controls{display:grid!important;grid-template-columns:minmax(180px,.7fr) minmax(360px,1.7fr)!important;gap:10px!important;align-items:stretch!important}.document-review-controls form{margin:0!important}.document-approve-form{display:flex}.document-decision-button{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;width:100%!important;min-height:48px!important;padding:10px 14px!important;text-align:center}.document-decision-button svg{flex:0 0 18px;width:18px;height:18px;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.document-approve-form .btn-success{background:#16845b!important;color:#fff!important;border-color:#16845b!important}.document-decline-form{display:grid!important;grid-template-columns:minmax(220px,1fr) minmax(190px,.72fr)!important;gap:9px!important;align-items:end!important}.document-decline-field{display:grid;gap:4px;min-width:0}.document-decline-field label{color:var(--color-text,#142033)!important;font-size:.72rem;font-weight:850}.document-decline-field label span{color:#b1353c}.document-decline-field textarea{width:100%;min-height:48px!important;max-height:92px;padding:9px 11px!important;resize:vertical;border-radius:11px!important;line-height:1.35!important}.document-decline-field small{text-align:right;color:var(--color-text-muted,#607087)!important;font-size:.66rem}.document-decline-form .btn-danger{background:#b63c44!important;color:#fff!important;border-color:#b63c44!important}
.document-modal-actions{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;padding:12px 20px!important;border-top:1px solid var(--color-border,#d9e2ec)!important;border-bottom:0!important;background:var(--color-surface,#fff)!important}.document-modal-security-note{display:flex;align-items:center;gap:7px;color:var(--color-text-muted,#607087);font-size:.72rem;font-weight:750}.document-modal-security-note svg{width:17px;height:17px;stroke:#25805f;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.document-modal-footer-actions{display:flex;align-items:center;gap:8px}.document-modal-actions .btn{margin:0!important}

html[data-theme="dark"] .staff-record-hero{border-color:#34536c;background:linear-gradient(135deg,#071a2a 0%,#0e314c 58%,#102b40 100%)}
html[data-theme="dark"] .document-type-icon{border-color:#34475a;background:#1c3345;color:#9fd0f2}
html[data-theme="dark"] .document-modal-icon{background:#1b364b;color:#9fd0f2}
html[data-theme="dark"] .document-modal-viewer-toolbar{border-color:#34475a;background:#172534;color:#b4c2d0}
html[data-theme="dark"] .document-modal-viewer-shell,html[data-theme="dark"] .document-modal-body{background:#0d151e!important}
html[data-theme="dark"] .document-image-stage{background:#0e1822}
html[data-theme="dark"] .document-review-panel-head{background:linear-gradient(135deg,var(--color-surface),var(--color-surface-alt))}
html[data-theme="dark"] .premium-document-review-panel .document-review-row:hover{background:#1d2937}
html[data-theme="dark"] .document-modal-status.status-pending{background:#3b2f16;color:#f4c86f}
html[data-theme="dark"] .document-modal-status.status-approved{background:#153c2d;color:#70d5a3}
html[data-theme="dark"] .document-modal-status.status-declined{background:#452329;color:#ff9aa0}

@media(max-width:1020px){
  .staff-record-hero{grid-template-columns:1fr}.staff-record-hero-actions{justify-content:flex-start;max-width:none}.staff-record-summary{grid-column:auto}
  .document-review-bar{grid-template-columns:1fr!important}.document-review-controls{grid-template-columns:minmax(170px,.65fr) minmax(0,1.35fr)!important}
}
@media(max-width:780px){
  .staff-record-hero{padding:21px;border-radius:20px}.staff-record-hero-main{align-items:flex-start}.staff-record-avatar{width:82px;height:82px;border-radius:20px}.staff-record-summary{grid-template-columns:1fr}.staff-record-hero-actions,.staff-record-hero-actions form,.staff-record-hero-actions .btn{width:100%}
  .document-review-panel-head{align-items:flex-start!important;flex-direction:column;padding:19px}.document-review-summary{justify-content:flex-start}
  .premium-document-review-panel .document-review-table th{display:none}.premium-document-review-panel .document-review-table td{padding:10px 0}.premium-document-review-panel .document-review-row{padding:13px 15px!important}.document-name-cell{min-width:0}.document-row-actions{min-width:0}.document-row-actions .btn{flex:1 1 130px}
  .document-modal{padding:6px!important}.document-modal-dialog{width:calc(100vw - 12px)!important;height:calc(100dvh - 12px)!important;border-radius:17px!important;grid-template-rows:auto minmax(210px,1fr) auto auto!important}.document-modal-head{padding:12px 13px!important}.document-modal-icon,.document-modal-head .eyebrow,.document-download-button span{display:none}.document-modal-head h2{max-width:calc(100vw - 170px);font-size:1rem!important}.document-modal-head-actions{gap:6px}.document-download-button{width:42px;height:42px;padding:0!important;justify-content:center}.document-modal-viewer-toolbar{padding:7px 11px}.document-viewer-note{display:none}.document-image-stage{padding:9px}.document-preview-image{max-width:100%!important;max-height:100%!important;border-radius:9px}
  .document-review-bar{max-height:42dvh;overflow:auto;padding:12px 13px!important;gap:10px!important}.document-review-copy small{display:none}.document-review-controls{grid-template-columns:1fr!important}.document-decline-form{grid-template-columns:1fr!important}.document-decision-button{min-height:44px!important}.document-decline-field textarea{max-height:75px}.document-modal-actions{padding:9px 12px!important}.document-modal-security-note{display:none}.document-modal-footer-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.document-modal-footer-actions .btn{width:100%}
}
@media(max-width:520px){
  .staff-record-hero-main{display:grid;grid-template-columns:auto minmax(0,1fr);gap:13px}.staff-record-avatar{width:68px;height:68px;border-radius:17px}.staff-record-identity h1{font-size:1.55rem}.staff-record-chips{grid-column:1/-1}.staff-record-summary>div{padding:11px 12px}
  .document-review-summary{display:grid;grid-template-columns:repeat(3,1fr);width:100%}.document-review-summary span{justify-content:center;padding:6px;font-size:.68rem}
  .document-modal-head h2{max-width:calc(100vw - 135px)}.document-modal-meta-row{display:none}.document-modal-footer-actions{grid-template-columns:1fr}.document-modal-footer-actions>a{display:none}.document-review-copy{display:none}.document-review-bar{max-height:48dvh}
}
@media(max-height:690px) and (min-width:781px){
  .document-modal-dialog{height:calc(100vh - 18px)!important}.document-review-copy small{display:none}.document-review-bar{padding-top:10px!important;padding-bottom:10px!important}.document-modal-actions{padding-top:8px!important;padding-bottom:8px!important}
}

/* Premium handwritten hiring-contract signature workflow */
.contract-signing-page{padding:42px 0 72px;background:radial-gradient(circle at 8% 0%,rgba(217,164,65,.14),transparent 32%),linear-gradient(180deg,rgba(17,38,61,.035),transparent 32%)}
.contract-signing-container{max-width:1240px}
.contract-signing-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:24px;padding:26px 30px;border:1px solid rgba(17,38,61,.12);border-radius:26px;background:linear-gradient(135deg,var(--surface),rgba(255,255,255,.88));box-shadow:0 22px 60px rgba(17,38,61,.09)}
.contract-signing-hero h1{margin:5px 0 7px;font-size:clamp(1.8rem,3vw,2.75rem)}
.contract-signing-hero p{margin:0;color:var(--muted)}
.contract-security-chip{display:inline-flex;align-items:center;gap:9px;padding:10px 14px;border:1px solid rgba(217,164,65,.34);border-radius:999px;background:rgba(217,164,65,.1);font-weight:800;color:var(--primary);white-space:nowrap}
.contract-signing-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(360px,.65fr);gap:24px;align-items:start}
.contract-document-card,.contract-signature-card{border:1px solid rgba(17,38,61,.12);border-radius:26px;background:var(--surface);box-shadow:0 20px 55px rgba(17,38,61,.09)}
.contract-document-card{overflow:hidden}
.contract-document-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:24px 28px;border-bottom:1px solid rgba(17,38,61,.1);background:linear-gradient(135deg,rgba(17,38,61,.035),rgba(217,164,65,.07))}
.contract-document-head h2,.contract-signature-head h2{margin:5px 0 0;font-size:1.35rem}
.contract-step{display:inline-flex;padding:5px 9px;border-radius:999px;background:rgba(17,38,61,.08);color:var(--primary);font-size:.72rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.contract-document-content{padding:30px;min-height:540px;line-height:1.72}
.contract-document-content h1,.contract-document-content h2,.contract-document-content h3{color:var(--primary)}
.contract-signature-card{position:sticky;top:22px;padding:24px}
.contract-signature-head{padding-bottom:18px;border-bottom:1px solid rgba(17,38,61,.1)}
.contract-signature-head p{margin:8px 0 0;color:var(--muted);line-height:1.55}
.signature-pad-shell{margin-top:20px;border:1px solid rgba(17,38,61,.16);border-radius:20px;overflow:hidden;background:#fff;transition:border-color .2s ease,box-shadow .2s ease}
.signature-pad-shell:focus-within,.signature-pad-shell.has-signature{border-color:rgba(217,164,65,.78);box-shadow:0 0 0 4px rgba(217,164,65,.12)}
.signature-pad-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;border-bottom:1px solid rgba(17,38,61,.1);background:#f7f9fc;font-size:.82rem;font-weight:800;color:#263b52}
.signature-live-dot{display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:50%;background:#22a06b;box-shadow:0 0 0 4px rgba(34,160,107,.12)}
.signature-canvas-wrap{position:relative;background:#fff;overflow:hidden}
.signature-canvas{display:block;width:100%;height:270px;background:#fff;cursor:crosshair;touch-action:none;user-select:none;-webkit-user-select:none;outline:none}
.signature-canvas:focus-visible{box-shadow:inset 0 0 0 3px rgba(217,164,65,.35)}
.signature-guide{position:absolute;left:28px;right:28px;bottom:38px;border-bottom:1px dashed rgba(17,38,61,.28);pointer-events:none}
.signature-guide span{position:absolute;right:0;bottom:6px;padding-left:8px;background:#fff;color:#8190a2;font-size:.72rem}
.signature-help{margin:0;padding:9px 13px;border-top:1px solid rgba(17,38,61,.08);background:#fbfcfe;color:#66788d;font-size:.78rem}
.contract-acceptance{display:flex;align-items:flex-start;gap:11px;padding:14px;border:1px solid rgba(17,38,61,.12);border-radius:16px;background:rgba(17,38,61,.035);line-height:1.5;cursor:pointer}
.contract-acceptance input{width:auto;flex:0 0 auto;margin-top:4px}
.signature-form-message{display:none;margin-top:13px;padding:11px 13px;border-radius:13px;font-size:.86rem;font-weight:700}
.signature-form-message:not(:empty){display:block}
.signature-form-message.is-error{background:#fff0f0;color:#9a2d2d;border:1px solid rgba(154,45,45,.2)}
.signature-form-message.is-working{background:#eef5ff;color:#244f80;border:1px solid rgba(36,79,128,.18)}
.contract-sign-submit{min-height:50px;display:flex;align-items:center;justify-content:center;gap:10px;font-weight:900}
.contract-sign-submit:disabled{opacity:.55;cursor:not-allowed;filter:saturate(.55)}
.signature-submit-lock{font-size:.72rem}
.signature-privacy-note{margin:10px 0 0;text-align:center;color:var(--muted);font-size:.75rem;line-height:1.45}
.contract-signature-success{text-align:center;padding:26px 4px 4px}
.contract-success-mark{display:grid;place-items:center;width:72px;height:72px;margin:0 auto 16px;border-radius:24px;background:linear-gradient(135deg,#1c9a68,#31b57f);box-shadow:0 18px 38px rgba(28,154,104,.23);color:#fff;font-size:2rem;font-weight:900}
.contract-signature-success h2{margin:0 0 8px}
.contract-signature-success>p{margin:0;color:var(--muted);line-height:1.6}
.contract-success-meta{display:grid;gap:8px;margin-top:20px;text-align:left}
.contract-success-meta span{position:relative;padding:10px 12px 10px 36px;border-radius:12px;background:rgba(28,154,104,.07);font-size:.84rem;font-weight:700;color:#285646}
.contract-success-meta span:before{content:'✓';position:absolute;left:13px;color:#1c9a68;font-weight:900}
.contract-signature-preview{margin-top:12px;padding:12px;border:1px solid rgba(17,38,61,.12);border-radius:16px;background:#f8fafc}
.contract-signature-preview img{display:block;width:100%;max-width:430px;max-height:180px;object-fit:contain;margin:0 auto;border-radius:10px;background:#fff;border:1px solid rgba(17,38,61,.09)}
.contract-signature-audit{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.contract-integrity-ok,.contract-integrity-warning{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;font-size:.72rem;font-weight:850}
.contract-integrity-ok{background:rgba(28,154,104,.1);color:#23684f}
.contract-integrity-warning{background:rgba(198,127,25,.12);color:#805410}

@media(max-width:980px){
  .contract-signing-layout{grid-template-columns:1fr}.contract-signature-card{position:static}.contract-document-content{min-height:0}.contract-signing-hero{align-items:flex-start}
}
@media(max-width:680px){
  .contract-signing-page{padding:22px 0 46px}.contract-signing-hero{display:grid;padding:20px;border-radius:20px}.contract-security-chip{white-space:normal;width:max-content;max-width:100%}.contract-document-card,.contract-signature-card{border-radius:20px}.contract-document-head{align-items:flex-start;padding:19px}.contract-document-content{padding:20px}.contract-signature-card{padding:18px}.signature-canvas{height:225px}.signature-guide{left:18px;right:18px;bottom:34px}
}

/* Premium signed hiring agreement PDF actions */
.contract-pdf-actions,
.staff-contract-pdf-actions{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap}
.contract-pdf-actions .btn,
.staff-contract-pdf-actions .btn{min-height:38px}
.staff-contract-library{overflow:hidden}
.staff-contract-pdf-card{display:flex;align-items:center;justify-content:space-between;gap:1rem;border:1px solid color-mix(in srgb,var(--primary,#11263d) 15%,var(--border,#dfe6ee));background:linear-gradient(135deg,color-mix(in srgb,var(--surface,#fff) 96%,var(--primary,#11263d)),var(--surface,#fff))}
.staff-contract-pdf-card p{margin:.35rem 0 0;color:var(--muted-color);font-size:.9rem}
@media(max-width:760px){.staff-contract-pdf-card{align-items:flex-start;flex-direction:column}.staff-contract-pdf-actions{width:100%}.staff-contract-pdf-actions .btn{flex:1 1 180px;text-align:center}}

/* Lead intake readiness, upload states and server-verified shift totals */
.lead-intake-shell{max-width:1180px}.lead-intake-heading{max-width:850px}.lead-intake-form{position:relative}.lead-admin-intake{padding:24px}.lead-admin-page-head{align-items:flex-start}.lead-intake-dashboard{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:16px;margin-bottom:24px}.lead-readiness-card,.lead-totals-card{position:relative;overflow:hidden;border:1px solid rgba(17,38,61,.1);border-radius:20px;padding:20px;min-height:188px}.lead-readiness-card{background:linear-gradient(145deg,#102b45,#17466c);color:#fff;box-shadow:0 20px 44px rgba(13,42,68,.2)}.lead-readiness-card:after{content:"";position:absolute;width:180px;height:180px;border-radius:50%;right:-70px;top:-90px;background:rgba(217,164,65,.2)}.lead-totals-card{background:linear-gradient(145deg,#fff,#f1f5f9);box-shadow:0 16px 38px rgba(17,38,61,.08)}.lead-dashboard-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;position:relative;z-index:1}.lead-dashboard-head h3{margin:.2rem 0 0}.lead-readiness-card h3,.lead-readiness-card p{color:#fff}.lead-dashboard-kicker{display:block;text-transform:uppercase;letter-spacing:.13em;font-size:.67rem;font-weight:850;opacity:.72}.lead-progress-count{font-size:1.45rem;line-height:1;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.14);border-radius:13px;padding:11px 13px}.lead-progress-track{height:10px;border-radius:999px;background:rgba(255,255,255,.16);margin:23px 0 12px;overflow:hidden;position:relative;z-index:1}.lead-progress-track>span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--accent),#f5d893);transition:width .28s ease}.lead-readiness-card p,.lead-totals-card p{font-size:.84rem;margin:12px 0 0;position:relative;z-index:1}.lead-total-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:20px}.lead-total-grid>div{border:1px solid #dde5ed;background:rgba(255,255,255,.8);border-radius:14px;padding:12px;min-width:0}.lead-total-grid span{display:block;color:var(--muted);font-size:.69rem;text-transform:uppercase;letter-spacing:.06em;font-weight:750}.lead-total-grid strong{display:block;font-size:1.25rem;margin-top:4px;overflow:hidden;text-overflow:ellipsis}.lead-server-state{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:7px 10px;font-size:.72rem;font-weight:800;background:#e9eef4;color:#52667b;white-space:nowrap}.lead-server-state:before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}.lead-server-state[data-state="loading"]{background:#fff5d8;color:#805d17}.lead-server-state[data-state="verified"]{background:#e4f5eb;color:#146c3c}.lead-server-state[data-state="warning"]{background:#fde9e7;color:#9c2720}.lead-section-title{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}.lead-section-title>div{display:flex;align-items:center;gap:10px}.lead-section-title>div>span{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:rgba(217,164,65,.15);color:#8b6728;font-size:.75rem;font-weight:900}.lead-section-title h3{margin:0}.lead-section-title>b{color:var(--muted);font-size:.73rem;text-transform:uppercase;letter-spacing:.07em}.lead-section-title.compact{margin-bottom:5px}.lead-shift-section-head{align-items:flex-start}.lead-shift-section-head>div{min-width:0}.lead-field-label{display:flex;align-items:center;justify-content:space-between;gap:9px}.lead-field-badge{display:inline-flex;align-items:center;border-radius:999px;padding:3px 8px;background:#edf1f5;color:#6d7c8e;font-size:.65rem;font-weight:850;white-space:nowrap;transition:.2s ease}.lead-field-detail{display:block;min-height:1.25em;color:#7a8898;font-size:.72rem;line-height:1.35}.field.is-complete input,.field.is-complete select,.field.is-complete textarea{border-color:#7fc49a;background:linear-gradient(0deg,rgba(228,245,235,.45),rgba(255,255,255,.88));box-shadow:0 0 0 3px rgba(21,115,71,.07)}.field.is-complete .lead-field-badge{background:#e4f5eb;color:#146c3c}.field.is-complete .lead-field-detail{color:#397b55}.field.is-invalid input,.field.is-invalid select,.field.is-invalid textarea{border-color:#d97871;background:#fff8f7;box-shadow:0 0 0 3px rgba(180,35,24,.08)}.field.is-invalid .lead-field-badge{background:#fde9e7;color:#9c2720}.field.is-invalid .lead-field-detail{color:#a33b34}.field.is-pending .lead-field-badge{background:#fff5d8;color:#805d17}.field input[type="file"]{padding:9px;background:#f8fafc}.field.has-file input[type="file"]{border-style:solid;background:#eff9f3}.lead-shift-card{padding:18px;margin-top:16px;border-radius:20px;background:linear-gradient(145deg,#f7fafc,#edf3f8);border:1px solid #d9e3ec;box-shadow:0 12px 28px rgba(17,38,61,.06);transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease}.lead-shift-card.is-complete{border-color:#b3d9c1}.lead-shift-card.is-verified{border-color:#7fc49a;box-shadow:0 16px 34px rgba(21,115,71,.1)}.lead-shift-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px;padding-right:0}.lead-shift-head strong{display:block;font-size:1.05rem}.lead-shift-kicker{display:block;text-transform:uppercase;letter-spacing:.1em;color:#7a8998;font-size:.67rem;font-weight:850;margin-bottom:3px}.lead-shift-actions{display:flex;align-items:center;gap:8px}.lead-shift-state{border-radius:999px;background:#fff5d8;color:#805d17;padding:6px 10px;font-size:.72rem;font-weight:850}.lead-shift-state.is-ready{background:#e4f5eb;color:#146c3c}.lead-shift-card .shift-remove{position:static}.lead-shift-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:15px;padding:14px;border:1px solid #d8e3ec;border-radius:16px;background:rgba(255,255,255,.72)}.lead-shift-summary>div{padding:5px 9px;border-right:1px solid #e0e7ee}.lead-shift-summary>div:nth-child(4){border-right:0}.lead-shift-summary span{display:block;color:var(--muted);font-size:.69rem;text-transform:uppercase;letter-spacing:.05em;font-weight:750}.lead-shift-summary strong{display:block;font-size:1.16rem;margin-top:2px}.lead-shift-summary p{grid-column:1/-1;margin:3px 0 0;padding-top:10px;border-top:1px solid #e1e8ee;color:#607286;font-size:.77rem}.lead-submit-zone{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:22px;border:1px solid #dfe6ed;border-radius:20px;padding:18px;background:linear-gradient(145deg,#f7f9fb,#edf2f7);position:sticky;bottom:14px;z-index:15;box-shadow:0 18px 40px rgba(17,38,61,.13)}.lead-submit-zone>div{display:flex;flex-direction:column;gap:3px}.lead-submit-zone>div>strong{font-size:1rem}.lead-submit-zone>div>span{color:var(--muted);font-size:.79rem}.lead-submit-zone.is-ready{border-color:#9dcfaf;background:linear-gradient(145deg,#eef9f2,#e2f2e8)}.lead-submit-button{min-width:230px;flex-direction:column;line-height:1.15}.lead-submit-button small{font-size:.67rem;opacity:.78;font-weight:650}.lead-submit-button:disabled,.btn:disabled{cursor:not-allowed;opacity:.48;transform:none;box-shadow:none}.lead-intake-form.is-ready .lead-submit-button{background:linear-gradient(135deg,#0e5c38,#17804d);box-shadow:0 12px 26px rgba(21,115,71,.22)}
@media(max-width:980px){.lead-intake-dashboard{grid-template-columns:1fr}.lead-total-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.lead-shift-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.lead-shift-summary>div{border-right:0;border-bottom:1px solid #e0e7ee}.lead-shift-summary>div:nth-child(3),.lead-shift-summary>div:nth-child(4){border-bottom:0}}
@media(max-width:700px){.lead-admin-intake,.form-card.lead-intake-form{padding:16px}.lead-readiness-card,.lead-totals-card{padding:17px;min-height:0}.lead-section-title{align-items:flex-start}.lead-section-title>b{display:none}.lead-shift-section-head{flex-direction:column}.lead-shift-section-head [data-add-shift]{width:100%}.lead-shift-head{align-items:flex-start}.lead-shift-actions{flex-direction:column;align-items:flex-end}.lead-submit-zone{position:static;flex-direction:column;align-items:stretch}.lead-submit-button{width:100%;min-width:0}.lead-submit-zone>div{text-align:center}.lead-total-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){.lead-dashboard-head{flex-direction:column}.lead-progress-count{align-self:flex-start}.lead-server-state{white-space:normal}.lead-shift-head{flex-direction:column}.lead-shift-actions{width:100%;flex-direction:row;justify-content:space-between}.lead-shift-summary{grid-template-columns:1fr}.lead-shift-summary>div{border-bottom:1px solid #e0e7ee!important}.lead-shift-summary>div:nth-child(4){border-bottom:0!important}}

/* Vigilex lead-readiness contrast hotfix 6.2.1
   Keep every readiness label readable on the dark premium card in all themes. */
.lead-readiness-card,
.lead-readiness-card .lead-dashboard-kicker,
.lead-readiness-card [data-readiness-title],
.lead-readiness-card [data-readiness-message],
.lead-readiness-card .lead-progress-count,
.lead-readiness-card .lead-progress-count span {
    color: #fff !important;
}
html[data-theme="light"] .lead-readiness-card,
body[data-theme="light"] .lead-readiness-card,
html[data-theme="dark"] .lead-readiness-card,
body[data-theme="dark"] .lead-readiness-card {
    color: #fff !important;
}

/* Premium bank-grade quotation workflow 6.2.3 */
.quote-builder{position:relative}.quote-builder-page-head{align-items:flex-start}.quote-control-grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:18px;margin-bottom:18px}.quote-readiness-card,.quote-total-card{position:relative;overflow:hidden;border-radius:24px;padding:22px;min-height:220px;border:1px solid rgba(17,38,61,.11)}.quote-readiness-card{background:linear-gradient(145deg,#071d31,#0d395d 62%,#164f77);color:#fff;box-shadow:0 22px 48px rgba(7,29,49,.24)}.quote-readiness-card:after{content:"";position:absolute;width:210px;height:210px;border-radius:50%;right:-80px;top:-105px;background:radial-gradient(circle,rgba(217,164,65,.34),rgba(217,164,65,0) 68%)}.quote-readiness-card.is-ready{background:linear-gradient(145deg,#08291f,#0c513a 62%,#127052)}.quote-total-card{background:linear-gradient(150deg,#fff,#f0f5f9);box-shadow:0 18px 42px rgba(17,38,61,.1)}.quote-control-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;position:relative;z-index:1}.quote-control-head h3{margin:.25rem 0 0}.quote-control-kicker{display:block;text-transform:uppercase;letter-spacing:.14em;font-size:.67rem;font-weight:900;opacity:.72}.quote-readiness-card,.quote-readiness-card h3,.quote-readiness-card p,.quote-readiness-card span,.quote-readiness-card strong{color:#fff!important}.quote-rate-count{font-size:1.45rem;line-height:1;padding:11px 13px;border-radius:14px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.15)}.quote-progress-track{height:10px;border-radius:999px;background:rgba(255,255,255,.15);overflow:hidden;margin:28px 0 12px;position:relative;z-index:1}.quote-progress-track>span{display:block;width:0;height:100%;background:linear-gradient(90deg,#e3aa39,#f5dc9b);border-radius:inherit;transition:width .25s ease}.quote-readiness-card p{position:relative;z-index:1;font-size:.84rem;margin:11px 0}.quote-verification-pill{position:relative;z-index:1;display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border-radius:999px;font-size:.72rem;font-weight:850;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.12)}.quote-verification-pill:before{content:"";width:7px;height:7px;border-radius:50%;background:#e3aa39}.quote-verification-pill[data-state="verified"]:before{background:#55d190}.quote-currency-badge,.quote-safe-badge{display:inline-flex;align-items:center;border-radius:999px;padding:7px 11px;font-size:.7rem;font-weight:900;letter-spacing:.05em;text-transform:uppercase}.quote-currency-badge{background:#0d2f4d;color:#fff}.quote-safe-badge{background:#e7f5ed;color:#176b42}.quote-live-total{margin-top:21px;border-radius:18px;padding:17px 18px;background:linear-gradient(135deg,#0b2944,#124f78);color:#fff;box-shadow:0 13px 28px rgba(11,41,68,.18)}.quote-live-total span{display:block;font-size:.72rem;text-transform:uppercase;letter-spacing:.09em;opacity:.76;font-weight:800}.quote-live-total strong{display:block;font-size:clamp(1.75rem,3vw,2.45rem);line-height:1.1;margin-top:5px;color:#fff}.quote-total-breakdown{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:11px}.quote-total-breakdown>div{background:rgba(255,255,255,.78);border:1px solid #dce5ed;border-radius:14px;padding:11px 13px}.quote-total-breakdown span{display:block;color:var(--muted);font-size:.7rem;text-transform:uppercase;letter-spacing:.06em;font-weight:800}.quote-total-breakdown strong{display:block;margin-top:3px}.quote-total-card>small{display:block;color:var(--muted);margin-top:11px;font-size:.71rem}.quote-metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}.quote-metric-grid>div{padding:15px 16px;border-radius:17px;background:var(--surface,#fff);border:1px solid rgba(17,38,61,.1);box-shadow:0 10px 24px rgba(17,38,61,.06)}.quote-metric-grid span{display:block;color:var(--muted);font-size:.69rem;text-transform:uppercase;letter-spacing:.07em;font-weight:800}.quote-metric-grid strong{display:block;font-size:1.35rem;margin-top:3px}.quote-rate-panel,.quote-payment-panel{padding:22px}.quote-panel-head{align-items:flex-start}.quote-rate-table-wrap{border-radius:18px}.quote-rate-table{min-width:1000px}.quote-rate-table th{background:linear-gradient(180deg,#0b3152,#082742);color:#fff;border-bottom:0}.quote-rate-table td{vertical-align:middle}.quote-rate-table td:first-child{min-width:210px}.quote-rate-table td:first-child strong{display:block}.quote-rate-table td:first-child small,.quote-rate-table td small{display:block;color:var(--muted);font-size:.7rem;margin-top:4px}.quote-rate-table tr.is-priced{background:linear-gradient(90deg,rgba(231,247,238,.62),rgba(255,255,255,0))}.quote-money-input{display:flex;align-items:stretch;min-width:145px;border:1px solid #d8e0ea;border-radius:12px;overflow:hidden;background:#fff;transition:.2s}.quote-money-input:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(217,164,65,.16)}.quote-money-input>span{display:grid;place-items:center;padding:0 10px;background:#eef3f7;color:#38546d;font-size:.72rem;font-weight:900;border-right:1px solid #d8e0ea}.quote-money-input input{border:0;border-radius:0;box-shadow:none!important;min-width:0;padding:11px 10px}.quote-money-input input.is-valid-rate{background:#f1fbf5}.quote-line-amount{display:block;white-space:nowrap;color:#0b5e3b;font-size:1rem}.quote-payment-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:20px;align-items:start}.quote-toggle-field{justify-content:flex-end}.quote-installment-card{position:sticky;top:98px;border-radius:21px;padding:18px;background:linear-gradient(150deg,#071d31,#0e3a5d);color:#fff;box-shadow:0 18px 38px rgba(7,29,49,.2)}.quote-installment-card span,.quote-installment-card p,.quote-installment-card small{color:rgba(255,255,255,.76)}.quote-installment-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;padding-bottom:13px;border-bottom:1px solid rgba(255,255,255,.12)}.quote-installment-head>span{font-size:.7rem;text-transform:uppercase;letter-spacing:.08em;font-weight:850}.quote-installment-head>strong{font-size:.75rem;text-align:right}.quote-full-payment-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:16px 0}.quote-full-payment-row span{font-size:.78rem}.quote-full-payment-row strong{font-size:1.22rem;color:#fff}.quote-installment-options{display:grid;gap:8px}.quote-installment-options>p{font-size:.79rem;margin:2px 0}.quote-installment-row,.quote-installment-empty{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border-radius:13px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.11)}.quote-installment-row>div{min-width:0}.quote-installment-row strong,.quote-installment-row span{display:block}.quote-installment-row strong{font-size:.8rem;color:#fff}.quote-installment-row span{font-size:.68rem;margin-top:2px}.quote-installment-row b{white-space:nowrap;color:#f1c76a;font-size:.86rem}.quote-installment-empty{justify-content:flex-start}.quote-installment-empty strong{font-size:1.25rem}.quote-installment-card>small{display:block;margin-top:13px;font-size:.67rem;line-height:1.5}.quote-submit-zone{position:sticky;bottom:14px;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:18px;padding:17px 18px;border-radius:20px;border:1px solid #dce4eb;background:linear-gradient(145deg,#f8fafc,#edf2f6);box-shadow:0 18px 42px rgba(17,38,61,.14)}.quote-submit-zone>div{display:flex;flex-direction:column}.quote-submit-zone>div>span{color:var(--muted);font-size:.78rem;margin-top:2px}.quote-submit-zone.is-ready{border-color:#8bc7a3;background:linear-gradient(145deg,#edf9f2,#dff2e7)}.quote-review-button{min-width:250px;flex-direction:column;line-height:1.1}.quote-review-button small{font-size:.66rem;opacity:.76}.quote-review-modal[hidden]{display:none!important}.quote-review-modal{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:22px}.quote-review-backdrop{position:absolute;inset:0;border:0;background:rgba(4,17,29,.78);backdrop-filter:blur(8px)}.quote-review-dialog{position:relative;width:min(980px,100%);max-height:calc(100vh - 44px);overflow:auto;border-radius:26px;background:#fff;box-shadow:0 36px 110px rgba(0,0,0,.36);border:1px solid rgba(255,255,255,.2)}.quote-review-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:23px 25px;background:linear-gradient(135deg,#071d31,#0e4169);color:#fff;border-bottom:4px solid #d9a441}.quote-review-header h3,.quote-review-header p,.quote-review-header span{color:#fff}.quote-review-header p{opacity:.78;margin:5px 0 0}.quote-modal-close{width:38px;height:38px;border-radius:12px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.1);color:#fff;font-size:1.55rem;line-height:1;cursor:pointer}.quote-review-body{padding:22px 25px}.quote-review-client{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}.quote-review-client>div{padding:12px 14px;border:1px solid #dfe6ed;border-radius:14px;background:#f7f9fb}.quote-review-client span{display:block;color:var(--muted);font-size:.67rem;text-transform:uppercase;letter-spacing:.07em;font-weight:800}.quote-review-client strong{display:block;margin-top:3px}.quote-review-table-wrap{overflow:auto;border:1px solid #dfe6ed;border-radius:16px}.quote-review-table{width:100%;border-collapse:collapse;min-width:650px}.quote-review-table th{padding:11px 13px;background:#0b3152;color:#fff;font-size:.7rem;text-transform:uppercase;letter-spacing:.06em;text-align:left}.quote-review-table td{padding:11px 13px;border-bottom:1px solid #e7ecf1}.quote-review-table tr:last-child td{border-bottom:0}.quote-review-table .numeric{text-align:right;font-variant-numeric:tabular-nums}.quote-review-bottom{display:grid;grid-template-columns:1fr 360px;gap:18px;margin-top:18px}.quote-review-plan{border:1px solid #dfe6ed;border-radius:16px;padding:16px;background:#f8fafc}.quote-review-plan h4{margin:0 0 7px}.quote-review-plan div{color:var(--muted);font-size:.84rem}.quote-review-totals{margin:0;border:1px solid #dfe6ed;border-radius:16px;overflow:hidden}.quote-review-totals>div{display:flex;justify-content:space-between;gap:14px;padding:11px 14px;border-bottom:1px solid #e7ecf1}.quote-review-totals>div:last-child{border-bottom:0}.quote-review-totals dt{color:var(--muted)}.quote-review-totals dd{margin:0;font-weight:850;font-variant-numeric:tabular-nums}.quote-review-totals .grand{background:#0b3152;color:#fff}.quote-review-totals .grand dt,.quote-review-totals .grand dd{color:#fff;font-size:1.04rem}.quote-review-assurance{display:flex;gap:12px;align-items:flex-start;margin-top:16px;padding:13px 15px;border-radius:14px;background:#edf8f2;border:1px solid #bfe2cd;color:#285f45}.quote-review-assurance strong{white-space:nowrap}.quote-review-assurance span{font-size:.78rem}.quote-review-actions{display:flex;justify-content:flex-end;gap:10px;padding:17px 25px;border-top:1px solid #e2e8ee;background:#f7f9fb}.quote-modal-open{overflow:hidden}

/* Premium client quote presentation */
.premium-quote-shell{max-width:1160px}.premium-quote-card{padding:0;overflow:hidden;border-radius:28px}.premium-quote-hero{display:flex;justify-content:space-between;gap:22px;align-items:flex-start;padding:30px;background:linear-gradient(135deg,#071d31,#0c3e64 68%,#355046);color:#fff;border-bottom:5px solid #d9a441}.premium-quote-hero h1,.premium-quote-hero p,.premium-quote-hero span{color:#fff}.premium-quote-hero p{opacity:.76}.premium-quote-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.premium-quote-actions .btn-ghost{border-color:rgba(255,255,255,.28);color:#fff}.premium-quote-body{padding:25px}.premium-finance-summary .summary-box{border:1px solid #dfe6ed;background:linear-gradient(145deg,#fff,#f3f6f9)}.premium-finance-summary .summary-box:first-child{background:linear-gradient(145deg,#0b3152,#0d4b78);color:#fff}.premium-finance-summary .summary-box:first-child span,.premium-finance-summary .summary-box:first-child strong{color:#fff}.premium-quote-table th{background:#0b3152;color:#fff}.premium-quote-table td:nth-last-child(-n+2),.premium-quote-table th:nth-last-child(-n+2){text-align:right}.premium-calculation-note{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;margin-top:12px;border-radius:14px;background:#eef5fb;border:1px solid #cfe0ee;color:#36556e;font-size:.78rem}.premium-calculation-note strong{white-space:nowrap}

@media(max-width:980px){.quote-control-grid,.quote-payment-layout,.quote-review-bottom{grid-template-columns:1fr}.quote-installment-card{position:static}.quote-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.quote-review-client{grid-template-columns:1fr}.premium-quote-hero{flex-direction:column}.premium-quote-actions{justify-content:flex-start}}
@media(max-width:680px){.quote-readiness-card,.quote-total-card,.quote-rate-panel,.quote-payment-panel{padding:17px;border-radius:20px}.quote-total-breakdown{grid-template-columns:1fr}.quote-submit-zone{position:static;flex-direction:column;align-items:stretch}.quote-review-button{width:100%;min-width:0}.quote-submit-zone>div{text-align:center}.quote-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.quote-review-modal{padding:8px}.quote-review-dialog{max-height:calc(100vh - 16px);border-radius:20px}.quote-review-header,.quote-review-body,.quote-review-actions{padding:17px}.quote-review-actions{flex-direction:column-reverse}.quote-review-actions .btn{width:100%}.quote-review-assurance{flex-direction:column}.premium-quote-body{padding:16px}.premium-quote-hero{padding:22px}}

/* Vigilex premium quotation dark-card contrast hotfix 6.2.4
   Prevent light-theme/global typography rules from turning text dark on navy cards. */

/* Quote readiness card */
.quote-readiness-card,
.quote-readiness-card h1,
.quote-readiness-card h2,
.quote-readiness-card h3,
.quote-readiness-card h4,
.quote-readiness-card strong,
.quote-readiness-card [data-quote-readiness-title],
.quote-readiness-card .quote-rate-count,
.quote-readiness-card .quote-rate-count span,
.quote-readiness-card .quote-verification-pill {
    color: #ffffff !important;
}
.quote-readiness-card .quote-control-kicker,
.quote-readiness-card [data-quote-readiness-message],
.quote-readiness-card p {
    color: rgba(255, 255, 255, .80) !important;
}

/* Live final-total navy panel */
.quote-live-total,
.quote-live-total span,
.quote-live-total strong,
.quote-live-total [data-grand-total] {
    color: #ffffff !important;
}

/* Live payment schedule navy panel */
.quote-installment-card,
.quote-installment-card h1,
.quote-installment-card h2,
.quote-installment-card h3,
.quote-installment-card h4,
.quote-installment-card strong,
.quote-installment-card [data-plan-mode],
.quote-installment-card [data-full-payment],
.quote-installment-card .quote-installment-row strong,
.quote-installment-card .quote-installment-empty strong {
    color: #ffffff !important;
}
.quote-installment-card span,
.quote-installment-card p,
.quote-installment-card small,
.quote-installment-card .quote-installment-row span,
.quote-installment-card .quote-installment-empty span {
    color: rgba(255, 255, 255, .78) !important;
}
.quote-installment-card .quote-installment-row b {
    color: #f1c76a !important;
}

/* Explicit theme guards for browsers where the theme is set on html or body. */
html[data-theme="light"] .quote-readiness-card,
body[data-theme="light"] .quote-readiness-card,
html[data-theme="dark"] .quote-readiness-card,
body[data-theme="dark"] .quote-readiness-card,
html[data-theme="light"] .quote-live-total,
body[data-theme="light"] .quote-live-total,
html[data-theme="dark"] .quote-live-total,
body[data-theme="dark"] .quote-live-total,
html[data-theme="light"] .quote-installment-card,
body[data-theme="light"] .quote-installment-card,
html[data-theme="dark"] .quote-installment-card,
body[data-theme="dark"] .quote-installment-card {
    color: #ffffff !important;
}

/* Vigilex final quote review modal contrast hotfix 6.2.5
   Protect premium navy sections from global light-theme text overrides. */

/* Modal document defaults stay dark on white surfaces. */
.quote-review-dialog,
.quote-review-dialog .quote-review-body,
.quote-review-dialog .quote-review-client,
.quote-review-dialog .quote-review-plan,
.quote-review-dialog .quote-review-totals {
    color: #11263a !important;
}

/* Premium navy review header. */
.quote-review-dialog .quote-review-header {
    color: #ffffff !important;
}
.quote-review-dialog .quote-review-header h1,
.quote-review-dialog .quote-review-header h2,
.quote-review-dialog .quote-review-header h3,
.quote-review-dialog .quote-review-header h4,
.quote-review-dialog .quote-review-header strong,
.quote-review-dialog .quote-review-header #quote-review-title {
    color: #ffffff !important;
}
.quote-review-dialog .quote-review-header .quote-control-kicker {
    color: #f2ca72 !important;
    opacity: 1 !important;
}
.quote-review-dialog .quote-review-header p,
.quote-review-dialog .quote-review-header span:not(.quote-control-kicker) {
    color: rgba(255, 255, 255, .78) !important;
}
.quote-review-dialog .quote-modal-close,
.quote-review-dialog .quote-modal-close:hover,
.quote-review-dialog .quote-modal-close:focus {
    color: #ffffff !important;
}

/* Premium final-total navy row. */
.quote-review-dialog .quote-review-totals .grand {
    background: linear-gradient(135deg, #082a47, #0d456d) !important;
    color: #ffffff !important;
}
.quote-review-dialog .quote-review-totals .grand dt,
.quote-review-dialog .quote-review-totals .grand dd,
.quote-review-dialog .quote-review-totals .grand [data-review-total] {
    color: #ffffff !important;
}
.quote-review-dialog .quote-review-totals .grand dt {
    opacity: .88 !important;
}
.quote-review-dialog .quote-review-totals .grand dd {
    font-weight: 900 !important;
}

/* Table header remains readable regardless of active UI theme. */
.quote-review-dialog .quote-review-table thead,
.quote-review-dialog .quote-review-table th {
    color: #ffffff !important;
}
.quote-review-dialog .quote-review-table tbody td {
    color: #11263a !important;
}

/* Theme-specific guards with higher specificity. */
html[data-theme="light"] .quote-review-dialog .quote-review-header h3,
body[data-theme="light"] .quote-review-dialog .quote-review-header h3,
html[data-theme="dark"] .quote-review-dialog .quote-review-header h3,
body[data-theme="dark"] .quote-review-dialog .quote-review-header h3,
html[data-theme="light"] .quote-review-dialog .quote-review-totals .grand dt,
body[data-theme="light"] .quote-review-dialog .quote-review-totals .grand dt,
html[data-theme="light"] .quote-review-dialog .quote-review-totals .grand dd,
body[data-theme="light"] .quote-review-dialog .quote-review-totals .grand dd,
html[data-theme="dark"] .quote-review-dialog .quote-review-totals .grand dt,
body[data-theme="dark"] .quote-review-dialog .quote-review-totals .grand dt,
html[data-theme="dark"] .quote-review-dialog .quote-review-totals .grand dd,
body[data-theme="dark"] .quote-review-dialog .quote-review-totals .grand dd {
    color: #ffffff !important;
}

/* Vigilex quote review line-table precision hotfix 6.2.6
   Locks colours and keeps each numeric value directly below its own heading. */

.quote-review-dialog .quote-review-table-wrap {
    overflow-x: hidden !important;
    background: #ffffff !important;
}

.quote-review-dialog .quote-review-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    background: #ffffff !important;
}

/* Stable banking-style column proportions. */
.quote-review-dialog .quote-review-table th:nth-child(1),
.quote-review-dialog .quote-review-table td:nth-child(1) {
    width: 42% !important;
}
.quote-review-dialog .quote-review-table th:nth-child(2),
.quote-review-dialog .quote-review-table td:nth-child(2) {
    width: 18% !important;
}
.quote-review-dialog .quote-review-table th:nth-child(3),
.quote-review-dialog .quote-review-table td:nth-child(3) {
    width: 20% !important;
}
.quote-review-dialog .quote-review-table th:nth-child(4),
.quote-review-dialog .quote-review-table td:nth-child(4) {
    width: 20% !important;
}

/* Header colours and alignment. */
.quote-review-dialog .quote-review-table thead,
.quote-review-dialog .quote-review-table thead tr,
.quote-review-dialog .quote-review-table th {
    background: #0b3152 !important;
    color: #ffffff !important;
}
.quote-review-dialog .quote-review-table th {
    padding: 12px 14px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}
.quote-review-dialog .quote-review-table th:first-child {
    text-align: left !important;
}
.quote-review-dialog .quote-review-table th:nth-child(n+2) {
    text-align: right !important;
}

/* Body colours and exact under-heading alignment. */
.quote-review-dialog .quote-review-table tbody,
.quote-review-dialog .quote-review-table tbody tr,
.quote-review-dialog .quote-review-table td {
    background: #ffffff !important;
    color: #11263a !important;
}
.quote-review-dialog .quote-review-table td {
    padding: 13px 14px !important;
    vertical-align: middle !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.quote-review-dialog .quote-review-table td:first-child {
    text-align: left !important;
    font-weight: 800 !important;
    color: #0b3152 !important;
}
.quote-review-dialog .quote-review-table td:nth-child(n+2),
.quote-review-dialog .quote-review-table td.numeric {
    text-align: right !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums !important;
}
.quote-review-dialog .quote-review-table td:nth-child(2) {
    color: #314a60 !important;
    font-weight: 700 !important;
}
.quote-review-dialog .quote-review-table td:nth-child(3) {
    color: #163f61 !important;
    font-weight: 750 !important;
}
.quote-review-dialog .quote-review-table td:nth-child(4) {
    color: #082a47 !important;
    font-weight: 900 !important;
    background: #fffaf0 !important;
    border-left: 1px solid #f0dfb5 !important;
}

/* Prevent global theme rules from overriding the review table. */
html[data-theme="light"] .quote-review-dialog .quote-review-table th,
body[data-theme="light"] .quote-review-dialog .quote-review-table th,
html[data-theme="dark"] .quote-review-dialog .quote-review-table th,
body[data-theme="dark"] .quote-review-dialog .quote-review-table th {
    color: #ffffff !important;
}
html[data-theme="light"] .quote-review-dialog .quote-review-table td,
body[data-theme="light"] .quote-review-dialog .quote-review-table td,
html[data-theme="dark"] .quote-review-dialog .quote-review-table td,
body[data-theme="dark"] .quote-review-dialog .quote-review-table td {
    color: #11263a !important;
}
html[data-theme="light"] .quote-review-dialog .quote-review-table td:nth-child(4),
body[data-theme="light"] .quote-review-dialog .quote-review-table td:nth-child(4),
html[data-theme="dark"] .quote-review-dialog .quote-review-table td:nth-child(4),
body[data-theme="dark"] .quote-review-dialog .quote-review-table td:nth-child(4) {
    color: #082a47 !important;
}

/* Compact phones: preserve all four columns without pushing Amount off-screen. */
@media (max-width: 680px) {
    .quote-review-dialog .quote-review-body {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
    .quote-review-dialog .quote-review-table th,
    .quote-review-dialog .quote-review-table td {
        padding-left: 8px !important;
        padding-right: 8px !important;
        font-size: .72rem !important;
    }
    .quote-review-dialog .quote-review-table th:nth-child(1),
    .quote-review-dialog .quote-review-table td:nth-child(1) {
        width: 34% !important;
    }
    .quote-review-dialog .quote-review-table th:nth-child(2),
    .quote-review-dialog .quote-review-table td:nth-child(2) {
        width: 20% !important;
    }
    .quote-review-dialog .quote-review-table th:nth-child(3),
    .quote-review-dialog .quote-review-table td:nth-child(3) {
        width: 22% !important;
    }
    .quote-review-dialog .quote-review-table th:nth-child(4),
    .quote-review-dialog .quote-review-table td:nth-child(4) {
        width: 24% !important;
    }
}

/* ========================================================================== 
   Vigilex Premium Quotation Record 6.2.7
   Fully scoped quote-detail presentation with explicit light/dark contrast.
   ========================================================================== */
.premium-quote-record{display:grid;gap:20px;max-width:1320px;margin:0 auto;color:#12263a}.premium-quote-record *{box-sizing:border-box}.quote-record-hero{position:relative;display:flex;justify-content:space-between;align-items:flex-start;gap:26px;padding:30px;border:1px solid rgba(255,255,255,.12);border-radius:28px;background:linear-gradient(135deg,#071d31 0%,#0b3a5f 65%,#3d4b3f 100%);box-shadow:0 24px 65px rgba(7,29,49,.23);overflow:hidden;color:#fff}.quote-record-hero:before{content:"";position:absolute;inset:auto -110px -160px auto;width:380px;height:380px;border-radius:50%;background:radial-gradient(circle,rgba(217,164,65,.32),rgba(217,164,65,0) 70%);pointer-events:none}.quote-record-hero:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px);background-size:34px 34px;mask-image:linear-gradient(90deg,#000,transparent 80%);pointer-events:none}.quote-record-hero-copy,.quote-record-actions{position:relative;z-index:1}.quote-record-kicker{display:block;margin-bottom:7px;color:#9a7229;font-size:.7rem;line-height:1.2;font-weight:900;letter-spacing:.14em;text-transform:uppercase}.quote-record-hero .quote-record-kicker{color:#f1c76a!important}.quote-record-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.quote-record-title-row h2{margin:0;color:#fff!important;font-size:clamp(1.65rem,3vw,2.45rem);letter-spacing:-.035em}.quote-record-hero p{margin:8px 0 0;color:rgba(255,255,255,.78)!important;font-weight:650}.quote-record-meta{display:flex;flex-wrap:wrap;gap:9px;margin-top:18px}.quote-record-meta span{display:inline-flex;align-items:center;min-height:31px;padding:6px 10px;border:1px solid rgba(255,255,255,.14);border-radius:999px;background:rgba(255,255,255,.075);color:#fff!important;font-size:.77rem;font-weight:720}.quote-record-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;flex-wrap:wrap}.quote-record-actions form{margin:0}.quote-record-actions .btn{min-height:46px;border-radius:13px;white-space:nowrap}.quote-action-secondary{border:1px solid rgba(255,255,255,.32)!important;background:rgba(255,255,255,.08)!important;color:#fff!important;box-shadow:none!important}.quote-action-primary{background:linear-gradient(135deg,#f1c75e,#d89b2b)!important;color:#172333!important;box-shadow:0 12px 26px rgba(217,164,65,.25)!important}

.quote-financial-dashboard{display:grid;grid-template-columns:minmax(310px,.92fr) minmax(0,1.4fr);gap:16px}.quote-total-feature{position:relative;min-height:245px;padding:25px;border-radius:24px;background:linear-gradient(145deg,#082946,#0c4c78);box-shadow:0 18px 45px rgba(9,48,80,.18);overflow:hidden;color:#fff}.quote-total-feature:after{content:"";position:absolute;width:220px;height:220px;border-radius:50%;right:-65px;top:-80px;background:radial-gradient(circle,rgba(241,199,106,.26),transparent 70%)}.quote-total-feature .quote-record-kicker{position:relative;z-index:1;color:#f1c76a!important}.quote-total-amount{position:relative;z-index:1;margin-top:12px;color:#fff!important;font-size:clamp(2rem,4.5vw,3.5rem);line-height:1;font-weight:950;letter-spacing:-.055em;font-variant-numeric:tabular-nums}.quote-total-feature p{position:relative;z-index:1;margin:12px 0 24px;color:rgba(255,255,255,.72)!important}.quote-paid-progress{position:relative;z-index:1;height:8px;border-radius:999px;background:rgba(255,255,255,.14);overflow:hidden}.quote-paid-progress span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#f0bd4d,#ffe39c)}.quote-paid-progress-label{position:relative;z-index:1;display:flex;justify-content:space-between;gap:12px;margin-top:8px;color:rgba(255,255,255,.74)!important;font-size:.76rem}.quote-paid-progress-label span,.quote-paid-progress-label strong{color:inherit!important}.quote-financial-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.quote-financial-metric{position:relative;display:flex;flex-direction:column;justify-content:center;min-height:245px;padding:22px;border:1px solid #dfe7ef;border-radius:23px;background:linear-gradient(145deg,#fff,#f4f7fa);box-shadow:0 12px 32px rgba(20,44,68,.07);overflow:hidden}.quote-financial-metric:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:#7391aa}.quote-financial-metric.metric-paid:before{background:#22915b}.quote-financial-metric.metric-pending:before{background:#d9a441}.quote-financial-metric.metric-outstanding:before{background:#c44a42}.quote-financial-metric span{color:#607488!important;font-size:.71rem;font-weight:900;letter-spacing:.1em;text-transform:uppercase}.quote-financial-metric strong{display:block;margin-top:10px;color:#10263a!important;font-size:clamp(1.35rem,2.2vw,2rem);line-height:1.15;font-weight:950;font-variant-numeric:tabular-nums}.quote-financial-metric small{margin-top:8px;color:#718296!important}

.quote-integrity-banner{display:flex;gap:13px;align-items:flex-start;padding:14px 16px;border:1px solid #bfdccf;border-radius:16px;background:linear-gradient(135deg,#edf9f3,#f8fcfa);color:#23583e}.quote-integrity-icon{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:50%;background:#1f8c58;color:#fff!important;font-weight:900}.quote-integrity-banner strong{display:block;color:#194d35!important}.quote-integrity-banner span{display:block;margin-top:2px;color:#537363!important;font-size:.82rem}

.quote-record-grid{display:grid;gap:20px}.quote-record-grid-two{grid-template-columns:repeat(2,minmax(0,1fr))}.quote-record-grid-edit{grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);align-items:start}.quote-record-card{position:relative;padding:24px;border:1px solid #dfe7ee;border-radius:24px;background:#fff;box-shadow:0 15px 42px rgba(20,44,68,.075);color:#12263a}.quote-record-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding-bottom:17px;margin-bottom:18px;border-bottom:1px solid #e4eaf0}.quote-record-section-head h3{margin:0;color:#11263a!important;font-size:1.18rem;letter-spacing:-.018em}.quote-record-section-head p{margin:6px 0 0;color:#718296!important;font-size:.86rem}.quote-card-badge{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:6px 10px;border:1px solid #d7e2eb;border-radius:999px;background:#eef4f8;color:#31536d!important;font-size:.68rem;font-weight:900;letter-spacing:.07em;text-transform:uppercase;white-space:nowrap}.quote-card-badge-gold{border-color:#ead79d;background:#fff7df;color:#7c5b17!important}.quote-card-badge-success{border-color:#c5e5d3;background:#edf9f2;color:#1c7148!important}.quote-card-badge-lock{border-color:#ecd2d0;background:#fff1f0;color:#9a3029!important}.quote-premium-data-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;margin:0;border:1px solid #e0e7ed;border-radius:17px;background:#e0e7ed;overflow:hidden}.quote-premium-data-list>div{min-width:0;padding:13px 15px;background:#fff}.quote-premium-data-list>div.full{grid-column:1/-1}.quote-premium-data-list dt{margin:0 0 4px;color:#667b8f!important;font-size:.68rem;font-weight:900;letter-spacing:.07em;text-transform:uppercase}.quote-premium-data-list dd{margin:0;color:#14293d!important;font-weight:780;overflow-wrap:anywhere}

.quote-service-card{overflow:hidden}.quote-service-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}.quote-service-metrics article{padding:15px;border:1px solid #dfe7ee;border-radius:17px;background:linear-gradient(145deg,#f9fbfd,#f0f5f8)}.quote-service-metrics span{display:block;color:#6b7f92!important;font-size:.67rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.quote-service-metrics strong{display:block;margin-top:6px;color:#102b43!important;font-size:1.17rem;font-weight:900;font-variant-numeric:tabular-nums}.quote-service-metrics small{display:block;margin-top:3px;color:#7b8b9a!important}.quote-service-schedule{border:1px solid #dce5ec;border-radius:18px;overflow:hidden;background:#fff}.quote-service-row{display:grid;grid-template-columns:minmax(220px,1.65fr) .55fr .8fr .82fr 1fr 1.05fr;align-items:stretch}.quote-service-header{background:linear-gradient(135deg,#082a47,#0b426c);color:#fff}.quote-service-header span{display:flex;align-items:center;padding:12px 13px;border-right:1px solid rgba(255,255,255,.09);color:#fff!important;font-size:.67rem;font-weight:900;letter-spacing:.075em;text-transform:uppercase}.quote-service-row:not(.quote-service-header){border-top:1px solid #e4eaf0}.quote-service-row:not(.quote-service-header)>div{display:flex;flex-direction:column;justify-content:center;min-width:0;padding:14px 13px;border-right:1px solid #e7edf2;color:#12263a}.quote-service-row:not(.quote-service-header)>div:last-child,.quote-service-header span:last-child{border-right:0}.quote-service-row [role="cell"] strong{color:#112a40!important;font-size:.89rem;font-variant-numeric:tabular-nums}.quote-service-row [role="cell"] small,.quote-service-row [role="cell"] span{color:#718396!important;font-size:.72rem}.quote-service-main strong{font-size:.96rem!important}.quote-service-main span{margin-top:3px}.quote-service-line-total{background:#fffaf0}.quote-service-line-total strong{color:#795616!important;font-size:.96rem!important}

.quote-premium-table-wrap{overflow:auto;border:1px solid #dce5ec;border-radius:18px;background:#fff}.quote-premium-table{width:100%;min-width:850px;border-collapse:collapse;table-layout:auto}.quote-premium-table th{padding:12px 13px;background:linear-gradient(135deg,#082a47,#0b426c);color:#fff!important;font-size:.67rem;font-weight:900;letter-spacing:.075em;text-transform:uppercase;text-align:left;white-space:nowrap}.quote-premium-table td{padding:13px;border-bottom:1px solid #e5ebf0;background:#fff;color:#14293d!important;vertical-align:middle}.quote-premium-table tbody tr:last-child td{border-bottom:0}.quote-premium-table tbody tr:hover td{background:#f8fafc}.quote-premium-table .money-cell{font-weight:900;font-variant-numeric:tabular-nums;color:#0d395d!important}.quote-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:112px;padding:20px;text-align:center;border:1px dashed #d5e0e8;border-radius:14px;background:#f7fafc}.quote-empty-state strong{color:#24435c!important}.quote-empty-state span{margin-top:4px;color:#7a8b9b!important;font-size:.82rem}

.quote-edit-card{min-width:0}.quote-rate-editor{display:grid;gap:10px;margin-bottom:18px}.quote-rate-editor-row{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:13px 14px;border:1px solid #dfe7ee;border-radius:15px;background:#f8fafc}.quote-rate-editor-service{display:flex;flex-direction:column;min-width:0}.quote-rate-editor-service strong{color:#132b41!important}.quote-rate-editor-service small{color:#758697!important}.quote-rate-input-shell{display:flex;align-items:center;min-width:180px;border:1px solid #ced9e2;border-radius:12px;background:#fff;overflow:hidden}.quote-rate-input-shell b{align-self:stretch;display:flex;align-items:center;padding:0 11px;background:#edf3f7;color:#35556e!important;font-size:.76rem}.quote-rate-input-shell input{border:0!important;border-radius:0!important;box-shadow:none!important;font-weight:850;font-variant-numeric:tabular-nums}.quote-edit-fields{margin-top:18px}.quote-checkbox-premium{min-height:47px;border-color:#d4dee7;background:#f8fafc;color:#193049!important}.quote-version-button{margin-top:18px;background:linear-gradient(135deg,#0b3c63,#0a2b47)!important;color:#fff!important}.quote-lock-notice{display:flex;flex-direction:column;padding:18px;border:1px solid #ead1cf;border-radius:16px;background:#fff4f3}.quote-lock-notice strong{color:#862e29!important}.quote-lock-notice span{margin-top:4px;color:#875c59!important;font-size:.84rem}

.quote-live-receipt{position:sticky;top:92px;padding:0;overflow:hidden}.quote-live-receipt .quote-record-section-head{padding:22px 22px 17px;margin:0}.quote-receipt-list{margin:0}.quote-receipt-list>div{display:flex;justify-content:space-between;gap:16px;padding:15px 22px;border-bottom:1px solid #e4eaf0}.quote-receipt-list dt{color:#5f7488!important}.quote-receipt-list dd{margin:0;color:#102a42!important;font-weight:900;font-variant-numeric:tabular-nums}.quote-receipt-list .quote-receipt-grand{padding-top:19px;padding-bottom:19px;background:linear-gradient(135deg,#072641,#0b476f);border-bottom:0}.quote-receipt-grand dt,.quote-receipt-grand dd{color:#fff!important;font-size:1.12rem}.quote-receipt-assurance{display:flex;flex-direction:column;margin:17px 20px;padding:14px;border:1px solid #cce2d7;border-radius:14px;background:#f0faf5}.quote-receipt-assurance strong{color:#205f43!important;font-size:.8rem}.quote-receipt-assurance span{margin-top:3px;color:#587667!important;font-size:.73rem}.quote-version-history{padding:0 20px 20px}.quote-version-history h4{margin:0 0 10px;color:#153049!important;font-size:.9rem}.quote-version-item{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-top:1px solid #e5ebf0}.quote-version-item span{color:#244057!important;font-weight:780}.quote-version-item small{color:#788998!important;text-align:right}.quote-version-empty{padding:12px;border:1px dashed #d7e1e9;border-radius:12px;color:#778a9b!important;text-align:center;font-size:.8rem}

.quote-record-danger-card{border-color:#ead6d4;background:linear-gradient(145deg,#fff,#fff8f7)}.quote-lifecycle-list{display:grid;gap:0}.quote-lifecycle-item{position:relative;display:flex;gap:13px;padding:0 0 18px}.quote-lifecycle-item:not(:last-child):before{content:"";position:absolute;left:6px;top:15px;bottom:0;width:1px;background:#d7e2ea}.quote-lifecycle-dot{position:relative;z-index:1;flex:0 0 13px;width:13px;height:13px;margin-top:5px;border:3px solid #e8f0f5;border-radius:50%;background:#0c486f;box-shadow:0 0 0 1px #9eb6c8}.quote-lifecycle-copy{min-width:0;flex:1}.quote-lifecycle-title{display:flex;justify-content:space-between;gap:14px}.quote-lifecycle-title strong{color:#142c42!important}.quote-lifecycle-title time{color:#738697!important;font-size:.75rem;white-space:nowrap}.quote-lifecycle-copy>small{color:#8091a0!important}.quote-event-data{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}.quote-event-data span{max-width:100%;padding:5px 8px;border:1px solid #dce6ed;border-radius:9px;background:#f6f9fb;color:#526a7d!important;font-size:.7rem;overflow-wrap:anywhere}.quote-event-data b{color:#23435d!important}.quote-record-footer-grid{align-items:start}

/* Explicit contrast guards: navy surfaces must never inherit black text. */
html[data-theme="light"] .premium-quote-record .quote-record-hero,body[data-theme="light"] .premium-quote-record .quote-record-hero,html[data-theme="dark"] .premium-quote-record .quote-record-hero,body[data-theme="dark"] .premium-quote-record .quote-record-hero,html[data-theme="light"] .premium-quote-record .quote-total-feature,body[data-theme="light"] .premium-quote-record .quote-total-feature,html[data-theme="dark"] .premium-quote-record .quote-total-feature,body[data-theme="dark"] .premium-quote-record .quote-total-feature,html[data-theme="light"] .premium-quote-record .quote-receipt-grand,body[data-theme="light"] .premium-quote-record .quote-receipt-grand,html[data-theme="dark"] .premium-quote-record .quote-receipt-grand,body[data-theme="dark"] .premium-quote-record .quote-receipt-grand{color:#fff!important}.premium-quote-record .quote-record-hero h1,.premium-quote-record .quote-record-hero h2,.premium-quote-record .quote-record-hero h3,.premium-quote-record .quote-record-hero strong,.premium-quote-record .quote-record-hero span:not(.status),.premium-quote-record .quote-total-feature h1,.premium-quote-record .quote-total-feature h2,.premium-quote-record .quote-total-feature h3,.premium-quote-record .quote-total-feature strong,.premium-quote-record .quote-receipt-grand dt,.premium-quote-record .quote-receipt-grand dd,.premium-quote-record .quote-service-header span,.premium-quote-record .quote-premium-table th{color:#fff!important}.premium-quote-record .quote-record-hero p,.premium-quote-record .quote-total-feature p{color:rgba(255,255,255,.76)!important}

@media(max-width:1120px){.quote-financial-dashboard{grid-template-columns:1fr}.quote-total-feature{min-height:215px}.quote-financial-metric{min-height:170px}.quote-record-grid-edit{grid-template-columns:1fr}.quote-live-receipt{position:static}.quote-service-row{grid-template-columns:minmax(200px,1.45fr) .5fr .75fr .8fr 1fr 1fr}}
@media(max-width:900px){.quote-record-hero{flex-direction:column}.quote-record-actions{justify-content:flex-start}.quote-financial-metrics{grid-template-columns:1fr}.quote-financial-metric{min-height:132px}.quote-record-grid-two{grid-template-columns:1fr}.quote-service-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.quote-service-header{display:none}.quote-service-row:not(.quote-service-header){grid-template-columns:repeat(2,minmax(0,1fr));padding:12px}.quote-service-row:not(.quote-service-header)>div{padding:11px;border:0}.quote-service-main{grid-column:1/-1;border-bottom:1px solid #e4eaf0!important}.quote-service-row [role="cell"]:not(.quote-service-main):before{content:attr(data-label);display:block;margin-bottom:4px;color:#708397!important;font-size:.62rem;font-weight:900;letter-spacing:.06em;text-transform:uppercase}.quote-service-line-total{border-radius:12px}}
@media(max-width:640px){.premium-quote-record{gap:14px}.quote-record-hero,.quote-record-card{padding:18px;border-radius:20px}.quote-record-actions{width:100%}.quote-record-actions .btn,.quote-record-actions form{width:100%}.quote-financial-dashboard{gap:12px}.quote-total-feature{padding:20px;border-radius:20px}.quote-financial-metrics{gap:10px}.quote-financial-metric{padding:18px;border-radius:19px}.quote-record-section-head{flex-direction:column;gap:10px}.quote-premium-data-list{grid-template-columns:1fr}.quote-premium-data-list>div.full{grid-column:auto}.quote-service-metrics{grid-template-columns:1fr}.quote-service-row:not(.quote-service-header){grid-template-columns:1fr}.quote-service-main{grid-column:auto}.quote-rate-editor-row{align-items:stretch;flex-direction:column}.quote-rate-input-shell{min-width:0;width:100%}.quote-lifecycle-title{flex-direction:column;gap:2px}.quote-lifecycle-title time{white-space:normal}.quote-record-meta{flex-direction:column;align-items:flex-start}.quote-record-meta span{width:100%}.quote-integrity-banner{align-items:flex-start}.quote-receipt-list>div{padding-left:18px;padding-right:18px}}

/* ========================================================================
   Vigilex client-facing premium quotation experience 6.2.8
   Scoped colour system prevents light/dark theme typography regressions.
   ======================================================================== */

.client-premium-quote {
    max-width: 1200px !important;
    margin-top: 44px !important;
    margin-bottom: 54px !important;
}

.client-quote-document {
    --cq-navy-950: #061a2d;
    --cq-navy-900: #082640;
    --cq-navy-800: #0b3558;
    --cq-navy-700: #104a75;
    --cq-gold-500: #d9a441;
    --cq-gold-300: #f0cb79;
    --cq-ink: #11263a;
    --cq-muted: #61758a;
    --cq-line: #dce5ed;
    --cq-soft: #f3f7fa;
    --cq-white: #ffffff;
    overflow: hidden;
    border: 1px solid rgba(12, 50, 82, .13);
    border-radius: 32px;
    background: #ffffff;
    box-shadow: 0 30px 90px rgba(7, 29, 49, .14);
    color: var(--cq-ink);
}

.client-quote-document,
.client-quote-document * {
    box-sizing: border-box;
}

.client-quote-hero {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 28px;
    padding: 34px;
    overflow: hidden;
    border-bottom: 5px solid var(--cq-gold-500);
    background:
        radial-gradient(circle at 92% 16%, rgba(217, 164, 65, .28), transparent 28%),
        linear-gradient(135deg, var(--cq-navy-950), var(--cq-navy-800) 68%, #315044);
    color: #ffffff !important;
}

.client-quote-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(90deg, #000, transparent 84%);
    pointer-events: none;
}

.client-quote-hero-copy,
.client-quote-hero-actions {
    position: relative;
    z-index: 1;
}

.client-quote-kicker {
    display: block;
    margin-bottom: 9px;
    color: var(--cq-gold-300) !important;
    font-size: .7rem;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.client-quote-kicker.dark {
    color: #9a7229 !important;
}

.client-quote-title-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.client-quote-emblem {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 16px;
    background: linear-gradient(145deg, #14639a, #0a3457);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 13px 28px rgba(0,0,0,.22);
    color: #ffffff !important;
    font-size: 1.25rem;
    font-weight: 900;
}

.client-quote-brand-name {
    display: block;
    color: rgba(255,255,255,.72) !important;
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .04em;
}

.client-quote-hero h1 {
    margin: 2px 0 0;
    color: #ffffff !important;
    font-size: clamp(1.7rem, 3.3vw, 2.65rem);
    letter-spacing: -.035em;
}

.client-quote-hero p {
    margin: 16px 0 0;
    color: rgba(255,255,255,.78) !important;
}

.client-quote-hero p strong {
    color: #ffffff !important;
}

.client-quote-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.client-quote-trust-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.9) !important;
    font-size: .73rem;
    font-weight: 700;
}

.client-quote-hero-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 430px;
}

.client-quote-hero-actions .status {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.9);
}

.client-quote-button-light,
.client-quote-button-gold {
    min-height: 46px;
    border-radius: 13px !important;
    white-space: nowrap;
}

.client-quote-button-light {
    border: 1px solid rgba(255,255,255,.4) !important;
    background: rgba(255,255,255,.96) !important;
    color: var(--cq-navy-900) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.12) !important;
}

.client-quote-button-gold {
    background: linear-gradient(135deg, #f2ca6b, #d79b2e) !important;
    color: #172333 !important;
    box-shadow: 0 12px 28px rgba(217,164,65,.26) !important;
}

.client-quote-content {
    display: grid;
    gap: 22px;
    padding: 28px;
    background:
        radial-gradient(circle at 96% 0, rgba(217,164,65,.08), transparent 23%),
        linear-gradient(180deg, #f8fafc, #ffffff 45%, #f6f9fb);
}

.client-quote-finance-dashboard {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 16px;
}

.client-quote-total-feature {
    position: relative;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 28px;
    border-radius: 25px;
    background:
        radial-gradient(circle at 88% 16%, rgba(217,164,65,.26), transparent 32%),
        linear-gradient(135deg, var(--cq-navy-950), var(--cq-navy-700));
    box-shadow: 0 20px 45px rgba(7,29,49,.18);
    color: #ffffff !important;
}

.client-quote-total-feature::after {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    right: -72px;
    bottom: -92px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
}

.client-quote-label {
    color: var(--cq-gold-300) !important;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.client-quote-total-feature strong {
    display: block;
    margin-top: 10px;
    color: #ffffff !important;
    font-size: clamp(2.25rem, 5vw, 3.8rem);
    line-height: 1;
    letter-spacing: -.045em;
    font-variant-numeric: tabular-nums;
}

.client-quote-total-feature small {
    display: block;
    margin-top: 16px;
    color: rgba(255,255,255,.72) !important;
    font-size: .82rem;
}

.client-quote-finance-metrics {
    display: grid;
    gap: 14px;
}

.client-quote-finance-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 88px;
    padding: 19px 21px;
    border: 1px solid var(--cq-line);
    border-radius: 21px;
    background: linear-gradient(145deg, #ffffff, #f4f7fa);
    box-shadow: 0 13px 30px rgba(17,38,61,.07);
    color: var(--cq-ink) !important;
}

.client-quote-finance-card span {
    color: #667b90 !important;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.client-quote-finance-card strong {
    margin-top: 5px;
    color: var(--cq-ink) !important;
    font-size: 1.55rem;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.client-quote-finance-card small {
    margin-top: 5px;
    color: var(--cq-muted) !important;
}

.client-quote-balance-card {
    border-color: #ead9ae;
    background: linear-gradient(145deg, #fffdf7, #f9f1de);
}

.client-quote-alert {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 16px 18px;
    border: 1px solid #cfe0ee;
    border-radius: 18px;
    background: #eef5fb;
    color: #244965 !important;
}

.client-quote-alert-pending {
    border-color: #ecd59d;
    background: #fff8e8;
    color: #6f511b !important;
}

.client-quote-alert-icon {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--cq-navy-800);
    color: #ffffff !important;
    font-weight: 900;
}

.client-quote-alert strong {
    color: inherit !important;
}

.client-quote-alert p {
    margin: 3px 0 0;
    color: inherit !important;
    opacity: .82;
}

.client-quote-section {
    padding: 24px;
    border: 1px solid rgba(17,38,61,.1);
    border-radius: 25px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 14px 36px rgba(17,38,61,.06);
    color: var(--cq-ink) !important;
}

.client-quote-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--cq-line);
}

.client-quote-section-heading h2 {
    margin: 0;
    color: var(--cq-ink) !important;
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    letter-spacing: -.025em;
}

.client-quote-section-heading p {
    margin: 7px 0 0;
    color: var(--cq-muted) !important;
}

.client-quote-verified-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 11px;
    border: 1px solid #cce7d8;
    border-radius: 999px;
    background: #eaf8f0;
    color: #17633d !important;
    font-size: .72rem;
    font-weight: 850;
    white-space: nowrap;
}

.client-quote-profile-grid,
.client-quote-settlement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.client-quote-panel {
    padding: 21px;
    border: 1px solid var(--cq-line);
    border-radius: 21px;
    background: linear-gradient(145deg, #fbfdff, #f2f6f9);
    color: var(--cq-ink) !important;
}

.client-quote-panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 15px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--cq-line);
}

.client-quote-panel-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--cq-navy-800), var(--cq-navy-950));
    color: #ffffff !important;
    font-size: .72rem;
    font-weight: 900;
}

.client-quote-panel-head small {
    display: block;
    color: var(--cq-muted) !important;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.client-quote-panel-head h3 {
    margin: 2px 0 0;
    color: var(--cq-ink) !important;
    font-size: 1.15rem;
}

.client-quote-data-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.client-quote-data-list > div {
    display: grid;
    grid-template-columns: minmax(130px, .8fr) minmax(0, 1.2fr);
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(220,229,237,.88);
}

.client-quote-data-list > div:last-child {
    border-bottom: 0;
}

.client-quote-data-list dt {
    color: var(--cq-muted) !important;
    font-size: .84rem;
}

.client-quote-data-list dd {
    margin: 0;
    color: var(--cq-ink) !important;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.client-quote-service-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.client-quote-service-metrics > div {
    min-height: 88px;
    padding: 17px;
    border: 1px solid var(--cq-line);
    border-radius: 17px;
    background: #f4f8fb;
}

.client-quote-service-metrics span {
    display: block;
    color: var(--cq-muted) !important;
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.client-quote-service-metrics strong {
    display: block;
    margin-top: 7px;
    color: var(--cq-ink) !important;
    font-size: 1.12rem;
    font-variant-numeric: tabular-nums;
}

.client-quote-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--cq-line);
    border-radius: 18px;
    background: #ffffff;
}

.client-quote-table {
    width: 100%;
    min-width: 1000px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    background: #ffffff;
    color: var(--cq-ink) !important;
}

.client-quote-table th,
.client-quote-table td {
    padding: 13px 12px;
    border-bottom: 1px solid #e7edf2;
    vertical-align: middle;
}

.client-quote-table th {
    background: linear-gradient(180deg, #0f466f, #082c4a);
    color: #ffffff !important;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .075em;
    text-transform: uppercase;
    white-space: nowrap;
}

.client-quote-table th:first-child {
    border-top-left-radius: 16px;
}

.client-quote-table th:last-child {
    border-top-right-radius: 16px;
}

.client-quote-table td {
    background: #ffffff;
    color: #263d52 !important;
    font-size: .84rem;
    font-variant-numeric: tabular-nums;
}

.client-quote-table td strong {
    color: var(--cq-ink) !important;
}

.client-quote-table tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.client-quote-table tbody tr:last-child td {
    border-bottom: 0;
}

.client-quote-table th:nth-child(n+4),
.client-quote-table td:nth-child(n+4) {
    text-align: right;
}

.client-quote-table th:nth-child(1) { width: 14%; }
.client-quote-table th:nth-child(2) { width: 17%; }
.client-quote-table th:nth-child(3) { width: 12%; }
.client-quote-table th:nth-child(4) { width: 8%; }
.client-quote-table th:nth-child(5) { width: 10%; }
.client-quote-table th:nth-child(6) { width: 7%; }
.client-quote-table th:nth-child(7) { width: 11%; }
.client-quote-table th:nth-child(8) { width: 10%; }
.client-quote-table th:nth-child(9) { width: 11%; }

.client-quote-table .client-quote-line-total {
    background: #fff9eb !important;
    color: var(--cq-navy-900) !important;
    border-left: 1px solid #efdfb7;
}

.client-quote-table .client-quote-line-total strong {
    color: var(--cq-navy-900) !important;
}

.client-quote-calculation-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #cce3d6;
    border-radius: 16px;
    background: #edf9f2;
    color: #23573b !important;
}

.client-quote-calculation-mark,
.client-quote-assurance-mark {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #1c754b;
    color: #ffffff !important;
    font-weight: 900;
}

.client-quote-calculation-note strong,
.client-quote-calculation-note span {
    color: inherit !important;
}

.client-quote-calculation-note strong {
    display: block;
}

.client-quote-calculation-note span {
    display: block;
    margin-top: 2px;
    opacity: .82;
    font-size: .82rem;
}

.client-quote-terms-copy {
    color: #42596e !important;
    line-height: 1.75;
}

.client-quote-receipt {
    overflow: hidden;
    border: 1px solid #ccd9e4;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 15px 34px rgba(17,38,61,.08);
}

.client-quote-receipt-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 19px 21px;
    background: linear-gradient(135deg, var(--cq-navy-950), var(--cq-navy-700));
    color: #ffffff !important;
}

.client-quote-receipt-head span,
.client-quote-receipt-head strong {
    color: #ffffff !important;
}

.client-quote-receipt-head > div > span {
    display: block;
    color: var(--cq-gold-300) !important;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.client-quote-receipt-head > div > strong {
    display: block;
    margin-top: 4px;
    font-size: .95rem;
}

.client-quote-currency-chip {
    display: inline-flex;
    padding: 6px 9px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    font-size: .72rem;
    font-weight: 900;
}

.client-quote-receipt dl {
    margin: 0;
}

.client-quote-receipt dl > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 15px 21px;
    border-bottom: 1px solid var(--cq-line);
}

.client-quote-receipt dt {
    color: #60758a !important;
}

.client-quote-receipt dd {
    margin: 0;
    color: var(--cq-ink) !important;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.client-quote-receipt .client-quote-receipt-grand {
    border-bottom: 0;
    background: linear-gradient(135deg, var(--cq-navy-950), var(--cq-navy-700));
}

.client-quote-receipt .client-quote-receipt-grand dt,
.client-quote-receipt .client-quote-receipt-grand dd {
    color: #ffffff !important;
    font-size: 1.12rem;
}

.client-quote-receipt > p {
    margin: 0;
    padding: 13px 21px;
    background: #f4f8fb;
    color: var(--cq-muted) !important;
    font-size: .75rem;
}

.client-quote-payment-table {
    min-width: 720px;
}

.client-quote-payment-table th:nth-child(1) { width: 22%; }
.client-quote-payment-table th:nth-child(2) { width: 22%; }
.client-quote-payment-table th:nth-child(3) { width: 18%; }
.client-quote-payment-table th:nth-child(4) { width: 20%; }
.client-quote-payment-table th:nth-child(5) { width: 18%; }

.client-quote-decision-card {
    overflow: hidden;
    border: 1px solid rgba(8,38,64,.18);
    border-radius: 25px;
    background: #ffffff;
    box-shadow: 0 18px 46px rgba(7,29,49,.11);
}

.client-quote-decision-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 23px 25px;
    background:
        radial-gradient(circle at 90% 10%, rgba(217,164,65,.24), transparent 31%),
        linear-gradient(135deg, var(--cq-navy-950), var(--cq-navy-700));
    color: #ffffff !important;
}

.client-quote-decision-head h2,
.client-quote-decision-head p {
    color: #ffffff !important;
}

.client-quote-decision-head h2 {
    margin: 0;
    font-size: 1.5rem;
}

.client-quote-decision-head p {
    margin: 6px 0 0;
    opacity: .75;
}

.client-quote-lock-chip {
    display: inline-flex;
    padding: 8px 11px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #ffffff !important;
    font-size: .72rem;
    font-weight: 850;
    white-space: nowrap;
}

.client-quote-tabs {
    margin: 0;
    padding: 14px 22px;
    border-bottom: 1px solid var(--cq-line);
    background: #f5f8fb;
}

.client-quote-tabs .tab-btn {
    border-color: #d6e0e8;
    background: #ffffff;
    color: #284158 !important;
}

.client-quote-tabs .tab-btn.active {
    border-color: var(--cq-navy-800);
    background: var(--cq-navy-800);
    color: #ffffff !important;
}

.client-quote-decision-body {
    padding: 23px;
    color: var(--cq-ink) !important;
}

.client-quote-decision-body label,
.client-quote-decision-body .field label {
    color: var(--cq-ink) !important;
}

.client-quote-decision-body input,
.client-quote-decision-body textarea {
    border-color: #cad7e2;
    background: #ffffff !important;
    color: var(--cq-ink) !important;
}

.client-quote-acceptance {
    align-items: flex-start;
    border-radius: 15px;
    background: #f5f8fb !important;
    color: var(--cq-ink) !important;
}

.client-quote-acceptance span {
    color: var(--cq-ink) !important;
}

.client-quote-primary-action {
    min-height: 48px;
    padding-left: 23px;
    padding-right: 23px;
    background: linear-gradient(135deg, #188250, #0f693f) !important;
    color: #ffffff !important;
}

.client-quote-reject-copy {
    margin-bottom: 14px;
}

.client-quote-reject-copy strong {
    color: #8f241f !important;
}

.client-quote-reject-copy p {
    color: var(--cq-muted) !important;
}

.client-quote-status-card {
    padding: 24px;
    border: 1px solid var(--cq-line);
    border-radius: 23px;
    background: #ffffff;
    color: var(--cq-ink) !important;
    box-shadow: 0 14px 34px rgba(17,38,61,.07);
}

.client-quote-status-card h2 {
    color: var(--cq-ink) !important;
}

.client-quote-status-card p {
    color: var(--cq-muted) !important;
}

.client-quote-assurance {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 17px;
    border: 1px solid #cfe0ee;
    border-radius: 18px;
    background: #eef5fb;
    color: #294f6c !important;
}

.client-quote-assurance strong,
.client-quote-assurance span {
    display: block;
    color: inherit !important;
}

.client-quote-assurance span {
    margin-top: 2px;
    opacity: .8;
    font-size: .8rem;
}

/* Permanent contrast guards: no black-on-navy regression in any theme. */
html[data-theme="light"] .client-quote-hero,
body[data-theme="light"] .client-quote-hero,
html[data-theme="dark"] .client-quote-hero,
body[data-theme="dark"] .client-quote-hero,
html[data-theme="light"] .client-quote-total-feature,
body[data-theme="light"] .client-quote-total-feature,
html[data-theme="dark"] .client-quote-total-feature,
body[data-theme="dark"] .client-quote-total-feature,
html[data-theme="light"] .client-quote-receipt-head,
body[data-theme="light"] .client-quote-receipt-head,
html[data-theme="dark"] .client-quote-receipt-head,
body[data-theme="dark"] .client-quote-receipt-head,
html[data-theme="light"] .client-quote-receipt-grand,
body[data-theme="light"] .client-quote-receipt-grand,
html[data-theme="dark"] .client-quote-receipt-grand,
body[data-theme="dark"] .client-quote-receipt-grand,
html[data-theme="light"] .client-quote-decision-head,
body[data-theme="light"] .client-quote-decision-head,
html[data-theme="dark"] .client-quote-decision-head,
body[data-theme="dark"] .client-quote-decision-head {
    color: #ffffff !important;
}

.client-quote-hero h1,
.client-quote-hero h2,
.client-quote-hero h3,
.client-quote-hero strong,
.client-quote-total-feature strong,
.client-quote-receipt-head strong,
.client-quote-decision-head h1,
.client-quote-decision-head h2,
.client-quote-decision-head h3,
.client-quote-table th {
    color: #ffffff !important;
}

@media (max-width: 980px) {
    .client-quote-hero,
    .client-quote-decision-head {
        flex-direction: column;
    }

    .client-quote-hero-actions {
        justify-content: flex-start;
        max-width: none;
    }

    .client-quote-finance-dashboard,
    .client-quote-profile-grid,
    .client-quote-settlement-grid {
        grid-template-columns: 1fr;
    }

    .client-quote-service-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .client-premium-quote {
        width: min(100% - 18px, 1200px);
        padding: 0;
        margin-top: 18px !important;
    }

    .client-quote-document {
        border-radius: 22px;
    }

    .client-quote-hero,
    .client-quote-content,
    .client-quote-section {
        padding: 18px;
    }

    .client-quote-title-row {
        align-items: flex-start;
    }

    .client-quote-hero-actions,
    .client-quote-hero-actions .btn {
        width: 100%;
    }

    .client-quote-hero-actions .status {
        width: auto;
    }

    .client-quote-service-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .client-quote-data-list > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .client-quote-section-heading {
        flex-direction: column;
    }

    .client-quote-table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .client-quote-table,
    .client-quote-payment-table {
        min-width: 0;
        border-spacing: 0 12px;
        background: transparent;
    }

    .client-quote-table thead {
        display: none;
    }

    .client-quote-table tbody,
    .client-quote-table tr,
    .client-quote-table td {
        display: block;
        width: 100% !important;
    }

    .client-quote-table tr {
        overflow: hidden;
        border: 1px solid var(--cq-line);
        border-radius: 17px;
        background: #ffffff;
        box-shadow: 0 9px 24px rgba(17,38,61,.06);
    }

    .client-quote-table td,
    .client-quote-table tbody tr:nth-child(even) td {
        display: grid;
        grid-template-columns: minmax(110px, .8fr) minmax(0, 1.2fr);
        gap: 12px;
        padding: 10px 13px;
        border-bottom: 1px solid #e7edf2;
        background: #ffffff;
        text-align: right !important;
        overflow-wrap: anywhere;
    }

    .client-quote-table td::before {
        content: attr(data-label);
        color: #657a8e !important;
        font-size: .7rem;
        font-weight: 850;
        letter-spacing: .06em;
        text-align: left;
        text-transform: uppercase;
    }

    .client-quote-table td:last-child {
        border-bottom: 0;
    }

    .client-quote-table td:first-child {
        background: #f3f7fa !important;
    }

    .client-quote-table .client-quote-line-total {
        background: #fff8e8 !important;
    }

    .client-quote-tabs {
        padding-left: 14px;
        padding-right: 14px;
    }

    .client-quote-tabs .tab-btn {
        flex: 1 1 100%;
    }

    .client-quote-decision-body {
        padding: 18px;
    }
}

@media (max-width: 520px) {
    .client-quote-service-metrics {
        grid-template-columns: 1fr;
    }

    .client-quote-total-feature strong {
        font-size: 2.35rem;
    }

    .client-quote-receipt dl > div {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ========================================================================
   Vigilex customized client quotation + permanent contrast repair 6.2.9
   ======================================================================== */

/* The previous max-width plus inherited padding could push the right side
   outside the viewport. This creates an exact border-box quotation canvas. */
html body .quote-shell.client-premium-quote {
    width: min(1180px, calc(100vw - 28px)) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

html body .client-quote-document {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.client-quote-content,
.client-quote-section,
.client-quote-profile-grid,
.client-quote-profile-grid > *,
.client-quote-settlement-grid,
.client-quote-settlement-grid > *,
.client-quote-finance-dashboard,
.client-quote-finance-dashboard > * {
    min-width: 0 !important;
}

/* Critical typography helpers. Inline !important styles are also present on
   the most important headings and totals for maximum theme compatibility. */
html body .client-quote-document .cq-force-white {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
}

html body .client-quote-document .cq-force-soft {
    color: rgba(255, 255, 255, .80) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, .80) !important;
}

html body .client-quote-document .cq-dark-surface h1,
html body .client-quote-document .cq-dark-surface h2,
html body .client-quote-document .cq-dark-surface h3,
html body .client-quote-document .cq-dark-surface h4,
html body .client-quote-document .cq-dark-surface strong,
html body .client-quote-document .cq-dark-surface dt,
html body .client-quote-document .cq-dark-surface dd {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

html body .client-quote-document .cq-dark-surface p,
html body .client-quote-document .cq-dark-surface small {
    color: rgba(255, 255, 255, .80) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, .80) !important;
}

html body .client-quote-document .client-quote-kicker,
html body .client-quote-document .client-quote-label,
html body .client-quote-document .client-quote-receipt-head > div > span {
    color: #f0cb79 !important;
    -webkit-text-fill-color: #f0cb79 !important;
}

html body .client-quote-document .client-quote-total-amount {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 8px 28px rgba(0, 0, 0, .22);
}

/* Customized reference ribbon */
.client-quote-reference-strip {
    display: grid;
    grid-template-columns: 1.35fr .75fr .75fr .85fr;
    border-bottom: 1px solid #dfe7ee;
    background: #ffffff;
}

.client-quote-reference-strip > div {
    min-width: 0;
    padding: 15px 20px;
    border-right: 1px solid #e2e9ef;
}

.client-quote-reference-strip > div:last-child {
    border-right: 0;
}

.client-quote-reference-strip span {
    display: block;
    color: #718397 !important;
    -webkit-text-fill-color: #718397 !important;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .095em;
    text-transform: uppercase;
}

.client-quote-reference-strip strong {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: #102a42 !important;
    -webkit-text-fill-color: #102a42 !important;
    font-size: .9rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Fully customized premium invoice service lines: no oversized table and no
   amount column pushed outside the viewport. */
.client-quote-line-items {
    display: grid;
    gap: 16px;
}

.client-quote-line-card {
    overflow: hidden;
    border: 1px solid #d9e3eb;
    border-radius: 21px;
    background: #ffffff;
    box-shadow: 0 13px 31px rgba(12, 42, 67, .065);
}

.client-quote-line-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 17px 19px;
    border-bottom: 1px solid #dbe5ed;
    background:
        radial-gradient(circle at 90% 0, rgba(217, 164, 65, .18), transparent 36%),
        linear-gradient(135deg, #f9fbfd, #eef4f8);
}

.client-quote-line-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.client-quote-line-number {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #0f4c78, #072944);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: .72rem;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(7, 41, 68, .18);
}

.client-quote-line-identity small {
    display: block;
    color: #7b8ea0 !important;
    -webkit-text-fill-color: #7b8ea0 !important;
    font-size: .65rem;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.client-quote-line-identity h3 {
    margin: 3px 0 0;
    overflow: hidden;
    color: #102a42 !important;
    -webkit-text-fill-color: #102a42 !important;
    font-size: 1.1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-quote-line-amount {
    flex: 0 0 auto;
    min-width: 170px;
    padding: 10px 14px;
    border: 1px solid #ead9ab;
    border-radius: 14px;
    background: #fff9e9;
    text-align: right;
}

.client-quote-line-amount span {
    display: block;
    color: #856428 !important;
    -webkit-text-fill-color: #856428 !important;
    font-size: .64rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.client-quote-line-amount strong {
    display: block;
    margin-top: 3px;
    color: #082c4b !important;
    -webkit-text-fill-color: #082c4b !important;
    font-size: 1.2rem;
    font-variant-numeric: tabular-nums;
}

.client-quote-line-card-body {
    display: grid;
    grid-template-columns: 1.1fr 1fr .85fr;
    gap: 0;
}

.client-quote-line-group {
    min-width: 0;
    padding: 18px 19px;
    border-right: 1px solid #e2e9ef;
}

.client-quote-line-group:last-child {
    border-right: 0;
}

.client-quote-line-group-title {
    display: block;
    margin-bottom: 9px;
    color: #9b742c !important;
    -webkit-text-fill-color: #9b742c !important;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .095em;
    text-transform: uppercase;
}

.client-quote-line-group dl {
    display: grid;
    gap: 7px;
    margin: 0;
}

.client-quote-line-group dl > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
}

.client-quote-line-group dt {
    color: #6a7e91 !important;
    -webkit-text-fill-color: #6a7e91 !important;
    font-size: .78rem;
}

.client-quote-line-group dd {
    margin: 0;
    color: #173148 !important;
    -webkit-text-fill-color: #173148 !important;
    font-size: .82rem;
    font-weight: 850;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.client-quote-line-pricing {
    background: linear-gradient(145deg, #fbfdff, #f1f6f9);
}

.client-quote-line-pricing-total {
    margin-top: 3px;
    padding-top: 9px;
    border-top: 1px solid #dbe5ed;
}

.client-quote-line-pricing-total dt,
.client-quote-line-pricing-total dd {
    color: #082c4b !important;
    -webkit-text-fill-color: #082c4b !important;
    font-weight: 900 !important;
}

.client-quote-line-pricing small {
    display: block;
    margin-top: 11px;
    color: #6c8093 !important;
    -webkit-text-fill-color: #6c8093 !important;
    font-size: .69rem;
    text-align: right;
}

/* Ensure the receipt is never visually cut and its final total is readable. */
.client-quote-receipt {
    min-width: 0 !important;
}

html body .client-quote-receipt .client-quote-receipt-grand,
html body .client-quote-receipt .client-quote-receipt-grand * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Theme implementations used by different portal releases. */
html[data-theme="light"] .cq-force-white,
body[data-theme="light"] .cq-force-white,
html[data-theme="dark"] .cq-force-white,
body[data-theme="dark"] .cq-force-white,
html.theme-light .cq-force-white,
body.theme-light .cq-force-white,
html.light-theme .cq-force-white,
body.light-theme .cq-force-white,
html[data-mode="light"] .cq-force-white,
body[data-mode="light"] .cq-force-white {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Better custom layout at standard laptops and tablets. */
@media (max-width: 1080px) {
    .client-quote-profile-grid,
    .client-quote-settlement-grid {
        grid-template-columns: 1fr !important;
    }

    .client-quote-line-card-body {
        grid-template-columns: 1fr 1fr;
    }

    .client-quote-line-pricing {
        grid-column: 1 / -1;
        border-top: 1px solid #e2e9ef;
    }
}

@media (max-width: 780px) {
    html body .quote-shell.client-premium-quote {
        width: calc(100vw - 16px) !important;
    }

    .client-quote-reference-strip {
        grid-template-columns: 1fr 1fr;
    }

    .client-quote-reference-strip > div:nth-child(2) {
        border-right: 0;
    }

    .client-quote-reference-strip > div:nth-child(-n+2) {
        border-bottom: 1px solid #e2e9ef;
    }

    .client-quote-line-card-head,
    .client-quote-line-card-body {
        display: grid;
        grid-template-columns: 1fr;
    }

    .client-quote-line-amount {
        width: 100%;
        min-width: 0;
        text-align: left;
    }

    .client-quote-line-group {
        border-right: 0;
        border-bottom: 1px solid #e2e9ef;
    }

    .client-quote-line-group:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 500px) {
    .client-quote-reference-strip {
        grid-template-columns: 1fr;
    }

    .client-quote-reference-strip > div {
        border-right: 0;
        border-bottom: 1px solid #e2e9ef;
    }

    .client-quote-reference-strip > div:last-child {
        border-bottom: 0;
    }

    .client-quote-line-group dl > div {
        display: grid;
        gap: 2px;
    }

    .client-quote-line-group dd {
        text-align: left;
    }

    .client-quote-line-pricing small {
        text-align: left;
    }
}

/* ========================================================================
   Vigilex premium payment authorization & signature evidence 6.3.0
   Theme-isolated styles with explicit foreground colours on every surface.
   ======================================================================== */

.quote-signature-capture,
.quote-signature-evidence {
    --sig-navy-950: #061a2d;
    --sig-navy-900: #082944;
    --sig-navy-800: #0d3d63;
    --sig-gold: #d8a43f;
    --sig-ink: #10273d;
    --sig-muted: #65798d;
    --sig-border: #d8e3ec;
    color: var(--sig-ink) !important;
}

.quote-signature-capture {
    overflow: hidden;
    border: 1px solid var(--sig-border);
    border-radius: 20px;
    background: #f8fbfd !important;
    box-shadow: 0 13px 30px rgba(8, 41, 68, .07);
}

.quote-signature-capture-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 15px 17px;
    border-bottom: 1px solid var(--sig-border);
    background: linear-gradient(135deg, #f8fbfd, #eef4f8) !important;
}

.quote-signature-capture-head span {
    display: block;
    color: #8a6727 !important;
    -webkit-text-fill-color: #8a6727 !important;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.quote-signature-capture-head strong {
    display: block;
    margin-top: 3px;
    color: var(--sig-ink) !important;
    -webkit-text-fill-color: var(--sig-ink) !important;
    font-size: 1rem;
}

.quote-signature-canvas-wrap {
    position: relative;
    margin: 16px;
    overflow: hidden;
    border: 1px dashed #9fb3c5;
    border-radius: 15px;
    background: #ffffff !important;
}

.quote-signature-canvas {
    display: block;
    width: 100%;
    height: 220px;
    background: #ffffff !important;
    cursor: crosshair;
    touch-action: none;
}

.quote-signature-canvas:focus {
    outline: 3px solid rgba(31, 111, 166, .22);
    outline-offset: -3px;
}

.quote-signature-guide {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    padding-top: 8px;
    border-top: 1px solid #d9e3eb;
    color: #8a9bab !important;
    -webkit-text-fill-color: #8a9bab !important;
    font-size: .72rem;
    text-align: center;
    pointer-events: none;
}

.quote-signature-capture.has-signature .quote-signature-guide {
    opacity: .42;
}

.quote-signature-help,
.quote-signature-message {
    margin: 0;
    padding: 0 17px 15px;
    color: var(--sig-muted) !important;
    -webkit-text-fill-color: var(--sig-muted) !important;
    font-size: .76rem;
}

.quote-signature-message:empty { display: none; }
.quote-signature-message.is-error {
    color: #9b2d29 !important;
    -webkit-text-fill-color: #9b2d29 !important;
}
.quote-signature-message.is-working {
    color: #1b6644 !important;
    -webkit-text-fill-color: #1b6644 !important;
}

.quote-signature-evidence {
    overflow: hidden;
    margin-top: 18px;
    border: 1px solid var(--sig-border);
    border-radius: 21px;
    background: #ffffff !important;
    box-shadow: 0 14px 34px rgba(8, 41, 68, .07);
}

.quote-signature-evidence-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    background: linear-gradient(135deg, var(--sig-navy-950), var(--sig-navy-800)) !important;
    color: #ffffff !important;
}

.quote-signature-evidence-head h3,
.quote-signature-evidence-head strong {
    margin: 3px 0 0;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.quote-signature-eyebrow {
    display: block;
    color: #efcb78 !important;
    -webkit-text-fill-color: #efcb78 !important;
    font-size: .65rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.quote-signature-verified {
    display: inline-flex;
    align-items: center;
    min-height: 31px;
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(255,255,255,.1) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: .68rem;
    font-weight: 850;
    white-space: nowrap;
}

.quote-signature-evidence-body {
    display: grid;
    grid-template-columns: minmax(260px, .95fr) minmax(0, 1.05fr);
    gap: 18px;
    padding: 18px;
}

.quote-signature-image-frame {
    position: relative;
    min-height: 150px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #d8e2ea;
    border-radius: 15px;
    background: #ffffff !important;
}

.quote-signature-image-frame::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 31px;
    border-top: 1px solid #cfdbe5;
}

.quote-signature-image-frame img {
    position: relative;
    z-index: 1;
    width: min(92%, 430px);
    max-height: 108px;
    object-fit: contain;
    filter: contrast(1.08);
}

.quote-signature-image-frame > span {
    position: absolute;
    z-index: 2;
    left: 18px;
    bottom: 10px;
    color: #718498 !important;
    -webkit-text-fill-color: #718498 !important;
    font-size: .65rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.quote-signature-unavailable {
    color: #667b8f !important;
    -webkit-text-fill-color: #667b8f !important;
    font-size: .8rem;
}

.quote-signature-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: start;
    gap: 0;
    margin: 0;
    border: 1px solid #e0e8ef;
    border-radius: 15px;
    overflow: hidden;
}

.quote-signature-details > div {
    min-width: 0;
    padding: 12px 14px;
    border-right: 1px solid #e0e8ef;
    border-bottom: 1px solid #e0e8ef;
    background: #f7fafc !important;
}

.quote-signature-details > div:nth-child(2n) { border-right: 0; }
.quote-signature-details > div.full {
    grid-column: 1 / -1;
    border-right: 0;
}
.quote-signature-details > div:last-child { border-bottom: 0; }

.quote-signature-details dt {
    color: #72869a !important;
    -webkit-text-fill-color: #72869a !important;
    font-size: .63rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.quote-signature-details dd {
    margin: 4px 0 0;
    color: var(--sig-ink) !important;
    -webkit-text-fill-color: var(--sig-ink) !important;
    font-size: .82rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.quote-signature-hash {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: .7rem !important;
}

.secure-payment-shell {
    width: min(1160px, calc(100vw - 28px));
    margin: 42px auto 56px;
    color: #10273d !important;
}

.secure-payment-document {
    --pay-navy-950: #061a2d;
    --pay-navy-900: #082944;
    --pay-navy-800: #0d3d63;
    --pay-navy-700: #12547f;
    --pay-gold: #d8a43f;
    --pay-gold-soft: #fff7e4;
    --pay-ink: #10273d;
    --pay-muted: #64788c;
    --pay-border: #d9e3eb;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(8,41,68,.12);
    border-radius: 31px;
    background: #ffffff !important;
    color: var(--pay-ink) !important;
    box-shadow: 0 30px 90px rgba(7,29,49,.15);
}

.secure-payment-document,
.secure-payment-document * { box-sizing: border-box; }

.secure-payment-dark {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.secure-payment-hero {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 28px;
    overflow: hidden;
    padding: 34px;
    border-bottom: 5px solid var(--pay-gold);
    background:
        radial-gradient(circle at 90% 12%, rgba(216,164,63,.28), transparent 31%),
        linear-gradient(135deg, var(--pay-navy-950), var(--pay-navy-700) 72%, #334f42) !important;
}

.secure-payment-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(90deg, #000, transparent 88%);
    pointer-events: none;
}

.secure-payment-hero-copy,
.secure-payment-hero-side { position: relative; z-index: 1; }
.secure-payment-hero-copy { min-width: 0; flex: 1 1 auto; }

.secure-payment-kicker {
    display: block;
    color: #efcb78 !important;
    -webkit-text-fill-color: #efcb78 !important;
    font-size: .69rem;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.secure-payment-kicker.dark {
    color: #94702b !important;
    -webkit-text-fill-color: #94702b !important;
}

.secure-payment-title-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 12px;
}

.secure-payment-emblem {
    width: 51px;
    height: 51px;
    flex: 0 0 51px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 16px;
    background: linear-gradient(145deg, #14669d, #092f50) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 1.25rem;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 12px 26px rgba(0,0,0,.2);
}

.secure-payment-title-row small {
    display: block;
    color: rgba(255,255,255,.72) !important;
    -webkit-text-fill-color: rgba(255,255,255,.72) !important;
    font-size: .75rem;
    font-weight: 800;
}

.secure-payment-title-row h1 {
    margin: 2px 0 0;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: clamp(1.7rem, 3.5vw, 2.7rem);
    letter-spacing: -.035em;
}

.secure-payment-hero-copy > p {
    max-width: 690px;
    margin: 17px 0 0;
    color: rgba(255,255,255,.8) !important;
    -webkit-text-fill-color: rgba(255,255,255,.8) !important;
}

.secure-payment-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}
.secure-payment-trust-row span {
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    background: rgba(255,255,255,.07) !important;
    color: rgba(255,255,255,.9) !important;
    -webkit-text-fill-color: rgba(255,255,255,.9) !important;
    font-size: .7rem;
    font-weight: 750;
}

.secure-payment-hero-side {
    width: min(310px, 34%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 20px;
    background: rgba(255,255,255,.08) !important;
    backdrop-filter: blur(8px);
}
.secure-payment-hero-side > span,
.secure-payment-hero-side > small {
    color: rgba(255,255,255,.7) !important;
    -webkit-text-fill-color: rgba(255,255,255,.7) !important;
}
.secure-payment-hero-side > span {
    font-size: .65rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.secure-payment-hero-side > strong {
    margin-top: 6px;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 1.15rem;
}
.secure-payment-hero-side > small { margin-top: 3px; }
.secure-payment-back {
    margin-top: 17px;
    border: 1px solid rgba(255,255,255,.3) !important;
    background: #ffffff !important;
    color: var(--pay-navy-900) !important;
    -webkit-text-fill-color: var(--pay-navy-900) !important;
}

.secure-payment-reference-bar {
    display: grid;
    grid-template-columns: 1.35fr .55fr .9fr 1fr;
    background: #ffffff !important;
    border-bottom: 1px solid var(--pay-border);
}
.secure-payment-reference-bar > div {
    min-width: 0;
    padding: 14px 19px;
    border-right: 1px solid var(--pay-border);
}
.secure-payment-reference-bar > div:last-child { border-right: 0; }
.secure-payment-reference-bar span {
    display: block;
    color: #728599 !important;
    -webkit-text-fill-color: #728599 !important;
    font-size: .63rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.secure-payment-reference-bar strong {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: var(--pay-ink) !important;
    -webkit-text-fill-color: var(--pay-ink) !important;
    font-size: .86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.secure-payment-content {
    display: grid;
    gap: 21px;
    padding: 27px;
    background:
        radial-gradient(circle at 96% 0, rgba(216,164,63,.08), transparent 23%),
        linear-gradient(180deg, #f8fafc, #ffffff 45%, #f4f8fb) !important;
}

.secure-payment-finance {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 16px;
}

.secure-payment-total {
    min-height: 175px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 27px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 89% 14%, rgba(216,164,63,.25), transparent 33%),
        linear-gradient(135deg, var(--pay-navy-950), var(--pay-navy-700)) !important;
    box-shadow: 0 18px 43px rgba(7,29,49,.18);
}
.secure-payment-total > span {
    color: #efcb78 !important;
    -webkit-text-fill-color: #efcb78 !important;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.secure-payment-total > strong {
    margin-top: 8px;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: clamp(2.1rem, 4.6vw, 3.45rem);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.secure-payment-total > small {
    margin-top: 14px;
    color: rgba(255,255,255,.72) !important;
    -webkit-text-fill-color: rgba(255,255,255,.72) !important;
}

.secure-payment-metrics { display: grid; gap: 14px; }
.secure-payment-metrics > div {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px 20px;
    border: 1px solid var(--pay-border);
    border-radius: 20px;
    background: linear-gradient(145deg, #ffffff, #f2f6f9) !important;
    box-shadow: 0 12px 28px rgba(17,38,61,.06);
}
.secure-payment-metrics span {
    color: #6b8094 !important;
    -webkit-text-fill-color: #6b8094 !important;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.secure-payment-metrics strong {
    margin-top: 5px;
    color: var(--pay-ink) !important;
    -webkit-text-fill-color: var(--pay-ink) !important;
    font-size: 1.4rem;
    font-variant-numeric: tabular-nums;
}
.secure-payment-metrics small {
    margin-top: 4px;
    color: var(--pay-muted) !important;
    -webkit-text-fill-color: var(--pay-muted) !important;
}

.secure-payment-alert,
.secure-payment-info {
    border: 1px solid #cddfeb;
    border-radius: 16px;
    background: #edf5fb !important;
    color: #27506d !important;
    -webkit-text-fill-color: #27506d !important;
}
.secure-payment-alert {
    display: flex;
    gap: 12px;
    padding: 15px 17px;
}
.secure-payment-alert.is-pending {
    border-color: #ecd89f;
    background: #fff8e8 !important;
    color: #70521c !important;
    -webkit-text-fill-color: #70521c !important;
}
.secure-payment-alert-icon {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--pay-navy-800) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 900;
}
.secure-payment-alert strong,
.secure-payment-alert p { color: inherit !important; -webkit-text-fill-color: inherit !important; }
.secure-payment-alert p { margin: 3px 0 0; opacity: .82; }
.secure-payment-info { margin-top: 15px; padding: 13px 15px; font-size: .82rem; }

.secure-payment-form { display: grid; gap: 21px; }
.secure-payment-section,
.secure-payment-state {
    min-width: 0;
    padding: 24px;
    border: 1px solid rgba(17,38,61,.1);
    border-radius: 24px;
    background: #ffffff !important;
    color: var(--pay-ink) !important;
    -webkit-text-fill-color: var(--pay-ink) !important;
    box-shadow: 0 14px 36px rgba(17,38,61,.06);
}

.secure-payment-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 17px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--pay-border);
}
.secure-payment-section-head h2,
.secure-payment-state h2 {
    margin: 3px 0 0;
    color: var(--pay-ink) !important;
    -webkit-text-fill-color: var(--pay-ink) !important;
    font-size: clamp(1.28rem, 2.2vw, 1.72rem);
}
.secure-payment-section-head p,
.secure-payment-state p {
    margin: 6px 0 0;
    color: var(--pay-muted) !important;
    -webkit-text-fill-color: var(--pay-muted) !important;
}

.secure-payment-live-amount {
    min-width: 180px;
    padding: 12px 15px;
    border: 1px solid #ead8aa;
    border-radius: 15px;
    background: #fff8e7 !important;
    text-align: right;
}
.secure-payment-live-amount span {
    display: block;
    color: #876529 !important;
    -webkit-text-fill-color: #876529 !important;
    font-size: .64rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.secure-payment-live-amount strong {
    display: block;
    margin-top: 4px;
    color: var(--pay-navy-900) !important;
    -webkit-text-fill-color: var(--pay-navy-900) !important;
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
}

.secure-payment-verified-chip {
    display: inline-flex;
    min-height: 31px;
    align-items: center;
    padding: 7px 10px;
    border: 1px solid #cae5d5;
    border-radius: 999px;
    background: #eaf8f0 !important;
    color: #17633d !important;
    -webkit-text-fill-color: #17633d !important;
    font-size: .68rem;
    font-weight: 850;
    white-space: nowrap;
}
.secure-payment-verified-chip.is-gold {
    border-color: #ead8aa;
    background: #fff8e7 !important;
    color: #7c5c21 !important;
    -webkit-text-fill-color: #7c5c21 !important;
}

.secure-payment-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.secure-payment-field { display: block; min-width: 0; }
.secure-payment-field.full { grid-column: 1 / -1; }
.secure-payment-field > span {
    display: block;
    margin-bottom: 7px;
    color: var(--pay-ink) !important;
    -webkit-text-fill-color: var(--pay-ink) !important;
    font-size: .78rem;
    font-weight: 850;
}
.secure-payment-field input,
.secure-payment-field select,
.secure-payment-field textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd7e1 !important;
    border-radius: 13px !important;
    background: #ffffff !important;
    color: var(--pay-ink) !important;
    -webkit-text-fill-color: var(--pay-ink) !important;
    box-shadow: inset 0 1px 2px rgba(17,38,61,.025);
}
.secure-payment-field small {
    display: block;
    margin-top: 6px;
    color: var(--pay-muted) !important;
    -webkit-text-fill-color: var(--pay-muted) !important;
}
.secure-payment-name-field { max-width: 520px; margin-bottom: 15px; }

.secure-payment-prior-signature {
    display: grid;
    gap: 3px;
    margin-bottom: 15px;
    padding: 13px 15px;
    border: 1px solid #cae5d5;
    border-radius: 15px;
    background: #edf9f2 !important;
}
.secure-payment-prior-signature span {
    color: #28704c !important;
    -webkit-text-fill-color: #28704c !important;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.secure-payment-prior-signature strong {
    color: #174e35 !important;
    -webkit-text-fill-color: #174e35 !important;
}
.secure-payment-prior-signature small {
    color: #557767 !important;
    -webkit-text-fill-color: #557767 !important;
}

.secure-payment-authorization-check {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 16px;
    padding: 14px 15px;
    border: 1px solid #d5e0e9;
    border-radius: 15px;
    background: #f5f8fb !important;
    color: var(--pay-ink) !important;
    -webkit-text-fill-color: var(--pay-ink) !important;
    font-size: .82rem;
    font-weight: 750;
}
.secure-payment-authorization-check input { margin-top: 2px; }
.secure-payment-authorization-check span {
    color: var(--pay-ink) !important;
    -webkit-text-fill-color: var(--pay-ink) !important;
}

.secure-payment-final-check {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    padding: 22px 24px;
    border-radius: 23px;
    background:
        radial-gradient(circle at 91% 12%, rgba(216,164,63,.25), transparent 34%),
        linear-gradient(135deg, var(--pay-navy-950), var(--pay-navy-700)) !important;
    box-shadow: 0 17px 38px rgba(7,29,49,.16);
}
.secure-payment-final-check span {
    display: block;
    color: #efcb78 !important;
    -webkit-text-fill-color: #efcb78 !important;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.secure-payment-final-check strong {
    display: block;
    margin-top: 4px;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}
.secure-payment-final-check small {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,.72) !important;
    -webkit-text-fill-color: rgba(255,255,255,.72) !important;
}
.secure-payment-confirm,
.secure-payment-primary {
    min-height: 49px;
    padding-left: 22px !important;
    padding-right: 22px !important;
    border: 1px solid rgba(255,255,255,.2) !important;
    background: linear-gradient(135deg, #f1ca6d, #d69a2c) !important;
    color: #17283a !important;
    -webkit-text-fill-color: #17283a !important;
    white-space: nowrap;
    box-shadow: 0 12px 27px rgba(216,164,63,.22) !important;
}
.secure-payment-confirm:disabled {
    opacity: .52;
    cursor: not-allowed;
}

.secure-payment-assurance {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 17px;
    border: 1px solid #cddfeb;
    border-radius: 17px;
    background: #edf5fb !important;
    color: #28506d !important;
    -webkit-text-fill-color: #28506d !important;
}
.secure-payment-assurance > span {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #188050 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 900;
}
.secure-payment-assurance strong,
.secure-payment-assurance small { display: block; color: inherit !important; -webkit-text-fill-color: inherit !important; }
.secure-payment-assurance small { margin-top: 2px; opacity: .8; }

.secure-payment-state { text-align: center; }
.secure-payment-state-icon {
    width: 55px;
    height: 55px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 17px;
    background: #fff3d3 !important;
    color: #8a631c !important;
    -webkit-text-fill-color: #8a631c !important;
    font-size: 1.35rem;
    font-weight: 900;
}
.secure-payment-state-icon.is-success {
    background: #e8f7ef !important;
    color: #17663f !important;
    -webkit-text-fill-color: #17663f !important;
}
.secure-payment-state .quote-signature-evidence { text-align: left; }
.secure-payment-state .secure-payment-primary { display: inline-flex; margin-top: 18px; }

/* Maximum-specificity contrast guards for every known theme attribute/class. */
html body .secure-payment-dark,
html body .secure-payment-dark h1,
html body .secure-payment-dark h2,
html body .secure-payment-dark h3,
html body .secure-payment-dark h4,
html body .secure-payment-dark strong,
html body .secure-payment-dark dd,
html[data-theme="light"] body .secure-payment-dark,
html[data-theme="dark"] body .secure-payment-dark,
html.theme-light body .secure-payment-dark,
html.light-theme body .secure-payment-dark,
html[data-mode="light"] body .secure-payment-dark {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}
html body .secure-payment-dark p,
html body .secure-payment-dark small {
    color: rgba(255,255,255,.78) !important;
    -webkit-text-fill-color: rgba(255,255,255,.78) !important;
}
html body .secure-payment-dark .secure-payment-kicker,
html body .secure-payment-dark .secure-payment-total > span {
    color: #efcb78 !important;
    -webkit-text-fill-color: #efcb78 !important;
}
html body .quote-signature-evidence-head,
html body .quote-signature-evidence-head h3,
html body .quote-signature-evidence-head strong,
html body .quote-signature-evidence-head .quote-signature-verified {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

@media (max-width: 920px) {
    .secure-payment-hero { flex-direction: column; }
    .secure-payment-hero-side { width: 100%; }
    .secure-payment-reference-bar { grid-template-columns: 1fr 1fr; }
    .secure-payment-reference-bar > div:nth-child(2) { border-right: 0; }
    .secure-payment-reference-bar > div:nth-child(-n+2) { border-bottom: 1px solid var(--pay-border); }
    .secure-payment-finance { grid-template-columns: 1fr; }
    .quote-signature-evidence-body { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .secure-payment-shell { width: calc(100vw - 16px); margin-top: 17px; }
    .secure-payment-document { border-radius: 22px; }
    .secure-payment-hero,
    .secure-payment-content,
    .secure-payment-section,
    .secure-payment-state { padding: 18px; }
    .secure-payment-option-grid { grid-template-columns: 1fr; }
    .secure-payment-field.full { grid-column: auto; }
    .secure-payment-section-head,
    .secure-payment-final-check { flex-direction: column; align-items: stretch; }
    .secure-payment-live-amount { min-width: 0; text-align: left; }
    .secure-payment-confirm { width: 100%; white-space: normal; }
    .quote-signature-canvas { height: 190px; }
    .quote-signature-capture-head { align-items: flex-start; }
}

@media (max-width: 480px) {
    .secure-payment-reference-bar { grid-template-columns: 1fr; }
    .secure-payment-reference-bar > div { border-right: 0; border-bottom: 1px solid var(--pay-border); }
    .secure-payment-reference-bar > div:last-child { border-bottom: 0; }
    .quote-signature-details { grid-template-columns: 1fr; }
    .quote-signature-details > div,
    .quote-signature-details > div:nth-child(2n) { border-right: 0; }
    .quote-signature-details > div.full { grid-column: auto; }
    .quote-signature-evidence-head { align-items: flex-start; flex-direction: column; }
}

/* ========================================================================
   Vigilex secure payment light-theme colour protection 6.3.1
   Fixes dark/black button text on coloured banking-style action buttons.
   ======================================================================== */

html body .secure-payment-document .secure-payment-force-white,
html body .secure-payment-document .secure-payment-force-white:hover,
html body .secure-payment-document .secure-payment-force-white:focus,
html body .secure-payment-document .secure-payment-force-white:active,
html body .secure-payment-document .secure-payment-force-white:visited {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .18) !important;
}

/* Premium Review Quotation action inside the navy hero. */
html body .secure-payment-document .secure-payment-hero-side .secure-payment-back,
html[data-theme="light"] body .secure-payment-document .secure-payment-hero-side .secure-payment-back,
html[data-mode="light"] body .secure-payment-document .secure-payment-hero-side .secure-payment-back,
html.theme-light body .secure-payment-document .secure-payment-hero-side .secure-payment-back,
html.light-theme body .secure-payment-document .secure-payment-hero-side .secure-payment-back,
body.theme-light .secure-payment-document .secure-payment-hero-side .secure-payment-back,
body.light-theme .secure-payment-document .secure-payment-hero-side .secure-payment-back {
    border: 1px solid rgba(255, 255, 255, .28) !important;
    background: linear-gradient(135deg, #0f4f7d, #082d4b) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .14),
        0 13px 28px rgba(3, 24, 42, .24) !important;
}

/* Premium final payment action: white typography in every state. */
html body .secure-payment-document .secure-payment-final-check .secure-payment-confirm,
html[data-theme="light"] body .secure-payment-document .secure-payment-final-check .secure-payment-confirm,
html[data-mode="light"] body .secure-payment-document .secure-payment-final-check .secure-payment-confirm,
html.theme-light body .secure-payment-document .secure-payment-final-check .secure-payment-confirm,
html.light-theme body .secure-payment-document .secure-payment-final-check .secure-payment-confirm,
body.theme-light .secure-payment-document .secure-payment-final-check .secure-payment-confirm,
body.light-theme .secure-payment-document .secure-payment-final-check .secure-payment-confirm {
    border: 1px solid rgba(255, 255, 255, .22) !important;
    background: linear-gradient(135deg, #178252, #0d673f) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 900 !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .16),
        0 13px 29px rgba(10, 93, 57, .28) !important;
}

/* Disabled state remains clearly disabled without turning the text black. */
html body .secure-payment-document .secure-payment-final-check .secure-payment-confirm:disabled,
html body .secure-payment-document .secure-payment-final-check .secure-payment-confirm[disabled] {
    opacity: 1 !important;
    border-color: rgba(255, 255, 255, .16) !important;
    background: linear-gradient(135deg, #6f8799, #526b7e) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

/* Protect all button descendants from global accessibility/theme overrides. */
html body .secure-payment-document .secure-payment-back *,
html body .secure-payment-document .secure-payment-confirm * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Keep native disabled text rendering readable in Chromium/WebKit. */
html body .secure-payment-document button.secure-payment-confirm:disabled {
    -webkit-opacity: 1 !important;
}

/* Vigilex brand refinements */
.sidebar-brand img.sidebar-brand-mark{width:42px;height:49px;max-width:none;max-height:none;object-fit:contain;flex:0 0 auto}
.auth-card .premium-auth-brand img{width:min(290px,100%);height:auto;max-height:88px;object-fit:contain;object-position:left center}

/* Expert request administration */
.request-stage{display:inline-flex;margin-top:7px;padding:5px 9px;border-radius:999px;font-size:.7rem;font-weight:850;letter-spacing:.03em}.request-stage.is-initial{background:#fff2cf;color:#865d00}.request-stage.is-complete{background:#dcf7e7;color:#17643a}.expert-request-overview{overflow:hidden;border-color:rgba(7,95,230,.16);background:linear-gradient(135deg,rgba(7,95,230,.055),rgba(255,255,255,.98) 50%)}.expert-admin-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-top:20px}.expert-admin-grid>div{display:grid;gap:5px;padding:16px;border:1px solid var(--border);border-radius:14px;background:var(--surface)}.expert-admin-grid small,.expert-admin-message>small{color:var(--muted);font-size:.7rem;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.expert-admin-grid strong{font-size:.92rem}.expert-admin-grid span{color:var(--muted);font-size:.75rem}.expert-admin-message{margin-top:14px;padding:20px;border-radius:16px;background:var(--surface);border:1px solid var(--border)}.expert-admin-message p{margin:9px 0 0;line-height:1.7}.expert-admin-next{display:flex;justify-content:space-between;gap:14px;margin-top:14px;padding:15px 18px;border-radius:14px;background:#071d34;color:#fff}.expert-admin-next>div{display:grid;gap:3px}.expert-admin-next span{color:#a9c4da;font-size:.78rem}.expert-detail-empty{display:grid;gap:8px;padding:30px}.expert-detail-empty strong{font-size:1rem}.expert-detail-empty span{max-width:760px;color:var(--muted);line-height:1.65}.btn.is-disabled{opacity:.55;pointer-events:none}.expert-request-table td{vertical-align:middle}
@media(max-width:900px){.expert-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.expert-admin-next{flex-direction:column}}
@media(max-width:560px){.expert-admin-grid{grid-template-columns:1fr}}

/* Premium Typography Manager */
body{font-family:var(--font,Arial,sans-serif);font-size:var(--base-size,16px);font-weight:var(--body-weight,400);line-height:var(--body-line-height,1.55)}
h1,h2,h3,h4,h5,h6{font-family:var(--heading-font,var(--font));font-weight:var(--heading-weight,800)!important}
h1{font-size:var(--h1-size,var(--heading-size,52px))!important}h2{font-size:var(--h2-size,40px)!important}h3{font-size:var(--h3-size,28px)!important}h4{font-size:var(--h4-size,22px)!important}h5{font-size:var(--h5-size,18px)!important}h6{font-size:var(--h6-size,16px)!important}
body p,body li,body label,body input,body select,body textarea{font-size:var(--base-size,16px)}
small,.small{font-size:var(--small-size,13px)}
.public-nav a,.sidebar-nav a,.sidebar-link,.nav-parent-link,.nav-child-link,.premium-header a{font-size:var(--nav-size,15px)}
.btn,button,input[type=submit],input[type=button]{font-size:var(--button-size,15px)}
/* v6.8.1 contrast-safe addon surfaces */
.font-preview-card{padding:18px;border:1px solid #d7e0e9;border-radius:16px;background:#f8fafc;color:#172537;box-shadow:inset 0 1px 0 rgba(255,255,255,.85)}
.font-preview-card small{color:#617286!important}
.font-preview-card h3{margin:.4rem 0;color:#172537!important;-webkit-text-fill-color:#172537!important}
.font-preview-card p{margin-bottom:0;color:#526579!important;-webkit-text-fill-color:#526579!important}
body[data-theme="dark"] .font-preview-card,html[data-theme="dark"] .font-preview-card{background:#101b28;color:#edf4fa;border-color:#34475a;box-shadow:none}
body[data-theme="dark"] .font-preview-card small,html[data-theme="dark"] .font-preview-card small{color:#aebdca!important;-webkit-text-fill-color:#aebdca!important}
body[data-theme="dark"] .font-preview-card h3,html[data-theme="dark"] .font-preview-card h3{color:#f4f8fb!important;-webkit-text-fill-color:#f4f8fb!important}
body[data-theme="dark"] .font-preview-card p,html[data-theme="dark"] .font-preview-card p{color:#bdcad6!important;-webkit-text-fill-color:#bdcad6!important}
.team-admin-row{display:grid;grid-template-columns:110px 1fr;gap:18px;align-items:start}.team-admin-photo img{width:100px;height:100px;object-fit:cover;border-radius:18px;border:1px solid #dfe6ee}
.record-center-page{--rc-text:#172537;--rc-muted:#5d6e80;--rc-card:#fff;--rc-card-hover:#f8fafc;--rc-border:#dbe3eb;--rc-notice-bg:#fff4e5;--rc-notice-border:#f1c98f;--rc-notice-text:#7a4311;color:var(--rc-text)}
.record-center-page .page-head h2,.record-center-page .page-head .eyebrow,.record-center-page .check-line,.record-center-page .field>label{color:var(--rc-text)!important;-webkit-text-fill-color:var(--rc-text)!important}
.record-center-page .page-head p,.record-center-page .field small{color:var(--rc-muted)!important;-webkit-text-fill-color:var(--rc-muted)!important}
.record-center-panel{border-color:#efc7c4!important;background:#fff9f8!important}
.record-center-notice{border:1px solid var(--rc-notice-border);background:var(--rc-notice-bg)!important;color:var(--rc-notice-text)!important;-webkit-text-fill-color:var(--rc-notice-text)!important}
.record-center-notice strong{color:var(--rc-notice-text)!important;-webkit-text-fill-color:var(--rc-notice-text)!important}
.record-center-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.record-center-card{display:flex;flex-direction:column;gap:9px;padding:18px;border:1px solid var(--rc-border);border-radius:16px;background:var(--rc-card);color:var(--rc-text);cursor:pointer;transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease,background .2s ease}
.record-center-card:hover{background:var(--rc-card-hover);border-color:#bcc9d6;box-shadow:0 12px 30px rgba(17,38,61,.09);transform:translateY(-1px)}
.record-center-card:has(input:checked){border-color:#c75a50;box-shadow:0 0 0 3px rgba(180,35,24,.1);background:#fff7f6}
.record-center-check{display:flex;gap:9px;align-items:center;color:var(--rc-text)!important;-webkit-text-fill-color:var(--rc-text)!important}
.record-center-check input{width:auto}
.record-center-card b,.record-center-card>strong{color:var(--rc-text)!important;-webkit-text-fill-color:var(--rc-text)!important}
.record-center-card>strong{font-size:1.2rem}
.record-center-card p{margin:0;font-size:.9rem;color:var(--rc-muted)!important;-webkit-text-fill-color:var(--rc-muted)!important}
body[data-theme="dark"] .record-center-page,html[data-theme="dark"] .record-center-page{--rc-text:#f0f5f9;--rc-muted:#adbdca;--rc-card:#192737;--rc-card-hover:#1f3042;--rc-border:#34475a;--rc-notice-bg:#3a2b17;--rc-notice-border:#6c4e25;--rc-notice-text:#ffd28a}
body[data-theme="dark"] .record-center-panel,html[data-theme="dark"] .record-center-panel{background:#151f2c!important;border-color:#55343a!important}
body[data-theme="dark"] .record-center-card:has(input:checked),html[data-theme="dark"] .record-center-card:has(input:checked){background:#342126;border-color:#b85d64;box-shadow:0 0 0 3px rgba(255,120,128,.1)}
body[data-theme="dark"] .record-center-page input[name="confirmation"],html[data-theme="dark"] .record-center-page input[name="confirmation"]{background:#101a26!important;color:#f0f5f9!important;border-color:#3a4e62!important;-webkit-text-fill-color:#f0f5f9!important}
body[data-theme="dark"] .record-center-page input[name="confirmation"]::placeholder,html[data-theme="dark"] .record-center-page input[name="confirmation"]::placeholder{color:#8295a8!important;-webkit-text-fill-color:#8295a8!important}
@media(max-width:900px){.record-center-grid{grid-template-columns:1fr}.team-admin-row{grid-template-columns:1fr}.team-admin-photo img{width:88px;height:88px}}


/* v6.9 workflow/UI stabilization */
.sidebar-brand{min-height:70px;display:flex;align-items:center;justify-content:flex-start;overflow:hidden;padding:8px 10px 16px}
.sidebar-brand.has-custom-logo{justify-content:center}
.sidebar-brand-logo-wrap{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;overflow:hidden}
.sidebar-brand-logo{display:block!important;width:auto!important;max-width:205px!important;height:auto!important;max-height:58px!important;object-fit:contain!important}
.sidebar-brand-title{min-width:0;max-width:165px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:800;line-height:1.15}
.sidebar.collapsed .sidebar-brand.has-custom-logo .sidebar-brand-logo{max-width:44px!important;max-height:44px!important}
.lead-intake-form .field{gap:5px}
.lead-intake-form .form-section{padding-top:18px;padding-bottom:18px}
.lead-intake-form textarea[data-address-field]{min-height:44px}
.lead-intake-form [data-field-detail]:empty{display:none!important}
.lead-intake-form .field-status-detail:empty{display:none!important}
.lead-intake-form .field.is-complete [data-field-detail]{display:none!important}
.next-step-panel{border:1px solid rgba(34,197,94,.28);background:linear-gradient(135deg,rgba(34,197,94,.08),rgba(255,255,255,.02))}
.next-step-panel .next-step-grid{display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.expiry-date-value{font-weight:700}.expiry-date-value.is-expired{color:#b42318}
@media(max-width:720px){.sidebar-brand-logo{max-width:170px!important}.next-step-panel .actions{width:100%}}

/* v6.8.1 HR selector and profile history refinement */
.employee-select-search{width:100%;margin-bottom:8px;min-height:42px;padding:0 12px;border:1px solid var(--border,#d7e0e8);border-radius:10px;background:var(--surface,#fff);color:var(--text,#182431)}.employee-select-search:focus{outline:0;border-color:var(--primary,#1769aa);box-shadow:0 0 0 3px rgba(23,105,170,.12)}.employee-select-search.no-results{border-color:#cf6672}.hr-profile-record-grid{align-items:start}.hr-profile-record-grid .panel{min-width:0}.hr-profile-record-grid table{width:100%}@media(max-width:900px){.hr-profile-record-grid{grid-template-columns:1fr!important}}
