/* Гаражно: shared foundations for cooperative and service workspaces. */
:root {
  color-scheme: light;
  --ink:#203138; --ink-strong:#14262e; --muted:#657780; --subtle:#7b8c92;
  --brand:#087e74; --brand-hover:#06695f; --brand-soft:#e5f4f0; --brand-line:#b9ded4;
  --canvas:#f4f7f8; --surface:#fff; --surface-soft:#f8fafb; --line:#e1e8eb;
  --rail:#182d35; --rail-hover:#233f47; --rail-text:#c2d3d8; --rail-active:#d3f1e3;
  --success:#217254; --success-soft:#e7f5ed; --warning:#946018; --warning-soft:#fff3dc;
  --danger:#b3463c; --danger-soft:#fff0ec; --info:#3a6993; --info-soft:#eaf2fb;
  --radius:14px; --radius-sm:9px; --shadow:0 2px 8px #20313804,0 1px 2px #20313804;
  --shadow-raised:0 8px 30px #2031380d; --focus:0 0 0 3px #087e7428;
  --font:"Segoe UI Variable",Inter,"Segoe UI",Arial,sans-serif;
  font:16px/1.5 var(--font); color:var(--ink); background:var(--canvas); font-synthesis:none;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
*,*::before,*::after{box-sizing:border-box}
body{margin:0;min-width:320px}body.nav-open{overflow:hidden}
button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:4px}
a{color:var(--brand);text-underline-offset:3px}button,a{touch-action:manipulation}
button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}button[aria-busy=true]{cursor:wait}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--brand);outline-offset:4px}
h1,h2,h3,h4,p{margin:0}h1{font-size:clamp(1.6rem,2.1vw,2rem);line-height:1.22;letter-spacing:-.035em;font-weight:700;color:var(--ink-strong)}
h2{font-size:1.0625rem;line-height:1.4;letter-spacing:-.015em;color:var(--ink-strong);font-weight:650}
h3{font-size:1rem;line-height:1.5;font-weight:650;color:var(--ink-strong)}p{line-height:1.65}small{font-size:.875rem;color:var(--muted)}
svg.ui-icon{width:20px;height:20px;flex:none;vertical-align:middle}
.brand{display:inline-flex;align-items:center;gap:11px;text-decoration:none;color:var(--ink-strong);width:max-content;max-width:100%}
.brand-mark{display:grid;place-items:center;flex:none;width:43px;height:43px;border-radius:13px;background:var(--brand);color:#f2fff7;box-shadow:inset 0 0 0 1px #ffffff0d}
.brand-mark svg{width:35px;height:35px}.brand-copy{display:grid;gap:2px;line-height:1.1}.brand-copy>strong{font-size:1.5rem;font-weight:750;letter-spacing:-.065em}.brand-copy>small{font-size:.75rem;letter-spacing:.03em;color:var(--muted)}.brand-dot{color:var(--brand)}
.sidebar .brand{color:#f5fbfc}.sidebar .brand-mark{background:#c5ead6;color:#1a4944}.sidebar .brand-dot{color:#a9d9c3}.sidebar .brand-copy>small{color:#9bb6bf}
.button,.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:43px;padding:10px 16px;border:1px solid #d2dfe3;border-radius:var(--radius-sm);background:white;color:#334e59;font-weight:600;font-size:.875rem;line-height:1.35;text-decoration:none;transition:background .15s,border-color .15s,box-shadow .15s;white-space:normal;text-align:center}
.button:hover,.btn:hover{background:#f3f8f8;border-color:#b7ced1}.button:active,.btn:active{box-shadow:inset 0 1px 3px #20313812}
.button.primary,.btn.primary{background:var(--brand);border-color:var(--brand);color:white;box-shadow:0 2px 3px #087e7414}.button.primary:hover,.btn.primary:hover{background:var(--brand-hover);border-color:var(--brand-hover)}
.button.danger,.btn.danger{background:var(--danger-soft);border-color:#ebc7bf;color:var(--danger)}
.button.small-button,.btn.small{min-height:34px;padding:7px 11px;font-size:.8125rem}.button.full{width:100%}
.icon-button{display:inline-grid;place-items:center;flex:none;width:40px;height:40px;border:1px solid transparent;border-radius:9px;color:var(--muted);background:transparent}
.icon-button svg{width:20px;height:20px}.icon-button:hover{background:#edf3f4;color:var(--brand)}
.text-button,.text-link{border:0;background:none;color:var(--brand);padding:5px 0;font-size:.875rem;font-weight:600;text-decoration:none;cursor:pointer}
.text-link:hover,.text-button:hover{text-decoration:underline}.muted{color:var(--muted)}.money,.num{font-variant-numeric:tabular-nums}.money{font-weight:650}.align-right{text-align:right}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-link{position:fixed;top:10px;left:16px;z-index:1000;clip-path:inset(100%);background:var(--brand);color:white;padding:10px 16px;border-radius:8px;text-decoration:none}.skip-link:focus{clip-path:none}
.eyebrow{font-size:.75rem;font-weight:650;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin-bottom:9px}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);min-width:0}
input,select,textarea{display:block;width:100%;min-height:45px;padding:11px 13px;border:1px solid #cfdde2;border-radius:8px;background:white;color:var(--ink);font-size:.9375rem;line-height:1.4;transition:border-color .15s,box-shadow .15s}
input::placeholder,textarea::placeholder{color:#84959d}input:hover,select:hover,textarea:hover{border-color:#a9c1c8}input:focus,select:focus,textarea:focus{outline:none;border-color:var(--brand);box-shadow:var(--focus)}
input[readonly]{background:var(--surface-soft)}input[type=checkbox]{display:inline-block;appearance:auto;width:18px;height:18px;min-height:18px;flex:none;accent-color:var(--brand);margin:0 9px 0 0;padding:0;vertical-align:middle}
.password-control{position:relative}.password-control input{padding-right:88px}.password-toggle{position:absolute;right:8px;top:6px;bottom:6px;border:0;border-radius:5px;background:#edf5f3;color:var(--brand-hover);font-size:.75rem;font-weight:600;padding:4px 9px}.password-toggle:hover{background:#dceee6}
input[type=file]{font-size:.875rem;padding:13px}input[type=file]::file-selector-button{border:0;border-radius:5px;background:var(--brand-soft);color:var(--brand-hover);padding:7px 11px;margin-right:12px;font:inherit;font-weight:600;cursor:pointer}
textarea{min-height:100px;resize:vertical}select{appearance:none;padding-right:38px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23657780' stroke-width='1.5'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}
.field{display:flex;flex-direction:column;gap:8px;margin-bottom:20px;text-align:left}.field>span{font-size:.875rem;font-weight:600;color:#3d535d}.field small{font-size:.8125rem;line-height:1.55;color:var(--muted)}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.form-error,.error{font-size:.875rem;line-height:1.6;color:var(--danger)}.form-error:not(:empty),.error:not(:empty){padding:11px 14px;margin:12px 0;border-radius:8px;background:var(--danger-soft)}
.info-note,.note,.calculation-preview{padding:15px 18px;background:var(--brand-soft);border:1px solid var(--brand-line);border-radius:9px;color:#315e56;font-size:.875rem;line-height:1.65;margin-bottom:22px;overflow-wrap:anywhere}
.info-note.compact{padding:12px 15px}.note.warning{background:var(--warning-soft);border-color:#ebd5a5;color:var(--warning)}
.page-note{font-size:.875rem;line-height:1.7;color:var(--muted);margin:18px 0 0}.badge{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border-radius:6px;font-size:.8125rem;font-weight:550;line-height:1.3;white-space:nowrap;background:#edf2f4;color:#546c77}
.badge.success,.badge.green{background:var(--success-soft);color:var(--success)}.badge.warning,.badge.amber{background:var(--warning-soft);color:var(--warning)}.badge.red{background:var(--danger-soft);color:var(--danger)}.badge.info{background:var(--info-soft);color:var(--info)}
.table-wrap{overflow:auto;max-width:100%;overscroll-behavior-inline:contain;scrollbar-width:thin;scrollbar-color:#b8cbd0 transparent}
.table-wrap:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}.panel>.table-wrap{max-height:68dvh}dialog .table-wrap{max-height:48dvh}
table{width:100%;border-collapse:separate;border-spacing:0;text-align:left;font-size:.875rem}th{padding:13px 20px;background:#f8fafb;border-top:1px solid var(--line);border-bottom:1px solid var(--line);color:#637984;font-size:.8125rem;font-weight:600;white-space:nowrap;position:sticky;top:0;z-index:1}
td{padding:17px 20px;border-bottom:1px solid #eaf0f2;vertical-align:middle;color:#3c5360;line-height:1.5}tbody tr:last-child td{border-bottom:0}tbody tr:hover td{background:#f8fbfb}td strong{font-weight:600;color:var(--ink-strong)}td small,.cell-subtitle{display:block;font-size:.8125rem;line-height:1.4;margin-top:5px;color:var(--muted)}
td.num{white-space:nowrap}.table-actions{display:flex;align-items:center;gap:8px}.table-wrap table caption{text-align:left;padding:16px 20px}
.empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:44px 24px;color:var(--muted);max-width:100%;white-space:normal}.empty svg{width:31px;height:31px;color:#799f9f;background:var(--brand-soft);padding:10px;box-sizing:content-box;border-radius:14px;margin-bottom:16px}.empty strong{color:#3b5863;font-size:.9375rem;font-weight:600}.empty p{font-size:.875rem;margin-top:7px;max-width:390px}
dialog{border:1px solid #d4e1e5;border-radius:18px;width:min(580px,calc(100vw - 28px));max-height:90dvh;padding:0;box-shadow:0 28px 100px #14262e36;background:#fff;color:var(--ink)}dialog.wide{width:min(900px,calc(100vw - 28px))}dialog::backdrop{background:#122c3a80;backdrop-filter:blur(3px)}
.modal-header,.dialog-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:24px 28px;border-bottom:1px solid var(--line);background:#fbfcfd}.modal-header h2,.dialog-head h2{font-size:1.25rem;line-height:1.35}.modal-header p{font-size:.875rem;margin-top:8px;color:var(--muted)}
.modal-header,.dialog-head{position:sticky;top:0;z-index:4}.modal-footer,.dialog-foot{position:sticky;bottom:0;z-index:3}
.modal-body,.dialog-body{padding:25px 28px 8px}.modal-footer,.dialog-foot{padding:18px 28px 24px;border-top:1px solid var(--line);background:#fbfcfd}.modal-footer>div,.dialog-foot{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.modal-explanation{font-size:.875rem;line-height:1.6;color:var(--muted);margin-bottom:20px}
pre{font-family:Consolas,"SFMono-Regular",monospace;font-size:.875rem;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;background:#f2f6f7;color:#385660;padding:16px;border-radius:8px}
.recovery-codes,.recovery{font-size:1rem;line-height:2;letter-spacing:.03em;background:#edf7f1;color:#235b46}
.loading{min-height:50vh;display:grid;place-content:center;text-align:center;color:var(--muted);font-size:.9375rem}.loading::before{content:"";width:28px;height:28px;margin:0 auto 16px;border:3px solid #d3e5e2;border-top-color:var(--brand);border-radius:50%;animation:loading-spin .8s linear infinite}
@keyframes loading-spin{to{transform:rotate(360deg)}}
.skeleton{display:grid;gap:20px;animation:loading-pulse 1.6s ease-in-out infinite}.skeleton-line{height:18px;width:40%;border-radius:6px;background:#dfe9eb}.skeleton-line.title{height:30px;width:60%}.skeleton-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.skeleton-card{height:132px;border:1px solid var(--line);border-radius:14px;background:#fff}.skeleton-table{height:310px;background:white;border:1px solid var(--line);border-radius:14px}@keyframes loading-pulse{50%{opacity:.5}}
.notifications{position:fixed;right:26px;bottom:26px;z-index:100;display:grid;gap:10px;max-width:440px}.toast,#notice:not(:empty){padding:15px 20px;background:#153e37;color:#f3fffa;border-radius:11px;box-shadow:0 12px 45px #14262e25;font-size:.875rem;line-height:1.6}.toast.error{background:#923d34}
.auth-layout{min-height:100dvh;display:grid;grid-template-columns:minmax(400px,1fr) minmax(460px,1fr);background:#fff}
.auth-story{position:relative;overflow:hidden;background:#163a40;color:#fff;padding:44px clamp(35px,5vw,80px);display:flex;flex-direction:column;isolation:isolate}.auth-story::before{content:"";position:absolute;inset:0;z-index:-1;background:radial-gradient(ellipse at 12% 10%,#31746f65,transparent 60%),radial-gradient(ellipse at 100% 90%,#6aaf8640,transparent 65%)}
.auth-story .brand{color:white}.auth-story .brand-mark{background:#bce5ce;color:#173f3c}.auth-story .brand-dot{color:#a1dcb6}.auth-story .brand-copy small{color:#bdd2d6}
.auth-message{margin:auto 0;padding:65px 0 35px;max-width:560px}.auth-message .eyebrow{color:#a9d9cb}.auth-message h1{font-size:clamp(2.8rem,4vw,4.4rem);font-weight:650;letter-spacing:-.055em;line-height:1.13;color:#fff;margin:20px 0 23px}.auth-message>p{font-size:1rem;color:#bdd5d8;max-width:410px;line-height:1.8}.auth-benefits{display:grid;gap:13px;margin-top:33px;color:#d5e9e3;font-size:.875rem}.auth-benefits span{display:flex;gap:10px;align-items:center}.auth-benefits svg{width:18px;height:18px;color:#b5e0bf}
.auth-illustration{position:relative;margin-top:42px;width:min(100%,420px);aspect-ratio:2.8/1;display:flex;gap:10px;align-items:end;padding:0 15px 13px;border-bottom:2px solid #76a69c60}.auth-garage{width:32%;height:78%;position:relative;border:1px solid #c5e0cb65;border-radius:10px 10px 2px 2px;background:#accfb110;padding:19px 13px 0}.auth-garage::before{content:"";position:absolute;top:-18px;left:0;right:0;height:26px;background:#b9dec325;clip-path:polygon(0 65%,50% 0,100% 65%,100% 100%,0 100%)}.auth-garage>span{height:100%;display:block;border-radius:3px 3px 0 0;background:repeating-linear-gradient(0deg,#b8dfcc30 0,#b8dfcc30 8px,#b8dfcc15 9px,#b8dfcc15 11px);border:1px solid #c6e5cc40}.auth-garage.active{height:92%;background:#bbdfca25}.auth-garage.active>span{background:repeating-linear-gradient(0deg,#cbecc450 0,#cbecc450 8px,#cbecc430 9px,#cbecc430 11px)}
.auth-footer{margin-top:30px;font-size:.8125rem;color:#a9c9ca}.auth-form-wrap{padding:55px 45px;display:flex;align-items:center;justify-content:center}.auth-form{width:100%;max-width:400px}.auth-form>h2{font-size:1.9rem;line-height:1.25;letter-spacing:-.045em;margin:18px 0 12px}.auth-form>p.muted{font-size:.9375rem;margin-bottom:28px;line-height:1.7}.auth-form .field{margin-bottom:21px}.auth-form .page-note{font-size:.8125rem}.auth-form .button.full{min-height:48px;margin-top:5px}.auth-form .brand{margin-bottom:20px}.auth-form .brand .brand-mark{display:none}.auth-form .brand .brand-copy small{display:none}
.tag{display:inline-flex;padding:5px 9px;border-radius:5px;background:var(--brand-soft);color:var(--brand-hover);font-size:.75rem;font-weight:650;letter-spacing:.04em}.tag.dark{background:#ffffff18;color:#d5f4e3}.security-gate{min-height:100dvh;display:grid;place-content:center;padding:25px}.security-gate>.panel{padding:35px;max-width:650px}.security-gate h1{margin:28px 0 15px}.security-gate p{color:var(--muted);margin-bottom:25px}.security-gate button{margin:0 7px 9px 0}.startup-error{max-width:620px;margin:10vh auto;padding:35px;background:white;border:1px solid var(--line);border-radius:var(--radius)}.startup-error h1{margin-bottom:15px}.startup-error p{margin-bottom:20px}
.help-line{display:flex;justify-content:space-between;gap:15px;margin-top:22px;font-size:.8125rem;color:var(--muted)}
@media(max-width:1000px){.auth-layout{grid-template-columns:minmax(320px,.85fr) minmax(390px,1fr)}.auth-story{padding:35px}.auth-message h1{font-size:3rem}.auth-form-wrap{padding:40px 30px}}
@media(max-width:760px){.auth-layout{grid-template-columns:1fr}.auth-story{padding:24px}.auth-story .brand-copy>strong{font-size:1.35rem}.auth-message{padding:25px 0 0;margin:0;max-width:none}.auth-message h1{font-size:2rem;margin:12px 0;max-width:500px}.auth-message>p{font-size:.875rem;line-height:1.7}.auth-illustration,.auth-benefits,.auth-footer{display:none}.auth-form-wrap{padding:32px 24px 45px}.auth-form{max-width:480px}.auth-form>h2{font-size:1.6rem}.form-grid{grid-template-columns:1fr}.modal-header,.dialog-head{padding:20px}.modal-body,.dialog-body{padding:21px 20px 7px}.modal-footer,.dialog-foot{padding:16px 20px 20px}dialog,dialog.wide{width:calc(100vw - 20px);max-height:94dvh;border-radius:14px}.notifications{left:14px;right:14px;bottom:88px;max-width:none}.skeleton-cards{grid-template-columns:1fr 1fr}.skeleton-card{height:110px}td,th{padding:13px 16px}.security-gate>.panel{padding:25px}.skip-link{font-size:.875rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
