/* 9.6.1 — dark workspace, centered sign-in and touch-friendly controls. */
@media screen {
:root,body[data-section]{color-scheme:dark;--ink:#fff;--muted:#c4ced8;--bg:#10161e;--card:#1b2531;--line:#354352;--nav:#121b25;--accent:#258577;--accent-soft:#233d3d;--shadow:0 12px 32px #0003}
body,.workspace{background:#10161e;color:#fff}
body{overflow-wrap:break-word}
.workspace{min-width:0}
#sidebar{background:#141e29;color:#fff;border-color:#354352;scrollbar-color:#637383 #141e29}
#sidebar .nav-label,#sidebar .nav-item,#sidebar .nav-item svg,#sidebar .side-note,#sidebar .side-note small,#sidebar .profile strong,#sidebar .profile small{color:#fff}
#sidebar .nav-item{min-height:48px;font-size:15px}
#sidebar .nav-item:hover,#sidebar .nav-item.active{background:#28665f;border-color:#4d968a;color:#fff}
#sidebar .nav-item .count{background:#3b5268;color:#fff}
#sidebar .side-note{background:#1b2836;border-color:#354352}
#profile{border-color:#354352}
.profile{flex-direction:column;text-align:center;gap:10px;padding:20px 8px}
.profile strong{display:block;font-size:20px;line-height:1.6;overflow-wrap:anywhere}
.profile small{display:block;font-size:14px;margin-top:4px}
.profile .profile-username{font-size:16px;direction:ltr;unicode-bidi:plaintext;font-weight:600!important}
.avatar{background:#304459;color:#fff;width:48px;height:48px;font-size:20px}
.topbar{background:#141e29;border-bottom:1px solid #354352}
.breadcrumb,.breadcrumb b,.breadcrumb span,.save-status,.header-tools .text-btn{color:#fff}
.panel,.stat,.project-card,.client-card,.client-profile,.project-profile,.profile-strip,.document-card,.custody-card,.ops-vault,.ops-item-card,.task-card,.studio-card,.hero,dialog,#editor{background:#1b2531;color:#fff;border-color:#354352;box-shadow:var(--shadow)}
.panel-head,.panel-pad,.toolbar,.modal-head,.modal-footer,.document-card-foot,.board-column,.detail-summary,.mini-metrics,.ops-summary,.ops-item-metrics,.document-total{background:#1b2531;color:#fff;border-color:#354352}
.board-column,.document-preview{background:#15202c}
.panel h2,.panel h3,.stat b,.stat strong,.stat-top,.page-head h1,.project-card h3,.client-card h3,.cell-name,.document-card strong,.detail-summary b,.form-section,.section-heading h2{color:#fff}
.muted,.small,.empty,.empty b,.page-note,.cell-sub,.stat p,.stat small,.panel p,.panel small,.chart-caption,.chart-keys,.attention-item small,.contact-line,.eyebrow,.hero p,.project-card p,.client-card p,footer{color:#d2dbe5}
input,select,textarea,.search input,.toolbar select{background:#111c28;color:#fff;border:1px solid #526578;min-height:46px;font-size:16px;max-width:100%}
input::placeholder,textarea::placeholder{color:#aebdcb;opacity:1}
input:focus,select:focus,textarea:focus{outline:2px solid #83d9c6;outline-offset:2px;border-color:#83d9c6}
input[type=checkbox],input[type=radio]{min-height:0;width:20px;height:20px;accent-color:#4db6a0}
input:-webkit-autofill{-webkit-text-fill-color:#fff;box-shadow:0 0 0 1000px #172637 inset;caret-color:#fff}
.field label,.field>small,.filters label,.date-filters label,.line-head{color:#fff}
.btn,.icon-btn,.text-btn,.row-actions button,.detail-tabs button,.file-type-bar button{min-height:44px}
.btn.secondary,.icon-btn,.text-btn,.detail-tabs button,.file-type-bar button,.period-bar,.period-bar button{background:#263748;color:#fff;border-color:#4a5c70}
body[data-section] .btn{color:#fff}
.text-btn:hover,.icon-btn:hover,.btn.secondary:hover{background:#344c60;color:#fff}
button:focus-visible,a:focus-visible{outline:3px solid #94e6d3;outline-offset:3px}
a{color:#b1efe1}
th,.table-wrap thead{background:#223242;color:#fff;border-color:#405266}
td{color:#fff;border-color:#354352}
tr:hover td{background:#253548}
.badge{color:#fff}
.detail-tabs{border-color:#354352}
.detail-tabs button.active,.file-type-bar button.active{background:#28665f;color:#fff}
.notice{background:#233d43;color:#fff;border-color:#53787c}
.form-error,#loginError,#recoveryMessage.form-error{color:#ffb5bb}
#permissionsPanel{overflow:hidden}
#permissionsPanel input{cursor:pointer}
#permissionsPanel td,#permissionsPanel th{white-space:normal}
.mobile-nav{background:#141e29;border-color:#405266}
.mobile-nav button,.mobile-nav button.active{color:#fff}
.mobile-nav button.active{background:#28665f;border-radius:10px}
/* A single centered form replaces the split-screen layout. */
#loginRoot{background:radial-gradient(ellipse at top,#243c48 0%,#111922 65%);color:#fff;min-height:100vh;min-height:100svh}
#loginRoot .login-page{display:block;min-height:100vh;min-height:100svh;background:transparent}
#loginRoot .login-art{display:none}
#loginRoot .login-form-wrap{min-height:100vh;min-height:100svh;padding:40px 24px;display:flex;align-items:center;justify-content:center}
#loginRoot .login-form{max-width:560px;width:100%;margin:auto;padding:38px 40px;background:#1b2734;border:1px solid #455867;border-radius:24px;box-shadow:0 24px 70px #0005;text-align:center}
.login-brand{display:flex;justify-content:center;margin:0 auto 22px}
.login-brand img{display:block;width:170px;max-width:58%;height:auto;max-height:125px;object-fit:contain;border-radius:14px}
#loginRoot .login-form h1{font-size:32px;color:#fff;margin:12px 0}
#loginRoot .login-form>p,#loginRoot .eyebrow,#loginRoot .login-foot{color:#e1e8ef;font-size:14px;line-height:1.9}
#loginRoot .eyebrow{font-size:12px;letter-spacing:2px}
#loginRoot .field{margin:24px 0;text-align:center}
#loginRoot .field label{display:block;font-size:17px;color:#fff;margin-bottom:10px}
#loginRoot .field input{width:100%;min-height:60px;padding:16px 18px;font-size:20px;text-align:center;border-radius:12px;background:#111d2a;color:#fff}
#loginRoot .login-form .btn{min-height:56px;font-size:17px;border-radius:12px;width:100%}
#loginRoot .login-form .text-btn{font-size:15px;width:100%;margin:8px 0}
#loginRoot .login-form a{color:#fff;text-decoration:underline;text-underline-offset:4px}
#loginRoot .login-form .login-foot{font-size:12px;margin:22px 0 12px}
#field_username,#field_display_name{min-height:54px;font-size:18px;text-align:center}
#editor{max-width:calc(100vw - 24px);max-height:90vh;max-height:90dvh}
#editor::backdrop{background:#02070dbb}
@media(max-width:850px){
 #sidebar{width:min(310px,88vw);height:100vh;height:100dvh;overflow-y:auto;padding-bottom:calc(24px + env(safe-area-inset-bottom))}
 .mobile-close{min-width:44px;min-height:44px}
 .topbar{height:auto;min-height:64px;flex-wrap:wrap;padding:12px 14px;gap:8px}
 .header-tools{margin-inline-start:auto;flex-wrap:wrap;justify-content:flex-end;max-width:100%}
 .topbar .breadcrumb{max-width:none;font-size:12px}
 #main{padding:22px 14px 100px}
 .mobile-nav{padding-bottom:env(safe-area-inset-bottom);overflow-x:auto}
 .mobile-nav button{min-width:62px;min-height:56px;font-size:11px}
 .table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
 .form-grid{grid-template-columns:1fr;gap:18px}
 .modal-footer{flex-wrap:wrap;padding-bottom:calc(16px + env(safe-area-inset-bottom))}
 .modal-footer .btn{flex:1}
}
@media(max-width:520px){
 #loginRoot .login-form-wrap{padding:24px 14px;align-items:center}
 #loginRoot .login-form{padding:28px 20px;border-radius:20px}
 #loginRoot .login-form h1{font-size:28px}
 #loginRoot .field input{min-height:58px;font-size:18px}
 #loginRoot .field label{font-size:16px}
 .login-brand img{width:145px;max-height:105px}
 .profile strong{font-size:21px}
 .header-tools .save-status{flex-basis:100%;text-align:end;max-width:none}
 .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .stat{min-width:0}
 .stat b{font-size:22px;overflow-wrap:anywhere}
 .page-head .actions{flex-wrap:wrap}
 #permissionsPanel{padding:12px}
 #permissionsPanel table{min-width:420px}
}
@media(max-height:700px){#loginRoot .login-form-wrap{align-items:flex-start;padding-top:24px;padding-bottom:24px}}
}
@media screen{
.login-brand img{background:#f2a400;padding:8px;border-radius:16px;width:190px;max-height:140px;max-width:65%}
.today-focus,.today-card,.social-day,.social-day.muted,.social-post,.social-plan-card,.boq-reference-card,.contract-document-text,.ops-vault,.ops-summary,.period-bar,.custody-body{background:#1b2531;color:#fff;border-color:#405266}
.today-head h2,.today-head h2 span,.today-head p,.today-card-top>span,.today-card-top svg,.today-card-meta,.today-card-link,.today-footnote,.boq-meta small,.boq-meta strong{color:#fff}
.today-card-top>b,.today-card.amber .today-card-top>b,.today-card.red .today-card-top>b,.today-card.blue .today-card-top>b,.today-card.green .today-card-top>b{background:#304859;color:#fff}
.today-card-link{border-color:#405266}
.today-card:hover{background:#273848;border-color:#63808b}
.today-quick-actions .btn{color:#fff;background:#28665f}
#content svg text{fill:#e0e9f0}
#content svg line{stroke:#536879}
@media(max-width:520px){.login-brand img{width:160px;max-height:115px}}
}
