/* Accounting workspace: deliberately scoped to preserve the existing ERP. */
#page-accounting { --ac-line:#e1e5e9; --ac-muted:#667482; --ac-blue:#1a4a7a; font-size:14px; line-height:1.6; }
#page-accounting * { box-sizing:border-box; }
#page-accounting button,#page-accounting input,#page-accounting select { font:inherit; }
#page-accounting button { cursor:pointer; }
#page-accounting button:disabled { cursor:not-allowed; opacity:.48; }
#page-accounting :focus-visible { outline:3px solid #c9a84c; outline-offset:3px; }
#page-accounting .ac-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-bottom:18px; }
#page-accounting h2 { font-size:24px; line-height:1.3; letter-spacing:-.7px; margin:0; }
#page-accounting h3 { font-size:17px; margin:0; }
#page-accounting p { margin:5px 0 0; }
#page-accounting .ac-muted { color:var(--ac-muted); }
#page-accounting .ac-small { font-size:12px; color:var(--ac-muted); }
#page-accounting .ac-context { display:flex; gap:12px; align-items:end; flex-wrap:wrap; }
#page-accounting label.ac-field { display:flex; flex-direction:column; gap:6px; min-width:0; }
#page-accounting label.ac-field>span { font-size:13px; font-weight:600; }
#page-accounting input,#page-accounting select { width:100%; min-height:40px; border:1px solid #cad2d9; border-radius:7px; background:white; color:var(--navy); padding:8px 10px; min-width:0; }
#page-accounting input[type=checkbox] { width:16px; min-height:16px; accent-color:var(--ac-blue); }
#page-accounting input[type=number] { text-align:right; }
#page-accounting .ac-context select { min-width:160px; }
#page-accounting .ac-code { font-variant-numeric:tabular-nums; font-weight:600; color:var(--navy); white-space:nowrap; }
#page-accounting .ac-period-nav { display:flex; gap:6px; }
#page-accounting .ac-period-nav .ac-button { padding:9px 12px; line-height:1; font-size:15px; }
#page-accounting .ac-banner { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 15px; border:1px solid #e9dcb6; background:#fffbef; border-radius:8px; color:#765a19; margin-bottom:18px; font-size:13px; }
#page-accounting .ac-tabs { display:flex; gap:4px; overflow-x:auto; border-bottom:1px solid var(--ac-line); margin-bottom:22px; padding-bottom:0; }
#page-accounting .ac-tab { background:transparent; border:0; border-bottom:3px solid transparent; padding:12px 14px; white-space:nowrap; color:var(--ac-muted); font-weight:600; }
#page-accounting .ac-tab[aria-selected=true] { color:var(--navy); border-bottom-color:var(--gold); }
#page-accounting .ac-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
#page-accounting .ac-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
#page-accounting .ac-button { padding:9px 15px; border:1px solid #cad2d9; border-radius:7px; background:white; color:var(--navy); font-weight:600; }
#page-accounting .ac-button:hover:not(:disabled) { background:#f3f6f8; }
#page-accounting .ac-primary { background:var(--navy); border-color:var(--navy); color:white; }
#page-accounting .ac-primary:hover:not(:disabled) { background:var(--navy3); }
#page-accounting .ac-link { background:none; border:0; color:var(--ac-blue); padding:3px 0; font-weight:600; text-align:left; }
#page-accounting .ac-pill { display:inline-flex; padding:3px 9px; border-radius:5px; background:#eef3f7; color:var(--ac-blue); font-size:12px; font-weight:600; white-space:nowrap; }
#page-accounting .ac-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:20px; }
#page-accounting .ac-stat { background:white; border:1px solid var(--ac-line); border-radius:10px; padding:19px; }
#page-accounting .ac-stat strong { display:block; font-size:26px; margin:7px 0 3px; line-height:1.25; }
#page-accounting .ac-grid2 { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(250px,1fr); gap:18px; }
#page-accounting .ac-card { border:1px solid var(--ac-line); border-radius:10px; background:white; padding:21px; margin-bottom:18px; min-width:0; }
#page-accounting .ac-card.ac-flush { padding:0; overflow:hidden; }
#page-accounting .ac-card-head { padding:16px 20px; border-bottom:1px solid var(--ac-line); display:flex; justify-content:space-between; gap:12px; align-items:center; }
#page-accounting .ac-step { display:flex; gap:14px; padding:15px 0; border-bottom:1px solid #edf0f3; align-items:flex-start; }
#page-accounting .ac-step:last-child { border-bottom:0; padding-bottom:0; }
#page-accounting .ac-step-no { flex-shrink:0; display:grid; place-items:center; width:30px; height:30px; background:#f0ede6; color:#786122; border-radius:50%; font-weight:700; }
#page-accounting .ac-step-main { flex:1; }
#page-accounting .ac-shortcuts { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:16px; }
#page-accounting .ac-shortcut { padding:15px; border:1px solid var(--ac-line); background:#fff; border-radius:8px; text-align:left; }
#page-accounting .ac-shortcut:hover { border-color:var(--gold); }
#page-accounting .ac-shortcut strong,#page-accounting .ac-shortcut span { display:block; }
#page-accounting .ac-shortcut span { font-size:12px; color:var(--ac-muted); margin-top:5px; }
#page-accounting .ac-scroll { overflow-x:auto; }
#page-accounting table { width:100%; border-collapse:collapse; }
#page-accounting thead { background:#f5f7f9; }
#page-accounting th { font-size:13px; color:#536271; font-weight:600; padding:12px 14px; white-space:nowrap; text-align:left; }
#page-accounting td { padding:11px 14px; font-size:14px; border-bottom:1px solid #edf0f3; }
#page-accounting tr:hover td { background:transparent; }
#page-accounting .ac-num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
#page-accounting .ac-empty { padding:44px 20px; text-align:center; color:var(--ac-muted); }
#page-accounting .ac-empty strong { display:block; color:var(--navy); font-size:16px; margin-bottom:5px; }
#page-accounting .ac-empty .ac-button { margin-top:16px; }
#page-accounting .ac-form { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-top:17px; }
#page-accounting .ac-form2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
#page-accounting .ac-editor { min-width:760px; }
#page-accounting .ac-editor input { min-width:90px; }
#page-accounting .ac-editor td:first-child { width:42px; }
#page-accounting .ac-totals { display:flex; justify-content:flex-end; gap:24px; padding:16px 20px; background:#f8fafb; flex-wrap:wrap; }
#page-accounting .ac-totals strong { margin-left:8px; }
#page-accounting .ac-feedback { margin-top:14px; border-radius:7px; padding:12px 15px; background:#eef4f9; color:#244c70; }
#page-accounting .ac-feedback:empty { display:none; }
#page-accounting .ac-error { background:#fff0ed; color:#a42a20; }
#page-accounting .ac-segments { display:flex; flex-wrap:wrap; gap:7px; }
#page-accounting .ac-segment { padding:8px 13px; border:1px solid var(--ac-line); background:white; border-radius:7px; }
#page-accounting .ac-segment[aria-pressed=true] { border-color:var(--ac-blue); background:#eef4f9; color:var(--ac-blue); font-weight:600; }
#page-accounting .ac-upload { border:1px dashed #b8c4ce; background:#f8fafc; border-radius:9px; padding:28px 22px; text-align:center; margin-top:20px; }
#page-accounting .ac-upload input { max-width:430px; margin:14px auto 6px; display:block; }
#page-accounting .ac-rule { display:grid; grid-template-columns:1fr auto; gap:15px; padding:12px 0; border-bottom:1px solid #edf0f3; }
#page-accounting .ac-rule:last-child { border-bottom:0; }
#page-accounting details.ac-detail { margin-top:15px; border:1px solid var(--ac-line); border-radius:8px; padding:13px 15px; }
#page-accounting details.ac-detail summary { cursor:pointer; font-weight:600; }
#page-accounting details.ac-detail summary::-webkit-details-marker { display:inline; }
#page-accounting .ac-report-title { padding:28px 20px; text-align:center; }
#page-accounting .ac-report-title h3 { font-size:22px; letter-spacing:3px; }
#page-accounting .ac-report-group td { background:#f8fafb!important; font-weight:700; }
#page-accounting .ac-report-indent { padding-left:34px; }
#page-accounting .ac-close-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
#page-accounting .ac-close-grid .ac-card { margin:0; }
#page-accounting .ac-close-grid button { margin-top:18px; }
#page-accounting .ac-check-row { display:flex; justify-content:space-between; gap:12px; padding:12px 0; border-bottom:1px solid #edf0f3; }
#page-accounting .ac-filter { display:flex; gap:10px; flex-wrap:wrap; margin-top:15px; }
#page-accounting .ac-filter input,#page-accounting .ac-filter select { width:auto; flex:1; min-width:150px; }
#page-accounting .ac-footer { margin-top:20px; text-align:right; font-size:12px; color:var(--ac-muted); }
#page-accounting .ac-entry-top { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
#page-accounting .ac-entry-top .ac-segment { min-width:132px; font-size:15px; padding:10px 20px; }
#page-accounting .ac-entry-top .ac-segment[aria-pressed=true] { color:white; background:var(--navy); border-color:var(--navy); }
#page-accounting .ac-query { padding:16px 18px 12px; margin-bottom:14px; background:#f7f9fb; }
#page-accounting .ac-query-row { display:flex; flex-wrap:wrap; align-items:end; gap:10px; }
#page-accounting .ac-query-row .ac-field { flex:0 1 160px; }
#page-accounting .ac-query-row .ac-query-search { flex:1 1 200px; }
#page-accounting .ac-date-separator { padding-bottom:9px; }
#page-accounting .ac-query-bottom { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-top:10px; }
#page-accounting .ac-query-bottom .ac-button { padding:3px 10px; font-size:12px; min-height:29px; }
#page-accounting .ac-query .ac-feedback { margin-top:10px; padding:8px 12px; }
#page-accounting .ac-voucher-list { margin-bottom:16px; }
#page-accounting .ac-voucher-list .ac-card-head { padding:10px 16px; }
#page-accounting .ac-voucher-list table { min-width:660px; }
#page-accounting .ac-voucher-list th { padding:9px 14px; }
#page-accounting .ac-voucher-list td { padding:0; }
#page-accounting .ac-list-empty { text-align:center; padding:20px 12px; font-size:13px; color:var(--ac-muted); }
#page-accounting .ac-entry-sheet { border-top:3px solid var(--navy); }
#page-accounting .ac-entry-sheet .ac-card-head { padding:12px 16px; }
#page-accounting .ac-entry-fields { padding:14px 16px; }
#page-accounting .ac-entry-basics { display:flex; align-items:end; gap:14px; }
#page-accounting .ac-entry-basics .ac-field { width:180px; flex-shrink:0; }
#page-accounting .ac-entry-basics p { padding-bottom:9px; }
#page-accounting .ac-tax-fields { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:13px; }
#page-accounting .ac-tax-fields #ac-supply,#page-accounting .ac-tax-fields #ac-vat { text-align:right; font-variant-numeric:tabular-nums; }
#page-accounting .ac-tax-build { display:flex; align-items:end; }
#page-accounting .ac-tax-build .ac-button { width:100%; }
#page-accounting .ac-editor-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; padding:10px 16px; border-top:1px solid var(--ac-line); }
#page-accounting .ac-editor-heading .ac-small { margin-left:6px; font-weight:400; }
#page-accounting .ac-editor-heading .ac-button { padding:5px 10px; }
#page-accounting .ac-editor { table-layout:fixed; min-width:830px; }
#page-accounting .ac-editor td { padding:5px 4px; border-right:1px solid #edf0f3; }
#page-accounting .ac-editor th { padding:10px 12px; }
#page-accounting .ac-editor td:first-child { text-align:center; color:var(--ac-muted); font-size:12px; }
#page-accounting .ac-editor td:last-child { text-align:center; }
#page-accounting .ac-editor input { min-width:0; min-height:38px; border-color:transparent; border-radius:4px; padding:7px 8px; }
#page-accounting .ac-editor input:hover { border-color:#c1cdd7; }
#page-accounting .ac-editor input:focus { border-color:var(--ac-blue); background:#fff; }
#page-accounting .ac-editor tr:focus-within td { background:#edf4fc; }
#page-accounting .ac-editor [data-field=debit],#page-accounting .ac-editor [data-field=credit] { text-align:right; font-variant-numeric:tabular-nums; font-weight:600; }
#page-accounting [aria-invalid=true] { border-color:#bf392d!important; background:#fff0ed!important; }
#page-accounting .ac-entry-sheet .ac-totals { padding:13px 16px; border-bottom:1px solid var(--ac-line); font-variant-numeric:tabular-nums; }
#page-accounting .ac-entry-bottom { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:12px 16px; }
#page-accounting .ac-entry-bottom .ac-feedback { flex:1 1 300px; margin:0; padding:9px 12px; font-size:13px; }
#page-accounting .ac-entry-bottom .ac-actions { margin-left:auto; }
@media(max-width:1100px) { #page-accounting .ac-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } #page-accounting .ac-grid2 { grid-template-columns:1fr; } #page-accounting .ac-tab { padding:11px 10px; } }
@media(max-width:700px) { #page-accounting .ac-head { align-items:flex-start; } #page-accounting .ac-context { width:100%; } #page-accounting .ac-context .ac-field { flex:1; } #page-accounting .ac-context select { min-width:0; } #page-accounting .ac-form,#page-accounting .ac-close-grid { grid-template-columns:1fr; } #page-accounting .ac-card { padding:16px; } #page-accounting .ac-banner { align-items:flex-start; } #page-accounting .ac-totals { gap:12px; } }
@media(max-width:900px) { #page-accounting .ac-tax-fields { grid-template-columns:repeat(2,minmax(0,1fr)); } #page-accounting .ac-key-help { display:none; } }
@media(max-width:700px) { #page-accounting .ac-query-row .ac-field { flex:1 1 140px; } #page-accounting .ac-query-row .ac-query-search { flex-basis:100%; } #page-accounting .ac-entry-top>.ac-actions { width:100%; } #page-accounting .ac-entry-top>.ac-actions .ac-button { flex:1; } #page-accounting .ac-date-separator { display:none; } #page-accounting .ac-entry-basics { flex-wrap:wrap; gap:4px; } #page-accounting .ac-entry-basics p { padding-bottom:0; } }

/* 계정과목: 사용여부 토글과 꺼 둔 행 */
#page-accounting .ac-use { display:inline-flex; align-items:center; gap:6px; font-size:12px; white-space:nowrap; cursor:pointer; }
#page-accounting .ac-use input { width:15px; height:15px; margin:0; accent-color:var(--ac-blue); cursor:pointer; }
#page-accounting .ac-use span { color:var(--ac-muted); }
#page-accounting .ac-row-off td { background:#fafbfc; color:var(--ac-muted); }
#page-accounting .ac-row-off .ac-code { color:var(--ac-muted); font-weight:500; }
#page-accounting .ac-row-off input[data-account-code] { color:var(--ac-muted); }
