:root{font-family:"Malgun Gothic","Apple SD Gothic Neo",system-ui,sans-serif;color:#172943;background:#f3f6fa;--ink:#172943;--muted:#51647b;--line:#d7e1ed;--blue:#174476;--navy:#101e3b;--soft:#edf4fd;--shadow:0 7px 22px #182e4d0b;color-scheme:light}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.48;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #5792cc;outline-offset:2px}[hidden]{display:none!important}h1,h2,h3,p{margin:0}label{min-width:0}img{max-width:100%;display:block}
.auth{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:28px;background:radial-gradient(ellipse at 82% 10%,#d9e9fa 0%,transparent 44%),linear-gradient(135deg,#eef4fb,#f7f9fc)}
.auth-card{width:min(100%,470px);padding:clamp(26px,6vw,44px);background:#fff;border:1px solid var(--line);border-radius:21px;box-shadow:0 20px 72px #172a4320}
.auth-logo{width:180px;margin:0 0 22px}.auth h1{font-size:clamp(1.35rem,4vw,1.95rem);letter-spacing:-.055em;margin-bottom:10px}.auth-form{display:grid;gap:15px;margin-top:28px}.auth-form .primary{min-height:48px;margin-top:2px}.auth-links{display:flex;justify-content:space-between;gap:12px;margin-top:14px}.notice{margin-top:15px;color:#8b341e;font-size:.86rem;line-height:1.55}
.office{min-height:100vh;display:grid;grid-template-columns:205px minmax(0,1fr)}.sidebar{background:var(--navy);color:white;padding:24px 16px;display:flex;flex-direction:column;gap:24px;min-width:0}.side-brand{background:#fff;color:var(--ink);padding:12px 13px;border-radius:12px;display:grid;gap:6px}.side-brand img{width:137px}.side-brand strong{font-size:.83rem;letter-spacing:-.025em}.sidebar nav{display:grid;gap:7px}.sidebar nav button{border:0;color:#ecf4ff;background:transparent;text-align:left;border-radius:8px;padding:13px 11px}.sidebar nav button:hover,.sidebar nav [aria-current="page"]{background:#27466d}.sidebar nav [aria-current="page"]{font-weight:800}.sidebar .side-action{color:#d9eaff;margin-top:auto}
.topbar{min-height:65px;padding:11px clamp(17px,3vw,34px);display:flex;justify-content:flex-end;align-items:center;gap:16px;background:white;border-bottom:1px solid var(--line);font-size:.91rem}.topbar>div{display:flex;align-items:center;gap:8px}.pill{display:inline-flex;align-items:center;background:#edf4fb;color:#284e79;padding:4px 7px;border-radius:6px;font-size:.76rem;font-weight:750}.content{padding:25px clamp(16px,3vw,35px) 42px;margin:auto;max-width:1580px}.page-head,.section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.page-head{margin:0 0 19px}.page-head h1{font-size:clamp(1.5rem,3vw,2.1rem);font-weight:850;letter-spacing:-.06em}.page-head p{margin-top:5px}.quiet{color:var(--muted);font-size:.88rem;line-height:1.6}.compact{margin-top:9px;white-space:pre-line;overflow-wrap:anywhere}.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:clamp(14px,2vw,22px);box-shadow:var(--shadow);min-width:0}.card h2,dialog h2{font-size:1.08rem;letter-spacing:-.035em}.card h3{font-size:.84rem;margin:15px 0 7px}.quote-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(270px,30%);gap:16px;align-items:start}.quote-main,.quote-side{display:grid;gap:14px;min-width:0}.quote-side{position:sticky;top:14px}.row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
label{display:grid;gap:6px;font-size:.83rem;color:var(--ink);font-weight:750}input,select,textarea{width:100%;min-height:40px;border:1px solid #c8d6e7;border-radius:8px;background:#fbfdff;color:var(--ink);padding:8px 10px;min-width:0}input::placeholder,textarea::placeholder{color:#687d95}textarea{resize:vertical}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.form{margin-top:14px}.grid .wide{grid-column:span 2}.memo-label{margin-top:15px}.button,.primary,.link-btn{display:inline-flex;justify-content:center;align-items:center;min-height:39px;padding:8px 12px;border-radius:8px;text-decoration:none;font-size:.86rem;font-weight:750;white-space:nowrap}.button{color:#20446c;background:#fff;border:1px solid #bfd1e6}.button:hover{background:#edf4fd}.primary{background:var(--blue);color:white;border:1px solid var(--blue)}.primary:hover{background:#0f3764}.link-btn{border:0;background:transparent;color:#1e5189;padding-inline:0}.danger{color:#a13b31}.actions{margin-top:15px}.section-title select{width:auto}
.assistant{background:linear-gradient(160deg,#edf5ff 0,#fff 73%);border-color:#c8d9ed}.assistant-head{display:flex;justify-content:space-between;gap:10px;align-items:center}.assistant-head .quiet{font-size:.78rem;font-variant-numeric:tabular-nums}.chat-log{max-height:230px;min-height:56px;overflow:auto;display:flex;flex-direction:column;gap:8px;margin:12px 0}.chat-log p{white-space:pre-line;padding:8px 12px;align-self:flex-start;background:white;border:1px solid #dce6f0;border-radius:10px;font-size:.86rem;line-height:1.6;overflow-wrap:anywhere;max-width:95%}.chat-log p[data-role="user"]{align-self:flex-end;background:#dceafb}.ask{display:flex;gap:7px}.ask input{flex:1}.lines{display:grid;gap:10px;margin-top:13px}.line-editor{border:1px solid #dbe5f0;border-radius:11px;padding:11px;background:#f9fbfe}.line-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.line-header strong{font-size:.9rem}.line-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:8px;gap:8px}.line-editor details{margin-top:8px}.line-editor summary{color:#325e89;font-size:.83rem;cursor:pointer}.line-cost{font-size:.82rem;color:var(--muted)}.schedule textarea{min-height:64px}.total-card{border:1px solid #b9cfe7}.options{display:grid;gap:8px;margin-top:12px}.amount-card{padding:13px;background:#eaf3fe;color:#193d6a;border-radius:9px;display:grid;gap:5px}.amount-card strong{font-size:clamp(1.2rem,3vw,1.6rem);letter-spacing:-.055em}.amount-card span{font-size:.78rem}.warning-list{padding:10px 12px 10px 28px;margin:12px 0 0;background:#fff4db;color:#78521e;border-radius:8px;line-height:1.5;font-size:.82rem}.exports .quiet{margin-top:5px}
.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;text-align:left}th,td{padding:10px 8px;border-bottom:1px solid #e3eaf3;font-size:.84rem;line-height:1.5}thead{color:#325478;background:#f2f7fd}td:last-child{white-space:nowrap}#rate-note{margin-bottom:10px}.file-button{position:relative;overflow:hidden;cursor:pointer}.file-button input{position:absolute;opacity:0;width:100%;inset:0;cursor:pointer}.list{display:grid;gap:8px}.list-entry{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 4px;border-bottom:1px solid #e1e9f2;flex-wrap:wrap}.list-entry:last-child{border:0}.list-entry strong{display:block;margin-bottom:4px}.list-entry select{width:auto}.list-entry div p{margin-top:3px}.list-entry [data-side]{min-width:150px}dialog{max-height:92dvh;width:min(660px,calc(100% - 24px));border:1px solid #cbd9eb;border-radius:14px;color:var(--ink);padding:22px;box-shadow:0 10px 55px #111b40aa}dialog::backdrop{background:#101e3b80}.dialog-form .grid{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:14px}
@media(max-width:1130px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.quote-layout{grid-template-columns:minmax(0,1fr) minmax(235px,31%)}}
@media(max-width:840px){.office{grid-template-columns:minmax(0,1fr)}.sidebar{padding:10px 14px;gap:11px}.side-brand{display:flex;align-items:center;gap:12px;max-width:220px;padding:5px 10px}.side-brand img{width:115px}.sidebar nav{display:flex;flex-wrap:wrap;gap:4px}.sidebar nav button{padding:9px 8px;font-size:.82rem}.topbar{min-height:52px}.quote-side{position:static}}
@media(max-width:630px){.quote-layout{grid-template-columns:minmax(0,1fr)}.content{padding:16px 11px 32px}.card{border-radius:11px}.topbar{padding:7px 12px}.page-head{margin-bottom:12px}.auth{padding:15px}.line-grid .wide{grid-column:span 2}.table-wrap{padding:8px}.list-entry{gap:8px}}
.rate-exports{margin-bottom:10px}
.total-card details .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#start-estimate{margin-top:12px}
#save-basis{white-space:normal;text-align:left}
.quote-steps{display:flex;align-items:center;gap:12px;margin:-4px 0 18px;padding:8px 0;border-bottom:1px solid var(--line);color:#8394a8}
.quote-steps a,.manual-entry{font-size:.86rem;text-decoration:none;color:var(--muted)}
.quote-steps a{padding:7px 2px;border-bottom:2px solid transparent}.quote-steps a[aria-current="step"]{color:var(--blue);border-color:var(--blue);font-weight:750}
.manual-entry{color:var(--blue);text-decoration:underline;text-underline-offset:3px}
.assistant{background:white;border-top:3px solid #315d88}
.ask{display:grid;gap:8px;margin-top:14px;border:1px solid #b6c9de;border-radius:10px;padding:10px;background:#fbfdff}
.ask:focus-within{border-color:#5785b1;box-shadow:0 0 0 2px #e1edf8}
.ask textarea{border:0;background:transparent;min-height:56px;resize:vertical;padding:5px 3px;line-height:1.6}
.ask textarea:focus-visible{outline:1px solid #8aaaca;outline-offset:0}
.composer-tools,.attached-image{display:flex;align-items:center;justify-content:space-between;gap:8px}.composer-tools{flex-wrap:wrap}
.composer-tools .button,.composer-tools button{min-height:36px}.file-button:focus-within{outline:2px solid #5785b1;outline-offset:2px}
.attached-image{border-top:1px solid var(--line);padding:8px 2px;justify-content:flex-start}.attached-image img{width:76px;height:52px;object-fit:contain;background:white;border:1px solid var(--line);border-radius:5px}
.attached-image div{min-width:0;flex:1}.attached-image strong{display:block;font-size:.85rem;overflow-wrap:anywhere}.attached-image p,.paste-hint{font-size:.78rem}
.paste-hint{margin-top:8px}.paste-hint kbd{font:inherit;border:1px solid var(--line);border-radius:4px;padding:0 3px}
.image-review{border:1px solid #a9c9bc;background:#f1f8f4;border-radius:9px;padding:14px;margin-top:12px}.image-review h3{margin:0;font-size:.96rem}
.image-review ul{padding-inline-start:20px;line-height:1.65;font-size:.87rem;max-height:260px;overflow:auto;overflow-wrap:anywhere}
.calculation-settings{grid-column:1/-1}.calculation-settings summary,.total-card summary{cursor:pointer;color:var(--blue);font-size:.85rem}
.rate-tools{margin:0 0 16px}.rate-tools summary,#rate-conditions summary{cursor:pointer;font-weight:650;color:var(--blue)}.rate-tools[open]>summary,#rate-conditions[open]>summary{margin-bottom:12px}.rate-search,.rate-source{display:grid;gap:6px;margin:8px 0 12px;font-weight:600}.rate-search{max-width:26rem}.rate-candidate{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:12px 0;border-top:1px solid var(--line);overflow-wrap:anywhere}.rate-candidate label{display:flex;align-items:center;gap:8px;font-weight:700}.rate-candidate input{width:18px;min-height:18px}.rate-candidate p{font-size:.86rem;margin:3px 0}.rate-candidate button{flex:none}.rate-candidate small{display:block}#rate-review-note{margin:10px 0}#rate-conflict-actions:not(:empty){display:grid;gap:8px;margin:12px 0}#rate-conditions{margin-bottom:12px}
#fare-panel{margin:16px 0}#fare-panel summary{cursor:pointer;color:var(--blue)}#fare-panel input[type=checkbox]{width:20px;min-height:20px;align-self:flex-start}#fare-groups{margin-bottom:10px}
.save-help{margin:10px 0;font-size:.8rem}.chat-log[hidden]+.ask{margin-top:16px}
.rate-candidate input[type=date]{width:auto;min-height:36px}.rate-candidate details{margin-top:8px}
.desk{min-width:0}.quote-main h2,.quote-side h2{scroll-margin-top:20px}
@media(max-width:840px){.sidebar{gap:8px}.sidebar nav{flex-wrap:nowrap;overflow-x:auto}.sidebar nav button{white-space:nowrap}.sidebar .side-action{align-self:flex-start}.topbar{min-height:40px}}
@media(max-width:550px){.quote-steps{gap:7px}.quote-steps a{font-size:.8rem}.composer-tools{gap:5px}.composer-tools .row{gap:7px}.line-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.image-thumb{background:transparent;border:0;padding:0;cursor:zoom-in}.paste-mobile{display:none}
.provider-settings{display:grid;gap:16px;max-width:640px}.provider-settings fieldset{display:grid;gap:10px;min-width:0;margin:0;padding:12px 16px 16px;border:1px solid var(--line);border-radius:9px}.provider-settings legend{font-weight:700;padding:0 5px}.provider-settings .remove-provider-key{display:flex;align-items:center;font-weight:500}.remove-provider-key input{width:16px;min-height:16px}.provider-settings .primary{justify-self:start}
#image-dialog{width:fit-content;max-width:min(96vw,1200px)}#large-image{margin:12px auto 0;max-width:100%;max-height:74vh;object-fit:contain}
.edit-status{color:#804900;font-size:.8rem;font-weight:650}
.pending-link,.warning-link{border:0;background:none;text-align:left;color:#70430a;text-decoration:underline;text-underline-offset:3px}
.pending-link{justify-self:start;padding:6px 9px;background:#fff1cd;border-radius:6px;font-weight:750}
.warning-link{padding:5px 0;line-height:1.4}.amount-card:has(.pending-link){background:#fff8e9}
#quote-dock,#rate-cards{display:none}
@media(max-width:840px){
  [data-panel="quote"]{padding-bottom:calc(72px + env(safe-area-inset-bottom))}
  #quote-dock{position:fixed;z-index:4;inset:auto 0 0;display:flex;align-items:center;gap:8px;padding:9px 14px calc(9px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line);box-shadow:0 -3px 14px #17294312}
  #dock-status{flex:1;font-size:.8rem;color:var(--muted)}#quote-dock button{min-height:44px}
  [data-panel="quote"] :is(input,textarea,select,button,h2){scroll-margin-bottom:82px}
}
@media(max-width:630px){
  [data-panel="rates"] .table-wrap{display:none}#rate-cards{display:grid;gap:9px}
  .rate-mobile-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px;border:1px solid var(--line);border-radius:10px;padding:14px;background:#fff}
  .rate-mobile-card h2{font-size:1rem;margin:2px 0 7px;overflow-wrap:anywhere}.rate-mobile-card strong{color:var(--blue)}
  .rate-mobile-card p{margin-top:5px;overflow-wrap:anywhere}.rate-mobile-card summary{cursor:pointer;min-height:44px;padding:10px 3px;color:var(--blue);font-size:.87rem}
  .rate-mobile-card details[open]{grid-column:1/-1}.rate-mobile-card details[open] summary{min-height:36px;padding:6px 0}.rate-mobile-card .row{justify-content:flex-end}
}
@media(max-width:630px){.sidebar nav{display:grid;grid-template-columns:repeat(auto-fit,minmax(55px,1fr));gap:2px}.sidebar nav button{text-align:center;padding:9px 1px}.paste-desktop{display:none}.paste-mobile{display:inline}}
