:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',Arial,sans-serif;color:#112447;background:#f3f7fc;--blue:#075be8;--navy:#101f48;--muted:#71809b;--border:#e2e9f4;--surface:#fff;--background:#f3f7fc;--soft:#f0f6ff;--shadow:0 12px 36px #152c5810}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}a{color:inherit;text-decoration:none}.app{display:flex;min-height:100vh}.sidebar{width:258px;background:var(--surface);border-right:1px solid var(--border);padding:22px 14px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;flex-shrink:0}.brand{display:flex;align-items:center;gap:8px;padding:3px 12px 21px;border-bottom:1px solid var(--border)}.brand img{width:170px;max-width:100%;height:60px;object-fit:contain;object-position:left}.small-label{font-size:11px;color:var(--muted);font-weight:700;letter-spacing:.06em;text-transform:uppercase}.nav{display:grid;gap:5px;padding:24px 0}.nav button{display:flex;gap:13px;align-items:center;padding:13px 16px;background:none;border:0;border-radius:12px;color:var(--navy);text-align:left;font-weight:600}.nav button:hover{background:var(--soft)}.nav button.active{background:linear-gradient(115deg,#096bf7,#0649d0);color:white;box-shadow:0 8px 18px #0b64e92b}.nav-icon{width:24px;text-align:center;font-size:20px;font-weight:400}.sidebar-bottom{margin-top:auto;padding:14px;border:1px solid var(--border);border-radius:13px;background:var(--soft)}.sidebar-bottom b{display:block;margin-bottom:5px}.sidebar-bottom p{font-size:12px;margin:2px 0;color:var(--muted)}.main{width:100%;min-width:0}.topbar{height:91px;background:var(--surface);border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;padding:14px 35px;gap:20px}.topbar strong{font-size:17px}.topbar .sub{font-size:13px;color:var(--muted)}.user{display:flex;align-items:center;gap:10px;font-size:13px;text-align:left}.avatar{height:39px;width:39px;border-radius:50%;background:linear-gradient(135deg,#0171f7,#073fbc);color:white;display:grid;place-items:center;font-weight:700}.content{max-width:1480px;margin:auto;padding:30px 35px 65px}.h1{font-weight:800;font-size:29px;letter-spacing:-.04em;margin:0 0 6px}.lead{margin:0 0 26px;color:#647491}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}.card{background:var(--surface);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow)}.metric{padding:22px;display:flex;align-items:center;gap:15px;min-width:0}.metric-icon{display:grid;place-items:center;width:55px;height:55px;background:#e8f2ff;color:#095bd7;font-size:25px;border-radius:17px;flex-shrink:0}.metric:nth-child(2) .metric-icon{background:#f4edff;color:#9234cc}.metric:nth-child(4) .metric-icon{background:#e9fbf0;color:#13884a}.metric strong{font-size:27px;line-height:1.1;display:block;white-space:nowrap}.metric span{font-size:13px;color:#536179}.columns{display:grid;grid-template-columns:1.45fr 1fr;gap:20px}.panel{padding:22px;margin-bottom:20px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:18px}.panel h2{font-size:19px;margin:0;letter-spacing:-.03em}.link{border:0;background:none;color:var(--blue);font-weight:700;font-size:13px}.ticket{padding:14px 0;display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--border)}.ticket:first-of-type{border-top:0}.ticket b{font-size:14px}.meta{color:var(--muted);font-size:12px;margin-top:5px}.pill{font-size:12px;font-weight:700;border-radius:20px;padding:6px 10px;white-space:nowrap}.pill.work{background:#fff0dc;color:#c66a00}.pill.plan{background:#e6f2ff;color:#1464bd}.pill.done{background:#e5f8ed;color:#148044}.pill.new{background:#f3efff;color:#753fc2}.btn{background:linear-gradient(110deg,#0a6cf7,#054dce);color:white;border:0;padding:12px 18px;border-radius:10px;font-weight:700;box-shadow:0 6px 14px #0966ea20}.btn.secondary{background:var(--surface);color:var(--navy);border:1px solid #dbe4f1;box-shadow:none}.btn.ghost{background:transparent;box-shadow:none;color:var(--blue)}.btn.danger{background:#d32943}.actions{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}.actions button{min-height:54px}.visit{display:flex;align-items:center;gap:14px}.datebox{background:#edf4ff;border-radius:13px;padding:12px;text-align:center;min-width:76px}.datebox b{font-size:28px;display:block}.datebox small{font-size:12px;color:var(--muted)}.visit p{margin:6px 0;color:#63738e;font-size:13px}.visit-tools{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.ai-banner{background:linear-gradient(110deg,#fff,#e4f1ff);padding:25px;display:flex;align-items:center;justify-content:space-between;gap:16px}.ai-banner b{font-size:19px}.ai-banner p{margin:7px 0 0;font-size:13px;color:#5e6f8e}.section-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:20px}.data-row{display:flex;align-items:center;justify-content:space-between;padding:17px 4px;gap:15px;border-bottom:1px solid var(--border)}.data-row:last-child{border-bottom:0}.row-buttons{display:flex;gap:8px;flex-wrap:wrap}.field{display:flex;flex-direction:column;gap:7px;margin:0 0 15px}.field span{font-size:13px;font-weight:700}.field input,.field textarea,.field select{width:100%;padding:12px 13px;border:1px solid #ced9e9;border-radius:10px;color:var(--navy);background:var(--surface);outline-color:var(--blue)}.field textarea{min-height:116px;resize:vertical}.form-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:15px}.note{font-size:13px;color:#64748f;line-height:1.5}.notice{background:#eef5ff;border:1px solid #d7e8ff;padding:13px 16px;border-radius:12px;margin-bottom:20px;font-size:13px}.empty{text-align:center;padding:45px 12px;color:var(--muted)}.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:17px}.service-card{padding:22px}.service-card h3{margin:5px 0 9px}.service-card p{font-size:13px;color:var(--muted)}.chat{height:500px;display:flex;flex-direction:column}.messages{flex:1;overflow:auto;display:flex;flex-direction:column;gap:12px;padding:15px 0}.bubble{padding:13px 16px;border-radius:15px;background:#edf3fa;max-width:78%;line-height:1.5;font-size:14px;white-space:pre-wrap}.bubble.me{background:#0c61e7;color:white;align-self:flex-end}.chatbar{display:flex;gap:10px}.chatbar input{flex:1;min-width:0;border:1px solid var(--border);border-radius:10px;padding:12px}.modal-back{position:fixed;inset:0;background:#07163090;z-index:40;display:flex;align-items:center;justify-content:center;padding:16px}.modal{width:min(600px,100%);max-height:90vh;overflow:auto;background:var(--surface);padding:24px;border-radius:20px;box-shadow:0 20px 100px #00162d55}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.modal-head h2{margin:0}.close{border:0;background:none;color:var(--navy);font-size:25px}.mobilebar{display:none}.toast{position:fixed;bottom:24px;right:24px;background:#0c2953;color:white;padding:14px 19px;border-radius:12px;z-index:90;box-shadow:var(--shadow)}.theme-dark{--surface:#172743;--background:#0d1930;--navy:#eaf1ff;--muted:#b3c0d6;--border:#32415b;--soft:#233956;--shadow:none;color:#eaf1ff;background:var(--background)}.theme-dark .lead,.theme-dark .meta,.theme-dark .note,.theme-dark .visit p,.theme-dark .service-card p{color:#b3c0d6}.theme-dark .ai-banner{background:linear-gradient(120deg,#173153,#102b4c)}.theme-dark .datebox{background:#253c62}.theme-dark .metric span{color:#b3c0d6}.theme-dark .bubble{background:#263c5b}.theme-dark .bubble.me{background:#095bd7}.theme-dark .field input,.theme-dark .field textarea,.theme-dark .field select{color:#eaf1ff}.theme-dark .btn.secondary{background:#223451;color:white}.theme-dark .notice{background:#233956;color:white;border-color:#324a68}@media(max-width:1200px){.metrics{grid-template-columns:repeat(2,1fr)}.actions{grid-template-columns:repeat(2,1fr)}}@media(max-width:900px){.sidebar{width:80px;padding:12px 8px}.brand img{width:56px;object-fit:cover;object-position:left}.nav button{justify-content:center}.nav button span:last-child,.sidebar-bottom,.brand .small-label{display:none}.topbar{padding:16px 20px}.content{padding:23px 20px 75px}.columns{grid-template-columns:1fr}}@media(max-width:640px){.sidebar{display:none}.topbar{height:72px;padding:12px 16px}.topbar .sub{display:none}.content{padding:24px 14px 90px}.h1{font-size:25px}.metrics{gap:10px}.metric{padding:13px;gap:9px}.metric-icon{width:40px;height:40px;font-size:20px}.metric strong{font-size:23px}.metric span{font-size:11px}.panel{padding:16px}.panel h2{font-size:17px}.actions{gap:8px}.actions button{font-size:12px;padding:10px}.mobilebar{position:fixed;bottom:0;left:0;right:0;background:var(--surface);border-top:1px solid var(--border);display:grid;grid-template-columns:repeat(4,1fr);z-index:15;padding:6px 0 max(6px,env(safe-area-inset-bottom))}.mobilebar button{border:0;background:transparent;color:var(--muted);font-size:10px;display:flex;flex-direction:column;align-items:center;gap:4px;padding:7px}.mobilebar button.active{color:var(--blue);font-weight:800}.mobilebar button b{font-size:20px}.grid-2,.two-fields{grid-template-columns:1fr}.ai-banner{flex-direction:column;align-items:stretch}.data-row{align-items:flex-start;flex-direction:column}.bubble{max-width:93%}}
