:root{color:#24312c;background:#efe8dc;font-family:Avenir Next,Segoe UI,sans-serif;font-size:14px;--ink: #24312c;--muted: #6d6458;--line: #e4d9c8;--paper: #fffdf8;--sand: #f7f1e7;--sidebar: #1c3d36;--sidebar-ink: #f6f1e8;--accent: #d7b56d;--plan: #5c564e}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{border:1px solid #d9cfc0;background:var(--paper);color:var(--ink);border-radius:9px;padding:7px 12px;cursor:pointer}button:hover{border-color:#1c3d36}button:disabled{opacity:.45;cursor:default}.toolbar>button,.form-actions button[type=submit],.login button,.nav-logout{background:#1c3d36;color:#f6f1e8;border-color:transparent}.toolbar>button:hover,.form-actions button[type=submit]:hover,.login button:hover{background:#27574c}.row-actions button+button,.staff-row button{background:transparent}.row-actions button+button{color:#9f1239;border-color:#f0d5dc}input,select{border:1px solid var(--line);border-radius:9px;padding:7px 10px;background:#fff;color:var(--ink)}input:focus,select:focus,button:focus-visible{outline:2px solid #cfe3da;outline-offset:1px;border-color:#1c3d36}.app{display:grid;grid-template-columns:248px 1fr;height:100vh;overflow:hidden}nav{display:flex;flex-direction:column;height:100vh;min-height:0;background:radial-gradient(120% 40% at 0% 0%,rgba(215,181,109,.18),transparent 42%),var(--sidebar);color:var(--sidebar-ink);padding:22px 14px 16px}.brand,.who{display:flex;gap:12px;align-items:center;padding:0 8px}.brand strong,.who strong{display:block;font-size:15px;letter-spacing:-.02em}.brand small,.who span{display:block;margin-top:2px;color:#f6f1e8ad;font-size:12px}.brand-mark{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:var(--accent);color:#1c3d36;font-weight:700;letter-spacing:-.04em;flex:none}.who{margin:18px 8px 8px;padding:10px 12px;border-radius:12px;background:#fffdf814}.nav-scroll{flex:1;overflow:auto;margin-top:8px;padding-right:2px}.nav-group+.nav-group{margin-top:10px}nav a.nav-sub{padding-left:22px}.nav-label{margin:8px 10px 4px;color:#f6f1e87a;font-size:11px;letter-spacing:.08em;text-transform:uppercase}nav button,nav a{display:block;width:100%;text-align:left;margin:2px 0;padding:8px 12px;border:0;border-radius:10px;background:transparent;color:inherit;cursor:pointer;font:inherit;text-decoration:none}nav button:hover,nav a:hover{background:#fffdf814}nav button.active,nav a.active{background:#fffdf824;box-shadow:inset 3px 0 0 var(--accent)}.nav-logout{margin-top:12px;background:transparent;color:var(--sidebar-ink);border:1px solid rgba(246,241,232,.18)}.nav-logout:hover{background:#fffdf814;border-color:#f6f1e866}main{display:flex;flex-direction:column;height:100vh;min-height:0;padding:22px 28px 36px;overflow:auto;background:radial-gradient(80% 40% at 100% 0%,rgba(215,181,109,.16),transparent 46%),#efe8dc}main h1{margin:0 0 8px;font-size:28px;font-weight:650;letter-spacing:-.035em}main h2{letter-spacing:-.02em}.login-screen{min-height:100vh;display:grid;place-items:center;background:radial-gradient(50% 40% at 20% 10%,rgba(215,181,109,.35),transparent 50%),radial-gradient(40% 40% at 90% 90%,rgba(28,61,54,.18),transparent 55%),#efe8dc}.login{width:min(380px,calc(100vw - 32px));display:grid;gap:12px;padding:28px;background:var(--paper);border:1px solid var(--line);border-radius:20px;box-shadow:0 20px 50px #24312c14}.login h1{margin:4px 0 0}.login .muted{margin:0 0 6px}.login button{margin-top:4px;padding:10px 12px}.grid-wrap{overflow:auto;max-height:calc(100vh - 148px);border:1px solid var(--line);border-radius:16px;background:var(--paper);box-shadow:0 1px 2px #24312c0a,0 14px 36px #24312c0f}.grid-wrap thead th{position:sticky;top:0;z-index:3;background:#f4eee4;color:#5e564c;font-size:12px;font-weight:650;letter-spacing:.01em;box-shadow:inset 0 -1px 0 var(--line)}.grid-wrap thead th:first-child{left:0;z-index:6;background:#f4eee4}.pnl-grid thead tr:nth-child(2) th{top:30px}.pnl-grid thead th:first-child{z-index:6;left:0}table{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%}th,td{border-bottom:1px solid #efe6da;padding:5px 6px;white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums}th:not(:first-child),td:not(:first-child){min-width:80px}th:first-child,td:first-child{text-align:left;position:sticky;left:0;z-index:4;background:var(--paper);min-width:188px}tbody tr:hover td{background-color:#fbf7f1}.expander,.expander-spacer{display:inline-block;width:18px;margin-right:6px}.expander{height:18px;padding:0;border:1px solid #ddd4c6;border-radius:6px;background:#fff;color:inherit;cursor:pointer;line-height:16px;text-align:center;vertical-align:-2px}.expander:hover{border-color:#1c3d36;color:#1c3d36}.pnl-grid{table-layout:fixed}.pnl-grid th:first-child,.pnl-grid td:first-child{width:220px;min-width:220px;max-width:220px;box-sizing:border-box}.pnl-grid th:not(:first-child),.pnl-grid td:not(:first-child){width:96px;min-width:96px;max-width:96px;overflow:hidden}.row-label{display:inline-block;max-width:176px;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.depth-1 .row-label{max-width:154px}.depth-2 .row-label{max-width:136px}.mode-toggle{border:0;padding:2px 8px;border-radius:999px;background:#efe8dc;cursor:pointer;font:inherit;font-size:12px}.mode-toggle.num-fact{background:#e3f3e8;color:#166534}.mode-toggle.num-plan{background:#e7e1d6;color:var(--plan)}.pnl-grid .num-fact{color:var(--ink)}.pnl-grid .num-plan{color:var(--plan)}.pnl-grid th.legacy,.pnl-grid td.legacy{background:#f3eee6}.pnl-grid td.num-diff{box-shadow:inset 0 -2px #c2410c}.pnl-grid .tone-revenue td,.pnl-grid .tone-revenue td:first-child{background:#e7f6ec}.pnl-grid .tone-revenue td.legacy{background:#d7f0e0}.pnl-grid .tone-expense td,.pnl-grid .tone-expense td:first-child{background:#fdeeee}.pnl-grid .tone-expense td.legacy{background:#f8e0e0}.pnl-grid .tone-profit td:first-child{font-weight:650}.pnl-grid .tone-profit td,.pnl-grid .tone-profit td:first-child{background:#fff8ea}.pnl-grid tbody tr:hover td:first-child{z-index:4;background:#fbf7f1}.pnl-grid tr.row-entity td{font-size:12px;padding-top:2px;padding-bottom:2px;color:#78716c}.pnl-grid tr.row-entity .row-label{font-size:11px;letter-spacing:.04em}.depth-1 td:first-child{padding-left:28px;color:#57534e}.depth-2 td:first-child{padding-left:46px;color:#57534e}.depth-3 td:first-child{padding-left:64px;color:#6d6458}.pnl-report{display:flex;flex-direction:column;min-height:0;height:calc(100vh - 92px)}.pnl-year{display:flex;align-items:center;gap:8px;margin:0 0 10px;color:var(--muted);font-size:13px}.pnl-year select{min-width:96px}.pnl-report>.grid-wrap{flex:1 1 auto;min-height:0;max-height:none}.depth-3 td:first-child{padding-left:64px;color:#78716c}.depth-3 .row-label{max-width:118px}.portfolio-grid th.month-group{text-align:center;background:#f3eee6;border-left:2px solid var(--line)}.portfolio-grid th.month-current{background:#e7f0ea}.portfolio-grid th,.portfolio-grid td{padding:4px 6px;font-size:13px}.portfolio-grid th.metric,.portfolio-grid td.metric{width:60px;min-width:60px;max-width:68px}.portfolio-grid th.metric{white-space:normal;line-height:1.15;font-weight:500;vertical-align:bottom}.portfolio-grid th.month-stack,.portfolio-grid td.month-stack{width:28px;min-width:28px;max-width:32px;padding:4px 2px;text-align:center;background:#f7f1e7;border-left:2px solid var(--line)}.month-stack-label{writing-mode:vertical-rl;transform:rotate(180deg);font-size:12px}.portfolio-grid td.sticky-0,.portfolio-grid th.sticky-0{position:sticky;left:0;z-index:4;width:200px;min-width:200px;max-width:200px;text-align:left;background:var(--paper)}.portfolio-grid td.sticky-1,.portfolio-grid th.sticky-1{position:sticky;left:200px;z-index:4;width:92px;min-width:92px;max-width:92px;text-align:left;background:var(--paper)}.portfolio-grid thead th{position:sticky;top:0;z-index:3;background:#f4eee4}.portfolio-grid thead tr:nth-child(2) th{top:var(--head-row, 28px)}.portfolio-grid thead th.month-group{background:#f3eee6}.portfolio-grid thead th.month-current{background:#e7f0ea}.portfolio-grid thead th.sticky-0,.portfolio-grid thead th.sticky-1{z-index:6;top:0;background:#f4eee4}.report-fill{display:flex;flex-direction:column;height:calc(100vh - 58px);min-height:0}.report-fill>h1{flex:none;margin:0 0 12px}.report-fill>.grid-wrap{flex:1 1 auto;min-height:0;max-height:none}.portfolio-grid th.month-stack .expander{display:block;margin:0 auto 4px}.portfolio-total td,.portfolio-total td.sticky-0,.portfolio-total td.sticky-1{font-weight:650;background:#f4eee4}.portfolio-gap td{color:#57534e}.portfolio-manager td,.portfolio-manager td.sticky-0,.portfolio-manager td.sticky-1{font-weight:650;background:#faf6ef}.portfolio-project td.sticky-0,.expected-grid .portfolio-project td:first-child{padding-left:28px}.expected-invoice td:first-child{padding-left:52px;color:#57534e}.portfolio-grid tbody tr:hover td.sticky-0,.portfolio-grid tbody tr:hover td.sticky-1,.directory-table tbody tr:hover td:first-child{background:#fbf7f1}.directory-group td{background:#efe6d8;font-weight:650;color:#5e564c}.directory-table tbody tr.directory-group:hover td,.directory-table tbody tr.directory-group:hover td:first-child{background:#efe6d8}.client-projects{white-space:normal;min-width:220px;max-width:420px}.project-active{color:#1a1a1a}.project-inactive{color:#9a9288}.note{max-width:760px;color:var(--muted);line-height:1.45}.staff-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:16px;align-items:start}.staff-names{max-height:calc(100vh - 220px);overflow:auto;background:var(--paper);border:1px solid var(--line);border-radius:12px}.staff-names button{display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;text-align:left;border:0;border-radius:0;background:transparent;padding:8px 12px}.staff-names button.active{background:var(--sand);font-weight:600}.staff-names button.inactive{color:var(--muted)}.left-mark{flex:none;font-size:11px;font-weight:500;color:var(--muted)}.staff-hide{display:inline-flex;align-items:center;gap:6px;color:var(--muted)}.staff-card{max-height:calc(100vh - 220px);overflow:auto;background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:12px 16px}.staff-card h2{margin:18px 0 8px;font-size:16px}.name-stack{display:flex;flex-direction:column;align-items:flex-start;gap:2px}.alias-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:10px}.alias-chip{display:inline-flex;align-items:center;gap:4px;background:var(--sand);border-radius:999px;padding:2px 4px 2px 10px}.alias-chip button{border:0;background:transparent;padding:2px 6px}.salary-wrap{overflow:auto}.salary-table{border-collapse:collapse;width:100%}.salary-table th{text-align:left;font-weight:600;color:var(--muted);padding:4px;white-space:nowrap}.salary-table td{padding:4px;white-space:nowrap}.salary-table input,.salary-table select{width:112px;padding:4px 6px}.salary-table .calc{min-width:72px;color:var(--muted)}.payroll-matrix{margin-top:28px}.payroll-matrix h2{margin:0 0 6px;font-size:20px}.matrix-wrap{max-height:70vh}.matrix-table{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;font-variant-numeric:tabular-nums}.matrix-table th,.matrix-table td{padding:5px 8px;white-space:nowrap;text-align:right;background:var(--paper)}.matrix-table th:nth-child(-n+3),.matrix-table td:nth-child(-n+3){text-align:left}.matrix-table .sticky{position:sticky;left:0;z-index:1;min-width:180px;box-shadow:1px 0 0 var(--line)}.matrix-table thead .sticky{z-index:6}.matrix-table button.linkish{border:0;background:transparent;padding:0;text-align:left}.matrix-table tr.selected td{background:var(--sand)}.matrix-table td.changed,.matrix-table tr.selected td.changed{background:#f6d98a;font-weight:700}.matrix-table td.stale{color:#8a4b12;font-weight:700}.matrix-table tr.subtotal td,.matrix-table tr.subtotal .sticky{background:#efe6d8;font-weight:650}.matrix-table tr.grand td,.matrix-table tr.grand .sticky{background:var(--sidebar);color:var(--sidebar-ink);font-weight:650}.staff-row{display:flex;gap:8px;align-items:center;margin:6px 0;flex-wrap:wrap}.section{margin-top:28px}.pipeline{display:grid;gap:12px;max-width:760px}.step{background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:14px 16px;box-shadow:0 8px 24px #24312c0a}.step strong{display:block;margin-bottom:4px}.step small{display:block;margin-top:8px;color:var(--muted)}.error{color:#9f1239}.editor input{width:90px;border:1px solid var(--line);padding:4px}.hint,.muted{color:var(--muted);max-width:820px;line-height:1.45}.toolbar{display:flex;gap:8px;align-items:center;margin:12px 0}.toolbar input:not([type=checkbox]){flex:1;max-width:480px}.directory-form{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:12px 16px;max-width:960px;margin:12px 0 20px;padding:16px;background:var(--paper);border:1px solid var(--line);border-radius:16px;box-shadow:0 8px 24px #24312c0a}.directory-form h2,.directory-form .aliases,.directory-form .form-actions{grid-column:1 / -1}.directory-form h2{margin:0}.directory-form label,.aliases{display:grid;gap:4px}.directory-form select{width:100%}.alias-row{display:flex;gap:8px}.alias-row input{flex:1}.aliases ul{list-style:none;margin:0;padding:0}.aliases li{display:flex;gap:8px;align-items:center;padding:4px 0}.form-actions{display:flex;gap:8px}.project-status{display:inline-block;padding:1px 8px;border-radius:999px;background:#efe6d8;color:#5e564c;font-size:12px;line-height:18px}.project-status[data-status="запуск mvp"]{background:#f4e3b8;color:#6b4e12}.project-status[data-status="настройка агента"]{background:#d7ebe3;color:#1c3d36}.project-status[data-status=стабилизация]{background:#e3dcf4;color:#43366b}.project-status[data-status=поддержка]{background:#d5ead3;color:#245c32}.project-status[data-status=развитие]{background:#d4e3f4;color:#1d3f66}.project-status[data-status=разовый]{background:#f6e4d0;color:#6b4520}.project-status[data-status=закрыт]{background:#eeeae4;color:#8a8176}.directory-table th,.directory-table td{text-align:left}.directory-table th:not(:first-child),.directory-table td:not(:first-child){min-width:0}.directory{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}.directory .grid-wrap{flex:1 1 auto;min-height:0;max-height:none}.directory-table th:last-child,.row-actions{position:sticky;right:0;z-index:2;background:var(--paper);white-space:nowrap}.directory-table thead th:last-child{z-index:6;background:#f4eee4}.directory-table tbody tr:hover .row-actions{background:#fbf7f1}.row-actions button{margin-right:8px}
