/* OSTOR premium screen theme. Document canvases and printing keep their own styles. */
:root{
 --ostor-premium-navy:#091f40;
 --ostor-premium-blue:#15365e;
 --ostor-premium-gold:#dbc89e;
 --ostor-premium-line:#dde4ed;
 --ostor-premium-muted:#6b788a;
}
@media screen{
 body.ostor-uniform-page{background:#f4f6f9!important}
 .ostor-uniform-page .ostor-shared-sidebar{background:#f7f9fc;border-right-color:#dde4ed}
 .ostor-uniform-page .ostor-shared-nav-link{font-weight:500;transition:background .16s,color .16s}
 .ostor-uniform-page .ostor-shared-nav-link.active{background:#e7edf5;color:#102e55}
 .ostor-uniform-page .ostor-shared-nav-link:focus-visible{outline:2px solid #a88a49;outline-offset:2px}
 .ostor-uniform-page .ostor-shared-workspace-chip{border-color:#dde4ed;box-shadow:none}
 .ostor-uniform-page:not(.ostor-dashboard-page) .ostor-shared-topbar{background:linear-gradient(115deg,#091f40,#15365e);border-bottom:1px solid #304967;box-shadow:0 4px 12px rgba(7,31,74,.06)}
 .ostor-uniform-page:not(.ostor-dashboard-page) .ostor-shared-module-copy strong,
 .ostor-uniform-page:not(.ostor-dashboard-page) .ostor-shared-user-chip strong{color:#fff;font-weight:500}
 .ostor-uniform-page:not(.ostor-dashboard-page) .ostor-shared-module-copy span{color:#d1dce9}
 .ostor-uniform-page:not(.ostor-dashboard-page) .ostor-shared-user-chip span{color:#dbc89e}
 .ostor-uniform-page:not(.ostor-dashboard-page) .ostor-shared-user-chip{border-left-color:rgba(255,255,255,.18)}
 .ostor-uniform-page:not(.ostor-dashboard-page) .ostor-shared-actions :is(.btn,button,a){background:#fff;color:#15365e;border:1px solid #dae2ed;box-shadow:none;font-weight:500}
 /* Working panels only: avoid report pages, invoice previews and spreadsheet cells. */
 .ostor-uniform-page .ostor-shared-content :is(.invoice-panel,.afs-panel,.wb-create-panel,.wb-register-panel,.pc-card,.pc-context-card,.pc-actions-card,.workspace-card,.tax-review-panel,.comparative-review-panel,.home-create-panel,.home-register-panel,.resolution-card,.asset-funding-card,.liability-story-card){border:1px solid #dde4ed!important;border-radius:14px!important;background:#fff!important;box-shadow:0 3px 10px rgba(7,31,74,.035)!important}
 .ostor-uniform-page .ostor-shared-content :is(.wb-card,.metric-card,.dashboard-organiser-card){border-color:#dde4ed!important;border-radius:14px!important;background:#fff!important;box-shadow:0 3px 10px rgba(7,31,74,.035)!important}
 .ostor-uniform-page .ostor-shared-content :is(.hero,.hero-card,.wb-intro,.afs-file-hero){background:linear-gradient(115deg,#091f40,#15365e)!important;color:#fff!important;border:1px solid #183661!important;border-radius:18px!important;box-shadow:0 8px 24px rgba(7,31,74,.10)!important}
 .ostor-uniform-page .ostor-shared-content :is(.hero,.hero-card,.wb-intro,.afs-file-hero) :is(h1,h2,h3,strong){color:#fff!important}
 .ostor-uniform-page .ostor-shared-content :is(.hero,.hero-card,.wb-intro,.afs-file-hero) :is(p,.lead,.muted,.local-note){color:#d1dce9!important}
 .ostor-uniform-page .ostor-shared-content :is(.hero,.hero-card,.wb-intro,.afs-file-hero) :is(.eyebrow,.hero-kicker,.wb-eyebrow,.hero-note){color:#dbc89e!important}
 .ostor-uniform-page .ostor-shared-content :is(.hero,.hero-card,.wb-intro,.afs-file-hero) :is(input,select){background:#fff;color:#102e55;border-color:#d2dce9}
 .ostor-uniform-page .ostor-shared-content :is(.hero,.hero-card,.wb-intro,.afs-file-hero) .btn{background:#fff;color:#15365e;border-color:#fff}
 .ostor-uniform-page .ostor-shared-content :is(.afs-panel-head,.wb-panel-head,.panel-heading-row,.pc-section-head,.pc-card-head,.pc-workspace-head){border-bottom-color:#e7ecf3}
 .ostor-uniform-page .ostor-shared-content :is(.afs-btn,.wb-button,.btn,.hero-primary,.hero-secondary){border-radius:9px;font-weight:500;box-shadow:none}
 .ostor-uniform-page .ostor-shared-content :is(.afs-btn.primary,.wb-button.primary,.btn.primary,.hero-primary){background:#15365e!important;color:#fff!important;border-color:#15365e!important}
 .ostor-uniform-page .ostor-shared-content :is(.afs-btn.primary,.wb-button.primary,.btn.primary,.hero-primary):hover{background:#214a78!important;border-color:#214a78!important}
 .ostor-uniform-page .ostor-shared-content :is(.afs-form,.wb-create-form,.home-create-form,.invoice-panel,.payroll-shell,.settings-form,.field,.form-row) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea){border-color:#cdd7e4;border-radius:8px;box-shadow:none;background:#fff;color:#102e55}
 .ostor-uniform-page .ostor-shared-content :is(input,select,textarea):focus-visible{outline:2px solid #b49a62;outline-offset:2px}
 .ostor-uniform-page .ostor-shared-content :is(.afs-table,.home-register-table table) th{background:#f3f6fa;color:#395372;font-weight:500;border-bottom-color:#dde4ed}
 .ostor-uniform-page .ostor-shared-content :is(.afs-table,.home-register-table table) td{border-bottom-color:#e8edf4}
 .ostor-uniform-page .ostor-shared-content :is(.afs-client-summary,.wb-client-summary){background:#f7f9fc;border-color:#dde4ed}
 .ostor-uniform-page .ostor-shared-content :is(.afs-btn,.wb-button,.btn,button):focus-visible{outline:2px solid #a88a49;outline-offset:3px}
 /* Authentication screens follow the same palette. */
 body.ostor-auth-page{background:radial-gradient(ellipse at top,#e8edf5,transparent 60%),#f4f6f9;color:#102e55}
 .ostor-auth-page .auth-card{border:1px solid #dde4ed;border-top:3px solid #b49a62;border-radius:18px;background:#fff;box-shadow:0 12px 35px rgba(7,31,74,.09)}
 .ostor-auth-page .auth-brand{color:#102e55;font-weight:600;letter-spacing:-.03em}
 .ostor-auth-page .auth-subtitle{color:#6b788a}
 .ostor-auth-page :is(input,select){border:1px solid #cdd7e4;border-radius:8px;color:#102e55;background:#fff}
 .ostor-auth-page label{font-weight:500;color:#395372}
 .ostor-auth-page .btn{background:#15365e;border-radius:9px;font-weight:500;box-shadow:none}
 .ostor-auth-page .btn:hover{background:#214a78}
 .ostor-auth-page a{color:#315785}
 .ostor-auth-page :is(input,select,button,a):focus-visible{outline:2px solid #b49a62;outline-offset:3px}
}
@media(prefers-reduced-motion:reduce){.ostor-uniform-page .ostor-shared-nav-link{transition:none}}

/* Invoicing uses a legacy two-column hero; align its single title block with the dashboard. */
@media screen{
 .ostor-billing-page .ostor-shared-content .hero{margin:20px 24px 22px;padding:28px 30px 23px!important}
 .ostor-billing-page .ostor-shared-content .hero::after{content:none!important}
 .ostor-billing-page .ostor-shared-content .hero .hero-grid{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
 .ostor-billing-page .ostor-shared-content .hero .eyebrow{font-size:11px!important;line-height:1.4;letter-spacing:.055em;margin:0 0 12px!important;font-weight:500}
 .ostor-billing-page .ostor-shared-content .hero h1{font-size:32px!important;line-height:1.2!important;font-weight:600!important;letter-spacing:-.035em;max-width:none!important;margin:0 0 10px!important}
 .ostor-billing-page .ostor-shared-content .hero .lead{font-size:13px!important;line-height:1.6!important;max-width:700px;margin:0!important}
 .ostor-billing-page .ostor-shared-content .hero .hero-actions{margin-top:18px!important;gap:9px!important}
 .ostor-billing-page .ostor-shared-content .hero .hero-actions .btn{width:auto!important;min-height:34px;padding:8px 14px!important;border-radius:9px!important;font-size:12px!important}
 .ostor-billing-page .ostor-shared-content .hero .hero-actions .btn.primary{background:#fff!important;color:#15365e!important;border-color:#fff!important}
 .ostor-billing-page .ostor-shared-content .hero .hero-actions .btn:not(.primary){background:transparent!important;color:#fff!important;border-color:rgba(255,255,255,.38)!important}
 .ostor-billing-page .ostor-shared-content .hero .local-note{display:none}
}
@media screen and (max-width:720px){
 .ostor-billing-page .ostor-shared-content .hero{margin:16px;padding:23px!important}
 .ostor-billing-page .ostor-shared-content .hero h1{font-size:27px!important}
}

/* Keep invoice section headings on the same content line as the welcome panel. */
@media screen{
 .ostor-billing-page .ostor-shared-content .billing-workbench>.section>.container{width:auto!important;max-width:none!important;margin-left:24px!important;margin-right:24px!important;padding-left:30px!important;padding-right:30px!important;box-sizing:border-box}
 .ostor-billing-page .ostor-shared-content .section-head{align-items:center;flex-wrap:wrap;gap:12px}
}
@media screen and (max-width:720px){
 .ostor-billing-page .ostor-shared-content .billing-workbench>.section>.container{margin-left:16px!important;margin-right:16px!important;padding-left:23px!important;padding-right:23px!important}
}

/* Payroll context selectors need full, readable columns rather than a compressed right rail. */
@media screen{
 body.imat-payroll-host .imat-payroll-shell-host.imat-payroll-dashboard .hero-card{display:block!important;min-height:0!important}
 body.imat-payroll-host .imat-payroll-shell-host.imat-payroll-dashboard .hero-copy{width:100%!important;max-width:none!important;margin-bottom:16px!important}
 body.imat-payroll-host .imat-payroll-shell-host.imat-payroll-dashboard :is(.hero-controls,.pc-live-controls){display:grid!important;grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important;width:100%!important;max-width:none!important;min-width:0!important;gap:12px!important;align-items:end!important;flex:none!important}
 body.imat-payroll-host .imat-payroll-shell-host.imat-payroll-dashboard :is(.pc-context-controls,.pc-workspace-controls){width:100%!important;max-width:none!important;min-width:0!important}
 body.imat-payroll-host .imat-payroll-shell-host.imat-payroll-dashboard :is(.hero-controls,.pc-live-controls)>label{display:flex!important;flex-direction:column!important;min-width:0!important;gap:6px!important;font-size:11px!important;font-weight:500!important;line-height:1.4!important;white-space:nowrap!important}
 body.imat-payroll-host .imat-payroll-shell-host.imat-payroll-dashboard :is(.hero-controls,.pc-live-controls) :is(input,select){width:100%!important;max-width:100%!important;min-width:0!important;height:38px!important;min-height:38px!important;font-size:12px!important;line-height:normal!important;box-sizing:border-box!important}
 body.imat-payroll-host .imat-payroll-shell-host.imat-payroll-dashboard :is(.hero-controls,.pc-live-controls)>label> :is(input,select){padding:7px 10px!important}
 body.imat-payroll-host .imat-payroll-shell-host.imat-payroll-dashboard :is(.hero-controls,.pc-live-controls) input[type=month]{min-width:170px!important}
}
@media screen and (max-width:500px){
 body.imat-payroll-host .imat-payroll-shell-host.imat-payroll-dashboard :is(.hero-controls,.pc-live-controls){grid-template-columns:1fr!important}
}

