:root{--portal-shell-max-width:1120px;--portal-shell-gutter:32px;--portal-header-padding:24px 36px;--portal-radius:20px;--app-shell-max-width:var(--portal-shell-max-width);--system-max:var(--portal-shell-max-width)}
.system-shell{width:min(calc(100% - var(--portal-shell-gutter)),var(--portal-shell-max-width));margin:0 auto;padding:32px 0 54px}
.system-card{overflow:hidden;border-radius:var(--portal-radius);background:var(--web-surface,#fff);box-shadow:0 18px 55px rgba(0,0,0,.1)}
.dashboard-page,.settings-page{min-height:100vh;background:var(--web-background,#f2f2f2)}
.dashboard-card{max-width:none;margin:6vh auto 0}
.dashboard-header{display:flex;align-items:center;gap:34px;padding:38px 42px;border-bottom:1px solid #ececec}
.dashboard-header img{width:230px;height:112px;object-fit:contain}
.dashboard-header p{margin:0 0 8px;color:var(--orange);font-size:11px;font-weight:700;letter-spacing:.14em}
.dashboard-header h1{margin:0;color:var(--ink);font-size:34px;letter-spacing:-.02em}
.dashboard-header span{display:block;margin-top:8px;color:var(--muted);font-size:14px;line-height:1.5}
.dashboard-card>.dashboard-header .desktop-user-trigger{margin:0}.dashboard-card>.dashboard-header .desktop-user-avatar{display:grid;margin:0;color:#37854d;font-size:12px;line-height:1}.dashboard-card>.dashboard-header .desktop-user-identity{display:grid;gap:3px;margin:0}.dashboard-card>.dashboard-header .desktop-user-identity strong,.dashboard-card>.dashboard-header .desktop-user-identity small{display:block;line-height:1.2}.dashboard-card>.dashboard-header .desktop-user-identity strong{margin:0;color:var(--ink);font-size:13px}.dashboard-card>.dashboard-header .desktop-user-identity small{margin:0;color:var(--muted);font-size:11px}.dashboard-card>.dashboard-header .desktop-user-chevron{display:block;margin:0 0 0 4px;color:var(--muted);font-size:16px;line-height:1}
.dashboard-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:30px 34px 36px}
.dashboard-action{display:flex;min-width:0;align-items:center;gap:16px;padding:22px;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--ink);font:inherit;text-align:left;text-decoration:none;cursor:pointer;transition:border-color .15s,transform .15s,box-shadow .15s}
.dashboard-action:hover,.dashboard-action:focus-visible{border-color:var(--orange);box-shadow:0 9px 24px rgba(0,0,0,.08);transform:translateY(-1px);outline:none}
.dashboard-number{display:grid;flex:0 0 46px;width:46px;height:46px;place-items:center;border-radius:50%;background:var(--orange-soft);color:var(--orange);font-size:13px;font-weight:800}
.dashboard-action strong{display:block;font-size:17px}
.dashboard-action small{display:block;margin-top:5px;color:var(--muted);font-size:12px;line-height:1.35}
.dashboard-action{background:var(--web-surface,#fff)}
.dashboard-content{padding:0 34px 34px}.dashboard-section{min-width:0;padding:24px 0;border-bottom:1px solid #ececec}.dashboard-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:14px;margin-bottom:13px}.dashboard-section-heading h2{margin:0;font-size:18px;letter-spacing:-.01em}.dashboard-section-heading a,.dashboard-section-heading>span{color:var(--orange-dark);font-size:12px;font-weight:700;text-decoration:none}.dashboard-quick-section{padding-top:22px}.dashboard-quick-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.dashboard-quick-links a{display:flex;align-items:center;gap:10px;min-width:0;padding:13px 15px;border:1px solid var(--line);border-radius:10px;background:var(--web-surface,#fff);color:var(--ink);text-decoration:none}.dashboard-quick-links a:hover,.dashboard-quick-links a:focus-visible,.dashboard-project-row:hover,.dashboard-project-row:focus-visible,.dashboard-request-row:hover,.dashboard-request-row:focus-visible{border-color:var(--orange);outline:none}.dashboard-quick-links span{display:grid;flex:0 0 28px;width:28px;height:28px;place-items:center;border-radius:8px;background:var(--orange-soft);color:var(--orange);font-size:19px}.dashboard-quick-links strong{font-size:13px;overflow-wrap:anywhere}.dashboard-activity-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 26px}.dashboard-project-list,.dashboard-time-list,.dashboard-request-list{display:grid;gap:7px}.dashboard-project-row,.dashboard-time-row,.dashboard-request-row{display:flex;align-items:center;justify-content:space-between;min-width:0;gap:14px;padding:11px 12px;border:1px solid var(--line);border-radius:9px;background:var(--web-surface,#fff);color:var(--ink);text-decoration:none}.dashboard-project-row>span,.dashboard-time-row>span,.dashboard-request-row>span{min-width:0}.dashboard-project-row strong,.dashboard-time-row strong,.dashboard-request-row strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.dashboard-project-row small,.dashboard-time-row small,.dashboard-request-row small{display:block;margin-top:3px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.dashboard-project-row>b,.dashboard-time-row>b,.dashboard-request-row>b{flex:0 0 auto;color:var(--orange-dark);font-size:13px;text-align:right}.dashboard-project-row>b small{font-weight:500}.dashboard-time-row b{color:var(--ink)}.dashboard-request-row small{max-width:28ch}.dashboard-empty{margin:0;padding:17px 12px;border:1px dashed var(--line);border-radius:9px;color:var(--muted);font-size:13px}.dashboard-features-section{border-bottom:0;padding-bottom:0}.dashboard-feature-links{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.dashboard-feature-links a{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 11px;border:1px solid var(--line);border-radius:8px;color:var(--muted);font-size:12px;font-weight:700;text-decoration:none}.dashboard-feature-links a:hover,.dashboard-feature-links a:focus-visible{border-color:var(--orange);color:var(--orange-dark);outline:none}.dashboard-feature-links span{color:var(--orange)}
.dashboard-document-list{display:grid;gap:7px}.dashboard-document-row{display:flex;align-items:center;justify-content:space-between;min-width:0;gap:14px;padding:11px 12px;border:1px solid var(--line);border-radius:9px;background:var(--web-surface,#fff);color:var(--ink);text-decoration:none}.dashboard-document-row .dashboard-row-main{min-width:0}.dashboard-document-row strong,.dashboard-document-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-document-row strong{font-size:14px}.dashboard-document-row small{margin-top:3px;color:var(--muted);font-size:12px}.dashboard-document-row>b{flex:0 0 auto;color:var(--orange-dark);font-size:13px;text-align:right}.dashboard-document-row:hover,.dashboard-document-row:focus-visible{border-color:var(--orange);outline:none}
.dashboard-document-list{gap:0;border-top:1px solid #edf1ed}.dashboard-document-row{border:0;border-bottom:1px solid #edf1ed;border-radius:0;background:transparent;padding:11px 4px}.dashboard-document-row:hover,.dashboard-document-row:focus-visible{background:#f8fcf9;border-color:#edf1ed}
.dashboard-time-meta{display:grid;flex:0 0 auto;justify-items:end;gap:3px;text-align:right}.dashboard-time-meta b{color:var(--ink);font-size:13px;white-space:nowrap}.dashboard-time-meta small{margin:0;color:var(--muted);font-size:11px;white-space:nowrap}
.dashboard-time-scope{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:7px;overflow:hidden}.dashboard-time-scope a{padding:5px 8px;border-right:1px solid var(--line);color:var(--muted);font-size:11px;font-weight:700;text-decoration:none;white-space:nowrap}.dashboard-time-scope a:last-child{border-right:0}.dashboard-time-scope a:hover,.dashboard-time-scope a:focus-visible{background:var(--orange-soft);color:var(--orange);outline:none}.dashboard-time-scope a.is-active{background:var(--orange-soft);color:var(--orange)}
.back-link{display:inline-flex;align-items:center;margin:0 0 14px;padding:9px 12px;border-radius:8px;color:var(--orange);font-size:14px;font-weight:700;text-decoration:none}
.back-link:hover{background:var(--orange-soft)}
 .page-header .page-header-system-name{margin:0 0 5px;color:var(--orange);font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}.page-header .page-header-subtitle{display:block;margin-top:7px;color:var(--muted);font-size:13px;line-height:1.45}.page-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;min-width:0}.settings-page-header{min-height:134px}.project-page-header .page-header-actions{flex-wrap:wrap}.project-page-header .project-status-badge{white-space:nowrap}
.settings-tabs{display:flex;gap:8px;padding:14px 36px;border-bottom:1px solid #ececec;overflow-x:auto;background:#fff}
.settings-tab{min-height:42px;padding:10px 16px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--muted);font:inherit;font-weight:700;white-space:nowrap;cursor:pointer}
.settings-tab:hover{color:var(--orange);background:var(--orange-soft)}
.settings-tab.is-active{border-color:var(--orange);background:var(--orange-soft);color:var(--orange-dark)}
.settings-form{padding:0 36px 34px}
.settings-section{padding:28px 0;border-bottom:1px solid #ececec}
.settings-section-heading{display:flex;align-items:flex-start;gap:14px;margin-bottom:20px}
.settings-section-heading>span{display:grid;flex:0 0 38px;width:38px;height:38px;place-items:center;border-radius:50%;background:var(--orange);color:#fff;font-size:12px;font-weight:800}
.settings-section-heading h2{margin:0 0 4px;font-size:21px}
.settings-section-heading p{margin:0;color:var(--muted);font-size:13px;line-height:1.4}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.settings-grid>label{align-self:start;min-width:0}
.settings-grid input:not([type="checkbox"]),.settings-grid select{width:100%;min-width:0;height:48px;box-sizing:border-box;margin-top:0;padding:12px 13px;border:1px solid #ccc;border-radius:8px;background:#fff;color:var(--ink);font:inherit}
.settings-grid textarea{width:100%;min-width:0;box-sizing:border-box;margin-top:0;padding:12px 13px;border:1px solid #ccc;border-radius:8px;background:#fff;color:var(--ink);font:inherit;line-height:1.5;min-height:110px;resize:vertical}
.settings-grid .wide{grid-column:1/-1}
.settings-form select{width:100%;margin-top:8px;padding:12px 36px 12px 13px;border:1px solid #ccc;border-radius:8px;background:#fff;color:var(--ink);font:inherit}.settings-form .settings-grid select{margin-top:0}
.logo-settings{display:grid;grid-template-columns:260px 1fr;gap:24px;align-items:center}
.logo-preview{display:grid;min-height:130px;place-items:center;padding:14px;border:1px solid var(--line);border-radius:12px;background:#fafafa}
.logo-preview img{max-width:100%;max-height:112px;object-fit:contain}
.logo-actions{display:flex;flex-wrap:wrap;gap:12px}
form.backup-actions{margin:0;padding:0}
.admin-backup-card>.backup-actions{margin-top:22px}
.file-button,.outline-button,.danger-button{display:inline-flex;min-height:44px;align-items:center;justify-content:center;padding:11px 16px;border:1px solid var(--orange);border-radius:9px;background:#fff;color:var(--orange);font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.file-button input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.danger-button{border-color:#b42318;color:#b42318}
.color-studio-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.color-studio-group{display:grid;gap:12px}.color-studio-group h3{margin:0;color:var(--orange);font-size:15px}.color-card{display:flex;min-height:132px;flex-direction:column;padding:15px;border:1px solid var(--line);border-radius:12px;background:#fff}.color-card>strong{display:block;margin-bottom:11px;font-size:14px}.color-editor{display:grid;grid-template-columns:48px minmax(0,1fr);grid-template-rows:42px 42px;gap:9px;align-items:center}.color-picker{width:48px!important;height:42px!important;margin:0!important;padding:3px!important;border:1px solid var(--line)!important;border-radius:8px!important;background:#fff;cursor:pointer}.color-hex{width:100%;height:42px;margin:0!important;padding:10px!important}.color-reset{grid-column:1/-1;width:100%;height:42px;padding:9px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--muted);font:inherit;font-size:11px;font-weight:700;cursor:pointer}.color-reset:hover{border-color:var(--orange);color:var(--orange)}.color-reset-bar{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}.color-reset-bar .outline-button{font-size:12px}.design-preview{margin-top:26px;padding:18px;border:1px solid var(--line);border-radius:14px;background:#fafafa}.design-preview h3{margin:0 0 3px;font-size:16px}.design-preview p{margin:0;color:var(--muted);font-size:12px}.design-preview-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}.preview-web-card,.preview-document{padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--preview-web-card,#fff);color:var(--preview-web-text,#222)}.preview-web-card button{padding:9px 13px;border:0;border-radius:7px;background:var(--preview-web-accent,#F07E00);color:#fff;font-weight:700}.preview-web-card input{display:block;width:100%;margin:12px 0;padding:9px;border:1px solid var(--line);border-radius:7px;background:var(--preview-web-bg,#f2f2f2);color:var(--preview-web-text,#222)}.preview-info{padding:10px;border-radius:7px;background:var(--preview-web-bg,#f2f2f2);font-size:12px}.preview-document{background:var(--preview-doc-secondary,#FFF6EC);color:var(--preview-doc-text,#222)}.preview-document-header{display:flex;justify-content:space-between;gap:10px;color:var(--preview-doc-accent,#F07E00);font-size:13px}.preview-document-line{height:2px;margin:12px 0;background:var(--preview-doc-accent,#F07E00)}.preview-document-box{padding:14px;border-radius:7px;background:var(--preview-doc-secondary,#FFF6EC);border:1px solid var(--preview-doc-accent,#F07E00);font-size:12px}
.setting-check{display:flex!important;min-height:48px;align-items:center;gap:11px;padding:12px 14px;border:1px solid var(--line);border-radius:9px;background:var(--panel);cursor:pointer}
.setting-check input{flex:0 0 21px;width:21px;height:21px;min-width:21px;margin:0;accent-color:var(--orange)}
.text-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.text-settings-grid textarea{min-height:130px}
.section-toggle-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.settings-hint{margin:16px 0 0;color:var(--muted);font-size:13px}
.settings-save-bar{position:static;display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 -36px -34px;padding:18px 36px;border-top:1px solid #e5e5e5;background:rgba(255,255,255,.96)}
 .app-version{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:18px 0 12px;color:#929292;font-size:12px;line-height:1.4}
.settings-save-bar p{margin:0;color:var(--muted);font-size:13px}
.settings-save-bar p.success{color:#286532}
.settings-save-bar p.error{color:#a42a2a}
.settings-save-bar button{min-width:180px;padding:14px 24px;border:0;border-radius:9px;background:var(--orange);color:#fff;font-weight:700;cursor:pointer}
.settings-save-bar button:disabled{opacity:.55;cursor:wait}
.admin-lock-button{display:inline-grid;width:30px;height:30px;place-items:center;margin:0 0 4px;padding:0;border:0;border-radius:7px;background:transparent;color:#9a9a9a;font-size:14px;cursor:pointer;opacity:.62}.admin-lock-button:hover,.admin-lock-button:focus-visible{background:var(--orange-soft);color:var(--orange);opacity:1;outline:none}
.admin-panel{padding-bottom:32px}.admin-module-card{padding:20px;border:1px solid var(--line);border-radius:14px;background:#fafafa}.admin-module-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}.admin-module-heading h3{margin:0 0 5px;font-size:17px}.admin-module-heading p{margin:0;color:var(--muted);font-size:13px;line-height:1.45}.admin-engine-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:14px}.admin-engine-choice{display:flex;min-width:0;align-items:flex-start;gap:10px;padding:14px;border:1px solid var(--line);border-radius:10px;background:#fff;cursor:pointer}.admin-engine-choice:has(input:checked){border-color:var(--orange);background:var(--orange-soft)}.admin-engine-choice input{width:19px!important;height:19px!important;min-width:19px;margin:1px 0 0!important;accent-color:var(--orange)}.admin-engine-choice strong,.admin-engine-choice small{display:block}.admin-engine-choice strong{font-size:13px}.admin-engine-choice small{margin-top:4px;color:var(--muted);font-size:11px;line-height:1.35}.admin-browserless-toggle{margin-bottom:16px;background:#fff}.admin-browserless-fields .settings-hint{display:block;margin:6px 0 0;font-size:11px}.admin-module-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}.admin-module-actions>button{min-height:44px;padding:11px 16px;border:0;border-radius:9px;background:var(--orange);color:#fff;font:inherit;font-size:13px;font-weight:700;cursor:pointer}.admin-test-result{display:grid;gap:8px;margin-top:18px;padding:14px 16px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font-size:13px;line-height:1.45}.admin-test-result.is-success{border-color:#82c995;background:#f1fbf3}.admin-test-result.is-error{border-color:#e1a1a1;background:#fff7f7}.admin-test-result strong{font-size:14px}.admin-test-details{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.admin-test-details span{display:block;color:var(--muted);font-size:11px}.admin-test-details b{display:block;margin-top:2px;overflow-wrap:anywhere;font-size:12px}

.admin-browserless-test{margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}.admin-browserless-test h4{margin:0 0 5px;font-size:14px}.admin-browserless-test>p{margin:0 0 12px;color:var(--muted);font-size:12px;line-height:1.45}.admin-browserless-test>button{min-height:44px;margin-top:12px}.admin-test-body{max-height:220px;margin:2px 0 0;padding:10px;overflow:auto;border-radius:7px;background:#202124;color:#f4f4f4;font:11px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}.admin-test-result details summary{cursor:pointer;font-weight:700}@media(max-width:700px){.admin-test-details{grid-template-columns:1fr}.admin-browserless-test input{max-width:100%}}
.document-pdf-error{flex:1 0 100%;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;padding:12px 14px;border:1px solid #d9a1a1;border-radius:10px;background:#fff7f7;color:#7f1d1d}.document-pdf-error p{margin:0;font-size:13px;font-weight:700}.document-pdf-error>div{display:flex;flex-wrap:wrap;gap:8px}.document-pdf-error button{min-height:40px}@media(max-width:600px){.document-pdf-error{align-items:stretch;flex-direction:column}.document-pdf-error>div{display:grid;grid-template-columns:1fr 1fr}.document-pdf-error button{min-height:44px}}
.document-pdf-share{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:1 0 100%;margin-top:10px;padding:10px 14px;border:1px solid var(--line);border-radius:10px;background:var(--orange-soft);color:var(--ink)}.document-pdf-share p{margin:0;font-size:13px;font-weight:700;overflow-wrap:anywhere}.document-pdf-share button{min-height:40px;white-space:nowrap}@media(max-width:600px){.document-pdf-share{align-items:stretch;flex-direction:column}.document-pdf-share button{width:100%;min-height:44px}}
.admin-dialog[hidden]{display:none}.admin-dialog{position:fixed;z-index:100;inset:0;display:grid;place-items:center;padding:20px;background:rgba(20,20,20,.46)}.admin-dialog-card{position:relative;width:min(100%,440px);padding:28px;border:1px solid rgba(255,255,255,.45);border-radius:16px;background:#fff;box-shadow:0 20px 65px rgba(0,0,0,.28)}.admin-dialog-card>p{margin:0 0 7px;color:var(--orange);font-size:11px;font-weight:800;letter-spacing:.13em}.admin-dialog-card h2{margin:0;font-size:24px}.admin-dialog-card>span{display:block;margin:8px 0 22px;color:var(--muted);font-size:13px;line-height:1.45}.admin-dialog-card label{display:block}.admin-dialog-card label input{box-sizing:border-box}.admin-dialog-close{position:absolute;top:11px;right:14px;width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:24px;line-height:1;cursor:pointer}.admin-dialog-close:hover{background:var(--orange-soft);color:var(--orange)}.admin-dialog-message{min-height:18px;margin-top:10px;color:#a42a2a;font-size:12px}.admin-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.admin-dialog-actions>button:last-child{min-height:44px;padding:11px 18px;border:0;border-radius:9px;background:var(--orange);color:#fff;font:inherit;font-weight:700;cursor:pointer}

/* 4.0: project workflow. Document and print styles remain untouched. */
.project-header-logo{width:190px;height:90px;object-fit:contain}
.project-form-card,.projects-card,.project-overview-card{max-width:none;margin:0 auto}.projects-card{overflow:visible}
.project-form{padding:0 36px 34px}
.project-form-section{padding:28px 0;border-bottom:1px solid #ececec}
.project-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.project-form-grid .wide{grid-column:1/-1}
.project-form-grid label>span,.projects-toolbar label>span{display:block;margin-bottom:8px;color:var(--ink);font-size:13px;font-weight:700}
.project-form-grid input,.project-form-grid select,.project-form-grid textarea,.projects-toolbar input{width:100%;min-width:0;margin:0;padding:12px 13px;border:1px solid #ccc;border-radius:8px;background:#fff;color:var(--ink);font:inherit;box-sizing:border-box}
.project-form-grid textarea{resize:vertical;line-height:1.5}
.project-form-grid input[readonly]{background:var(--panel);font-weight:700}
.project-save-bar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding-top:22px}
.project-save-bar p{margin:0;color:var(--muted);font-size:13px}.project-save-bar p.success{color:#286532}.project-save-bar p.error{color:#a42a2a}
.project-save-bar button{min-height:44px;padding:11px 22px;border:0;border-radius:9px;background:var(--orange);color:#fff;font:inherit;font-weight:700;cursor:pointer}.project-save-bar button:disabled{opacity:.55;cursor:wait}
.projects-content,.project-overview-content{padding:30px 36px 38px}
.projects-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;align-items:stretch;margin-bottom:12px;padding:0}
.project-filter-tabs{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.project-filter-tabs .history-filter{white-space:nowrap}.projects-toolbar label{min-width:0}.projects-toolbar input{min-height:44px}
.project-groups{display:grid;gap:28px}.project-group+.project-group{padding-top:26px;border-top:1px solid #ececec}.project-group-heading{display:flex;align-items:baseline;gap:9px;margin:0 0 12px}.project-group-heading h2{margin:0;color:var(--ink);font-size:13px;letter-spacing:.08em;text-transform:uppercase}.project-group-heading span{color:var(--muted);font-size:12px}
.project-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.project-list-card{display:flex;min-width:0;flex-direction:column;padding:20px;border:1px solid var(--line);border-left:3px solid var(--project-card-line,var(--line));border-radius:14px;background:#fff;box-shadow:0 6px 20px rgba(0,0,0,.045);transition:border-left-color .15s,box-shadow .15s}
.project-list-card:hover,.project-list-card:focus-within{border-left-color:var(--project-card-line-strong,var(--project-card-line,var(--line)));box-shadow:0 8px 24px rgba(0,0,0,.07)}
.project-card-status-planned{--project-card-line:#d2d9e1;--project-card-line-strong:#aeb9c6}
.project-card-status-active{--project-card-line:#b9dfc2;--project-card-line-strong:#82c392}
.project-card-status-counted{--project-card-line:#f2c58f;--project-card-line-strong:#e5a45c}
.project-card-status-paused{--project-card-line:#ead49a;--project-card-line-strong:#d8b95e}
.project-card-status-completed{--project-card-line:#d5d5d5;--project-card-line-strong:#a9a9a9}
.project-list-meta{display:flex;align-items:center;justify-content:space-between;gap:12px}.project-list-meta>strong{color:var(--muted);font-size:12px;letter-spacing:.04em}.project-status-control{position:relative;flex:0 0 auto}.project-status-trigger{gap:6px;border:0;cursor:pointer;font:inherit}.project-status-trigger:focus-visible,.project-status-option:focus-visible{outline:3px solid rgba(240,126,0,.25);outline-offset:2px}.project-status-chevron{font-size:13px;line-height:1}.project-status-menu{position:absolute;top:calc(100% + 8px);right:0;z-index:5;min-width:178px;max-width:calc(100vw - 40px);padding:8px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 12px 28px rgba(0,0,0,.13)}.project-status-menu-label{padding:4px 9px 7px;color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.project-status-option{display:flex;width:100%;align-items:center;gap:8px;padding:9px;border:0;border-radius:7px;background:#fff;color:var(--ink);font:inherit;font-size:13px;text-align:left;cursor:pointer}.project-status-option:hover,.project-status-option.is-selected{background:var(--panel)}.project-status-option>span{width:12px;color:var(--orange);font-weight:800}.project-status-feedback{min-height:16px;padding:5px 9px 1px;color:#a42a2a;font-size:11px}
.project-list-card h2{margin:18px 0 5px;font-size:20px;overflow-wrap:anywhere}.project-list-card>p{margin:0;color:var(--muted);font-size:14px}
.project-list-card dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:20px 0}.project-list-card dl>div{min-width:0;padding:11px;border-radius:9px;background:var(--panel)}.project-list-card dt{color:var(--muted);font-size:11px}.project-list-card dd{margin:4px 0 0;font-size:13px;font-weight:700;overflow-wrap:anywhere}.project-card-owner dd{overflow-wrap:anywhere}.project-card-time{grid-column:2}.project-card-time dd{color:var(--orange)}.project-card-time small{display:block;margin-top:3px;color:var(--muted);font-size:11px}.project-card-time small.has-uninvoiced{color:var(--orange-dark);font-weight:700}
.project-card-link{display:flex;min-height:44px;align-items:center;justify-content:center;margin-top:auto;border:1px solid var(--orange);border-radius:9px;color:var(--orange);font-size:13px;font-weight:700;text-decoration:none}.project-card-link:hover{background:var(--orange-soft)}
.project-status-badge{display:inline-flex;align-items:center;min-height:28px;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800}.project-status-planned{background:#eef2f6;color:#475467}.project-status-active{background:#eaf8ee;color:#26713a}.project-status-counted{background:#fff0df;color:#a85000}.project-status-paused{background:#fff4d9;color:#8b5d00}.project-status-completed{background:#e8f0ff;color:#305aa8}
.project-overview-header{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:32px 36px;border-bottom:1px solid #ececec}.project-overview-header p{margin:0 0 8px;color:var(--orange);font-size:12px;font-weight:800;letter-spacing:.08em}.project-overview-header h1{margin:0;font-size:32px}.project-overview-header span:not(.project-status-badge){display:block;margin-top:7px;color:var(--muted)}
.project-overview-header-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}
.project-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.project-summary-grid>div{min-width:0;padding:15px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}.project-summary-grid .wide{grid-column:1/-1}.project-summary-grid span{display:block;margin-bottom:5px;color:var(--muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}.project-summary-grid strong,.project-summary-grid p{margin:0;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.project-create-section,.project-documents-section{margin-top:30px}.project-section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:14px}.project-section-heading h2{margin:0;font-size:22px}.project-section-heading p{margin:4px 0 0;color:var(--muted);font-size:13px}
.project-document-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.project-document-actions a{display:block;min-height:86px;padding:18px;border:1px solid var(--orange);border-radius:12px;background:var(--orange-soft);color:var(--ink);text-decoration:none}.project-document-actions a:hover{box-shadow:0 8px 20px rgba(0,0,0,.06);transform:translateY(-1px)}.project-document-actions strong{display:block;color:var(--orange);font-size:16px}.project-document-actions small{display:block;margin-top:7px;color:var(--muted);font-size:12px}
.project-time-section{margin-top:30px;padding-top:30px;border-top:1px solid #ececec}.project-time-heading{align-items:center}.project-time-heading .outline-button{white-space:nowrap}.project-time-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:14px}.project-time-summary>div{padding:15px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}.project-time-summary span{display:block;color:var(--muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}.project-time-summary strong{display:block;margin-top:5px;color:var(--orange);font-size:21px}.project-time-people{display:flex;flex-wrap:wrap;gap:8px 18px;margin:0 0 18px;color:var(--muted);font-size:13px}.project-time-people>strong{width:100%;color:var(--ink);font-size:12px}.project-time-people b{color:var(--ink)}.project-time-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}.project-time-filters{display:flex;flex-wrap:wrap;gap:8px}.project-time-auto{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:13px}.project-time-auto label{white-space:nowrap}.project-time-auto input{width:84px;min-height:38px;padding:8px 9px;border:1px solid #ccc;border-radius:8px;background:#fff;color:var(--ink);font:inherit}.project-time-auto button{min-height:38px;padding:8px 10px}.project-time-bulk{display:flex;align-items:center;justify-content:flex-end;gap:10px;color:var(--muted);font-size:13px}.project-time-bulk[hidden]{display:none}.project-time-bulk button{min-height:42px}.project-time-list{display:grid;gap:8px}.project-time-entry{display:grid;grid-template-columns:28px 88px minmax(0,1fr) auto minmax(150px,auto);align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:#fff}.project-time-entry[hidden]{display:none}.project-time-entry.is-auto-selected{border-color:var(--orange);background:var(--orange-soft)}.project-time-check{display:flex;align-items:center;justify-content:center}.project-time-check input{width:18px;height:18px;accent-color:var(--orange)}.project-time-entry-date strong,.project-time-entry-date small,.project-time-entry-main strong,.project-time-entry-main p{display:block}.project-time-entry-date small{margin-top:3px;color:var(--muted);font-size:11px}.project-time-entry-main{min-width:0}.project-time-entry-main strong{overflow-wrap:anywhere}.project-time-entry-main p{margin:3px 0 0;color:var(--muted);font-size:13px;overflow-wrap:anywhere}.project-time-entry-hours{color:var(--orange);white-space:nowrap}.project-time-entry-status{display:flex;align-items:center;justify-content:flex-end;gap:8px}.project-time-entry-status .outline-button{min-height:34px;padding:7px 9px;font-size:11px}.project-time-auto-detail{color:var(--orange-dark);font-size:12px;font-weight:700;white-space:nowrap}.project-time-empty-filter{margin-top:10px;padding:18px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--muted);text-align:center}.project-time-status{min-height:18px;margin:10px 0 0;color:#a42a2a;font-size:13px}
.project-missing{max-width:620px;margin:0 auto;padding:34px;text-align:center}
.searchable-select-host{position:relative;min-width:0}.searchable-select-host>input{position:relative;z-index:2}.searchable-select-menu{position:absolute;z-index:20;top:calc(100% + 4px);left:0;width:100%;max-width:min(100%,calc(100vw - 28px));max-height:260px;overflow-y:auto;border:1px solid var(--line);border-radius:8px;background:#fff;box-shadow:0 8px 22px rgba(0,0,0,.14)}.searchable-select-option{display:block;width:100%;min-height:44px;padding:10px 12px;border:0;border-bottom:1px solid #eee;background:#fff;color:var(--ink);font:inherit;text-align:left;cursor:pointer}.searchable-select-option:last-child{border-bottom:0}.searchable-select-option:hover,.searchable-select-option.is-active,.searchable-select-option[aria-selected="true"]{background:var(--orange-soft)}.searchable-select-empty{margin:0;padding:11px 12px;color:var(--muted);font-size:13px}
.time-report-shell{max-width:1120px}.time-report-content{padding:30px 36px 38px}.time-week-section,.time-day-section,.time-form-section{padding:0 0 30px}.time-day-section,.time-form-section{margin-top:30px;padding-top:30px;border-top:1px solid #ececec}.time-section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:16px}.time-section-heading h2{margin:0;font-size:22px}.time-section-heading p{margin:5px 0 0;color:var(--muted);font-size:13px}.time-section-heading>strong{color:var(--orange);font-size:20px}.time-week-actions{display:flex;flex-wrap:wrap;gap:8px}.time-week-actions button{min-height:42px;padding:10px 13px}.time-week-summary{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:14px;padding:16px 18px;border-radius:10px;background:var(--panel)}.time-week-summary span{color:var(--muted);font-size:13px}.time-week-summary strong{font-size:21px}.time-week-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.time-day-card{display:flex;min-width:0;min-height:118px;flex-direction:column;align-items:flex-start;justify-content:space-between;padding:13px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}.time-day-card:hover,.time-day-card:focus-visible{border-color:var(--orange);box-shadow:0 5px 14px rgba(0,0,0,.06);outline:none}.time-day-card.is-selected{border-color:var(--orange);box-shadow:inset 0 0 0 1px var(--orange);background:var(--orange-soft)}.time-day-name{color:var(--muted);font-size:12px;text-transform:capitalize}.time-day-number{font-size:25px}.time-day-total{color:var(--orange-dark);font-size:13px;font-weight:700}.time-report-status,.time-form-status{min-height:20px;margin:12px 0 0;color:var(--muted);font-size:13px}.time-day-entries{display:grid;gap:10px}.time-empty{padding:24px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--muted);text-align:center}.time-entry-card{padding:16px;border:1px solid var(--line);border-radius:11px;background:#fff}.time-entry-heading{display:flex;align-items:baseline;justify-content:space-between;gap:14px}.time-entry-heading strong:first-child{overflow-wrap:anywhere}.time-entry-heading strong:last-child{color:var(--orange);white-space:nowrap}.time-entry-card p{margin:8px 0 12px;color:var(--muted);overflow-wrap:anywhere}.time-entry-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--muted);font-size:13px}.time-entry-status{padding:5px 8px;border-radius:999px;background:var(--orange-soft);color:var(--orange-dark);font-weight:700;white-space:nowrap}.time-entry-status.is-invoiced{background:#eaf8ee;color:#26713a}.time-entry-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.time-entry-actions button{min-height:40px}.time-entry-actions .danger{color:#a42a2a;border-color:#e3b2b2}.time-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.time-form-grid label{min-width:0}.time-comment-field{grid-column:1/-1}.time-form-grid input{min-height:46px}.time-form-grid .searchable-select-host-wrap{position:relative;margin-top:8px}.time-form-grid .searchable-select-host-wrap>input{margin-top:0}.time-reporter{display:grid;align-content:start;min-height:46px;padding:11px 13px;border:1px solid var(--line);border-radius:8px;background:var(--panel);font-size:14px}.time-reporter span{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.05em}.time-reporter strong{margin-top:3px}.time-form-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:20px}.time-form-actions .time-form-status{flex:1;margin:0}.time-form-actions button{min-height:46px}.time-form-actions .primary-button{min-width:150px}
.customer-content,.customer-detail-content{padding:30px 36px 38px}.customer-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end;margin-bottom:24px}.customer-toolbar label span{display:block;margin-bottom:8px;color:var(--ink);font-size:13px;font-weight:700}.customer-toolbar input{width:100%;min-width:0;min-height:44px;box-sizing:border-box;padding:12px 13px;border:1px solid #ccc;border-radius:8px;background:#fff;color:var(--ink);font:inherit}.customer-toolbar button{min-height:44px;padding:11px 22px;border:0;border-radius:9px;background:var(--orange);color:#fff;font:inherit;font-weight:700;cursor:pointer}.customer-list{display:grid;gap:14px}.customer-list-card{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:20px;padding:20px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 6px 20px rgba(0,0,0,.045)}.customer-list-card h2{margin:0;font-size:20px;overflow-wrap:anywhere}.customer-list-card p{margin:5px 0 0;color:var(--muted);font-size:14px}.customer-list-card dl{display:flex;flex-wrap:wrap;gap:12px 20px;margin:16px 0 0}.customer-list-card dt{color:var(--muted);font-size:11px}.customer-list-card dd{margin:3px 0 0;max-width:32ch;overflow-wrap:anywhere;font-size:13px;font-weight:700}.customer-detail-content h2{margin:0 0 14px;color:var(--orange);font-size:13px;letter-spacing:.08em}.customer-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}.customer-detail-grid>div{min-width:0;padding:15px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}.customer-detail-grid dt{color:var(--muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}.customer-detail-grid dd{margin:6px 0 0;overflow-wrap:anywhere;font-size:14px;line-height:1.5}.customer-form{padding:0 36px 34px}.customer-form-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding-top:22px}.customer-form-actions p{flex:1;margin:0;color:var(--muted);font-size:13px}.customer-form-actions p.error{color:#a42a2a}.searchable-select-field small{display:block;margin-top:7px;color:var(--muted);font-size:12px;line-height:1.4}

@media(max-width:760px){
.dashboard-header h1,.dashboard-header span,.page-header h1,.page-header .page-header-subtitle,.app-header h1,.app-header p{max-width:100%;overflow-wrap:anywhere;word-break:break-word}
.page-header .brand-lockup>div,.app-header .brand-lockup>div{min-width:0;max-width:100%;overflow-wrap:anywhere}
.system-shell{width:min(calc(100% - 20px),var(--system-max));padding:14px 0 34px}
.app-shell{width:100%}
.dashboard-card{margin-top:0}
.dashboard-header{flex-direction:column;align-items:flex-start;padding:26px 22px}
.dashboard-header img{width:210px;height:96px;align-self:center}
.dashboard-header h1{font-size:29px}
.dashboard-grid{grid-template-columns:1fr;padding:20px}
.dashboard-action{min-height:88px;padding:18px}
 .page-header{align-items:flex-start;flex-direction:column;padding:24px 20px}.page-header .brand-lockup{width:100%;min-width:0}.page-header .brand-lockup>div{min-width:0}.page-header-actions{width:100%;justify-content:flex-start}.page-header-actions .primary-link,.page-header-actions .outline-button{width:100%}.settings-page-header{min-height:0}
.settings-form{padding:0 20px 24px}
.settings-grid,.text-settings-grid,.section-toggle-grid,.logo-settings,.color-studio-grid,.design-preview-grid{grid-template-columns:minmax(0,1fr)}
.logo-actions{display:grid;grid-template-columns:1fr}
.backup-actions{display:grid;grid-template-columns:1fr}
.backup-actions .primary-button{width:100%}
.file-button,.outline-button,.danger-button{width:100%}
.color-editor{grid-template-columns:48px minmax(0,1fr)}.color-reset{grid-column:1/-1;width:100%}
.settings-save-bar{align-items:stretch;flex-direction:column;margin:0 -20px -24px;padding:14px 20px}
.app-version{align-items:flex-start;flex-direction:column}
.project-documents-table td:nth-child(6){grid-column:1/-1;padding-bottom:0}.project-documents-table td:nth-child(6) .history-actions{margin-top:2px}
.settings-save-bar button{width:100%}
.admin-module-card{padding:16px}.admin-module-heading{align-items:stretch;flex-direction:column}.admin-module-heading .outline-button{width:100%}.admin-engine-options,.admin-test-details{grid-template-columns:minmax(0,1fr)}.admin-module-actions{display:grid;grid-template-columns:minmax(0,1fr)}.admin-module-actions>button{width:100%}.admin-dialog{align-items:end;padding:12px}.admin-dialog-card{width:100%;padding:24px 20px;border-radius:16px}.admin-dialog-actions{display:grid;grid-template-columns:1fr 1fr}.admin-dialog-actions .outline-button{width:100%}
.project-header-logo{width:180px;height:82px;align-self:center}.project-form{padding:0 20px 24px}.project-form-grid,.project-card-grid,.project-summary-grid,.project-document-actions{grid-template-columns:minmax(0,1fr)}.project-form-grid .wide,.project-summary-grid .wide{grid-column:auto}.project-save-bar{align-items:stretch;flex-direction:column}.project-save-bar button{width:100%}.projects-content,.project-overview-content{padding:22px 20px 26px}.projects-toolbar{grid-template-columns:minmax(0,1fr)}.project-filter-tabs{display:grid;width:100%;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.project-filter-tabs .history-filter{width:100%;min-width:0;text-align:center}.project-overview-header{align-items:flex-start;flex-direction:column;padding:26px 20px}.project-overview-header h1{font-size:28px}.project-overview-header-actions{width:100%;justify-content:flex-start}.project-overview-header-actions .outline-button{width:100%}.project-section-heading{align-items:flex-start;flex-direction:column}
}

/* Customer register list view: scoped to avoid changing the established card view or project list. */
.customer-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;flex-wrap:wrap;margin-bottom:24px}
.customer-toolbar-left{display:flex;align-items:center;gap:18px;min-width:0;flex-wrap:wrap}
.customer-toolbar-left>form,.customer-view-toggle,.customer-columns-control{margin:0;padding:0}
.customer-view-toggle,.customer-sort-controls{display:flex;align-items:center;gap:7px;min-width:0}
.customer-view-toggle>span,.customer-sort-label,.customer-sort-controls>label{color:var(--muted);font-size:12px;font-weight:700;white-space:nowrap}
.customer-view-option{display:inline-flex;min-height:34px;align-items:center;padding:7px 11px;border:1px solid var(--line);background:#fff;color:var(--muted);font-size:12px;font-weight:700;text-decoration:none}
.customer-view-option:first-of-type{border-radius:8px 0 0 8px}.customer-view-option:last-of-type{margin-left:-8px;border-radius:0 8px 8px 0}.customer-view-option.is-active{border-color:#315f93;background:#edf3fb;color:#315f93;position:relative;z-index:1}
.customer-sort-controls label{display:flex;align-items:center;gap:7px}.customer-sort-controls select{min-height:36px;min-width:145px;padding:7px 30px 7px 9px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font:inherit;font-size:12px}.customer-sort-direction{display:inline-grid;width:36px;height:36px;place-items:center;padding:0;border:1px solid var(--line);border-radius:8px;background:#fff;color:#315f93;font-size:17px;font-weight:800;cursor:pointer}.customer-sort-direction:hover,.customer-sort-direction:focus-visible{border-color:#315f93;background:#edf3fb;outline:none}
.customer-columns-control{position:relative}.customer-columns-control summary{display:flex;min-height:36px;align-items:center;padding:7px 11px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--muted);font-size:12px;font-weight:700;cursor:pointer;list-style:none}.customer-columns-control summary::-webkit-details-marker{display:none}.customer-columns-control[open] summary{border-color:#315f93;color:#315f93}.customer-columns-control>form{position:absolute;z-index:8;top:calc(100% + 7px);right:0;width:240px;margin:0;padding:10px 12px 8px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 12px 28px rgba(0,0,0,.13)}
.customer-columns-menu{display:grid;gap:0}.customer-columns-menu label{display:flex;align-items:center;gap:8px;min-height:30px;color:var(--ink);font-size:12px;font-weight:600;line-height:1.2}.customer-columns-menu input[type=checkbox]{flex:0 0 16px;width:16px;height:16px;min-width:16px;min-height:16px;max-width:16px;margin:0;padding:0;border:0;border-radius:3px;accent-color:#315f93}.customer-columns-menu input[type=checkbox]:disabled{opacity:.45}.customer-columns-control .outline-button{width:100%;min-height:36px;margin-top:6px;padding:8px 10px;font-size:12px}
.customer-toolbar-search{display:flex;align-items:flex-end;gap:8px;min-width:min(100%,420px);margin:0;padding:0}.customer-toolbar-search label{min-width:180px;flex:1}.customer-toolbar-search label span{display:block;margin-bottom:8px;color:var(--ink);font-size:13px;font-weight:700}.customer-toolbar-search input{width:100%;min-width:0;min-height:40px;box-sizing:border-box;padding:9px 11px;border:1px solid #ccc;border-radius:8px;background:#fff;color:var(--ink);font:inherit}.customer-toolbar-actions{display:flex;align-items:center;gap:8px}.customer-toolbar-actions button,.customer-toolbar-actions .primary-link{min-height:40px;box-sizing:border-box;white-space:nowrap}.customer-toolbar-actions button{padding:9px 18px}
.customer-list-wrap{overflow-x:auto}.customer-table{min-width:860px;border-top:1px solid #e5eae6}.customer-table-row{display:grid;grid-template-columns:var(--customer-columns);align-items:center;gap:12px;padding:11px 10px;border-bottom:1px solid #edf1ed;color:var(--ink)}.customer-table-row:not(.customer-table-header){cursor:pointer}.customer-table-row:not(.customer-table-header):hover,.customer-table-row:not(.customer-table-header):focus-visible{background:#f8fcf9;outline:none}.customer-table-header{padding-top:9px;padding-bottom:9px;color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.customer-table-cell{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.customer-table-cell-customer strong{font-size:14px}.customer-table-cell-number,.customer-table-cell-updated{color:var(--muted);font-size:12px}.customer-table-cell-projects{text-align:center;font-size:13px;font-weight:700}
@media(max-width:760px){.customer-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}.customer-toolbar-left{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.customer-view-toggle{width:max-content;max-width:100%}.customer-sort-controls{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:end}.customer-sort-label{grid-column:1/-1;color:var(--ink);font-size:13px}.customer-sort-controls>label{display:block;min-width:0}.customer-sort-controls select{width:100%;min-width:0;height:40px;min-height:40px}.customer-sort-direction{width:40px;height:40px}.customer-columns-control>form{left:0;right:auto}.customer-toolbar-search{display:grid;grid-template-columns:minmax(0,1fr);min-width:0}.customer-toolbar-search label{min-width:0}.customer-toolbar-actions{display:grid;grid-template-columns:minmax(0,1fr)}.customer-toolbar-actions button,.customer-toolbar-actions .primary-link{width:100%;text-align:center}.customer-list-wrap{display:none}}

/* Dashboard refinement: shared rows and icons keep the activity areas light. */
.dashboard-card{box-shadow:0 12px 34px rgba(34,67,45,.08)}
.dashboard-content{padding:0 40px 30px}
.dashboard-section{padding:22px 0;border-bottom:1px solid #e8eee9}
.dashboard-section-heading{margin-bottom:12px}
.dashboard-section-heading h2{font-size:17px}
.dashboard-section-heading>span,.dashboard-section-heading a{color:#34794a}
.dashboard-heading-actions{display:flex;align-items:center;gap:14px}
.dashboard-quick-links{gap:12px}
.dashboard-quick-links a{min-height:64px;padding:12px 16px;border-color:#e1e9e2;border-radius:12px;background:#fbfdfb;transition:border-color .15s ease,background .15s ease}
.dashboard-quick-links a:hover,.dashboard-quick-links a:focus-visible{border-color:#8eb69a;background:#f5fbf6}
.dashboard-quick-links svg,.dashboard-feature-links svg{flex:0 0 auto;width:24px;height:24px;fill:none;stroke:#34794a;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7}
.dashboard-quick-links svg{width:34px;height:34px;padding:7px;border-radius:50%;background:#eaf5ec;stroke:#2d7546}
.dashboard-quick-links strong{font-size:13px}
.dashboard-quick-links small{display:block;margin-top:3px;color:var(--muted);font-size:11px}
.dashboard-activity-grid{gap:0 34px}
.dashboard-project-list,.dashboard-time-list,.dashboard-request-list{gap:0;border-top:1px solid #edf1ed}
.dashboard-project-row,.dashboard-time-row,.dashboard-request-row{border:0;border-bottom:1px solid #edf1ed;border-radius:0;background:transparent;padding:12px 4px}
.dashboard-project-row:hover,.dashboard-project-row:focus-visible,.dashboard-request-row:hover,.dashboard-request-row:focus-visible{border-color:#edf1ed;background:#f8fcf9}
.dashboard-row-icon{flex:0 0 auto;width:28px;height:28px;fill:none;stroke:#5a936b;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.65}
.dashboard-row-main{flex:1 1 auto;min-width:0}
.dashboard-project-row strong,.dashboard-time-row strong,.dashboard-request-row strong{font-size:13px}
.dashboard-project-row small,.dashboard-time-row small,.dashboard-request-row small{font-size:11px}
.dashboard-project-meta{display:flex;flex:0 0 auto;align-items:flex-end;gap:14px;text-align:right}
.dashboard-project-meta .project-status-badge{min-height:24px;padding:4px 8px}
.dashboard-project-meta>strong{min-width:54px;color:#34794a;font-size:13px}
.dashboard-project-meta>strong small{display:block;margin-top:2px;color:var(--muted);font-size:10px;font-weight:500}
.dashboard-time-row{gap:12px}
.dashboard-date-tile{display:grid;flex:0 0 38px;width:38px;height:38px;place-content:center;text-align:center;border-radius:9px;background:#edf7ef;color:#34794a}
.dashboard-date-tile strong{font-size:15px!important;line-height:1}
.dashboard-date-tile small{margin-top:3px!important;color:#5b8b66!important;font-size:8px!important;font-weight:800;letter-spacing:.06em}
.dashboard-time-row>b{color:var(--ink);font-size:13px}
.dashboard-request-avatar{display:grid;flex:0 0 30px;width:30px;height:30px;place-items:center;border-radius:50%;background:#eaf5ec;color:#34794a;font-size:12px;font-weight:800}
.dashboard-request-row>b{color:#34794a;font-size:11px;font-weight:700}
.dashboard-row-arrow{flex:0 0 auto;color:#6a9f79;font-size:16px}
.dashboard-empty{border:0;border-top:1px solid #edf1ed;border-bottom:1px solid #edf1ed;border-radius:0;padding:16px 4px}
.dashboard-features-section{display:none;padding-top:20px}
.dashboard-feature-links{gap:0;border-top:1px solid #edf1ed}
.dashboard-feature-links a{justify-content:flex-start;min-height:48px;padding:9px 4px;border:0;border-bottom:1px solid #edf1ed;border-radius:0;color:var(--muted);font-size:12px}
.dashboard-feature-links a:hover,.dashboard-feature-links a:focus-visible{border-color:#edf1ed;background:#f8fcf9;color:#34794a}
.dashboard-feature-links svg{width:21px;height:21px;margin-right:8px;stroke:#60906b}
.dashboard-feature-links a>span{flex:1;color:inherit}
.dashboard-feature-links b{margin-left:auto;color:#6a9f79;font-size:13px}

@media(max-width:760px){
  .dashboard-content{padding:0 20px 20px}
  .dashboard-section{padding:18px 0}
  .dashboard-quick-links{gap:6px}
  .dashboard-quick-links a{min-height:68px;gap:5px;padding:9px 3px}
  .dashboard-quick-links svg{width:30px;height:30px;padding:6px}
  .dashboard-quick-links strong{font-size:10px;line-height:1.15}
  .dashboard-quick-links small{display:none}
  .dashboard-heading-actions{gap:8px;flex-wrap:wrap;justify-content:flex-end}
  .dashboard-heading-actions a{font-size:11px}
  .dashboard-project-row,.dashboard-time-row,.dashboard-request-row{padding:11px 2px}
  .dashboard-project-meta{gap:7px}
  .dashboard-project-meta .project-status-badge{font-size:10px}
  .dashboard-project-meta>strong{min-width:43px;font-size:12px}
  .dashboard-project-row small,.dashboard-time-row small,.dashboard-request-row small{font-size:10px}
  .dashboard-feature-links{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px}
  .dashboard-feature-links a{min-height:49px;font-size:11px}
}

@media(max-width:760px){
  .dashboard-content{padding:0 20px 22px}.dashboard-section{padding:19px 0}.dashboard-quick-section{padding-top:16px}.dashboard-section-heading h2{font-size:16px}.dashboard-quick-links{gap:6px}.dashboard-quick-links a{flex-direction:column;justify-content:center;gap:5px;padding:9px 4px;text-align:center}.dashboard-quick-links span{flex-basis:25px;width:25px;height:25px;font-size:17px}.dashboard-quick-links strong{font-size:10px;line-height:1.15}.dashboard-activity-grid{grid-template-columns:1fr;gap:0}.dashboard-project-row,.dashboard-time-row,.dashboard-request-row{padding:10px}.dashboard-project-row strong,.dashboard-time-row strong,.dashboard-request-row strong{font-size:13px}.dashboard-feature-links{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.dashboard-feature-links a{min-height:38px;padding:8px;font-size:11px}.dashboard-header{padding-bottom:20px}
}

.customer-history{display:grid;gap:18px;margin-top:30px}.customer-history h2{margin:0 0 -8px}.customer-history ul{display:grid;gap:8px;margin:0;padding:0;list-style:none}.customer-history li{display:flex;justify-content:space-between;gap:16px;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:#fff}.customer-history li a{min-width:0;color:var(--ink);text-decoration:none;overflow-wrap:anywhere}.customer-history li a strong{color:var(--orange)}.customer-history li small{color:var(--muted);white-space:nowrap}.customer-history>p{margin:0;color:var(--muted)}
.customer-relation-display{grid-column:1/-1;margin:0;padding:12px 14px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--ink);font-weight:700}.customer-relation-display small{display:block;margin-top:4px;color:var(--muted);font-weight:400}.customer-register-option{display:flex;align-items:center;gap:8px;grid-column:1/-1;color:var(--ink);font-size:14px}.customer-register-option input{width:auto}
.project-form-grid .customer-register-option>span{margin:0;color:inherit;font-size:inherit;font-weight:inherit}

@media(max-width:360px){.project-filter-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}}

@media(max-width:760px){
  .project-time-heading{align-items:stretch}.project-time-heading .outline-button{width:100%;text-align:center}.project-time-summary{grid-template-columns:1fr;gap:8px}.project-time-summary>div{display:flex;align-items:center;justify-content:space-between;padding:12px 14px}.project-time-summary strong{margin:0;font-size:18px}.project-time-toolbar{align-items:stretch;flex-direction:column}.project-time-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.project-time-filters .history-filter{width:100%;min-width:0;padding-left:5px;padding-right:5px}.project-time-auto{flex-wrap:wrap}.project-time-auto label{width:100%}.project-time-auto input{flex:1;width:auto}.project-time-auto button{flex:1}.project-time-bulk{align-items:stretch;flex-direction:column;gap:8px}.project-time-bulk button{width:100%}.project-time-entry{grid-template-columns:24px minmax(0,1fr) auto;gap:5px 10px;padding:12px}.project-time-entry-date{grid-column:2}.project-time-entry-date small{display:none}.project-time-entry-main{grid-column:2/-1}.project-time-entry-hours{grid-column:3;grid-row:1}.project-time-entry-status{grid-column:2/-1;justify-content:space-between;flex-wrap:wrap}.project-time-check{grid-column:1;grid-row:1}.project-time-entry:not(:has(.project-time-check)){grid-template-columns:minmax(0,1fr) auto}.project-time-entry:not(:has(.project-time-check)) .project-time-entry-date,.project-time-entry:not(:has(.project-time-check)) .project-time-entry-main,.project-time-entry:not(:has(.project-time-check)) .project-time-entry-status{grid-column:1/-1}.project-time-entry:not(:has(.project-time-check)) .project-time-entry-hours{grid-column:2;grid-row:1}.project-time-entry-status .outline-button{width:auto}
}

@media(max-width:760px){
  .customer-content,.customer-detail-content{padding:22px 20px 26px}
  .customer-form{padding:0 20px 24px}
  .customer-toolbar{grid-template-columns:minmax(0,1fr)}
  .customer-toolbar button,.customer-list-card .outline-button,.customer-form-actions .outline-button,.customer-form-actions .primary-button{width:100%}
  .customer-list-card{align-items:stretch;flex-direction:column;gap:16px}
  .customer-detail-grid{grid-template-columns:minmax(0,1fr)}
  .customer-form-actions{align-items:stretch;flex-direction:column}
  .customer-form-actions p{flex:auto}
}

/* Design Studio uses the same web theme variables as the application UI. */
.color-card{background:var(--web-surface,#fff)}
.color-card>strong{margin-bottom:3px}
.color-card>small{display:block;margin-bottom:9px;color:var(--muted);font-size:11px;font-weight:500;line-height:1.35}
.color-picker,.color-reset{background:var(--web-surface,#fff)}
.preview-web{padding:16px;border-radius:10px;background:var(--web-background,#f2f2f2);color:var(--web-text,#222)}
.preview-web-card{background:var(--web-surface,#fff);color:var(--web-text,#222)}
.preview-web-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px;color:var(--web-accent,#f07e00);font-size:12px}
.preview-web-card h4{margin:0 0 5px;font-size:17px}
.preview-web-card p{margin:0 0 14px;color:var(--web-text,#222);font-size:12px;line-height:1.4}
.preview-web-card label{display:block;color:var(--web-text,#222);font-size:11px}
.preview-web-card input{background:var(--web-surface,#fff);color:var(--web-text,#222)}
.preview-web-card button{background:var(--web-accent,#f07e00)}

/* Common web surfaces follow Panel- och formulärbakgrund. */
.dashboard-action,
.settings-tabs,
.settings-grid input:not([type="checkbox"]),
.settings-grid select,
.settings-grid textarea,
.settings-form select,
.file-button,
.outline-button,
.danger-button,
.admin-engine-choice,
.admin-browserless-toggle,
.admin-test-result,
.admin-dialog-card,
.project-form-grid input,
.project-form-grid select,
.project-form-grid textarea,
.projects-toolbar input,
.project-list-card,
.user-card,
.account-form-card,
.users-create-section,
.users-list-section,
.users-content input,
.users-content select,
.profile-content input,
.profile-content select{background:var(--web-surface,#fff)}

/* Shared application shell and common document actions. */
.app-shell{width:min(calc(100% - var(--portal-shell-gutter)),var(--portal-shell-max-width));max-width:none;}
.history-shell{width:min(calc(100% - var(--portal-shell-gutter)),var(--portal-shell-max-width));max-width:none;margin:0 auto;}
.app-shell>.app-card,.history-card{border-radius:var(--portal-radius)}
.prices-card{max-width:none!important;}

/* Dokumenthistorik: desktop actions are opt-in at the desktop breakpoint.
   Hiding the wrapper also hides any open details menu on mobile. */
body.history-page .history-actions-desktop{display:none}

/* Desktop gutter belongs to the shell width calculation, not to the shell's
   box-model padding. This keeps the white application card at the shared
   portal width while preserving the existing mobile gutter rules. */
@media screen and (min-width:761px){
  body.history-page .history-mobile-only{display:none}
  body.history-page .history-content{padding:24px 34px 30px}
  body.history-page .history-toolbar{align-items:center;margin-bottom:16px}
  body.history-page .history-toolbar h2{font-size:21px}
  body.history-page .history-toolbar p{margin-top:3px;font-size:12px}
  body.history-page .history-desktop-toolbar{display:flex;align-items:center;gap:16px;min-width:0;margin-bottom:16px}
  body.history-page .history-type-filter,
  body.history-page .history-desktop-sort,
  body.history-page .history-desktop-search{display:flex;align-items:center;gap:7px;min-width:0;margin:0;padding:0}
  body.history-page .history-type-filter{flex:0 0 auto}
  body.history-page .history-desktop-sort{flex:0 0 auto}
  body.history-page .history-desktop-search{flex:1 1 auto}
  body.history-page .history-type-filter label,
  body.history-page .history-desktop-sort label,
  body.history-page .history-desktop-search label{display:flex;align-items:center;gap:7px;min-width:0;margin:0;color:var(--muted);font-size:12px;font-weight:700;white-space:nowrap}
  body.history-page .history-desktop-sort>span{display:inline-flex;align-items:center;color:var(--muted);font-size:12px;font-weight:700;line-height:1;white-space:nowrap}
  body.history-page .history-desktop-search label{flex:1 1 auto}
  body.history-page .history-desktop-toolbar label>span,
  body.history-page .history-desktop-search label>span{color:var(--muted);font-size:12px;font-weight:700}
  body.history-page .history-desktop-toolbar select{height:36px;min-height:36px;min-width:145px;padding:7px 30px 7px 9px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font:inherit;font-size:12px}
  body.history-page .history-desktop-sort select{min-width:150px}
  body.history-page .history-desktop-toolbar input{height:40px;min-height:40px;min-width:0;margin:0;padding:9px 11px;border:1px solid #ccc;border-radius:8px;background:#fff;color:var(--ink);font:inherit}
  body.history-page .history-desktop-search button{display:inline-flex;height:40px;min-height:40px;align-items:center;justify-content:center;padding:0 14px;border-radius:9px;font:inherit;font-size:13px;font-weight:700;line-height:1;white-space:nowrap}
  body.history-page .history-desktop-sort>button{display:inline-flex;width:36px;height:36px;min-height:36px;align-items:center;justify-content:center;padding:0;border:1px solid var(--line);border-radius:8px;background:#fff;color:#315f93;font-size:17px;font-weight:800;line-height:1;cursor:pointer}
  body.history-page .history-desktop-sort>button:hover,
  body.history-page .history-desktop-sort>button:focus-visible{border-color:#315f93;background:#edf3fb;outline:none}
  body.history-page .history-desktop-new{display:inline-flex;height:40px;min-height:40px;flex:0 0 auto;align-items:center;justify-content:center;padding:0 14px;border:1px solid var(--orange);border-radius:9px;background:var(--orange);color:#fff;font:inherit;font-size:13px;font-weight:700;line-height:1;text-decoration:none;white-space:nowrap}
  body.history-page .history-desktop-new:hover,
  body.history-page .history-desktop-new:focus-visible{background:var(--orange-dark);color:#fff;outline:2px solid color-mix(in srgb,var(--orange) 28%,transparent);outline-offset:2px}
  body.history-page .history-table-wrap{border:0;overflow:visible}
  body.history-page .history-table{border-collapse:collapse;border-spacing:0;table-layout:fixed}
  body.history-page .history-table thead th{padding:9px 12px;border-bottom:1px solid var(--line);background:var(--panel);color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap}
  body.history-page .history-table tbody tr{background:transparent;box-shadow:none}
  body.history-page .history-table tbody tr:hover{background:#f8fcf9}
  body.history-page .history-table tbody td{padding:10px 12px;border-top:0;border-right:0;border-bottom:1px solid #edf1ed;border-left:0;border-radius:0!important;font-size:13px;vertical-align:middle}
  body.history-page .history-table tbody tr:last-child td{border-bottom:0}
  body.history-page .history-table th:nth-child(1),body.history-page .history-table td:nth-child(1){width:12%}
  body.history-page .history-table th:nth-child(2),body.history-page .history-table td:nth-child(2){width:13%}
  body.history-page .history-table th:nth-child(3),body.history-page .history-table td:nth-child(3){width:16%}
  body.history-page .history-table th:nth-child(4),body.history-page .history-table td:nth-child(4){width:21%}
  body.history-page .history-table th:nth-child(5),body.history-page .history-table td:nth-child(5){width:9%}
  body.history-page .history-table th:nth-child(6),body.history-page .history-table td:nth-child(6){width:8%;text-align:right}
  body.history-page .history-table th:nth-child(7),body.history-page .history-table td:nth-child(7){width:11%}
  body.history-page .history-table th:nth-child(8),body.history-page .history-table td:nth-child(8){width:10%}
  body.history-page .history-table tbody td:nth-child(1)>small{display:block;margin-top:2px;color:var(--muted);font-size:11px;line-height:1.2;white-space:nowrap}
  body.history-page .history-table tbody td:nth-child(3),body.history-page .history-table tbody td:nth-child(4){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  body.history-page .project-history-link{display:inline;color:#315f93;background:transparent;border:0;border-radius:0;padding:0;font-size:13px;font-weight:700;text-decoration:none}
  body.history-page .project-history-link:hover,body.history-page .project-history-link:focus-visible{text-decoration:underline;outline:none}
  body.history-page .standalone-badge{display:inline;padding:0;background:transparent;color:var(--muted);font-size:13px;font-weight:600}
  body.history-page .status-badge{display:inline-flex;min-height:26px;align-items:center;padding:5px 9px;border-radius:7px;font-size:11px;font-weight:800;line-height:1;white-space:nowrap}
  body.history-page .history-document-status{position:relative;display:inline-flex;width:max-content}
  body.history-page .history-actions-mobile{display:none}
  body.history-page .history-actions-desktop{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
  body.history-page .history-actions-desktop>a:first-child{display:inline-flex;height:34px;min-height:34px;align-items:center;justify-content:center;padding:0 10px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);font:inherit;font-size:12px;font-weight:700;line-height:1;text-decoration:none;white-space:nowrap}
  body.history-page .history-actions-desktop>a:first-child:hover,body.history-page .history-actions-desktop>a:first-child:focus-visible{border-color:var(--orange);color:var(--orange);outline:none}
  body.history-page .history-action-overflow{position:relative;flex:0 0 auto}
  body.history-page .history-action-overflow>summary{display:inline-flex;width:34px;height:34px;align-items:center;justify-content:center;box-sizing:border-box;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--muted);font-size:19px;font-weight:800;line-height:1;cursor:pointer;list-style:none}
  body.history-page .history-action-overflow>summary::-webkit-details-marker{display:none}
  body.history-page .history-action-overflow>summary:hover,body.history-page .history-action-overflow[open]>summary{border-color:#315f93;background:#edf3fb;color:#315f93}
  body.history-page .history-action-menu{position:absolute;z-index:20;top:calc(100% + 6px);right:0;display:grid;min-width:130px;padding:6px;border:1px solid var(--line);border-radius:9px;background:#fff;box-shadow:0 12px 28px rgba(0,0,0,.13)}
  body.history-page .history-action-overflow.is-drop-up .history-action-menu{top:auto;bottom:calc(100% + 6px)}
  body.history-page .history-action-menu a,body.history-page .history-action-menu button{display:flex;min-height:32px;width:100%;align-items:center;padding:7px 9px;border:0;border-radius:6px;background:transparent;color:var(--ink);font:inherit;font-size:12px;font-weight:700;line-height:1;text-align:left;text-decoration:none;cursor:pointer}
  body.history-page .history-action-menu a:hover,body.history-page .history-action-menu a:focus-visible,body.history-page .history-action-menu button:hover,body.history-page .history-action-menu button:focus-visible{background:#f5f8f6;outline:none}
  body.history-page .history-action-menu form{margin:0;padding:0;border-top:1px solid var(--line);margin-top:4px;padding-top:4px}
  body.history-page .history-action-menu button.danger{color:#a42a2a}
}
@media screen and (max-width:760px){
  body.history-page .history-desktop-toolbar{display:none}
}
  .app-shell,
  .history-shell{padding:0}
}

/* PDF engine choices: visible, touch-friendly buttons instead of a clipped dropdown. */
.document-pdf-actions{display:inline-flex;align-items:stretch;gap:8px;min-width:0;flex-wrap:wrap}
.document-pdf-actions>.pdf-engine-option{display:inline-flex;min-width:150px;min-height:44px;align-items:center;justify-content:center;padding:10px 14px;border:1px solid var(--orange);border-radius:9px;background:#fff;color:var(--orange);font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.document-pdf-actions>.pdf-engine-option:hover{background:var(--orange-soft)}
.document-pdf-actions>.pdf-engine-option[hidden]{display:none}
.action-buttons>.document-pdf-actions{min-width:0}
.form-actions .action-buttons{
  display:grid;
  flex:1 1 auto;
  min-width:0;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;
  align-items:stretch;
}
.form-actions .action-buttons>.document-pdf-actions{display:contents}
.form-actions .action-buttons>button,
.form-actions .document-pdf-actions>button,
.form-actions .document-pdf-actions>.pdf-engine-option{
  display:flex;
  align-items:center;
  justify-content:center;
  align-self:stretch;
  box-sizing:border-box;
  height:48px;
  min-width:180px;
  min-height:48px;
  margin:0;
  padding:12px 18px;
  -webkit-appearance:none;
  appearance:none;
  font-family:inherit;
  font-size:14px;
  font-weight:700;
  line-height:1.2;
  text-align:center;
}
.project-save-bar button,
.settings-save-bar button,
.prices-save-controls button{
  min-width:180px;
  min-height:48px;
  padding:12px 18px;
  font-family:inherit;
  font-size:14px;
  font-weight:700;
  line-height:1.2;
  text-align:center;
}
.history-actions .document-pdf-actions{display:flex;width:100%;min-width:0}
.history-actions .document-pdf-actions>.pdf-engine-option{flex:1;min-width:0}
@media screen and (max-width:760px){
  .document-pdf-actions{display:grid;width:100%;grid-template-columns:minmax(0,1fr);gap:8px}
  .document-pdf-actions>.pdf-engine-option{width:100%;min-width:0;min-height:46px}
  .action-buttons>.document-pdf-actions{grid-column:1/-1}
  .history-actions .document-pdf-actions{display:grid}
}

/* Gemensam mobilnavigation. Desktopens befintliga sidhuvud lämnas orört. */
.mobile-navigation-sheet{display:none}
.desktop-navigation{position:relative;z-index:20;display:flex;min-height:54px;border-top:1px solid #edf0ed;border-bottom:1px solid #e5e9e5;background:var(--web-surface,#fff)}
.desktop-navigation__link,.desktop-navigation__trigger{position:relative;display:inline-flex;min-height:54px;align-items:center;gap:9px;padding:0 20px;border:0;background:transparent;color:var(--ink);font:inherit;font-size:13px;font-weight:750;text-decoration:none;cursor:pointer;white-space:nowrap}
.desktop-navigation__link:hover,.desktop-navigation__trigger:hover,.desktop-navigation__link:focus-visible,.desktop-navigation__trigger:focus-visible{background:color-mix(in srgb,var(--orange) 6%,transparent);outline:none}
.desktop-navigation__link.is-active,.desktop-navigation__dropdown.is-active .desktop-navigation__trigger{color:var(--orange)}
.desktop-navigation__link.is-active::after,.desktop-navigation__dropdown.is-active .desktop-navigation__trigger::after{position:absolute;right:18px;bottom:-1px;left:18px;height:2px;background:var(--orange);content:""}
.desktop-navigation svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8;flex:0 0 auto}
.desktop-navigation--blue svg{color:#3b6fe5}.desktop-navigation--green svg{color:#37854d}.desktop-navigation--purple svg{color:#8151d6}.desktop-navigation--orange svg{color:#df7b1b}.desktop-navigation--teal svg{color:#168f9a}.desktop-navigation--neutral svg{color:#5f6662}
.desktop-navigation__dropdown{position:relative;border-left:1px solid #f0f1f0}.desktop-navigation__chevron{margin-left:2px;font-size:16px;line-height:1;transform:translateY(-1px)}
.desktop-navigation__menu{position:absolute;top:calc(100% + 7px);left:8px;display:none;min-width:230px;padding:7px;border:1px solid #e1e5e1;border-radius:10px;background:var(--web-surface,#fff);box-shadow:0 14px 32px rgba(34,47,38,.14)}
.desktop-navigation__dropdown.is-open .desktop-navigation__menu{display:grid}.desktop-navigation__menu a{display:flex;min-height:38px;align-items:center;gap:10px;padding:8px 10px;border-radius:6px;color:var(--ink);font-size:13px;text-decoration:none;white-space:nowrap}.desktop-navigation__menu a:hover,.desktop-navigation__menu a:focus-visible{background:color-mix(in srgb,var(--orange) 8%,transparent);outline:none}.desktop-navigation__menu svg{width:16px;height:16px}
.desktop-user-area{position:relative;z-index:40;flex:0 0 auto}.desktop-user-trigger{display:flex;min-height:48px;align-items:center;gap:9px;padding:5px 7px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer}.desktop-user-trigger:hover,.desktop-user-trigger:focus-visible,.desktop-user-area.is-open .desktop-user-trigger{border-color:#e1ebe3;background:#f8fcf9;outline:none}.desktop-user-avatar{display:grid;flex:0 0 38px;width:38px;height:38px;place-items:center;border-radius:50%;background:#eaf6ed;color:#37854d;font-size:12px;font-weight:800}.desktop-user-identity{display:grid;min-width:0;gap:3px;margin:0}.desktop-user-identity strong{display:block;max-width:18ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:1.2}.desktop-user-identity small{display:block;color:var(--muted);font-size:11px;line-height:1.2}.desktop-user-chevron{display:block;margin-left:4px;color:var(--muted);font-size:16px;line-height:1}.desktop-user-menu{position:absolute;top:calc(100% + 8px);right:0;display:none;min-width:160px;padding:7px;border:1px solid #e1e5e1;border-radius:10px;background:var(--web-surface,#fff);box-shadow:0 14px 32px rgba(34,47,38,.16)}.desktop-user-area.is-open .desktop-user-menu{display:grid}.desktop-user-menu form{margin:0;padding:0}.desktop-user-menu form button{display:flex;min-height:38px;width:100%;align-items:center;gap:10px;padding:8px 10px;border:0;border-radius:6px;background:transparent;color:#b42318;font:inherit;font-size:13px;text-align:left;cursor:pointer}.desktop-user-menu form button:hover,.desktop-user-menu form button:focus-visible{background:#fff5f4;color:#8f1d16;outline:none}.desktop-user-menu svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}
.projects-toolbar-actions,.customer-toolbar-actions{display:flex;align-items:center;gap:8px}.projects-toolbar-actions .primary-link,.customer-toolbar-actions .primary-link{min-height:44px;box-sizing:border-box;white-space:nowrap}.project-overview-content-header,.customer-detail-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.customer-detail-heading h2{margin:0}.requests-list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px;padding-bottom:12px;border-bottom:1px solid var(--line)}.register-heading-actions{display:flex;align-items:flex-end;justify-content:flex-end;gap:12px;flex-wrap:wrap}.inline-document-meta{display:flex;flex:0 0 auto;align-items:flex-end;gap:10px;margin-left:auto}.inline-document-meta label{display:grid;gap:4px;color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.inline-document-meta input{width:145px;height:36px;margin:0;padding:7px 9px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--ink);font:inherit;font-size:12px;font-weight:700}.document-section-title-main{min-width:0;flex:1}
@media(min-width:761px) and (max-width:900px){.document-section-title{flex-wrap:wrap}.inline-document-meta{width:100%;margin-left:52px}}
@media(min-width:761px){.system-card:has(>.desktop-navigation),.app-card:has(>.desktop-navigation){overflow:visible}}
@media(max-width:760px){.desktop-navigation{display:none}}
@media(max-width:760px){.desktop-user-area{display:none}.projects-toolbar-actions,.customer-toolbar-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}.projects-toolbar-actions button,.projects-toolbar-actions .primary-link,.customer-toolbar-actions button,.customer-toolbar-actions .primary-link{width:100%}.project-overview-content-header,.customer-detail-heading,.requests-list-toolbar{align-items:stretch;flex-direction:column}.project-overview-content-header .outline-button,.customer-detail-heading .outline-button,.requests-list-toolbar .primary-link{width:100%;box-sizing:border-box;text-align:center}.register-heading-actions{align-items:stretch;flex-direction:column}.register-heading-actions>.primary-link{width:100%;text-align:center}.document-section-title{align-items:flex-start;flex-wrap:wrap}.inline-document-meta{width:100%;margin-left:0;display:grid;grid-template-columns:minmax(0,1fr);gap:8px}.inline-document-meta input{width:100%;box-sizing:border-box}.dashboard-card>.dashboard-header .desktop-user-identity{display:grid;gap:3px;margin:0}.dashboard-card>.dashboard-header .desktop-user-identity strong,.dashboard-card>.dashboard-header .desktop-user-identity small{display:block;line-height:1.2}}
@media(min-width:761px){.dashboard-card>.account-strip{display:none}}

/* Projects: shared control visuals and dense desktop list presentation. */
.projects-status-filter select{min-height:36px;min-width:150px;padding:7px 30px 7px 9px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font:inherit;font-size:12px}
.projects-view-toggle,.projects-sort-controls{display:flex;align-items:center;gap:7px;min-width:0}.projects-view-toggle>span,.projects-sort-controls>label{color:var(--muted);font-size:12px;font-weight:700}.projects-view-option{display:inline-flex;min-height:34px;align-items:center;padding:7px 11px;border:1px solid var(--line);background:#fff;color:var(--muted);font-size:12px;font-weight:700;text-decoration:none}.projects-view-option:first-of-type{border-radius:8px 0 0 8px}.projects-view-option:last-of-type{margin-left:-8px;border-radius:0 8px 8px 0}.projects-view-option.is-active{border-color:#315f93;background:#edf3fb;color:#315f93;position:relative;z-index:1}.projects-sort-controls label{display:flex;align-items:center;gap:7px}.projects-sort-controls select{min-height:36px;min-width:150px;padding:7px 30px 7px 9px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font:inherit;font-size:12px}.projects-sort-direction{display:inline-grid;width:36px;height:36px;place-items:center;padding:0;border:1px solid var(--line);border-radius:8px;background:#fff;color:#315f93;font-size:17px;font-weight:800;cursor:pointer}.projects-sort-direction:hover,.projects-sort-direction:focus-visible{border-color:#315f93;background:#edf3fb;outline:none}.projects-columns-control{position:relative}.projects-columns-control summary{display:flex;min-height:36px;align-items:center;padding:7px 11px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--muted);font-size:12px;font-weight:700;cursor:pointer;list-style:none}.projects-columns-control summary::-webkit-details-marker{display:none}.projects-columns-control[open] summary{border-color:#315f93;color:#315f93}.projects-columns-control>form{position:absolute;z-index:8;top:calc(100% + 7px);right:0;width:210px;padding:12px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 12px 28px rgba(0,0,0,.13)}.projects-columns-menu{display:grid;gap:9px}.projects-columns-menu label{display:flex;align-items:center;gap:8px;color:var(--ink);font-size:12px;font-weight:600}.projects-columns-menu input{accent-color:#315f93}.projects-columns-control .outline-button{width:100%;min-height:36px;margin-top:12px;padding:8px 10px;font-size:12px}.projects-list-wrap{overflow-x:auto}.projects-list{min-width:860px;border-top:1px solid #e5eae6}.projects-list-row{display:grid;grid-template-columns:110px minmax(190px,1.5fr) minmax(150px,1.1fr) minmax(120px,.9fr) 105px 125px 55px 125px;align-items:center;min-width:0;gap:12px;padding:11px 10px;border-bottom:1px solid #edf1ed;color:var(--ink)}.projects-list-row:not(.projects-list-header){cursor:pointer}.projects-list-row:not(.projects-list-header):hover,.projects-list-row:not(.projects-list-header):focus-visible{background:#f8fcf9;outline:none}.projects-list-header{padding-top:9px;padding-bottom:9px;color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.projects-list-cell{min-width:0;overflow-wrap:anywhere}.projects-list-cell-project strong{display:block;overflow-wrap:anywhere;font-size:14px}.projects-list-secondary,.projects-list-cell-updated,.projects-list-cell-documents{color:var(--muted);font-size:12px}.projects-list-cell-customer,.projects-list-cell-owner{font-size:13px}.projects-list-cell-status{overflow:visible}.projects-list-cell-worked{display:grid;gap:3px;justify-items:start;font-size:13px;font-weight:700}.projects-list-cell-worked small{color:var(--muted);font-size:11px;font-weight:600;white-space:nowrap}.projects-list-cell .project-status-control{width:max-content;max-width:100%}
@media(min-width:901px){.projects-list-row{grid-template-columns:var(--projects-list-columns)}}
@media(max-width:900px) and (min-width:761px){.projects-list{min-width:760px}.projects-list-row{grid-template-columns:var(--projects-list-columns);gap:8px;padding-left:6px;padding-right:6px}}
@media(max-width:760px){.projects-columns-control>form{left:0;right:auto}.projects-list-wrap{display:none}}

/* Project columns menu: contain the global form input treatment to a compact portal control. */
.projects-columns-control>form{width:240px}
.projects-columns-control>form{margin:0;padding:10px 12px 8px}
.projects-columns-menu{gap:0}
.projects-columns-menu label{min-height:30px;line-height:1.2}
.projects-columns-menu input[type="checkbox"]{flex:0 0 16px;width:16px;height:16px;min-width:16px;min-height:16px;max-width:16px;margin:0;padding:0;border:0;border-radius:3px;accent-color:#315f93}
.projects-columns-menu input[type="checkbox"]:disabled{opacity:.45;cursor:not-allowed}
.projects-columns-control .outline-button{margin-top:6px}

/* Project toolbar/list fit: keep related controls together and size the list to its content area. */
.projects-toolbar-actions button,.projects-toolbar-actions .primary-link{display:inline-flex;min-height:40px;height:40px;box-sizing:border-box;align-items:center;justify-content:center;padding:0 14px;border-radius:9px;font:inherit;font-size:13px;font-weight:700;line-height:1;text-align:center;text-decoration:none}
.projects-toolbar-actions .primary-link{border:1px solid var(--orange);background:var(--orange);color:#fff}
.projects-toolbar-actions button:hover,.projects-toolbar-actions button:focus-visible{border-color:var(--orange-dark);background:var(--orange-soft);color:var(--orange-dark);outline:none}
.projects-toolbar-actions .primary-link:hover,.projects-toolbar-actions .primary-link:focus-visible{background:var(--orange-dark);color:#fff;outline:2px solid rgba(240,126,0,.28);outline-offset:2px}
@media(min-width:761px){
  .projects-list-wrap{overflow:visible}
  .projects-list{width:100%;min-width:0}
}
@media(min-width:901px){.projects-list-row{grid-template-columns:var(--projects-list-columns)}}
@media(max-width:900px) and (min-width:761px){
  .projects-list-row{grid-template-columns:var(--projects-list-columns-narrow);gap:8px;padding-left:6px;padding-right:6px}
}
.projects-list-header .projects-list-cell{white-space:nowrap;font-size:10px;line-height:1.2;font-weight:800;letter-spacing:.06em;color:var(--muted);text-transform:uppercase}.projects-list-cell-documents,.projects-list-header .projects-list-cell-documents{text-align:center}.projects-list-cell-worked,.projects-list-header .projects-list-cell-worked{text-align:right;justify-items:end}.projects-list-cell-updated{white-space:nowrap}

/* Project toolbar: scoped forms and two compact responsive rows. */
.projects-toolbar .projects-status-filter,.projects-toolbar .projects-sort-controls,.projects-toolbar .projects-toolbar-search{margin:0;padding:0}
@media(min-width:761px){
  .projects-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin:0 0 12px;padding:0 0 12px;border-bottom:1px solid #ecefec}
  .projects-toolbar-left{display:flex;width:fit-content;max-width:100%;align-items:center;gap:24px;flex-wrap:wrap}
  .projects-toolbar-left>form,.projects-toolbar-left>.projects-view-toggle,.projects-list-controls{flex:0 0 auto;margin:0}
  .projects-toolbar-left label{display:flex;align-items:center;gap:7px;min-width:0}
  .projects-toolbar-left label>span,.projects-toolbar-search label>span{display:inline;margin:0;color:var(--muted);font-size:12px;font-weight:700;white-space:nowrap}
  .projects-toolbar-left select{height:40px;min-height:40px;margin:0;padding:8px 30px 8px 10px;font-size:12px}
  .projects-status-filter select{width:180px}
  .projects-view-toggle{display:flex;align-items:center;gap:7px}
  .projects-list-controls{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
  .projects-sort-controls{display:flex;align-items:center;gap:7px;flex:0 0 auto}
  .projects-sort-controls>label{display:flex;align-items:center;gap:7px}
  .projects-sort-label{display:inline;color:var(--muted);font-size:12px;font-weight:700;white-space:nowrap}
  .projects-sort-controls select{width:150px;min-width:150px;height:40px;min-height:40px}
  .projects-sort-direction,.projects-columns-control summary{height:40px;min-height:40px}
  .projects-toolbar-right{display:flex;width:100%;align-items:center;min-width:0;margin:0}
  .projects-toolbar-search{display:flex;align-items:center;min-width:0;gap:8px}
  .projects-toolbar-search>label{display:block;flex:1 1 auto;min-width:0}
  .projects-toolbar-search>label>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .projects-toolbar-search>label input{width:100%;height:40px;min-height:40px}
  .projects-toolbar-actions{display:flex;flex:0 0 auto;align-items:center;gap:8px}
  .projects-toolbar-actions button,.projects-toolbar-actions .primary-link{height:40px;min-height:40px}
}
@media(max-width:900px) and (min-width:761px){.projects-toolbar-left{gap:20px}}
@media(max-width:760px){
  .projects-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin:0 0 10px;padding:0}
  .projects-toolbar-left{display:grid;gap:10px}
  .projects-toolbar-left label{display:grid;gap:6px}
  .projects-toolbar-left label>span,.projects-toolbar-search label>span{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto;color:var(--ink);font-size:13px;font-weight:700}
  .projects-toolbar-left select{width:100%;height:auto;min-height:40px}
  .projects-list-controls{display:flex;flex-wrap:wrap;gap:10px}
  .projects-view-toggle{width:max-content;max-width:100%;justify-content:flex-start}
  .projects-sort-controls{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:end;gap:7px;flex:1 1 100%;min-width:0}
  .projects-sort-label{grid-column:1/-1;color:var(--ink);font-size:13px;font-weight:700}
  .projects-sort-controls>label{display:block;grid-column:1;min-width:0}
  .projects-sort-controls select{width:100%;min-width:0}
  .projects-sort-direction{grid-column:2;width:40px;height:40px;min-height:40px;padding:0}
  .projects-toolbar-right{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:0}
  .projects-toolbar-search{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
  .projects-toolbar-search>label{display:grid;gap:6px}
  .projects-toolbar-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
  .projects-toolbar-actions button,.projects-toolbar-actions .primary-link{width:100%;text-align:center}
}
.mobile-navigation-sheet svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}
@media screen and (max-width:760px){
  .app-header,
  .dashboard-card>.dashboard-header{
    position:relative;display:flex;min-height:64px;align-items:center;justify-content:center;flex-direction:row;padding:10px 58px;border-bottom:1px solid #e8eee9
  }
  .app-header .brand-lockup,
  .dashboard-card>.dashboard-header .brand-lockup{display:block!important;width:auto;min-width:0}
  .app-header .brand-lockup>div,
  .dashboard-card>.dashboard-header .brand-lockup>div{display:none}
  .app-header .brand-lockup img,
  .dashboard-card>.dashboard-header .brand-lockup img{display:block;width:min(48vw,154px);height:auto;max-width:100%}
  .app-header .top-meta{display:none}
  .page-header-mobile-left,.page-header-mobile-right{position:absolute;top:50%;display:grid;place-items:center;width:42px;height:42px;transform:translateY(-50%)}
  .page-header-mobile-left{left:10px}.page-header-mobile-right{right:10px}
  .mobile-menu-trigger{display:grid;width:42px;height:42px;place-items:center;padding:0;border:0;border-radius:50%;background:transparent;color:#315f3d;cursor:pointer}
  .mobile-menu-trigger:hover,.mobile-menu-trigger:focus-visible{background:#edf7ef;outline:none}
  .mobile-menu-trigger svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}
  .mobile-header-spacer{display:block;width:42px;height:42px}
  .mobile-navigation-sheet{position:fixed;z-index:100;inset:0;display:block;visibility:hidden;opacity:0;pointer-events:none;transition:visibility 0s linear .24s,opacity .24s ease}
  .mobile-navigation-sheet.is-open{visibility:visible;opacity:1;pointer-events:auto;transition-delay:0s}
  .mobile-navigation-overlay{position:absolute;inset:0;width:100%;height:100%;border:0;background:rgba(18,34,24,.56);cursor:pointer}
  .mobile-navigation-panel{position:absolute;right:0;bottom:0;left:0;display:flex;max-height:88vh;flex-direction:column;border-radius:22px 22px 0 0;background:var(--web-surface,#fff);box-shadow:0 -12px 35px rgba(0,0,0,.18);transform:translateY(100%);transition:transform .24s ease;outline:none}
  .mobile-navigation-sheet.is-open .mobile-navigation-panel{transform:translateY(0)}
  .mobile-navigation-handle{flex:0 0 auto;width:34px;height:4px;margin:10px auto 0;border-radius:999px;background:#aebbb1}
  .mobile-navigation-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 20px 14px;border-bottom:1px solid #e8eee9}.mobile-navigation-heading h2{margin:0;font-size:20px}.mobile-navigation-close{display:grid;width:42px;height:42px;place-items:center;padding:0;border:0;border-radius:50%;background:transparent;color:var(--ink);font-size:28px;font-weight:300;line-height:1;cursor:pointer}.mobile-navigation-close:hover,.mobile-navigation-close:focus-visible{background:#f1f6f2;outline:none}
  .mobile-navigation-content{min-height:0;overflow-y:auto;padding:0 20px calc(18px + env(safe-area-inset-bottom))}
  .mobile-navigation-section{padding:18px 0 16px;border-bottom:1px solid #e8eee9}.mobile-navigation-section h3{margin:0 0 9px;color:var(--muted);font-size:10px;letter-spacing:.08em;text-transform:uppercase}
  .mobile-navigation-quick-links{display:grid;gap:0}.mobile-navigation-quick-links a{display:flex;min-height:48px;align-items:center;gap:12px;border-bottom:1px solid #edf1ed;color:var(--ink);font-size:13px;font-weight:700;text-decoration:none}.mobile-navigation-quick-links a:last-child{border-bottom:0}.mobile-navigation-quick-links svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}.mobile-navigation-quick-links span{flex:1}.mobile-navigation-quick-links b{color:#6a9f79;font-size:16px}
  .mobile-navigation-feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.mobile-navigation-feature-grid a{display:flex;min-height:78px;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:8px 5px;border:1px solid #e2ebe3;border-radius:12px;background:#fbfdfb;color:var(--ink);font-size:10px;font-weight:700;text-align:center;text-decoration:none;overflow-wrap:normal;word-break:normal}.mobile-navigation-feature-grid a:hover,.mobile-navigation-feature-grid a:focus-visible{border-color:#9bc1a4;background:#f2faf4;outline:none}.mobile-navigation-feature-grid svg{width:25px;height:25px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}
  .mobile-navigation-account{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 0 0}.mobile-navigation-user{display:flex;min-width:0;align-items:center;gap:9px}.mobile-navigation-avatar{display:grid;flex:0 0 36px;width:36px;height:36px;place-items:center;border-radius:50%;background:#eaf6ed;color:#37854d;font-size:12px;font-weight:800}.mobile-navigation-user strong,.mobile-navigation-user small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mobile-navigation-user strong{font-size:13px}.mobile-navigation-user small{margin-top:3px;color:var(--muted);font-size:11px}.mobile-navigation-account form{margin:0}.mobile-navigation-logout{display:flex;min-height:44px;align-items:center;gap:7px;padding:0;border:0;background:transparent;color:#b42318;font:inherit;font-size:13px;font-weight:800;cursor:pointer}.mobile-navigation-logout:focus-visible{outline:2px solid #e2a29b;outline-offset:4px}.mobile-navigation-logout svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}
  .account-strip{display:none}
  html.mobile-navigation-open,body.mobile-navigation-open{overflow:hidden}
  .dashboard-features-section{display:none}
}

/* This follows the older account-strip mobile rules so the duplicated
   dashboard footer remains hidden when the global sheet is available. */
@media screen and (max-width:760px){
  .account-strip{display:none}
}

/* Material keeps its useful document-metadata header arrangement, but its
   desktop brand footprint follows the shared portal header. */
@media screen and (min-width:761px){
  body.material-page .app-shell>.app-card:has(> form#materialListForm)>.app-header .brand-lockup img{
    width:190px;
    height:108px;
    object-fit:contain;
  }
}

/* Projects and requests intentionally allow desktop dropdowns to escape the
   card. On mobile the shared app shell must clip its content to the radius. */
@media screen and (max-width:760px){
  .projects-card,.requests-card{overflow:hidden;border-radius:20px}
}

/* Isolated global mobile app header. Page titles and page actions stay in the
   existing page header below it. */
.mobile-app-header{display:none}
@media screen and (max-width:760px){
  .mobile-app-header{position:relative;z-index:2;display:grid;grid-template-columns:48px minmax(0,1fr) 48px;min-height:64px;align-items:center;padding:10px 10px;border-bottom:1px solid #e8eee9;background:var(--web-surface,#fff)}
  .mobile-app-header__menu,.mobile-app-header__balance{display:grid;width:42px;height:42px;place-items:center}
  .mobile-app-header__menu{padding:0;border:0;border-radius:50%;background:transparent;color:#315f3d;cursor:pointer}
  .mobile-app-header__menu:hover,.mobile-app-header__menu:focus-visible{background:#edf7ef;outline:none}
  .mobile-app-header__menu svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}
  .mobile-app-header__logo{display:flex;grid-column:2;align-items:center;justify-content:center;min-width:0}
  .mobile-app-header__logo img{display:block;width:min(48vw,154px);height:auto;max-width:100%;object-fit:contain}
  .mobile-app-header__balance{grid-column:3;grid-row:1}
  .mobile-app-header + .app-header{display:flex;min-height:0;align-items:flex-start;flex-direction:column;padding:24px 20px}
  .mobile-app-header + .app-header .brand-lockup{width:100%;min-width:0}
  .mobile-app-header + .app-header .brand-link{display:none}
  .mobile-app-header + .app-header .brand-lockup>div{display:block;min-width:0}
  .mobile-app-header + .app-header .page-header-actions{position:static;display:flex;width:100%;transform:none;justify-content:flex-start}
  .mobile-app-header + .app-header .page-header-actions .primary-link,.mobile-app-header + .app-header .page-header-actions .outline-button{width:100%;min-height:44px;padding:11px 16px;font-size:13px;white-space:normal}
  .dashboard-card .mobile-app-header + .app-header{display:none}

  .mobile-navigation-sheet{position:fixed;z-index:100;inset:0;width:100%;height:100%;min-height:100%;overflow:hidden;display:block;visibility:hidden;opacity:0;pointer-events:none;transition:visibility 0s linear .24s,opacity .24s ease}
  .mobile-navigation-sheet.is-open{visibility:visible;opacity:1;pointer-events:auto;transition-delay:0s}
  .mobile-navigation-overlay{position:absolute;inset:0;width:100%;height:100%;border:0;background:rgba(18,34,24,.56);cursor:pointer}
  .mobile-navigation-panel{position:absolute;right:0;bottom:0;left:0;display:flex;height:88vh;height:min(88vh,calc(100vh - env(safe-area-inset-top)));height:min(88dvh,calc(100dvh - env(safe-area-inset-top)));max-height:calc(100dvh - env(safe-area-inset-top));min-height:0;flex-direction:column;padding-bottom:env(safe-area-inset-bottom);border-radius:22px 22px 0 0;background:var(--web-surface,#fff);box-shadow:0 -12px 35px rgba(0,0,0,.18);transform:translateY(100%);transition:transform .24s ease;outline:none;overflow:hidden}
  .mobile-navigation-sheet.is-open .mobile-navigation-panel{transform:translateY(0)}
  .mobile-navigation-handle{flex:0 0 auto;width:34px;height:4px;margin:8px auto 0;border-radius:999px;background:#aebbb1}
  .mobile-navigation-heading{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 20px 10px;border-bottom:1px solid #e8eee9}.mobile-navigation-heading h2{margin:0;font-size:20px}.mobile-navigation-close{display:grid;width:42px;height:42px;place-items:center;padding:0;border:0;border-radius:50%;background:transparent;color:var(--ink);font-size:28px;font-weight:300;line-height:1;cursor:pointer}.mobile-navigation-close:hover,.mobile-navigation-close:focus-visible{background:#f1f6f2;outline:none}
  .mobile-navigation-content{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 20px 14px}
  .mobile-navigation-section{padding:14px 0 12px;border-bottom:1px solid #e8eee9}.mobile-navigation-section h3{margin:0 0 7px;color:var(--muted);font-size:10px;letter-spacing:.08em;text-transform:uppercase}
  .mobile-navigation-quick-links a{display:flex;min-height:44px;align-items:center;gap:10px;border-bottom:1px solid #edf1ed;color:var(--ink);font-size:13px;font-weight:700;text-decoration:none}.mobile-navigation-quick-links svg{width:21px;height:21px}.mobile-navigation-quick-links b{color:#6a9f79;font-size:16px}
  .mobile-navigation-feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.mobile-navigation-feature-grid a{display:flex;min-height:68px;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:6px 4px;border:1px solid #e2ebe3;border-radius:12px;background:#fbfdfb;color:var(--ink);font-size:10px;font-weight:700;text-align:center;text-decoration:none;overflow-wrap:normal;word-break:normal}.mobile-navigation-feature-grid svg{width:22px;height:22px}
  .mobile-navigation-account{padding:14px 0 0}
}

/* Mobile density pass: keep the dashboard's established density as-is while
   bringing secondary portal pages closer to it. Touch targets remain intact. */
@media screen and (max-width:760px){
  .mobile-app-header{min-height:58px;padding:8px 10px}
  .mobile-app-header__menu,.mobile-app-header__balance{width:42px;height:42px}
  .mobile-app-header__logo img{width:min(45vw,146px)}

  .mobile-app-header + .app-header{padding:18px 20px}
  .mobile-app-header + .app-header h1{font-size:27px;line-height:1.15;letter-spacing:-.02em}
  .mobile-app-header + .app-header .page-header-subtitle{margin-top:5px;font-size:12px;line-height:1.4}
  .mobile-app-header + .app-header .page-header-actions{gap:8px}

  .customer-content,.customer-detail-content,.projects-content,.project-overview-content{padding-top:18px;padding-bottom:22px}
  .customer-toolbar,.projects-toolbar{margin-bottom:18px}
  .customer-list,.project-card-grid{gap:10px}
  .customer-list-card,.project-list-card{gap:12px;padding:16px}
  .customer-list-card .outline-button,.project-card-link{min-height:42px}
  .customer-list-card h2,.project-list-card h2{font-size:18px}
  .customer-list-card dl,.project-list-meta{gap:5px 12px}

  .project-group{margin-top:20px}
  .project-group-heading{margin-bottom:10px}
  .project-group-heading h2{font-size:20px}

  .time-report-content{padding:20px 20px 24px}
  .time-week-section,.time-day-section,.time-form-section{padding-bottom:20px}
  .time-day-section,.time-form-section{margin-top:14px;padding-top:14px}
  .time-section-heading{margin-bottom:10px;gap:8px}
  .time-section-heading h2{font-size:20px}
  .time-section-heading p{margin-top:3px;font-size:12px}
  .time-day-entries{gap:8px}
  .time-entry-card{padding:13px}
  .time-entry-card p{margin:6px 0 9px}
  .time-entry-actions{margin-top:10px}
  .time-form-grid{gap:12px}
  .time-form-actions{margin-top:14px}

  .history-content{padding:16px}
  .history-toolbar{gap:12px;margin-bottom:16px}
  .history-toolbar h2{font-size:20px}
  .history-table tbody{gap:10px}
  .history-table tr{padding:14px}
  .history-table td{padding:8px 0}
  .history-table td:nth-child(1){padding-bottom:10px}
}

/* Keep Design Studio cards compact and identical in both color groups. */
.color-studio-group{align-content:start}
.color-card{min-height:0;height:auto}
.color-editor{align-content:start}
.color-reset{align-self:start}

/* Dashboard recent-time rows: one date source, project-first hierarchy. */
.dashboard-time-list{gap:0}
.dashboard-time-row{gap:12px;padding:10px 12px}
.dashboard-time-row .dashboard-row-main{min-width:0}
.dashboard-time-row .dashboard-row-main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dashboard-time-row .dashboard-row-main small{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.dashboard-time-row>b{flex:0 0 auto;white-space:nowrap}
.dashboard-time-row:hover,.dashboard-time-row:focus-visible{background:#f8fcf9;outline:none}
.dashboard-document-row:hover,.dashboard-document-row:focus-visible{background:#f8fcf9;outline:none}
@media screen and (max-width:760px){
  .dashboard-document-list{gap:0;border-top:1px solid #edf1ed}
  .dashboard-document-row{border:0;border-bottom:1px solid #edf1ed;border-radius:0;background:transparent;padding:10px 2px}
  .dashboard-document-row strong{font-size:13px}.dashboard-document-row small{font-size:10px}
}

/* Keep document history aligned with the same mobile shell as the editor pages. */
@media screen and (max-width:760px){
  .history-shell{width:100%;max-width:none;margin:0;padding:14px max(14px,env(safe-area-inset-right)) 14px max(14px,env(safe-area-inset-left))}
  .history-card{width:100%;min-width:0}
}

/* Shared mobile navigation and action dock for longer editors. */
.mobile-bottom-back{display:none}
@media screen and (max-width:760px){
  body.history-page>main.history-shell{width:auto;max-width:none;margin:0;padding-top:14px;padding-right:max(14px,env(safe-area-inset-right));padding-bottom:14px;padding-left:max(14px,env(safe-area-inset-left))}
  body.history-page>main.history-shell>.history-card{width:100%;max-width:none;margin:0}
}
@media screen and (max-width:760px){
  .mobile-bottom-back{
    display:inline-flex;
    align-items:center;
    min-height:44px;
    margin:22px 0 10px;
    color:var(--orange);
    font-size:14px;
    font-weight:700;
    text-decoration:none;
  }
  .mobile-action-footer{
    position:static;
    margin-top:22px!important;
    padding:16px 0 0!important;
    border-top:1px solid var(--line);
    background:transparent;
    box-shadow:none;
    backdrop-filter:none;
  }
  .form-actions.mobile-action-footer>p{display:none}
  .form-actions.mobile-action-footer .action-buttons{
    display:grid;
    width:100%;
    grid-template-columns:minmax(0,1fr);
    gap:8px;
  }
  /* PDF controls are wrapped into their own group. Keep every primary action
     full width on mobile instead of leaving the preview button in a narrow
     desktop-style grid cell. */
  .form-actions.mobile-actions-three .action-buttons{grid-template-columns:minmax(0,1fr)}
  .form-actions.mobile-actions-four .action-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}
  .form-actions.mobile-action-footer .action-buttons>button,
  .form-actions.mobile-action-footer .action-buttons>.document-pdf-actions{
    width:100%;
    min-width:0;
    min-height:0;
    height:auto;
    margin:0;
    padding:12px 16px;
    border-radius:9px;
    font-family:inherit;
    font-size:14px;
    font-weight:700;
    line-height:1.2;
    text-align:center;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .form-actions.mobile-action-footer .action-buttons>button{
    display:flex;
    align-items:center;
    justify-content:center;
    align-self:stretch;
    box-sizing:border-box;
    height:48px;
    min-height:48px;
    min-width:0!important;
    -webkit-appearance:none;
    appearance:none;
  }
  .form-actions.mobile-action-footer .action-buttons>.document-pdf-actions{
    display:contents;
    width:100%;
    min-width:0;
  }
  .form-actions.mobile-action-footer .document-pdf-actions>.pdf-engine-option,
  .form-actions.mobile-action-footer .document-pdf-actions>#printButton{
    display:flex;
    align-items:center;
    justify-content:center;
    align-self:stretch;
    box-sizing:border-box;
    width:100%;
    min-width:0!important;
    min-height:0;
    height:48px;
    margin:0;
    padding:12px 16px;
    border-radius:9px;
    font-family:inherit;
    font-size:14px;
    font-weight:700;
    line-height:1.2;
    text-align:center;
    white-space:normal;
    overflow-wrap:anywhere;
    -webkit-appearance:none;
    appearance:none;
  }
  .form-actions.mobile-action-footer .history-link{display:flex;align-items:center;justify-content:center}
  .form-actions.mobile-action-footer .status-controls{grid-column:1/-1}
  .project-save-bar.mobile-action-footer,
  .settings-save-bar.mobile-action-footer{
    align-items:stretch;
    flex-direction:column;
    margin:0 -20px -24px!important;
    padding:14px 20px!important;
    border-top:1px solid var(--line);
    background:transparent;
  }
  .project-save-bar.mobile-action-footer button,
  .settings-save-bar.mobile-action-footer button,
  .prices-save-controls button{width:100%}
  .prices-save-controls p{white-space:normal}
}
/* Authentication and role administration */
.auth-shell{max-width:560px;min-height:100vh;display:grid;align-items:center}.auth-card{padding:clamp(28px,5vw,52px)}
.auth-logo{display:block;width:min(260px,80%);height:auto;margin:0 auto 28px}.auth-eyebrow{color:var(--orange);font-weight:800;letter-spacing:.16em;font-size:.78rem}.auth-card h1{margin:.25rem 0 .5rem;font-size:32px;line-height:1.12;letter-spacing:-.02em}
.auth-form{display:grid;gap:18px;margin-top:24px}.auth-form label,.settings-grid label{display:grid;gap:8px;font-weight:700}.auth-form input{width:100%;box-sizing:border-box;min-height:52px;border:1px solid var(--line);border-radius:12px;padding:0 15px;background:var(--web-surface,#fff);color:var(--web-text,#222);font:inherit}.auth-form button{min-height:50px;padding:12px 20px;border:0;border-radius:9px;background:var(--orange);color:#fff;font:inherit;font-weight:700;cursor:pointer;box-shadow:0 8px 18px rgba(240,126,0,.18)}.auth-form button:hover,.auth-form button:focus-visible{background:var(--orange-dark);outline:2px solid rgba(240,126,0,.35);outline-offset:2px}
.auth-message{border-radius:12px;padding:14px 16px;margin:18px 0}.auth-message.error{background:#fff1f1;border:1px solid #efb5b5;color:#8b1e1e}.auth-message.success{background:#effaf3;border:1px solid #a9dfbb;color:#145c2a}
.account-strip{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 36px;border-top:1px solid #e7e7e7;color:#666;font-size:13px}.account-strip form{margin:0}.secondary-button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;border:1px solid var(--orange);color:var(--orange);background:#fff;border-radius:9px;padding:9px 14px;font-size:13px;font-weight:700;cursor:pointer;transition:background .15s ease,color .15s ease,box-shadow .15s ease,transform .15s ease}.secondary-button:hover{background:var(--orange-soft);color:var(--orange-dark);box-shadow:0 4px 12px rgba(240,126,0,.14)}.secondary-button:active{transform:translateY(1px)}.secondary-button:focus-visible{outline:2px solid rgba(240,126,0,.35);outline-offset:2px}
.account-strip-user{display:flex;min-width:0;align-items:center;gap:9px}.account-strip-user .mobile-navigation-avatar{display:grid;flex:0 0 36px;width:36px;height:36px;place-items:center;border-radius:50%;background:#eaf6ed;color:#37854d;font-size:12px;font-weight:800}.account-strip-user strong,.account-strip-user small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-strip-user strong{font-size:13px;color:var(--ink)}.account-strip-user small{margin-top:3px;color:var(--muted);font-size:11px}.account-strip .mobile-navigation-logout{display:flex;min-height:42px;align-items:center;gap:7px;padding:0;border:0;background:transparent;color:#b42318;font:inherit;font-size:13px;font-weight:800;cursor:pointer}.account-strip .mobile-navigation-logout:hover,.account-strip .mobile-navigation-logout:focus-visible{color:#8f1d16}.account-strip .mobile-navigation-logout:focus-visible{outline:2px solid #e2a29b;outline-offset:4px}.account-strip .mobile-navigation-logout svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}
@media screen and (min-width:761px){.dashboard-content{padding-bottom:16px}.dashboard-features-section{padding-top:12px;border-bottom:0}.account-strip{padding-top:10px;padding-bottom:14px;border-top:0}}
.users-content,.profile-content{padding:32px 36px 38px}.user-list{display:grid;gap:16px}.user-card{display:grid;grid-template-columns:minmax(220px,.7fr) minmax(0,1.3fr);gap:24px;padding:20px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 6px 20px rgba(0,0,0,.045)}.user-summary{display:grid;align-content:start;gap:6px}.role-badge{width:max-content;padding:6px 10px;border-radius:999px;background:var(--orange-soft);color:var(--orange-dark);font-weight:700;font-size:.85rem}.user-actions{display:grid;gap:10px}.user-actions form{display:flex;gap:10px;align-items:center}.user-actions input,.user-actions select{min-width:0;flex:1;min-height:44px;border:1px solid var(--line);border-radius:9px;padding:0 12px;background:#fff;color:var(--ink);font:inherit}.user-actions button,.users-content .settings-grid>button,.profile-content .settings-grid>button{min-height:44px;padding:11px 16px;border:1px solid var(--orange);border-radius:9px;background:var(--orange);color:#fff;font:inherit;font-weight:700;cursor:pointer}.user-actions button:hover,.users-content .settings-grid>button:hover,.profile-content .settings-grid>button:hover{background:var(--orange-dark)}.danger-button{color:#a92727!important;border-color:#e3b2b2!important;background:#fff!important}
.administration-grid{padding:clamp(24px,4vw,48px)}.system-information{margin:0 clamp(24px,4vw,48px) clamp(24px,4vw,48px)}.system-information dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px}.system-information dl div{padding:14px;border:1px solid #ddd;border-radius:12px}.system-information dt{font-size:.78rem;text-transform:uppercase;color:#777;font-weight:800}.system-information dd{margin:6px 0 0;font-weight:700}
.administration-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:24px clamp(24px,4vw,48px);border-bottom:1px solid #ececec}.administration-nav a{display:grid;gap:5px;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--web-surface,#fff);color:var(--ink);text-decoration:none}.administration-nav a:hover,.administration-nav a:focus-visible{border-color:var(--orange);outline:none}.administration-nav small{color:var(--muted);font-size:12px}.administration-module{margin:0 clamp(24px,4vw,48px)}.permission-admin-note{display:flex;gap:10px;align-items:center;margin:0 0 20px;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--muted)}.permission-admin-note strong{color:var(--ink)}
@media(max-width:720px){.administration-nav{grid-template-columns:1fr;padding:20px}.administration-module{margin:0 20px}.permission-admin-note{align-items:flex-start;flex-direction:column;gap:3px}}

/* Shared primary action styling for buttons that are not inside a form footer. */
.primary-button{display:inline-flex;min-height:46px;min-width:180px;align-items:center;justify-content:center;padding:14px 24px;border:0;border-radius:9px;background:var(--orange);color:#fff;font:inherit;font-weight:700;line-height:1.25;cursor:pointer;transition:background .15s ease,transform .15s ease,box-shadow .15s ease}
.primary-button:hover{background:var(--orange-dark);box-shadow:0 6px 14px rgba(240,126,0,.18)}
.primary-button:focus-visible{outline:2px solid rgba(240,126,0,.35);outline-offset:2px}
.primary-button:disabled{opacity:.55;cursor:wait}
.permission-actions{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:10px}
@media(max-width:720px){.permission-actions{grid-template-columns:minmax(0,1fr)}.permission-actions .primary-button,.permission-actions .outline-button{width:100%}}
.permissions-admin{margin:0 clamp(24px,4vw,48px)}.permissions-matrix{display:grid;gap:24px}.permission-group h3{margin:0 0 10px}.permission-table{border:1px solid var(--line);border-radius:12px;overflow:hidden}.permission-row{display:grid;grid-template-columns:minmax(220px,1fr) 110px 110px;gap:12px;align-items:center;padding:13px 16px;border-top:1px solid #ececec;background:var(--web-surface,#fff)}.permission-row:first-child{border-top:0}.permission-row>span{display:grid;gap:3px}.permission-row small{color:var(--muted);font-size:12px;line-height:1.35}.permission-row input{justify-self:center;width:20px;height:20px;accent-color:var(--orange)}.permission-header{background:#f8f8f8;font-size:12px;font-weight:800;text-transform:uppercase;color:var(--muted)}.permission-header span:not(:first-child){text-align:center}.permission-actions{display:flex;flex-wrap:wrap;gap:10px}
 @media(max-width:720px){.account-strip{align-items:flex-start;flex-direction:column;padding:20px}.user-card{grid-template-columns:1fr}.user-actions form{align-items:stretch;flex-direction:column}.users-content,.profile-content{padding:20px}.permission-row{grid-template-columns:minmax(0,1fr) 72px 72px;padding:12px 10px;gap:6px}.permission-row small{font-size:11px}.permission-header{font-size:10px}}

/* Settings account and user management share the same compact admin cards. */
.account-settings-panel,.users-settings-panel{padding:32px 36px 38px}
.account-forms{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}
.account-form-card,.users-create-section,.users-list-section{margin:0;padding:22px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 6px 20px rgba(0,0,0,.045)}
.account-form-card h3,.users-create-section h3,.users-list-section h3{margin:0 0 16px;font-size:21px}
.account-form-card .settings-grid,.settings-users-form{grid-template-columns:1fr;gap:14px}
.account-form-card .primary-button,.settings-users-form .primary-button{width:100%;min-height:48px;margin-top:16px}
.users-create-section{margin-bottom:24px}
.settings-user-list{gap:14px}
.settings-user-card{padding:18px;grid-template-columns:minmax(180px,.65fr) minmax(0,1.35fr)}
.settings-user-card .user-actions{gap:8px}
@media(max-width:820px){.account-forms{grid-template-columns:1fr}.account-settings-panel,.users-settings-panel{padding:24px 20px 30px}.settings-user-card{grid-template-columns:1fr}}

/* Auth administration uses the same compact card rhythm as the settings tabs. */
.users-card .users-content{padding:28px 36px 34px}
.users-card .users-content>.settings-section{padding:24px 0}
.users-card .user-card{grid-template-columns:minmax(210px,.55fr) minmax(0,1.45fr);gap:20px;padding:18px;align-items:start}
.users-card .user-actions{align-content:start;gap:10px}
.users-card .user-actions form{min-width:0}
.users-card .user-actions input,.users-card .user-actions select{box-sizing:border-box;min-height:46px;height:46px}
@media(max-width:720px){.users-card .users-content{padding:22px 20px 28px}.users-card .user-card{grid-template-columns:1fr}}

/* Authentication views share the same controls as the rest of the portal. */
.users-content,.profile-content{padding:30px 36px 38px}
.users-content>.settings-section,.profile-content>.settings-section{padding:26px 0}
.users-content input,.users-content select,.profile-content input,.profile-content select{box-sizing:border-box;width:100%;min-width:0;min-height:48px;margin-top:8px;padding:12px 14px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);font:inherit}
.users-content button,.profile-content button{min-height:44px;padding:11px 18px;border:1px solid var(--orange);border-radius:9px;background:#fff;color:var(--orange);font:inherit;font-weight:700;cursor:pointer}
.users-content .settings-grid>button,.profile-content .settings-grid>button{background:var(--orange);color:#fff}
.user-card{background:#fff;box-shadow:0 6px 20px rgba(0,0,0,.04)}
.account-forms{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.account-form-card{padding:20px;border:1px solid var(--line);border-radius:14px;background:#fafafa}
.account-form-card h3{margin:0 0 14px;font-size:17px}
.account-form-card button{margin-top:16px;background:var(--orange);color:#fff}
.admin-backup-card{margin-top:18px}
.admin-backup-status{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0;padding:0}
.admin-backup-status div{padding:14px;border:1px solid var(--line);border-radius:10px;background:#fff}
.admin-backup-status dt{color:var(--muted);font-size:11px}.admin-backup-status dd{margin:4px 0 0;font-size:14px;font-weight:700}
@media(max-width:720px){.admin-backup-status{grid-template-columns:minmax(0,1fr)}}
@media(max-width:720px){.users-content,.profile-content{padding:22px 20px 28px}.account-forms{grid-template-columns:minmax(0,1fr)}}

@media(max-width:760px){
  .time-report-content{padding:22px 20px 28px}
  .time-section-heading{align-items:flex-start;flex-direction:column;gap:12px}
  .time-week-actions{display:grid;width:100%;grid-template-columns:repeat(3,minmax(0,1fr))}
  .time-week-actions button{width:100%;padding:10px 6px}
  .time-week-days{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .time-day-card{min-height:96px}
  .time-day-card:last-child{grid-column:1/-1}
  .time-form-grid{grid-template-columns:minmax(0,1fr)}
  .time-comment-field{grid-column:auto}
  .time-form-actions{align-items:stretch;flex-direction:column}
  .time-form-actions .time-form-status{min-height:0}
  .time-form-actions button{width:100%}
  .time-entry-meta{align-items:flex-start;flex-direction:column;gap:8px}
}

/* Account and user-management forms use the same primary action component as
   the rest of the portal.  The older embedded forms only had a class name;
   without these scoped rules the browser fell back to its native grey button. */
.account-form-card button.primary-button,
.users-settings-panel button.primary-button,
.users-settings-panel .user-actions button:not(.danger-button){
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:11px 18px;
  border:1px solid var(--orange);
  border-radius:9px;
  background:var(--orange);
  color:#fff;
  font:inherit;
  font-weight:700;
  cursor:pointer;
  transition:background .15s ease,transform .15s ease,box-shadow .15s ease;
}
.account-form-card button.primary-button:hover,
.users-settings-panel button.primary-button:hover,
.users-settings-panel .user-actions button:not(.danger-button):hover{background:var(--orange-dark);box-shadow:0 6px 14px rgba(240,126,0,.18)}
.account-form-card button.primary-button:focus-visible,
.users-settings-panel button.primary-button:focus-visible,
.users-settings-panel .user-actions button:focus-visible{outline:2px solid rgba(240,126,0,.35);outline-offset:2px}
.users-settings-panel .user-actions .danger-button{background:#fff!important;color:#a92727!important;border-color:#e3b2b2!important}

/* Keep the embedded user-management tab dense: the summary stays on the
   left while the controls use a compact two-column action grid instead of
   leaving large empty vertical bands between forms. */
.settings-user-card .user-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  align-content:start;
}
.settings-user-card .user-actions form{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  min-width:0;
  align-items:center;
}
.settings-user-card .user-actions form:nth-child(3){grid-column:1/-1}
.settings-user-card .user-actions form:nth-child(4){grid-column:1/-1;max-width:320px}
.settings-user-card .user-actions input,
.settings-user-card .user-actions select{width:100%;min-width:0}
@media(max-width:820px){
  .settings-user-card .user-actions{grid-template-columns:minmax(0,1fr)}
  .settings-user-card .user-actions form,
  .settings-user-card .user-actions form:nth-child(3),
  .settings-user-card .user-actions form:nth-child(4){grid-column:auto;max-width:none}
}

/* Keep the login view visually aligned with portal actions on every device. */
.auth-card h1{font-size:clamp(30px,5vw,38px);font-weight:750;line-height:1.1}
.auth-form button{width:100%;min-height:50px;padding:12px 20px;border-radius:9px}
@media(max-width:720px){.auth-shell{padding:16px}.auth-card{padding:28px 24px}.auth-logo{width:min(220px,82%);margin-bottom:22px}}

/* Keep dashboard and document headings readable on narrow iPhone viewports. */
@media screen and (max-width:760px){
  .dashboard-header{width:100%;min-width:0;overflow:hidden}
  .dashboard-header>div{width:100%;min-width:0;max-width:100%}
  .dashboard-header h1,.dashboard-header span{max-width:100%;overflow-wrap:anywhere;word-break:break-word}
  .dashboard-header .brand-lockup{
    width:100%;
    min-width:0;
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:14px;
  }
  .dashboard-header .brand-lockup>div{width:100%;min-width:0;max-width:100%}
  .dashboard-header .brand-lockup img{align-self:flex-start!important;width:min(210px,78vw);height:auto}
}
.brand-link{display:inline-flex;line-height:0;text-decoration:none;color:inherit}.brand-link:hover{opacity:.92}

/* Shared web PageHeader: keep dashboard/project, module and history pages on
   one responsive header system.  These rules are web-only and do not affect
   the document/PDF markup. */
.dashboard-card>.dashboard-header,
.app-shell>.app-card>.app-header,
.history-card>.app-header,
.system-card>.page-header,
.project-card>.page-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  min-height:150px;
  padding:var(--portal-header-padding);
}
.app-shell>.app-card>.app-header .brand-lockup,
.history-card>.app-header .brand-lockup,
.system-card>.page-header .brand-lockup,
.project-card>.page-header .brand-lockup{
  display:flex;
  align-items:center;
  gap:24px;
  min-width:0;
  flex:1 1 auto;
}
.app-shell>.app-card>.app-header .brand-lockup img,
.history-card>.app-header .brand-lockup img,
.system-card>.page-header .brand-lockup img,
.project-card>.page-header .brand-lockup img{
  width:190px;
  height:108px;
  max-width:34vw;
  flex:0 0 auto;
  object-fit:contain;
}
.app-shell>.app-card>.app-header .brand-lockup>div,
.history-card>.app-header .brand-lockup>div,
.system-card>.page-header .brand-lockup>div,
.project-card>.page-header .brand-lockup>div{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
  max-width:100%;
}
.app-shell>.app-card>.app-header .brand-lockup h1,
.history-card>.app-header .brand-lockup h1,
.system-card>.page-header h1,
.project-card>.page-header h1{
  margin:0;
  max-width:100%;
  font-size:32px;
  line-height:1.1;
  letter-spacing:-.02em;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.app-shell>.app-card>.app-header .brand-lockup p,
.history-card>.app-header .brand-lockup p,
.system-card>.page-header .page-header-system-name,
.project-card>.page-header .page-header-system-name{
  margin:0 0 6px;
  color:var(--orange);
  font-size:11px;
  font-weight:800;
  letter-spacing:.14em;
  line-height:1.2;
  text-transform:uppercase;
}
.app-shell>.app-card>.app-header .brand-lockup .page-header-subtitle,
.history-card>.app-header .brand-lockup .page-header-subtitle,
.system-card>.page-header .page-header-subtitle,
.project-card>.page-header .page-header-subtitle{
  display:block;
  max-width:62ch;
  margin-top:7px;
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
  overflow-wrap:anywhere;
}
.app-shell>.app-card>.app-header .brand-lockup .page-header-subtitle,
.history-card>.app-header .brand-lockup .page-header-subtitle,
.system-card>.page-header .brand-lockup .page-header-subtitle,
.project-card>.page-header .brand-lockup .page-header-subtitle{
  display:block;
  visibility:visible;
  order:2;
}
.app-shell>.app-card>.app-header .brand-lockup .page-header-system-name,
.history-card>.app-header .brand-lockup .page-header-system-name,
.system-card>.page-header .brand-lockup .page-header-system-name,
.project-card>.page-header .brand-lockup .page-header-system-name{order:3}
.app-shell>.app-card>.app-header .top-meta,
.history-card>.app-header .top-meta,
.system-card>.page-header .page-header-actions,
.project-card>.page-header .page-header-actions{
  flex:0 1 auto;
  min-width:0;
}
@media screen and (max-width:760px){
  .dashboard-card>.dashboard-header,
  .app-shell>.app-card>.app-header,
  .history-card>.app-header,
  .system-card>.page-header,
  .project-card>.page-header{
    align-items:flex-start;
    flex-direction:column;
    gap:14px;
    min-height:0;
    padding:24px 20px;
  }
  .app-shell>.app-card>.app-header .brand-lockup,
  .history-card>.app-header .brand-lockup,
  .system-card>.page-header .brand-lockup,
  .project-card>.page-header .brand-lockup{
    width:100%;
    align-items:flex-start;
    flex-direction:column;
    gap:10px;
  }
  .app-shell>.app-card>.app-header .brand-lockup img,
  .history-card>.app-header .brand-lockup img,
  .system-card>.page-header .brand-lockup img,
  .project-card>.page-header .brand-lockup img{
    width:min(52vw,210px);
    max-width:100%;
    height:auto;
  }
  .app-shell>.app-card>.app-header .brand-lockup h1,
  .history-card>.app-header .brand-lockup h1,
  .system-card>.page-header h1,
  .project-card>.page-header h1{
    font-size:clamp(26px,8vw,34px);
    line-height:1.1;
  }
  .app-shell>.app-card>.app-header .top-meta,
  .history-card>.app-header .top-meta,
  .system-card>.page-header .page-header-actions,
  .project-card>.page-header .page-header-actions{
    width:100%;
    max-width:100%;
  }
}
/* Compact calendar treatment for time-reporting v1. */
.time-week-heading{align-items:center;margin-bottom:12px}
.time-week-heading-side{display:flex;align-items:center;justify-content:flex-end;gap:18px}
.time-week-actions{display:flex;align-items:center;gap:6px}
.time-week-actions button{min-width:38px;min-height:36px;padding:7px 10px}
.time-week-actions .time-today-button{min-width:52px}
.time-week-summary{display:flex;align-items:baseline;gap:8px;margin:0;padding:0;background:none;white-space:nowrap}
.time-week-summary span{font-size:12px}
.time-week-summary strong{font-size:18px;color:var(--orange)}
.time-week-days{grid-template-columns:repeat(7,minmax(0,1fr));gap:0;border:1px solid var(--line);border-radius:11px;overflow:hidden;background:var(--line)}
.time-day-card{min-height:84px;padding:10px 8px;border:0;border-right:1px solid var(--line);border-radius:0;background:#fff;box-shadow:none;justify-content:space-between}
.time-day-card:last-child{border-right:0}
.time-day-card:hover,.time-day-card:focus-visible{box-shadow:none;transform:none}
.time-day-card.is-selected{border-color:var(--line);box-shadow:inset 0 0 0 2px #6a9f79;background:#f4faf5}
.time-day-card.is-today:not(.is-selected)::before{content:"";width:5px;height:5px;margin:-4px auto 0;border-radius:50%;background:#9ab6a1}
.time-day-name{font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.time-day-number{font-size:22px;line-height:1}
.time-day-total{font-size:12px;color:#4b7b59}
.time-report-status{min-height:16px;margin:8px 0 0}
.time-day-section,.time-form-section{margin-top:22px;padding-top:22px}
.time-day-section .time-section-heading{margin-bottom:10px}
.time-empty{padding:13px 16px;border-radius:8px;text-align:left}

@media(max-width:760px){
  .time-week-heading{align-items:stretch;gap:8px}
  .time-week-heading-side{align-items:center;justify-content:space-between;gap:12px}
  .time-week-actions{flex:1;justify-content:space-between}
  .time-week-actions button{min-width:36px;min-height:38px;padding:7px 9px}
  .time-week-actions .time-today-button{min-width:52px}
  .time-week-summary{gap:5px}
  .time-week-summary span{font-size:11px}
  .time-week-summary strong{font-size:17px}
  .time-week-days{width:100%;grid-template-columns:repeat(7,minmax(0,1fr));border-radius:9px}
  .time-day-card{min-height:72px;padding:8px 2px;align-items:center}
  .time-day-card:last-child{grid-column:auto;border-right:0}
  .time-day-name{font-size:9px;letter-spacing:0}
  .time-day-number{font-size:19px}
  .time-day-total{font-size:10px;white-space:nowrap}
  .time-day-card.is-today:not(.is-selected)::before{width:4px;height:4px;margin:-3px auto 0}
}

@media(max-width:370px){
  .time-report-content{padding-left:14px;padding-right:14px}
  .time-day-card{min-height:68px;padding-left:1px;padding-right:1px}
  .time-day-name{font-size:8px}
  .time-day-number{font-size:18px}
  .time-day-total{font-size:9px}
}

/* Calendar state polish: empty, populated, selected and today remain independent. */
.time-view-filter{display:inline-flex;gap:0;margin-top:8px;padding:2px;border:1px solid var(--line);border-radius:8px;background:var(--panel)}
.time-view-filter button{min-height:30px;padding:5px 12px;border:0;border-radius:6px;background:transparent;color:var(--muted);font:inherit;font-size:12px;font-weight:700;cursor:pointer}
.time-view-filter button.is-active{background:#fff;color:#4b7b59;box-shadow:0 1px 4px rgba(0,0,0,.08)}
.time-day-card.has-time{background:#f3faf4}
.time-day-card.has-time .time-day-total{color:#286532;font-weight:800}
.time-day-card.has-time.is-selected{background:#edf8ef;box-shadow:inset 0 0 0 2px #6a9f79}
.time-day-card:not(.has-time).is-selected{background:#f7fbf8;box-shadow:inset 0 0 0 2px #6a9f79}
.time-day-card.is-today:not(.is-selected)::before{content:none}

@media(max-width:760px){
  .time-week-actions{display:flex!important;flex-direction:row;align-items:center;justify-content:space-between;gap:6px}
  .time-week-heading-side{display:flex;align-items:center;gap:10px}
  .time-week-actions .time-week-arrow{flex:0 0 38px;width:38px;padding-left:0;padding-right:0}
  .time-week-actions .time-today-button{flex:0 0 auto;width:auto}
  .time-view-filter{margin-top:6px}
  .time-day-section,.time-form-section{margin-top:14px;padding-top:14px;padding-bottom:20px}
  .time-entry-card{padding:12px}
  .time-entry-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
  .time-entry-actions button{width:100%;min-height:42px;padding:9px 8px}
}

/* Mobile dashboard branding remains intentionally compact and centered. */
@media screen and (max-width:760px){
  .dashboard-card>.dashboard-header{padding:20px 20px 18px}
}

/* The week view and following day view use the same compact section gap. */
.time-week-section{padding-bottom:0}

/* The text span must not inherit the fixed icon sizing rule. */
.dashboard-quick-links a>span{
  display:block;
  flex:1 1 auto;
  min-width:0;
  width:auto;
  height:auto;
  background:transparent;
  color:inherit;
}
.dashboard-quick-links strong,
.dashboard-quick-links small{
  overflow-wrap:normal;
  word-break:normal;
}
.dashboard-quick-links strong{white-space:nowrap}
.dashboard-quick-links small{white-space:nowrap}
@media(max-width:760px){
  .dashboard-quick-links a>span{width:100%;flex:0 1 auto}
  .dashboard-quick-links strong{white-space:normal}
  .dashboard-quick-links small{white-space:normal}
}

/* Dashboard icon palette and mobile navigation sheet. */
.dashboard-icon-green{color:#37854d}.dashboard-icon-blue{color:#3b6fe5}.dashboard-icon-orange{color:#df7b1b}.dashboard-icon-purple{color:#8151d6}.dashboard-icon-pink{color:#cf477e}.dashboard-icon-teal{color:#168f9a}
.dashboard-quick-links small{display:none}
.dashboard-feature-links svg.dashboard-icon-green,.dashboard-feature-links svg.dashboard-icon-blue,.dashboard-feature-links svg.dashboard-icon-orange,.dashboard-feature-links svg.dashboard-icon-purple,.dashboard-feature-links svg.dashboard-icon-pink,.dashboard-feature-links svg.dashboard-icon-teal{stroke:currentColor}
.dashboard-row-icon.dashboard-icon-green{stroke:#37854d}.dashboard-row-icon.dashboard-icon-blue{stroke:#3b6fe5}.dashboard-row-icon.dashboard-icon-orange{stroke:#df7b1b}
.dashboard-quick-links svg.dashboard-icon-green{background:#eaf6ed;stroke:#37854d}.dashboard-quick-links svg.dashboard-icon-blue{background:#edf2ff;stroke:#3b6fe5}.dashboard-quick-links svg.dashboard-icon-orange{background:#fff1e4;stroke:#df7b1b}
.page-header-mobile-left,.page-header-mobile-right{display:none}
.dashboard-bottom-sheet{display:none}
.dashboard-mobile-all-functions{display:none}
.visually-hidden{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}

/* Compact dashboard time overview: one information row on desktop, 2x2 on mobile. */
.dashboard-time-summary{padding-top:18px;padding-bottom:18px}
.dashboard-time-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center;border:1px solid #e1e9e2;border-radius:10px;background:#fbfdfb}
.dashboard-time-kpi{min-width:0;padding:13px 16px;border-right:1px solid #e1e9e2}
.dashboard-time-kpi:last-child{border-right:0}
.dashboard-time-kpi span{display:block;overflow:hidden;color:var(--muted);font-size:10px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}
.dashboard-time-kpi strong{display:block;margin-top:5px;color:#34794a;font-size:20px;line-height:1.1}
.dashboard-time-kpi-uninvoiced strong,.dashboard-time-kpi-total strong{color:#df7b1b}
.dashboard-time-kpi-total{background:#fffaf5;border-radius:0 9px 9px 0}
.dashboard-time-kpi-total span{color:#c46b18}.dashboard-time-kpi-total strong{font-weight:800}
.dashboard-time-progress{display:grid;gap:5px;max-width:52%;margin:8px auto 0;text-align:center}
.dashboard-time-progress-track{display:flex;height:6px;overflow:hidden;border-radius:999px;background:#f8dcc5}
.dashboard-time-progress-invoiced{background:#34794a}.dashboard-time-progress-uninvoiced{background:#f28a32}
.dashboard-time-progress small{color:var(--muted);font-size:10px}
.projects-list-cell-worked small.has-uninvoiced{color:#c46b18}
.dashboard-time-summary-heading-actions{display:flex;align-items:center;gap:14px;color:var(--orange-dark);font-size:12px;font-weight:700}
.dashboard-time-summary-heading-actions>span:last-child{white-space:nowrap}
@media screen and (max-width:760px){
  .dashboard-time-summary{padding-top:16px;padding-bottom:16px}
  .dashboard-time-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;border:0;background:transparent}
  .dashboard-time-kpi{padding:10px 11px;border:1px solid #e1e9e2;border-radius:9px;background:#fbfdfb}
  .dashboard-time-kpi:last-child{border-right:1px solid #e1e9e2}
  .dashboard-time-kpi span{font-size:9px}.dashboard-time-kpi strong{font-size:17px;margin-top:4px}
  .dashboard-time-kpi-total{background:#fffaf5;border-color:#f5cba9;border-radius:9px}
  .dashboard-time-progress{display:none}
  .dashboard-time-summary-heading-actions{gap:8px;flex-wrap:wrap;justify-content:flex-end}
}

@media screen and (max-width:760px){
  .dashboard-card>.dashboard-header{position:relative;display:flex;min-height:72px;align-items:center;justify-content:center;padding:12px 54px;border-bottom:1px solid #e8eee9}
  .dashboard-card>.dashboard-header .brand-lockup{display:block!important;width:auto;min-width:0}
  .dashboard-card>.dashboard-header .brand-lockup>div{display:none}
  .dashboard-card>.dashboard-header .brand-lockup img{display:block;width:min(48vw,154px);height:auto;max-width:100%}
  .dashboard-card>.dashboard-header .page-header-mobile-left,.dashboard-card>.dashboard-header .page-header-mobile-right{position:absolute;top:50%;display:grid;place-items:center;width:40px;height:40px;transform:translateY(-50%)}
  .dashboard-card>.dashboard-header .page-header-mobile-left{left:12px}.dashboard-card>.dashboard-header .page-header-mobile-right{right:12px}
  .dashboard-mobile-menu-trigger{display:grid;width:40px;height:40px;place-items:center;padding:0;border:0;border-radius:50%;background:transparent;color:#315f3d;cursor:pointer}
  .dashboard-mobile-menu-trigger:hover,.dashboard-mobile-menu-trigger:focus-visible{background:#edf7ef;outline:none}
  .dashboard-mobile-menu-trigger svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}
  .dashboard-mobile-header-spacer{display:block;width:40px;height:40px}
  .dashboard-bottom-sheet{position:fixed;z-index:100;inset:0;display:block;visibility:hidden;opacity:0;pointer-events:none;transition:visibility 0s linear .24s,opacity .24s ease}
  .dashboard-bottom-sheet.is-open{visibility:visible;opacity:1;pointer-events:auto;transition-delay:0s}
  .dashboard-sheet-overlay{position:absolute;inset:0;width:100%;height:100%;border:0;background:rgba(18,34,24,.56);cursor:pointer}
  .dashboard-sheet-panel{position:absolute;right:0;bottom:0;left:0;display:flex;max-height:88vh;flex-direction:column;border-radius:22px 22px 0 0;background:var(--web-surface,#fff);box-shadow:0 -12px 35px rgba(0,0,0,.18);transform:translateY(100%);transition:transform .24s ease;outline:none}
  .dashboard-bottom-sheet.is-open .dashboard-sheet-panel{transform:translateY(0)}
  .dashboard-mobile-all-functions{display:flex;width:100%;min-height:48px;align-items:center;gap:10px;margin:0 0 4px;padding:0 4px;border:0;border-bottom:1px solid #e8eee9;background:transparent;color:#34794a;font:inherit;font-size:13px;font-weight:800;text-align:left;cursor:pointer}.dashboard-mobile-all-functions svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}.dashboard-mobile-all-functions span{flex:1}.dashboard-mobile-all-functions b{font-size:16px}.dashboard-mobile-all-functions:focus-visible{outline:2px solid #9bc1a4;outline-offset:3px}
  .dashboard-features-section{display:none}
  .dashboard-sheet-handle{flex:0 0 auto;width:34px;height:4px;margin:10px auto 0;border-radius:999px;background:#aebbb1}
  .dashboard-sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 20px 14px;border-bottom:1px solid #e8eee9}
  .dashboard-sheet-heading h2{margin:0;font-size:20px}.dashboard-sheet-close{display:grid;width:42px;height:42px;place-items:center;padding:0;border:0;border-radius:50%;background:transparent;color:var(--ink);font-size:28px;font-weight:300;line-height:1;cursor:pointer}.dashboard-sheet-close:hover,.dashboard-sheet-close:focus-visible{background:#f1f6f2;outline:none}
  .dashboard-sheet-content{min-height:0;overflow-y:auto;padding:0 20px calc(18px + env(safe-area-inset-bottom))}
  .dashboard-sheet-section{padding:18px 0 16px;border-bottom:1px solid #e8eee9}.dashboard-sheet-section h3{margin:0 0 9px;color:var(--muted);font-size:10px;letter-spacing:.08em;text-transform:uppercase}
  .dashboard-sheet-quick-links{display:grid;gap:0}.dashboard-sheet-quick-links a{display:flex;min-height:48px;align-items:center;gap:12px;border-bottom:1px solid #edf1ed;color:var(--ink);font-size:13px;font-weight:700;text-decoration:none}.dashboard-sheet-quick-links a:last-child{border-bottom:0}.dashboard-sheet-quick-links svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}.dashboard-sheet-quick-links span{flex:1}.dashboard-sheet-quick-links b{color:#6a9f79;font-size:16px}
  .dashboard-sheet-feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.dashboard-sheet-feature-grid a{display:flex;min-height:78px;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:8px 5px;border:1px solid #e2ebe3;border-radius:12px;background:#fbfdfb;color:var(--ink);font-size:10px;font-weight:700;text-align:center;text-decoration:none}.dashboard-sheet-feature-grid a:hover,.dashboard-sheet-feature-grid a:focus-visible{border-color:#9bc1a4;background:#f2faf4;outline:none}.dashboard-sheet-feature-grid svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}
  .dashboard-sheet-logout{padding:16px 0 0}.dashboard-sheet-logout button{display:flex;width:100%;min-height:46px;align-items:center;gap:9px;padding:0;border:0;background:transparent;color:#b42318;font:inherit;font-size:13px;font-weight:800;text-align:left;cursor:pointer}.dashboard-sheet-logout button:focus-visible{outline:2px solid #e2a29b;outline-offset:4px}.dashboard-sheet-logout svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}
  body.dashboard-sheet-open{overflow:hidden}
}

@media screen and (max-width:760px){
  .account-strip{display:none}
}

/* Final mobile shell cascade: this follows all legacy shell-specific mobile
   rules so normal portal cards share the same outer viewport gutter. */
@media screen and (max-width:760px){
  .app-shell,
  .history-shell{
    width:min(calc(100% - 20px),var(--portal-shell-max-width));
    max-width:none;
    margin:0 auto;
    padding:0;
  }
  .app-shell>.app-card,
  .history-shell>.history-card{
    width:100%;
    min-width:0;
  }
}
.customer-toolbar{display:flex;align-items:center;justify-content:flex-start;gap:18px;flex-wrap:wrap}
.customer-toolbar-left{display:flex;flex:0 0 auto;align-items:center;gap:18px;min-width:0;flex-wrap:wrap}
.customer-toolbar-search{display:flex;flex:1 1 auto;align-items:center;gap:8px;min-width:260px}
.customer-toolbar-search label{display:flex;flex:1 1 auto;align-items:center;min-width:0}
.customer-search-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.customer-toolbar-search input{height:40px;min-height:40px;margin:0;padding:9px 11px}
.customer-toolbar-actions{display:flex;flex:0 0 auto;align-items:center;gap:8px}
.customer-toolbar-actions button,.customer-toolbar-actions .primary-link{display:inline-flex;height:40px;min-height:40px;box-sizing:border-box;align-items:center;justify-content:center;padding:0 14px;border-radius:9px;font:inherit;font-size:13px;font-weight:700;line-height:1;text-align:center;text-decoration:none;white-space:nowrap}
.customer-toolbar-actions button{padding:0 14px}.customer-toolbar-actions .primary-link{padding:0 20px;border:1px solid var(--orange);background:var(--orange);color:#fff}
.customer-sort-direction{display:inline-flex;width:36px;height:36px;min-height:36px;align-items:center;justify-content:center;padding:0;line-height:1}
.customer-table-row{grid-template-columns:var(--customer-columns)}
@media(min-width:1200px){.customer-toolbar{flex-wrap:nowrap}.customer-toolbar-left{flex-wrap:nowrap}.customer-toolbar-search{min-width:0}}
@media(min-width:761px) and (max-width:1199px){.customer-toolbar-search{flex-basis:100%;min-width:0}.customer-toolbar-search label{min-width:0}}
@media(max-width:760px){.customer-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}.customer-toolbar-left{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.customer-toolbar-search{display:grid;grid-template-columns:minmax(0,1fr);min-width:0}.customer-search-label{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto;white-space:normal}.customer-toolbar-search label{display:block}.customer-toolbar-search input{margin-top:8px}.customer-toolbar-actions{display:grid;grid-template-columns:minmax(0,1fr)}.customer-toolbar-actions button,.customer-toolbar-actions .primary-link{width:100%}}

/* Requests: compact desktop list; mobile keeps the existing card presentation. */
body.requests-page .requests-desktop-list-header,
body.requests-page .requests-desktop-count,
body.requests-page .request-card-meta-desktop,
body.requests-page .request-owner-desktop,
body.requests-page .request-card-actions-desktop{display:none}
@media screen and (min-width:761px){
  body.requests-page .requests-list-toolbar{align-items:center;justify-content:flex-start;gap:10px;margin-bottom:14px;padding-bottom:12px}
  body.requests-page .requests-list-toolbar>strong{font-size:21px;line-height:1.2}
  body.requests-page .requests-desktop-count{display:inline;color:var(--muted);font-size:12px;line-height:1;white-space:nowrap}
  body.requests-page .requests-list-toolbar>.primary-link{display:inline-flex;height:40px;min-height:40px;align-items:center;justify-content:center;margin-left:auto;padding:0 20px;border:1px solid var(--orange);border-radius:9px;background:var(--orange);color:#fff;font:inherit;font-size:13px;font-weight:700;line-height:1;text-decoration:none;white-space:nowrap}
  body.requests-page .requests-list-toolbar>.primary-link:hover,body.requests-page .requests-list-toolbar>.primary-link:focus-visible{background:var(--orange-dark);color:#fff;outline:2px solid rgba(240,126,0,.28);outline-offset:2px}
  body.requests-page .requests-desktop-list-header{display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,.2fr) 90px 125px;gap:12px;padding:9px 10px;border-bottom:1px solid var(--line);color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase}
  body.requests-page .requests-desktop-list-header[hidden]{display:none}
  body.requests-page #requestList.request-card-grid{display:block}
  body.requests-page .request-list-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,.2fr) 90px 125px;grid-template-rows:auto auto;align-items:center;gap:3px 12px;min-width:0;padding:10px;border:0;border-bottom:1px solid #edf1ed;border-radius:0;background:transparent;box-shadow:none}
  body.requests-page .request-list-card:hover,body.requests-page .request-list-card:focus-within{border-color:#edf1ed;background:#f8fcf9;box-shadow:none}
  body.requests-page .request-card-meta-mobile{display:none}
  body.requests-page .request-card-meta-desktop{display:block;grid-column:3;grid-row:1 / span 2;color:var(--ink);font-size:13px;white-space:nowrap}
  body.requests-page .request-list-card>h2{grid-column:1;grid-row:1;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:1.25}
  body.requests-page .request-list-card>.request-description{grid-column:1;grid-row:2;display:-webkit-box;overflow:hidden;margin:0;color:var(--muted);font-size:12px;line-height:1.35;-webkit-box-orient:vertical;-webkit-line-clamp:2}
  body.requests-page .request-list-card>.request-owner{grid-column:2;grid-row:1 / span 2;min-width:0;margin:0;overflow:hidden;color:var(--ink);font-size:13px;text-overflow:ellipsis;white-space:nowrap}
  body.requests-page .request-list-card>.request-owner-desktop{display:block;grid-column:2;grid-row:1 / span 2;min-width:0;margin:0;overflow:hidden;color:var(--ink);font-size:13px;text-overflow:ellipsis;white-space:nowrap}
  body.requests-page .request-list-card>.request-owner{display:none}
  body.requests-page .request-card-actions-mobile{display:none}
  body.requests-page .request-card-actions-desktop{display:flex;grid-column:4;grid-row:1 / span 2;align-items:center;justify-content:flex-start;gap:6px;flex-wrap:nowrap}
  body.requests-page .request-card-actions-desktop>a:first-child{display:inline-flex;height:34px;min-height:34px;align-items:center;justify-content:center;padding:0 10px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);font:inherit;font-size:12px;font-weight:700;line-height:1;text-decoration:none;white-space:nowrap}
  body.requests-page .request-card-actions-desktop>a:first-child:hover,body.requests-page .request-card-actions-desktop>a:first-child:focus-visible{border-color:var(--orange);color:var(--orange);outline:none}
  body.requests-page .history-action-overflow{position:relative;flex:0 0 auto}
  body.requests-page .history-action-overflow>summary{display:inline-flex;width:34px;height:34px;align-items:center;justify-content:center;box-sizing:border-box;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--muted);font-size:19px;font-weight:800;line-height:1;cursor:pointer;list-style:none}
  body.requests-page .history-action-overflow>summary::-webkit-details-marker{display:none}
  body.requests-page .history-action-overflow>summary:hover,body.requests-page .history-action-overflow[open]>summary{border-color:#315f93;background:#edf3fb;color:#315f93}
  body.requests-page .history-action-menu{position:absolute;z-index:20;top:calc(100% + 6px);right:0;display:grid;min-width:130px;padding:6px;border:1px solid var(--line);border-radius:9px;background:#fff;box-shadow:0 12px 28px rgba(0,0,0,.13)}
  body.requests-page .history-action-menu a,body.requests-page .history-action-menu button{display:flex;min-height:32px;width:100%;align-items:center;padding:7px 9px;border:0;border-radius:6px;background:transparent;color:var(--ink);font:inherit;font-size:12px;font-weight:700;line-height:1;text-align:left;text-decoration:none;cursor:pointer}
  body.requests-page .history-action-menu a:hover,body.requests-page .history-action-menu a:focus-visible,body.requests-page .history-action-menu button:hover,body.requests-page .history-action-menu button:focus-visible{background:#f5f8f6;outline:none}
  body.requests-page .history-action-menu form{margin:0;padding:4px 0 0;border-top:1px solid var(--line)}
  body.requests-page .history-action-menu button.danger{color:#a42a2a}
}
@media screen and (max-width:760px){body.requests-page .requests-desktop-count,body.requests-page .requests-desktop-list-header{display:none}}
/* Shared server-side register pagination */
.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:18px 0 0;color:var(--muted-text,#64748b);font-size:13px}
.history-pagination-links,.history-pagination-size{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.history-pagination a,.history-pagination strong,.history-pagination .outline-button{display:inline-flex;box-sizing:border-box;width:auto;min-width:30px;height:30px;min-height:30px;align-items:center;justify-content:center;padding:0 8px;border:1px solid var(--border-color,#dbe3ec);border-radius:7px;color:inherit;text-decoration:none;background:var(--surface,#fff);font:inherit;font-size:13px;line-height:1;font-weight:600}
.history-pagination strong{color:var(--accent-color,#2563eb);border-color:currentColor}
.history-pagination .is-disabled{opacity:.45;cursor:default}
.history-pagination-size a[aria-current=true]{color:var(--accent-color,#2563eb);border-color:currentColor}
@media (max-width:760px){.history-pagination{align-items:flex-start}.history-pagination-links{width:100%}.history-pagination-links .outline-button{order:2}.history-pagination-size{width:100%}}
.project-time-entry-date small{white-space:nowrap}.project-time-check-placeholder{visibility:hidden}

/* Körjournalens smala veckokolumner använder ett kort antalformat på mobil. */
.driving-log-page .time-day-total-short{display:none}
@media(max-width:760px){.driving-log-page .time-day-total-full{display:none}.driving-log-page .time-day-total-short{display:inline}}
