:root{--green:#0b6b47;--green2:#118357;--mint:#eaf5ef;--line:#dfe8e2;--bg:#f7faf8;--text:#14231d;--muted:#78877f;--blue:#2475db;--orange:#e39b23;--purple:#8757e8;--red:#e45757;--shadow:0 8px 28px rgba(20,50,35,.06)}
*{box-sizing:border-box}body{margin:0;font-family:Inter,"Pretendard","Noto Sans KR",system-ui,sans-serif;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}.shell{display:grid;grid-template-columns:230px 1fr;min-height:100vh}.sidebar{background:white;border-right:1px solid var(--line);padding:20px 14px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:10px;padding:0 8px 18px}.brand .mark{font-size:34px;font-weight:900;color:var(--green)}.brand b{font-size:22px}.brand small{display:block;font-size:9px;letter-spacing:2px;color:var(--green)}.brand.big{justify-content:center}.factory-card{display:flex;gap:10px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#f9fbfa;margin-bottom:16px}.factory-card small{display:block;color:var(--muted);font-size:11px;margin-top:3px}nav{display:grid;gap:5px}nav button{border:0;background:transparent;text-align:left;padding:12px 14px;border-radius:10px;color:#52655b;cursor:pointer;font-weight:650}nav button.active{background:var(--mint);color:var(--green)}.badge{float:right;font-size:10px;border:1px solid #cce1d6;border-radius:5px;padding:2px 5px}.side-bottom{margin-top:auto;display:grid;gap:8px}.status-dot{font-size:13px;color:#4e6157;margin:10px}.status-dot span{display:inline-block;width:8px;height:8px;background:#13a266;border-radius:50%;margin-right:8px}main{min-width:0}.topbar{height:66px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 34px;position:sticky;top:0;z-index:5}.crumb{color:var(--muted);margin-right:18px;font-size:12px}.top-actions{display:flex;gap:10px;align-items:center}.page{display:none;padding:30px 34px 60px;max-width:1500px;margin:auto}.page.active{display:block}.hero{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:22px}.hero h1{font-size:30px;margin:0 0 7px}.hero p{margin:0;color:var(--muted)}.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.card{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.metric{padding:20px}.metric small{color:var(--muted)}.metric strong{display:block;font-size:28px;margin-top:10px}.layout2{display:grid;grid-template-columns:1.15fr .85fr;gap:18px;margin-top:18px}.layout3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:18px;margin-top:18px}.card h2{font-size:17px;margin:0;padding:18px 20px;border-bottom:1px solid var(--line)}.card-body{padding:18px 20px}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse;font-size:13px}.table th{background:#f8faf9;color:#6d7c74;font-weight:600;text-align:left;padding:11px 12px;border-bottom:1px solid var(--line);white-space:nowrap}.table td{padding:12px;border-bottom:1px solid #edf1ef;vertical-align:middle}.table tr:last-child td{border-bottom:0}.muted{color:var(--muted);font-size:12px}.pill{background:#eef5f1;border:1px solid #dce9e2;color:#4f665b;border-radius:999px;padding:7px 10px;font-size:12px}.stage{padding:5px 9px;border-radius:7px;font-weight:700;font-size:12px}.stage.MANUFACTURING{color:#186ac2;background:#e8f2ff}.stage.DRYING{color:#ad7100;background:#fff3d9}.stage.PACKING{color:#6f37c8;background:#f1e9ff}.stage.COMPLETED{color:#14704a;background:#e4f4eb}.primary,.success{border:0;border-radius:9px;padding:10px 14px;background:var(--green);color:#fff;font-weight:700;cursor:pointer}.secondary{border:1px solid #bfd1c7;border-radius:9px;padding:9px 13px;background:#fff;color:var(--green);font-weight:700;cursor:pointer}.danger{border:1px solid #f3caca;background:#fff3f3;color:#c74444;border-radius:8px;padding:8px 11px;cursor:pointer}.ghost{border:1px solid var(--line);background:#fff;border-radius:8px;padding:8px 11px;cursor:pointer;color:#506158}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.toolbar.right{justify-content:flex-end}.field{display:grid;gap:6px;margin-bottom:13px}.field label{font-size:12px;font-weight:700;color:#55685e}.field input,.field select,.field textarea{width:100%;border:1px solid #d6e0da;border-radius:8px;padding:10px;background:white;outline:none}.field input:focus,.field select:focus,.field textarea:focus{border-color:#74a98c;box-shadow:0 0 0 3px #e9f4ee}.inline{display:flex;gap:8px;align-items:center}.inline>*{flex:1}.capacity{margin:12px 0;background:#edf8f1;border:1px solid #d1eada;border-radius:9px;padding:12px;color:#165f42;font-weight:700}.note{padding:12px;background:#f4f8f5;border:1px solid #dfebe3;border-radius:9px;color:#5a6d63;font-size:12px}.recipe-list{display:grid;gap:8px}.recipe-item{padding:13px;border:1px solid var(--line);border-radius:10px;cursor:pointer;background:white}.recipe-item.active{border-color:#6fa589;background:#edf8f2}.recipe-item b{display:block}.recipe-editor{min-height:500px}.ingredients{display:grid;gap:8px}.ingredient-row{display:grid;grid-template-columns:1.6fr 1fr auto;gap:8px}.dropzone{border:1.5px dashed #b9cec2;border-radius:12px;padding:24px;text-align:center;background:#fbfdfc}.dropzone input{margin-top:10px}.split-head{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid var(--line)}.split-head h2{padding:0;border:0}.highlight{color:var(--green);font-weight:800}.login-overlay{position:fixed;inset:0;z-index:100;background:rgba(245,249,247,.98);display:flex;align-items:center;justify-content:center}.login-card{width:min(420px,92vw);background:white;border:1px solid var(--line);box-shadow:0 20px 60px rgba(20,60,40,.12);border-radius:18px;padding:30px}.login-card h1{font-size:23px}.login-card p{color:var(--muted)}.login-card input{width:100%;padding:12px;border:1px solid var(--line);border-radius:9px;margin:12px 0}.login-card button{width:100%}.error{color:#c84545;font-size:12px;margin-top:8px}.hidden{display:none!important}#toast{position:fixed;right:25px;bottom:25px;background:#173b2b;color:#fff;padding:12px 16px;border-radius:9px;opacity:0;transform:translateY(10px);transition:.2s;z-index:200;max-width:450px}#toast.show{opacity:1;transform:translateY(0)}.ai-answer{white-space:pre-wrap;line-height:1.65;padding:18px;background:#f8fbf9;border:1px solid var(--line);border-radius:12px;min-height:140px}.manual-banner{background:#fff8e9;border:1px solid #f2ddae;color:#835d10;padding:12px;border-radius:9px;margin-bottom:12px;font-size:12px}.progress{display:flex;gap:6px;align-items:center}.progress .dot{padding:5px 7px;border-radius:6px;background:#edf1ef;color:#829087;font-size:11px}.progress .dot.on{background:#e4f4eb;color:#136b47;font-weight:700}.doc-ai{padding:12px;background:#f1edff;border:1px solid #ddd1ff;border-radius:10px;color:#5d42a1;font-size:12px}.section-space{margin-top:18px}

/* modal input windows */
.modal-overlay{position:fixed;inset:0;z-index:500;background:rgba(20,35,28,.38);display:flex;align-items:center;justify-content:center;padding:24px;backdrop-filter:blur(2px)}
.modal-overlay.sub{z-index:550;background:rgba(20,35,28,.24)}
.modal-panel{width:min(820px,96vw);max-height:88vh;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 28px 80px rgba(18,55,38,.22);overflow:hidden;display:flex;flex-direction:column}
.modal-panel.wide{width:min(980px,96vw)}
.modal-panel.compact{width:min(720px,96vw)}
.modal-panel.small{width:min(520px,94vw)}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:17px 20px;border-bottom:1px solid var(--line);background:#fbfdfc}
.modal-head h2{margin:0;font-size:18px}
.modal-x{border:0;background:transparent;font-size:27px;line-height:1;color:#718178;cursor:pointer;padding:2px 7px}
.modal-body{padding:20px;overflow:auto}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.material-admin-list{display:grid;gap:8px;margin-top:14px}
.material-admin-row{display:grid;grid-template-columns:1.4fr .55fr .7fr .7fr auto;gap:8px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:10px;background:#fbfdfc}
.material-admin-row .stock-readonly{font-size:12px;color:#64756c}
.recipe-card-list{display:grid;gap:10px}
.recipe-card{border:1px solid var(--line);border-radius:12px;padding:15px;display:flex;justify-content:space-between;gap:15px;align-items:center;background:#fff}
.recipe-card:hover{border-color:#afcabc;background:#fbfdfc}
.recipe-card .recipe-meta{display:grid;gap:4px}
.modal-section-title{font-size:14px;margin:20px 0 10px;color:#40554a}
.material-choice-row{display:grid;grid-template-columns:minmax(180px,1.6fr) 1fr auto auto;gap:8px;align-items:center}
.small-help{font-size:11px;color:var(--muted);line-height:1.5}
.action-card{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px}
.action-card p{margin:5px 0 0;color:var(--muted);font-size:12px}
@media(max-width:720px){.material-admin-row{grid-template-columns:1fr 1fr}.material-choice-row{grid-template-columns:1fr}.modal-overlay{padding:10px}.modal-panel{max-height:94vh}}

.version-pill{
  background:#173f2a !important;
  color:#fff !important;
  border-color:#173f2a !important;
  font-weight:800;
  letter-spacing:.04em;
}
.row-actions{display:flex;gap:6px;flex-wrap:wrap;}


/* v4 workflow refinements */
.help-tip{position:relative;display:inline-flex;align-items:center;justify-content:center;width:19px;height:19px;margin-left:6px;border-radius:50%;background:#eef5f1;border:1px solid #cbded4;color:var(--green);font-size:12px;font-weight:800;vertical-align:middle;cursor:help;outline:none}
.help-tip-text{position:absolute;left:50%;top:27px;transform:translateX(-50%) translateY(-4px);width:330px;padding:11px 12px;border-radius:9px;background:#173b2b;color:#fff;font-size:12px;font-weight:500;line-height:1.5;box-shadow:0 10px 30px rgba(20,50,35,.18);opacity:0;visibility:hidden;transition:.16s;z-index:30;pointer-events:none}
.help-tip:hover .help-tip-text,.help-tip:focus .help-tip-text{opacity:1;visibility:visible;transform:translateX(-50%) translateY(0)}
.capacity-overview{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin:12px 0 16px}
.capacity-card{display:grid;gap:4px;padding:13px 14px;border:1px solid #d1eada;border-radius:10px;background:#f1f9f4}
.capacity-card>span{font-size:12px;color:#48675a;font-weight:700}.capacity-card>span small{color:#7c8e84;font-weight:500}.capacity-card>b{font-size:20px;color:#165f42}.capacity-card>small{font-size:11px;color:var(--muted)}
@media(max-width:720px){.help-tip-text{left:auto;right:-20px;transform:translateY(-4px);width:min(300px,80vw)}.help-tip:hover .help-tip-text,.help-tip:focus .help-tip-text{transform:translateY(0)}}

/* V5 related-material filtering */
.related-material-head{display:flex;align-items:baseline;gap:12px;margin:18px 0 10px}
.related-material-head b{font-size:14px;color:#40554a}
.empty-related-materials{padding:18px;border:1px dashed #cfdcd5;border-radius:10px;background:#fbfdfc;color:#718178;font-size:13px}
/* Keep data-entry modals stable: close only with X/Cancel/Save. */
.modal-panel input[type="number"]{touch-action:manipulation}

/* V5.1 accounts & logs */
.role-staff .admin-only{display:none !important}
.user-chip{font-weight:700}
.user-chip.ADMIN{background:#fff4e0;border-color:#f0d29c;color:#8a5a00}
.pw-warning{margin:14px 28px 0;padding:11px 14px;border:1px solid #f0c9c9;background:#fff3f3;color:#9b2c2c;border-radius:10px;font-size:13px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pw-warning.hidden{display:none}
.log-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}
.log-tabs button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 14px;cursor:pointer;font-size:13px}
.log-tabs button.active{background:var(--green);border-color:var(--green);color:#fff}
.log-filters{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr)) auto auto;gap:8px;align-items:end;margin-bottom:12px}
.log-filters .field{margin:0}
.log-table td,.log-table th{font-size:12px;white-space:nowrap}
.log-table td.wrap{white-space:normal;min-width:180px}
.status-CANCELLED{color:var(--red);font-weight:700}
.status-CONFIRMED{color:var(--green);font-weight:700}
.role-tag{display:inline-block;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:700;background:#eef5f1;color:var(--green)}
.role-tag.ADMIN{background:#fff4e0;color:#8a5a00}
.inbound-row{grid-template-columns:minmax(180px,1.6fr) 1fr 90px auto !important}
@media(max-width:720px){.log-filters{grid-template-columns:1fr 1fr}.pw-warning{margin:10px 12px 0}}

/* V5.2 AI chat */
.pill.ai-off{background:#fff3f3;border-color:#f0c9c9;color:#9b2c2c}
#page-ai.page.active{padding-bottom:18px}
.chat-shell{display:grid;grid-template-columns:250px 1fr;gap:14px;height:calc(100vh - 110px);min-height:520px}
.chat-side{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px;display:flex;flex-direction:column;gap:10px;min-height:0}
.chat-conv-list{flex:1;overflow:auto;display:grid;align-content:start;gap:4px}
.chat-conv{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:9px 10px;border-radius:9px;cursor:pointer;font-size:13px}
.chat-conv span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-conv:hover{background:#f3f8f5}.chat-conv.active{background:var(--mint);font-weight:700}
.chat-conv-del{border:0;background:transparent;color:#9aa8a0;font-size:17px;cursor:pointer;padding:0 4px;visibility:hidden}
.chat-conv:hover .chat-conv-del,.chat-conv.active .chat-conv-del{visibility:visible}
.chat-conv-del:hover{color:var(--red)}
.chat-empty-list{padding:10px;font-size:12px}
.chat-side-foot{display:grid;gap:6px;border-top:1px solid var(--line);padding-top:10px}
.chat-side-foot .ghost{font-size:12px}
.chat-main{background:#fff;border:1px solid var(--line);border-radius:14px;display:flex;flex-direction:column;min-height:0;min-width:0}
.chat-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.chat-head-pills{display:flex;gap:6px;flex-wrap:wrap}.chat-head-pills .pill{font-size:11px}
.chat-rename{border:0;background:transparent;cursor:pointer;color:var(--muted);margin-left:4px}
.chat-messages{flex:1;overflow:auto;padding:18px;display:flex;flex-direction:column;gap:12px;background:#fbfdfc}
.chat-msg{max-width:min(760px,86%);padding:11px 14px;border-radius:14px;font-size:14px;line-height:1.6;word-break:break-word}
.chat-msg.user{align-self:flex-end;background:var(--green);color:#fff;border-bottom-right-radius:4px}
.chat-msg.assistant{align-self:flex-start;background:#fff;border:1px solid var(--line);border-bottom-left-radius:4px}
.chat-msg.error{background:#fff3f3;border-color:#f0c9c9;color:#9b2c2c}
.chat-msg pre{background:#14231d;color:#e8f2ec;padding:10px;border-radius:8px;overflow:auto;font-size:12px}
.chat-msg code{background:rgba(0,0,0,.06);padding:1px 4px;border-radius:4px;font-size:12px}.chat-msg pre code{background:none;padding:0}
.chat-msg.user code{background:rgba(255,255,255,.18)}
.chat-tag{display:block;font-size:11px;opacity:.85;margin-bottom:4px}
.chat-imgs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:6px}
.chat-img{max-width:220px;max-height:220px;border-radius:9px;display:block;background:#eef3f0}
.chat-img.generated{max-width:min(420px,100%);max-height:420px}
.chat-mem-note{margin-top:8px;font-size:12px;color:#5b4a8f;background:#f4f0ff;border-radius:7px;padding:5px 8px}
.chat-msg.pending{color:var(--muted)}
.dots::after{content:'';animation:dots 1.2s steps(4,end) infinite}
@keyframes dots{0%{content:''}25%{content:'.'}50%{content:'..'}75%{content:'...'}}
.chat-welcome{margin:auto;text-align:center;max-width:460px;color:#40554a}.chat-welcome b{font-size:20px}.chat-welcome p{font-size:13px;line-height:1.6}
.chat-compose{border-top:1px solid var(--line);padding:12px 14px;display:grid;gap:8px}
.chat-compose textarea{width:100%;border:1px solid #d6e0da;border-radius:10px;padding:10px 12px;resize:vertical;min-height:62px;outline:none}
.chat-compose textarea:focus{border-color:#74a98c;box-shadow:0 0 0 3px #e9f4ee}
.chat-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.chat-opt{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:#40554a;cursor:pointer;user-select:none}
.chat-opt.disabled{opacity:.45;cursor:not-allowed}
.chat-mode{font-size:12px;padding:4px 6px;border:1px solid var(--line);border-radius:6px}
.chat-send{margin-left:auto}
.chat-files{display:flex;gap:6px;flex-wrap:wrap}
.chat-file{font-size:12px;background:var(--mint);border-radius:999px;padding:3px 4px 3px 10px;display:inline-flex;align-items:center;gap:4px}
.chat-file button{border:0;background:transparent;cursor:pointer;color:#5b6d63}
.mem-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:10px;background:#fbfdfc;font-size:13px}
.mem-row .muted{font-size:11px;margin-top:3px}
.provider-pick{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.provider-card{border:1px solid var(--line);border-radius:12px;padding:12px;display:grid;gap:4px;cursor:pointer}
.provider-card:has(input:checked){border-color:var(--green);background:var(--mint)}
.provider-card span{font-size:12px;color:var(--muted)}
.provider-card em{font-style:normal;font-weight:700;margin-left:4px}.provider-card em.ok{color:var(--green)}.provider-card em.bad{color:var(--red)}
@media(max-width:900px){.chat-shell{grid-template-columns:1fr;height:auto}.chat-side{max-height:220px}.chat-main{height:70vh}.provider-pick{grid-template-columns:1fr}.chat-msg{max-width:94%}}
#toast{pointer-events:none}

/* ==================================================================
   V5.4 소프트 파스텔 테마 (SUIT 글꼴) + 태블릿 레이아웃
   ================================================================== */
@font-face{font-family:"SUIT";src:url(/factory/static/fonts/SUIT-Regular.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"SUIT";src:url(/factory/static/fonts/SUIT-Medium.woff2) format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:"SUIT";src:url(/factory/static/fonts/SUIT-SemiBold.woff2) format("woff2");font-weight:600;font-display:swap}
@font-face{font-family:"SUIT";src:url(/factory/static/fonts/SUIT-Bold.woff2) format("woff2");font-weight:700;font-display:swap}
@font-face{font-family:"SUIT";src:url(/factory/static/fonts/SUIT-ExtraBold.woff2) format("woff2");font-weight:800 900;font-display:swap}

:root{--green:#6d5dfc;--green2:#5b8cff;--mint:#efecff;--line:#ebe8f7;--bg:#f6f5fc;--text:#25233a;--muted:#7d7a95;
  --grad:linear-gradient(135deg,#7c6cff,#5b8cff);--soft-shadow:0 8px 30px rgba(60,50,140,.07);--radius:22px}
body,button,input,select,textarea{font-family:"SUIT","Pretendard","Noto Sans KR",system-ui,sans-serif}
body{background:var(--bg);-webkit-tap-highlight-color:transparent}

/* 사이드바 */
.sidebar{background:#fff;border-right:0;box-shadow:4px 0 24px rgba(109,93,252,.06)}
.brand .mark,.brand small{color:#6d5dfc}
.factory-card{border:0;border-radius:16px;background:var(--bg)}
nav button{display:flex;align-items:center;gap:10px;border-radius:14px;color:#5f5c78;font-weight:600}
nav button .ni{width:20px;text-align:center;flex:none}
nav button .nl{flex:1}
nav button .badge{float:none;border-color:#dcd6ff;color:#6d5dfc}
nav button:hover{background:#f7f6fd}
nav button.active{background:var(--grad);color:#fff;box-shadow:0 6px 16px rgba(109,93,252,.3)}
nav button.active .badge{border-color:rgba(255,255,255,.6);color:#fff}
.status-dot span{background:#22c55e}

/* 상단·카드·표 */
.topbar{background:rgba(255,255,255,.85);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
.card{border:0;border-radius:var(--radius);box-shadow:var(--soft-shadow)}
.card h2,.split-head{border-bottom:1px solid #f1effa}
.grid4 .metric{border-radius:20px}
.grid4 .metric:nth-child(1){background:#efecff}.grid4 .metric:nth-child(2){background:#e6f4ff}
.grid4 .metric:nth-child(3){background:#e8f8ef}.grid4 .metric:nth-child(4){background:#fff1e6}
.metric small{font-weight:600;color:#6b6886}
.metric strong{font-weight:800;letter-spacing:-.02em}
.hero h1{font-weight:800;letter-spacing:-.02em}
.table th{background:#f7f6fd;color:#7d7a95;border:0}
.table th:first-child{border-radius:10px 0 0 10px}.table th:last-child{border-radius:0 10px 10px 0}
.table td{border-bottom:1px solid #f1effa}
.row-finished td{opacity:.6}
.done-tag{color:#16a34a;font-weight:700;font-size:13px}

/* 버튼·입력 */
.primary,.success{background:var(--grad);border-radius:14px;box-shadow:0 6px 16px rgba(109,93,252,.25)}
.primary:disabled{opacity:.6;box-shadow:none}
.secondary{border:1px solid #dcd6ff;color:#6d5dfc;border-radius:12px;background:#fff}
.ghost{border-radius:12px;border-color:#e6e3f3;color:#5f5c78}
.danger{border-radius:12px}
.pill{background:#fff;border-color:#ebe8f7;color:#5f5c78}
.version-pill{background:#25233a!important;border-color:#25233a!important;color:#fff!important}
.user-chip.ADMIN{background:#fff4e0;border-color:#f6dcae;color:#8a5a00}
.field label{color:#5f5c78}
.field input,.field select,.field textarea{border-color:#e3e0f2;border-radius:12px}
.field input:focus,.field select:focus,.field textarea:focus{border-color:#a79dff;box-shadow:0 0 0 3px #efecff}
.note{background:#f7f6fd;border-color:#ebe8f7;color:#5f5c78;border-radius:14px}
.capacity{background:#efecff;border-color:#dcd6ff;color:#5141d9;border-radius:14px}
.capacity-card{background:#f7f6fd;border-color:#e6e2fb;border-radius:16px}.capacity-card>b{color:#6d5dfc}.capacity-card>span{color:#5f5c78}
.dropzone{border-color:#cfc8f8;border-radius:16px;background:#faf9ff}
.recipe-card{border:1px solid #f1effa;border-radius:16px}
.recipe-card:hover{border-color:#dcd6ff;background:#faf9ff}
.material-admin-row,.mem-row{border-color:#ebe8f7;border-radius:14px;background:#faf9ff}
.empty-related-materials{border-color:#dcd6ff;border-radius:14px;background:#faf9ff}
.stage{border-radius:999px;padding:5px 11px}
.stage.COMPLETED{color:#15803d;background:#dcfce7}
.help-tip{background:#efecff;border-color:#dcd6ff;color:#6d5dfc}
.help-tip-text{background:#25233a}
#toast{background:#25233a;border-radius:14px}
.pw-warning{border-radius:14px}

/* 모달·로그인 */
.modal-overlay{background:rgba(37,35,58,.32)}
.modal-panel{border:0;border-radius:24px;box-shadow:0 28px 80px rgba(60,50,140,.22)}
.modal-head{background:#fff;border-bottom-color:#f1effa}
.modal-actions{border-top-color:#f1effa}
.login-overlay{background:linear-gradient(135deg,#f1eeff,#e8f1ff)}
.login-card{border:0;border-radius:26px;box-shadow:0 24px 70px rgba(60,50,140,.16)}
.login-card input{border-color:#e3e0f2;border-radius:12px}

/* 기록·사용자·AI */
.log-tabs button{border-color:#e6e3f3;border-radius:999px}
.log-tabs button.active{background:var(--grad);border-color:transparent}
.role-tag{background:#efecff;color:#6d5dfc}
.chat-side,.chat-main{border:0;border-radius:var(--radius);box-shadow:var(--soft-shadow)}
.chat-conv{border-radius:12px}.chat-conv.active{background:#efecff;color:#4c3fd1}
.chat-messages{background:#faf9ff}
.chat-msg{border-radius:18px}
.chat-msg.user{background:var(--grad)}
.chat-msg.assistant{border-color:#ebe8f7}
.chat-msg pre{background:#25233a}
.chat-compose textarea{border-color:#e3e0f2;border-radius:14px}
.chat-compose textarea:focus{border-color:#a79dff;box-shadow:0 0 0 3px #efecff}
.chat-file{background:#efecff}
.provider-card{border-color:#ebe8f7;border-radius:16px}
.provider-card:has(input:checked){border-color:#a79dff;background:#f7f6fd}

/* ---------------- 태블릿·터치 ---------------- */
/* 손가락으로 누르기 쉽게: 버튼·입력 최소 높이 44px, 입력 글자 16px(iPad 확대 방지) */
@media (pointer:coarse){
  .primary,.secondary,.ghost,.danger,.success{min-height:44px;padding-left:16px;padding-right:16px}
  .field input,.field select,.field textarea,.login-card input,.chat-compose textarea,select,input[type=number],input[type=text],input[type=date],input[type=datetime-local]{font-size:16px;min-height:46px}
  nav button{min-height:50px}
  .table td{padding-top:14px;padding-bottom:14px}
  .chat-conv{padding:13px 12px}
  .chat-conv-del{visibility:visible;font-size:22px}
  .chat-opt{font-size:14px;min-height:40px}
  .chat-opt input[type=checkbox]{width:20px;height:20px}
  .modal-x{font-size:32px;padding:4px 12px}
  .log-tabs button{padding:10px 16px}
}

/* 표 안 짧은 값은 줄바꿈하지 않는다 */
.nowrap,.stage{white-space:nowrap}
.prod-table td:first-child{white-space:nowrap}
.sidebar{overflow-y:auto}

/* 화면 높이가 낮은 가로 태블릿: 메뉴 간격을 줄여 아래 버튼까지 한 화면에 */
@media (max-height:900px) and (min-width:1025px){
  .factory-card{display:none}
  .brand{padding-bottom:10px}
  nav button{padding:10px 12px;min-height:44px}
  .side-bottom{gap:6px}
  .side-bottom .ghost{padding:7px 10px;min-height:38px}
  .status-dot{margin:6px 10px}
}

/* 태블릿 가로 (예: iPad 1180~1366, 갤럭시탭 1280) */
@media (max-width:1366px){
  .shell{grid-template-columns:210px 1fr}
  .page{padding:24px 22px 48px}
  .topbar{padding:0 22px}
  .layout2{grid-template-columns:1fr 1fr}
}

/* 태블릿 세로·작은 태블릿 (≤1024): 왼쪽 메뉴를 아이콘+짧은 이름의 좁은 레일로 */
@media (max-width:1024px){
  .shell{grid-template-columns:88px 1fr}
  .sidebar{padding:16px 8px}
  .sidebar .brand{justify-content:center;padding-bottom:12px}
  .sidebar .brand div{display:none}
  .sidebar .brand .mark{font-size:30px}
  .factory-card,.status-dot{display:none}
  nav{gap:4px}
  nav button{flex-direction:column;gap:3px;padding:10px 4px;font-size:11px;text-align:center;min-height:64px;justify-content:center;position:relative}
  nav button .ni{font-size:20px;width:auto}
  nav button .nl{font-size:11px;line-height:1.25;word-break:keep-all}
  nav button .badge{position:absolute;top:6px;right:6px;font-size:8px;padding:1px 3px}
  .side-bottom .ghost{font-size:11px;padding:8px 4px;min-height:40px;word-break:keep-all;line-height:1.25}
  .topbar{height:auto;min-height:60px;padding:8px 16px;flex-wrap:wrap;gap:8px}
  .crumb{display:none}
  .top-actions{flex-wrap:wrap;gap:6px}
  .top-actions .pill{padding:6px 9px;font-size:11px}
  .page{padding:20px 16px 40px}
  .hero{flex-wrap:wrap;gap:12px;align-items:flex-start}
  .hero h1{font-size:26px}
  .grid4{grid-template-columns:repeat(2,1fr);gap:12px}
  .layout2,.layout3{grid-template-columns:1fr}
  .metric strong{font-size:30px}
  .split-head{flex-wrap:wrap;gap:10px}
  .modal-overlay{padding:12px}
  .modal-panel,.modal-panel.wide,.modal-panel.compact{width:96vw;max-height:92vh}
  .modal-actions{flex-wrap:wrap}
  .material-admin-row{grid-template-columns:1fr 1fr}
  .recipe-card{flex-wrap:wrap}
  .log-filters{grid-template-columns:1fr 1fr}
  .chat-shell{grid-template-columns:1fr;height:auto}
  /* 대화 목록을 위쪽 한 줄(가로 스크롤)로 접는다 */
  .chat-side{max-height:none;flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px;padding:10px}
  .chat-side>.primary{flex:none}
  .chat-side-foot{order:2;display:flex;flex-direction:row;flex-wrap:wrap;gap:6px;border-top:0;padding-top:0;margin-left:auto}
  .chat-conv-list{order:3;flex:1 1 100%;display:flex;gap:6px;overflow-x:auto;padding-bottom:2px}
  .chat-conv{flex:none;max-width:220px;background:#f7f6fd}
  .chat-empty-list{padding:6px}
  .chat-main{height:calc(100vh - 230px);min-height:480px}
  .chat-msg{max-width:92%}
  .provider-pick{grid-template-columns:1fr}
}

/* 휴대폰 크기 */
@media (max-width:640px){
  .shell{grid-template-columns:1fr}
  .sidebar{position:sticky;top:0;z-index:20;height:auto;flex-direction:row;align-items:center;padding:6px;overflow-x:auto}
  .sidebar .brand,.side-bottom{display:none}
  nav{display:flex;gap:4px}
  nav button{min-width:72px;min-height:56px}
  .topbar{position:static}
  .grid4{grid-template-columns:1fr 1fr}
}
.row-actions{align-items:center}
#capacityRecipe{border:1px solid #e3e0f2;border-radius:12px;padding:9px 12px;background:#fff;min-height:42px}

/* V5.5 작은 확인창 (기본 confirm/prompt 대체) */
.dialog-overlay{position:fixed;inset:0;z-index:700;background:rgba(37,35,58,.34);backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;padding:20px;animation:dlgFade .15s ease}
.dialog-overlay.hidden{display:none}
.dialog-card{width:min(400px,92vw);background:#fff;border-radius:26px;padding:26px 24px 20px;box-shadow:0 30px 80px rgba(60,50,140,.25);text-align:center;animation:dlgPop .18s cubic-bezier(.2,.9,.3,1.2)}
.dialog-icon{width:56px;height:56px;margin:0 auto 12px;border-radius:18px;display:flex;align-items:center;justify-content:center;font-size:26px;background:#efecff}
.tone-danger .dialog-icon{background:#ffecec}
.dialog-card h3{margin:0 0 8px;font-size:19px;font-weight:800}
.dialog-body p{margin:0;color:#6b6886;font-size:14px;line-height:1.6;word-break:keep-all}
.dialog-prod{display:grid;gap:3px;margin:4px 0 16px}.dialog-prod b{font-size:16px}.dialog-prod span{font-size:13px;color:#7d7a95}
.stage-flow{display:flex;align-items:center;justify-content:center;gap:12px;padding:14px;border-radius:16px;background:#f7f6fd}
.stage-flow .stage{font-size:15px;padding:8px 16px}
.stage-arrow{font-size:20px;color:#a79dff;font-weight:800}
.dialog-input{width:100%;margin-top:14px;border:1px solid #e3e0f2;border-radius:12px;padding:12px;font-size:16px;outline:none}
.dialog-input:focus{border-color:#a79dff;box-shadow:0 0 0 3px #efecff}
.dialog-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}
.dialog-actions button{min-height:48px;font-size:15px;font-weight:700}
.danger-solid{border:0;border-radius:14px;background:linear-gradient(135deg,#ff7a7a,#f2557a);color:#fff;cursor:pointer;box-shadow:0 6px 16px rgba(242,85,122,.25)}
@keyframes dlgFade{from{opacity:0}to{opacity:1}}
@keyframes dlgPop{from{opacity:0;transform:translateY(8px) scale(.96)}to{opacity:1;transform:none}}

/* v5.7.3 입력 검사 */
.input-invalid{border-color:#f2557a!important;box-shadow:0 0 0 3px #ffe4ea!important}
.row-invalid{outline:2px solid #f2557a;outline-offset:3px;border-radius:12px;background:#fff6f8}
.in-hint{grid-column:1/-1;font-size:12px;color:#9a3412;background:#fff7ed;border:1px solid #fed7aa;border-radius:10px;padding:6px 10px}
.modal-actions .primary:disabled{opacity:.55;cursor:wait}

/* v6.1 */
.perm-off{display:none !important}
.bell{position:relative;font-size:18px;padding:6px 10px}
.bell-count{position:absolute;top:-4px;right:-4px;background:#f2557a;color:#fff;border-radius:999px;font-size:11px;min-width:18px;height:18px;line-height:18px;text-align:center;padding:0 4px}
.warn-pill{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}
.outbox-pill{background:#eef2ff;color:#3730a3;cursor:pointer}
.outbox-pill.bad{background:#ffe4ea;color:#9f1239}
.photo-overlay{position:fixed;inset:0;background:rgba(15,15,25,.88);z-index:200;display:flex;align-items:center;justify-content:center}
.photo-overlay img{max-width:94vw;max-height:90vh;border-radius:10px;box-shadow:0 10px 40px rgba(0,0,0,.4)}
.photo-x{position:absolute;top:16px;right:20px;font-size:30px;background:#fff;border-radius:999px;width:46px;height:46px;border:0;cursor:pointer}
.chat-data-at{margin-top:6px;font-size:11px;color:#9aa0ae}
.notif-list{display:flex;flex-direction:column;gap:8px;max-height:60vh;overflow:auto}
.notif{display:flex;gap:10px;padding:10px 12px;border-radius:12px;background:#f7f7fb;cursor:pointer}
.notif.unread{background:#eef2ff;border-left:4px solid #6c63ff}
.notif-ic{font-size:20px}
.tag-supply,.tag-off,.tag-warn,.tag-link{display:inline-block;font-size:11px;border-radius:8px;padding:1px 7px;margin-left:4px;vertical-align:middle}
.tag-supply{background:#ecfdf5;color:#047857}.tag-off{background:#f1f1f4;color:#6b7280}
.tag-warn{background:#fff7ed;color:#9a3412}.tag-link{background:#eef2ff;color:#4338ca}
.count-badge{background:#f2557a;color:#fff;border-radius:999px;padding:0 7px;font-size:12px;margin-left:4px}
.low-stock{color:#be123c;font-weight:600}
.more-actions{display:flex;flex-direction:column;gap:10px}
.more-actions button{text-align:left;display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:12px 14px}
.more-actions button span{font-size:12px;color:#7a7f8c;font-weight:400}
.usage-list{display:flex;flex-direction:column;gap:6px;margin:6px 0}
.usage-row,.return-row{display:grid;grid-template-columns:1fr 120px 50px 70px;gap:8px;align-items:center;padding:6px 8px;border-radius:10px;background:#fafafe}
.return-row{grid-template-columns:1fr 110px 200px}
.usage-row.usage-diff{background:#fff7ed;outline:1px solid #fed7aa}
.small{font-size:12px;font-weight:400}
.small-btn{padding:6px 12px;font-size:13px}
.inbound-summary{display:flex;flex-direction:column;gap:8px;margin:8px 0;text-align:left}
.sum-line{display:flex;align-items:baseline;gap:10px;justify-content:space-between;padding:8px 12px;border-radius:10px;background:#f5f5fb}
.sum-line b{font-size:24px;letter-spacing:-.3px}
.sum-conv{font-size:12px;color:#6b7280}
.unlinked-card{border:2px solid #fed7aa;background:#fffbf5}
.unlinked-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-bottom:1px dashed #f3d9b8}
.unlinked-row.overdue b{color:#be123c}
.unlinked-opt{margin:8px 0}
.note.warn{background:#fff7ed;border-color:#fed7aa}
.dash-alerts{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.dash-alert{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:12px;padding:8px 14px;cursor:pointer}
.doc-ai.error{color:#9f1239}
.role-tag.OWNER{background:#fdf2f8;color:#9d174d}.role-tag.MANAGER{background:#ecfeff;color:#155e75}

/* ================= v6.2 HACCP 관리 ================= */
.bad{color:#be123c;font-weight:700}.ok{color:#15803d;font-weight:700}.small{font-size:12px}
nav button .hc-badge{background:#f2557a;color:#fff;border:0;border-radius:999px;padding:1px 7px;font-size:11px;font-weight:800}
nav button.active .hc-badge{background:#fff;color:#f2557a}
.haccp-pill{cursor:pointer;font-weight:700}
.haccp-pill.due{background:#fff1f2;border-color:#fecdd3;color:#be123c;animation:hcPulse 1.6s ease-in-out infinite}
@keyframes hcPulse{0%,100%{box-shadow:0 0 0 0 rgba(242,85,122,.35)}50%{box-shadow:0 0 0 6px rgba(242,85,122,0)}}
.hc-due-banner{display:grid;gap:8px;margin:0 0 16px}
.hc-due-banner button{display:flex;align-items:center;gap:8px;flex-wrap:wrap;text-align:left;border:1px solid #fecdd3;background:#fff1f2;color:#881337;border-radius:16px;padding:14px 16px;font-size:15px;cursor:pointer;animation:hcPulse 1.6s ease-in-out infinite}
.hc-due-banner .hc-go{margin-left:auto;font-weight:800;color:#be123c}
.hc-empty{padding:26px;text-align:center;border:1px dashed #dcd6ff;border-radius:16px;background:#faf9ff;line-height:1.8}
.hc-session{border:1px solid var(--line);border-radius:18px;padding:14px 16px;margin-bottom:14px;background:#fff}
.hc-session.OPEN{border-color:#c7d2fe;box-shadow:0 0 0 3px #eef2ff}
.hc-session.ENDING{border-color:#fed7aa;box-shadow:0 0 0 3px #fff7ed}
.hc-session.CLOSED{background:#fafafa}
.hc-shead{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.hc-prods{display:flex;gap:4px;flex-wrap:wrap}
.hc-chip{display:inline-block;border-radius:999px;padding:4px 11px;font-size:12px;font-weight:800;white-space:nowrap}
.hc-chip.on{background:#e0e7ff;color:#3730a3}.hc-chip.end{background:#ffedd5;color:#9a3412}.hc-chip.done{background:#dcfce7;color:#166534}
.hc-track{display:grid;grid-template-columns:minmax(150px,1.1fr) minmax(170px,1fr) minmax(200px,1.4fr) auto;gap:12px;align-items:center;padding:12px;border-radius:14px;background:#faf9ff;margin-bottom:8px}
.hc-tname b{display:block;font-size:15px}.hc-tname small{color:var(--muted);font-size:11px}
.hc-tassign select{width:100%;border:1px solid #d9d4f5;border-radius:12px;padding:9px 10px;background:#fff;min-height:42px}
.hc-tassign select:disabled{background:#f4f4f6;color:#666}
.hc-next b{font-size:16px}.hc-wait{color:#9a3412;font-weight:700;font-size:13px}.hc-ok{color:#15803d;font-weight:700}
.hc-left{margin-left:6px;font-size:12px;font-weight:800;border-radius:999px;padding:2px 8px;background:#eef2ff;color:#3730a3}
.hc-left.soon{background:#fff7ed;color:#9a3412}.hc-left.late{background:#fee2e2;color:#be123c}
.hc-appr{color:#166534;font-weight:700}
.hc-sfoot{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:6px}
.hc-endbtn{padding:10px 18px;font-weight:800}
.hc-log{margin-top:10px}.hc-log summary{cursor:pointer;color:#5f5c78;font-size:13px;font-weight:700;padding:6px 0}
.hc-log h4{margin:12px 0 6px;font-size:13px}.hc-logempty{margin:8px 0}
.hc-ltable td.wrap{white-space:normal;min-width:260px}
.hc-void td{color:#9ca3af;text-decoration:line-through}.hc-void td .muted,.hc-void td button{text-decoration:none}
.hc-limit{font-size:12px;color:#5f5c78;background:#f7f6fd;border-radius:12px;padding:9px 12px;margin:4px 0 14px;line-height:1.6}
.hc-grid1{display:grid;grid-template-columns:48px .9fr 1.25fr auto;gap:8px;align-items:center;margin-bottom:12px}
.hc-seg.hc-acid button{min-width:42px;padding:10px 0;font-size:16px}
.hc-seg.hc-acid button.on[data-v="3"],.hc-seg.hc-acid button.on[data-v="4"],.hc-seg.hc-acid button.on[data-v="5"]{background:linear-gradient(135deg,#fb7185,#e11d48)}
.hc-grid1>b{font-size:12px;color:#5f5c78;text-align:center}.hc-grid1 .hc-rowlab{font-size:14px;color:var(--text);text-align:left}
.hc-grid1 input,.hc-mmss input,.hc-passrow input,.hy-devrow textarea{width:100%;border:1px solid #e3e0f2;border-radius:12px;padding:10px;background:#fff;font-size:16px;min-width:0}
.hc-mmss{display:grid;grid-template-columns:1fr auto 1fr auto;gap:4px;align-items:center;font-size:13px;color:#5f5c78}
.hc-row3{display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:10px;align-items:end}
.hc-seg{display:inline-flex;border:1px solid #d9d4f5;border-radius:12px;overflow:hidden;background:#fff}
.hc-seg button{border:0;background:#fff;padding:10px 14px;min-height:44px;min-width:52px;cursor:pointer;font-weight:700;color:#5f5c78;border-left:1px solid #ece9fb}
.hc-seg button:first-child{border-left:0}
.hc-seg button.on{background:var(--grad);color:#fff}
.hc-seg button:disabled{cursor:default;opacity:.85}
.hc-oxgroup{border:1px solid #ece9fb;border-radius:14px;padding:10px 12px;margin-bottom:10px}
.hc-oxgroup h4{margin:0 0 8px;font-size:14px}.hc-oxgroup h4 small{color:var(--muted);font-weight:500;margin-left:6px}
.hc-oxline{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:6px 0}.hc-oxline>b{min-width:96px;font-size:13px}
.hc-oxcell{display:inline-flex;align-items:center;gap:6px}.hc-oxcell>span{font-size:13px;color:#5f5c78;min-width:22px;text-align:right}
.hc-oxcell .hc-seg button{min-width:46px;font-size:18px;padding:6px 10px}
.hc-verdict{margin:14px 0 6px;padding:12px 14px;border-radius:14px;font-size:14px}
.hc-verdict.ok{background:#dcfce7;color:#14532d}.hc-verdict.ng{background:#fee2e2;color:#881337}.hc-verdict.wait{background:#f4f4f6;color:#6b7280}
.hc-ngbox{border:1px solid #fecdd3;background:#fff7f8;border-radius:14px;padding:12px 14px;margin-top:10px}
.hc-ngbox h4{margin:0 0 10px;font-size:14px;color:#881337}
.hc-passrow{display:grid;grid-template-columns:1.4fr .9fr .7fr 1.2fr auto;gap:6px;margin-bottom:6px}
.hc-hyg-today{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.hc-date{border:1px solid #e3e0f2;border-radius:12px;padding:8px 10px;min-height:42px}
.hy-tools{justify-content:space-between;margin:6px 0 10px}
.hy-list{display:grid;gap:6px}
.hy-period{margin-top:10px;font-weight:800;font-size:13px;color:#4338ca;border-bottom:2px solid #e0e7ff;padding-bottom:4px}
.hy-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;border-radius:12px;background:#faf9ff;border:1px solid transparent}
.hy-item.todo{border-color:#e0e7ff;background:#fff}
.hy-item.no{background:#fff1f2;border-color:#fecdd3}
.hy-text{font-size:14px;line-height:1.5}.hy-area{display:inline-block;font-size:11px;font-weight:800;color:#6d5dfc;background:#efecff;border-radius:8px;padding:1px 7px;margin-right:6px}
.hy-hint{font-size:12px;color:#0369a1;margin-top:2px}
.hy-item .hc-seg{flex:none}
.hy-devrow{display:grid;grid-template-columns:1fr 1.3fr auto;gap:6px;margin-bottom:6px}
.hc-htable td{vertical-align:top}.hc-hcell{display:flex;align-items:center;gap:4px;flex-wrap:wrap;font-size:13px;margin-bottom:4px}
.hc-hcell .small-btn{padding:4px 9px;min-height:32px}
.hc-dash{background:#fff1f2;border-color:#fecdd3;color:#881337}
@media(max-width:1024px){.hc-track{grid-template-columns:1fr 1fr}.hc-tact{grid-column:1/-1}.hc-row3{grid-template-columns:1fr 1fr}.hy-item{flex-direction:column;align-items:stretch}.hy-item .hc-seg{align-self:flex-end}}
@media(max-width:640px){.hc-head2{flex-direction:column;align-items:stretch;gap:0}.hc-track{grid-template-columns:1fr}.hc-grid1{grid-template-columns:40px 1fr 1.3fr;gap:5px}.hc-grid1>b:nth-child(4){display:none}.hc-grid1 .hc-acid{grid-column:2/-1;justify-self:start}.hc-grid1 .hc-acid::before{content:"산가";align-self:center;padding:0 8px;font-size:12px;color:#5f5c78}.hc-row3{grid-template-columns:1fr}.hc-passrow,.hy-devrow{grid-template-columns:1fr 1fr}}

/* ================= v6.2 회계: 원산지·단가·금액 ================= */
.inbound-row .in-acct{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;margin:-2px 0 6px}
.in-acct input,.acct-row input{border:1px dashed #d9d4f5;border-radius:10px;padding:8px 10px;background:#fcfbff;font-size:13px;min-width:0}
input.auto{color:#6d5dfc;background:#f5f3ff}
.mat-acct{color:#0f766e;font-weight:600}
.acct-head,.acct-row{display:grid;grid-template-columns:1.3fr 1fr 1fr 1fr;gap:8px;align-items:center}
.acct-head{font-size:12px;font-weight:700;color:#5f5c78;padding:0 4px 6px}
.acct-row{padding:8px 4px;border-top:1px solid #f1effa}
.out-acct input{border-style:dashed}
@media(max-width:640px){.inbound-row .in-acct{grid-template-columns:1fr 1fr}.acct-head{display:none}.acct-row{grid-template-columns:1fr 1fr}}
