:root{--navy:#132b48;--ink:#182c45;--blue:#2762e9;--bg:#f3f6fb;--muted:#7589a2;--line:#e0e8f3;--green:#138b66}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.5 system-ui,-apple-system,Segoe UI,Arial,sans-serif}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #97bbff;outline-offset:2px}[hidden]{display:none!important}.head{background:linear-gradient(110deg,#11233b,#1d456b);color:white;min-height:70px;padding:14px 25px;display:flex;justify-content:space-between;align-items:center;gap:12px}.brand{display:flex;gap:11px;align-items:center;font-size:18px;font-weight:800;letter-spacing:.25px}.brand strong{color:#84b4ff}.brand small{display:block;color:#acc3dd;font-size:11px;letter-spacing:0;font-weight:400}.brandmark{color:#448bff;font-size:31px}.userbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.rolechip{padding:5px 10px;border:1px solid #527295;border-radius:20px;color:#c5d7ec;font-size:12px}.smallbtn{background:#294f76;border:1px solid #49769f;color:white;border-radius:9px;padding:8px 14px}.auth-layout{max-width:1170px;min-height:500px;display:grid;grid-template-columns:1.1fr .8fr;align-items:center;gap:50px;padding:70px 25px;margin:auto}.auth-intro h1{font-size:42px;line-height:1.12;letter-spacing:-1.3px;margin:14px 0 20px}.auth-intro p{font-size:17px;color:#627a94;max-width:540px}.mini-info{border-left:4px solid #3178ed;padding:15px 20px;background:#e7f0fe;max-width:520px;margin-top:24px;border-radius:0 12px 12px 0;color:#476383}.auth-card{padding:30px;border-radius:22px;background:white;box-shadow:0 15px 45px #1b416010;border:1px solid #e0e9f6;max-width:450px;width:100%}.auth-card h2{margin:9px 0 27px;font-size:25px}.auth-card label,.panel form label{display:block;color:#627d9d;font-size:12px;font-weight:700;margin:14px 0 7px}.auth-card input,.panel input,.panel select{display:block;width:100%;padding:12px 13px;border:1px solid #cedded;border-radius:10px;background:#fff;color:#203c5a;min-height:43px;font-size:14px;margin-top:6px}.btn{min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid #cadaec;background:white;color:#30577f;padding:9px 15px;border-radius:10px;white-space:normal}.btn.primary{background:var(--blue);color:#fff;border-color:var(--blue);font-weight:700}.btn:hover,.smallbtn:hover{filter:brightness(.96)}.btn.full{width:100%;margin-top:14px}.error{color:#b8243c;min-height:18px}.fine{color:#8a9eb4;font-size:12px;line-height:1.5}.eyebrow{font-size:10px;letter-spacing:1.7px;color:#6684af;font-weight:800}.shell{max-width:1600px;margin:auto;display:grid;grid-template-columns:216px minmax(0,1fr);min-height:calc(100vh - 70px)}.sidebar{background:#e8eff9;border-right:1px solid #d7e3f1;padding:27px 13px}.side-title{margin:0 15px 13px;font-size:11px;font-weight:800;color:#8099b7;letter-spacing:1px}.nav{display:flex;width:100%;border:0;background:transparent;color:#4c6482;padding:13px 13px;align-items:center;gap:12px;margin:4px 0;border-radius:10px;text-align:left}.nav.active{background:#2666e9;color:white;font-weight:750}.nav:hover:not(.active){background:#d7e7fa}.side-foot{border-top:1px solid #d4dfef;margin-top:30px;padding:20px 13px;color:#5b7492;font-size:11px;font-weight:700}.side-foot span{font-weight:400}.content{padding:27px 27px 50px;min-width:0}.content-top{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:15px;margin-bottom:22px}.content h1{margin:4px 0;font-size:30px}.subtitle{color:#8095ae;font-size:13px;margin:5px 0}.toolbar{display:flex;gap:8px}.toolbar select{background:white;border:1px solid #d6e2f0;padding:9px 13px;border-radius:10px}.page{display:none}.page.active{display:block}.grid{display:grid;gap:13px;margin-bottom:16px}.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.tile{padding:20px;border:1px solid #e2ebf5;background:#fff;border-radius:16px;min-width:0}.label,.tile small{color:#8497ad;font-size:11px;letter-spacing:.3px}.tile strong{display:block;font-size:29px;margin:9px 0 4px}.panel{background:white;border:1px solid #e1eaf6;border-radius:18px;padding:23px;margin-bottom:16px}.panel h2{font-size:18px;margin:0 0 12px}.panel h3{font-size:15px;margin-top:25px}.panel.highlight{background:linear-gradient(115deg,#17314f,#235381);color:#fff;border:0}.panel.highlight .eyebrow{color:#9abfe7}.panel.highlight p{color:#cad9ec}.section-top{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:14px}.pill{background:#dcf7ed;color:#118768;padding:5px 10px;border-radius:14px;font-size:11px;font-weight:700}.pill.gray{background:#eaf0f7;color:#56718f}.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;margin-top:20px}.steps>div{border:1px solid #ffffff2b;background:#ffffff14;border-radius:12px;padding:13px;font-size:12px;color:#98c8ff}.steps strong{color:#fff;display:block;font-size:15px;margin-top:5px}.steps span{color:#bed2ec;display:block}.action-row{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}.notice{min-height:0;color:#21649e;margin:0 0 12px}.notice:empty{display:none}.notice.error{color:#ac2941}.profile{display:flex;align-items:center;gap:18px}.avatar{width:63px;height:63px;border-radius:17px;background:#deeafb;color:#2871df;font-size:25px;font-weight:800;display:grid;place-items:center}.muted{color:#7790aa}.info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:20px}.info-grid>div{padding:15px;background:#f2f6fc;border-radius:11px;overflow-wrap:anywhere}.info-grid strong{display:block;font-size:13px;margin-top:5px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 15px}.form-action{align-self:end;padding-bottom:5px}.table-scroll{overflow-x:auto}table{border-collapse:collapse;width:100%;min-width:580px}td,th{padding:12px;text-align:left;border-bottom:1px solid #e5ecf6}th{font-size:12px;font-weight:600;color:#7b90a9}td{font-size:13px}.table-action{border:1px solid #d8e2ef;border-radius:8px;padding:6px 9px;background:white;color:#3157a0}.inset{padding:15px;margin-top:14px;background:#f1f6fb;border-radius:12px;max-width:420px}.inset label{display:block;margin-bottom:10px}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(max-width:1100px){.grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}.info-grid{grid-template-columns:1fr}}@media(max-width:720px){.auth-layout{grid-template-columns:1fr;padding:25px 15px;gap:20px}.auth-intro h1{font-size:28px}.shell{display:block}.sidebar{display:flex;gap:4px;overflow-x:auto;padding:9px;position:sticky;top:0;z-index:2}.side-title,.side-foot{display:none}.sidebar nav{display:flex}.nav{width:auto;white-space:nowrap;padding:9px 12px}.content{padding:18px 12px}.form-grid{grid-template-columns:1fr}.steps{grid-template-columns:1fr}.head{padding:13px}.brand{font-size:14px}.brandmark{font-size:22px}.userbar{font-size:12px}.grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:400px){.grid.four,.grid.two{grid-template-columns:1fr}}

/* Crystal Motors Director — manager dashboard */
.manager-only[hidden],.employee-only[hidden]{display:none!important}
.team-tools{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin:18px 0}
.team-tools label{display:flex;flex:1 1 190px;flex-direction:column;gap:5px;font-size:12px;color:#607b9d;font-weight:700}
.team-tools input,.team-tools select{width:100%;min-height:42px;padding:9px 12px;border:1px solid #cad9eb;border-radius:9px;color:#213f5b;background:#fff;font-size:14px}
.team-tools button{min-height:42px}
.table-scroll{overflow-x:auto}
.team-table{width:100%;border-collapse:collapse;min-width:690px;font-size:13px}
.team-table th{text-align:left;color:#6682a3;font-size:12px;padding:12px 9px;border-bottom:1px solid #e3eaf2}
.team-table td{padding:10px 9px;border-bottom:1px solid #e8edf4}
.team-table tr:hover td{background:#f4f8ff}
.team-table button{color:#145ad1;background:none;border:0;text-align:left;font-weight:700;padding:7px 3px;cursor:pointer}
.team-table button:hover{text-decoration:underline}
.team-table .pending{font-size:12px;color:#95a6bb}
.manager-secondary{margin-top:15px}
.rank-row{display:flex;align-items:center;gap:10px;margin:12px 0}
.rank-row b{min-width:24px;color:#5a759c}
.rank-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rank-bar{display:block;width:100%;height:8px;border-radius:7px;background:#e7eef9;overflow:hidden;margin-top:5px}
.rank-bar>span{display:block;height:100%;background:#3372ef;border-radius:7px}
.rank-count{font-weight:800;color:#163d7f}
.plan-figures{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;font-size:20px}
.plan-figures span{font-size:14px;color:#5f7d9f}
.progress-track{height:10px;border-radius:8px;background:#e2ecf6;overflow:hidden}
.progress-track>div{height:100%;width:0;background:linear-gradient(90deg,#2f7af1,#21ba9b)}
.plan-form{display:flex;align-items:end;gap:12px;margin-top:14px;flex-wrap:wrap}
.plan-form label{flex:1 1 180px}
.plan-form input{margin:5px 0 0}
.comparison-result{margin-top:15px;overflow-x:auto}
.comp-table{width:100%;border-collapse:collapse;font-size:13px;min-width:370px}
.comp-table th,.comp-table td{padding:11px 9px;border-bottom:1px solid #e3eaf3;text-align:left}
#team-person-panel{margin-top:15px}
@media(max-width:700px){.team-tools{gap:10px}.plan-form button{width:100%}}

/* Personal card history: transparent daily Bitrix metrics, responsive SVG and timeline. */
.employee-history{margin-top:18px;padding:24px;border-color:#dbe6f6;box-shadow:0 5px 30px rgba(23,58,105,.035)}
.employee-history h3{margin:0;font-size:17px;color:#183453}
.employee-history .section-top{margin-bottom:3px}
.history-status{font-size:12px;margin:8px 0 17px;line-height:1.7}
.history-metric-picks{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 8px}
.history-pick{background:#f4f7fd;color:#587397;border:1px solid #e1eaf6;border-radius:8px;padding:8px 12px;font-size:12px;font-weight:750;min-height:35px}
.history-pick.active{background:#2869df;color:#fff;border-color:#2869df}
.history-graph{width:100%;min-height:180px;border-radius:13px;background:linear-gradient(180deg,#fff,#f9fbff);padding:12px 8px;border:1px solid #e6edf7;color:#7e92aa;display:flex;align-items:center;justify-content:center;font-size:13px}
.history-graph svg{width:100%;height:auto;max-height:300px;overflow:visible}
.history-columns{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:20px;margin-top:22px}
.history-columns h3{font-size:14px;margin:0 0 12px}
.history-table-scroll,.history-activity{max-height:370px;overflow:auto;border:1px solid #e6edf7;border-radius:12px;scrollbar-color:#b8c8df transparent}
.history-table{min-width:420px;font-size:12px}
.history-table th{position:sticky;top:0;background:#f7faff;color:#6984a8;white-space:nowrap}
.history-table td,.history-table th{padding:10px 9px}
.history-table tbody tr:hover{background:#f7faff}
.history-activity{min-height:110px;padding:3px 13px}
.history-event{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid #ebeff7}
.history-event:last-child{border-bottom:0}
.history-event-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:#e8f0ff;color:#316bd4;font-size:17px;flex:none}
.history-event-icon.lead{background:#efe9ff;color:#704dc4}
.history-event-icon.car{background:#e0f8f2;color:#0f927b}
.history-event-content{min-width:0;flex:1;display:flex;flex-direction:column}
.history-event-content b{font-size:12px;color:#274362}
.history-event-content small{color:#8a9bb0;font-size:11px;overflow-wrap:anywhere}
.history-event-time{color:#8b9fb7;font-size:10px;flex:none}
.history-source{margin-top:15px}
@media(max-width:1050px){.history-columns{grid-template-columns:1fr}}
@media(max-width:600px){.employee-history{padding:15px}.history-table-scroll,.history-activity{max-height:290px}.history-pick{flex:1 0 40%}.history-graph{padding:6px;min-height:120px}}

/* Team → create a linked login, administrator-only. */
.team-account-panel{border-color:#b8d3f9;background:#fbfdff;scroll-margin-top:85px}
.team-account-panel input[readonly]{background:#edf3fb;color:#557493;cursor:default}
.account-create-btn{background:#eaf1ff!important;border:1px solid #c8dafa!important;color:#2365d9!important;border-radius:8px!important;font-size:12px!important;padding:7px 10px!important;white-space:nowrap}
.team-table button.account-create-btn:hover{text-decoration:none;background:#dceaff!important}
.account-state{font-size:12px;color:#956b33;white-space:nowrap}
.account-state.is-active{color:#087b5d}
#selected-account-status{margin:5px 0 0}
#team-account-feedback:empty{display:none}
@media(max-width:650px){.team-account-panel .form-grid{grid-template-columns:1fr}}

/* Payroll v1: compact cards, month-scoped and role-protected server values */
.payroll-card{margin-top:16px;border-color:#d0e4de;background:linear-gradient(135deg,#ffffff,#f7fcfa)}
.payroll-card h3{margin:0;color:#163856}
.payroll-card-main{display:flex;align-items:baseline;gap:16px;flex-wrap:wrap;margin:12px 0 18px}
.payroll-card-main strong{font-size:clamp(26px,3vw,38px);font-weight:800;letter-spacing:-.03em;color:#0c806c;font-variant-numeric:tabular-nums}
.payroll-card-main span{font-size:13px;color:#647c94}
#team-payroll-table{max-height:430px;overflow:auto}
#team-payroll-table table{min-width:570px}
.payroll-inline{display:flex;gap:13px;align-items:baseline;flex-wrap:wrap;background:#f4f9f8;border:1px solid #d6eae5;border-radius:12px;margin:12px 0 14px;padding:15px;color:#174f48}
.payroll-inline small{font-size:12px;color:#617987}
.payroll-overview-line{font-weight:650;color:#0a806a;background:#f3f9f7;padding:9px 12px;border-radius:9px}
#payroll-rate-table{max-width:490px;margin:14px 0 20px}
#payroll-rate-table table{width:100%}
#payroll-mode{min-width:260px;max-width:100%}
