/* 관리자 · 장부(assets/admin-ledger.js). 기본 모양은 회원 화면(admin-members.css의 amb-)과 매출 화면(admin-revenue.css의 arv-)을 쓰고, 장부 칸만 더한다. 접두사 alg- */
.alg-month{display:inline-flex;align-items:center;gap:8px}
body.editorial .alg-month b{min-width:96px;text-align:center;font-size:17px;font-weight:800;color:#0a0a0a!important}
.alg-month .amb-btn{width:34px;padding:0;font-size:18px;line-height:1}
.alg-actions{display:flex;flex-wrap:wrap;gap:8px;margin-left:auto}
body.editorial .alg .arv-warn{display:flex;align-items:center;gap:8px;flex-wrap:wrap}

/* 숫자 칸: 이익 · 통장 · 맡아 둔 돈 */
.alg-stats{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:0 28px;margin-top:18px}
.alg-group{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid #0a0a0a;border-bottom:1px solid #e5e5e5;align-content:start}
.alg-group:nth-child(2){grid-template-columns:repeat(2,minmax(0,1fr))}
.alg-group.alg-held{grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr));margin-top:18px;background:#fafafa}
body.editorial .alg-group h3{grid-column:1/-1;margin:0;padding:10px 0 0;font-size:13px;font-weight:800;color:#0a0a0a!important;border:0}
body.editorial .alg-group.alg-held h3{padding-left:14px}
body.editorial .alg-group h3 small{margin-left:6px;font-size:12px;font-weight:600;color:#8e8e8e!important}
.alg-stat{padding:8px 14px 14px 0;min-width:0}
.alg-held .alg-stat{padding-left:14px}
.alg-stat+.alg-stat{padding-left:14px;border-left:1px solid #f0f0f1}
body.editorial .alg-stat span{display:block;font-size:12.5px;font-weight:600;color:#737373!important}
body.editorial .alg-stat strong{display:block;margin-top:4px;font-size:22px;font-weight:800;letter-spacing:-.02em;color:#0a0a0a!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.editorial .alg-stat strong em{font-style:normal}
body.editorial .alg-stat strong em.neg{color:#d92d20!important}
body.editorial .alg-stat small{display:block;margin-top:3px;font-size:12px;line-height:1.5;color:#8e8e8e!important}

/* 적기·고치기 칸 */
.alg-form{margin-top:22px;padding:18px 20px 20px;border:1px solid #0a0a0a;border-radius:10px;background:#fff}
body.editorial .alg-form h3{margin:0 0 12px;padding:0;border:0;font-size:16px;font-weight:800;color:#0a0a0a!important}
body.editorial .alg-form h3 small{margin-left:8px;font-size:12.5px;font-weight:600;color:#8e8e8e!important}
.alg-kinds{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}
.alg-kinds button{height:34px;padding:0 14px;border:1px solid #d4d4d8;border-radius:999px;background:#fff;font:inherit;font-size:13.5px;font-weight:700;color:#404040;cursor:pointer}
.alg-kinds button.on{border-color:#0a0a0a;background:#0a0a0a;color:#fff}
.alg-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 14px}
.alg-grid .wide{grid-column:span 2}
body.editorial .alg-grid label{display:flex;flex-direction:column;gap:5px;font-size:12.5px;font-weight:700;color:#525252!important}
.alg-grid input:not([type=checkbox]):not([type=file]),.alg-grid select{height:38px;padding:0 10px;border:1px solid #d4d4d8;border-radius:6px;background:#fff;font:inherit;font-size:14px;font-weight:500;color:#0a0a0a}
.alg-grid input[type=file]{font:inherit;font-size:13px}
.alg-grid input:focus,.alg-grid select:focus{outline:2px solid #0a0a0a;outline-offset:-1px}
body.editorial .alg-grid label.alg-chk,body.editorial .alg-vatbox .alg-chk{flex-direction:row;align-items:center;gap:8px;font-size:13.5px;font-weight:600;color:#262626!important}
.alg-vatbox{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 16px;padding:10px 12px;border-radius:8px;background:#f7f7f8}
.alg-vatbox .alg-vatin{width:130px}
body.editorial .alg-vatline{font-size:13px;font-weight:600;color:#525252!important}
body.editorial .alg-err{margin:12px 0 0;font-size:13.5px;font-weight:700;color:#d92d20!important}
.alg-formacts{display:flex;gap:8px;margin-top:16px}

/* 목록 */
.alg-bar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;margin-top:26px;border-bottom:1px solid #e5e5e5}
.alg-bar .amb-tabs{margin-top:0;border-bottom:0}
.alg-bar .amb-search{margin-bottom:6px}
.alg-row{display:grid;grid-template-columns:72px minmax(0,1fr) 110px 110px 90px;gap:12px;align-items:start;padding:12px 4px;border-bottom:1px solid #f0f0f1;font-size:14px}
.alg-row.alg-head{padding:8px 4px;font-size:12.5px;font-weight:600;color:#8e8e8e}
.alg-row>span:nth-child(n+3){text-align:right;font-variant-numeric:tabular-nums;font-weight:700}
.alg-row.alg-head>span{font-weight:600!important}
body.editorial .alg-row i{font-style:normal;font-weight:600;color:#8e8e8e!important}
body.editorial .alg-date{font-size:13px;font-weight:600;color:#737373!important;padding-top:1px}
body.editorial .alg-what strong{display:block;font-weight:700;color:#0a0a0a!important;overflow-wrap:anywhere}
body.editorial .alg-what small{display:block;margin-top:3px;font-size:12.5px;line-height:1.5;color:#8e8e8e!important}
body.editorial .alg-what .alg-note{color:#a3a3a3!important}
body.editorial .alg-what .alg-heldamt{font-weight:700;color:#525252!important}
body.editorial .alg-tag{font-weight:700;color:#525252!important}
body.editorial .alg-tag.s-income{color:#0b6b3a!important}
body.editorial .alg-tag.s-held{color:#6b6f78!important}
.alg-files{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.alg-file{max-width:220px;height:26px;padding:0 9px;border:1px solid #e2e2e5;border-radius:999px;background:#fff;font:inherit;font-size:12px;font-weight:600;color:#404040;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.alg-acts{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin-top:6px}
.alg-acts .amb-link{margin-left:0;font-size:12.5px;color:#525252}
.alg-acts .amb-btn{height:28px;padding:0 10px;font-size:12.5px}
.alg-attach{cursor:pointer}
body.editorial .alg-void,body.editorial .alg-check,body.editorial .alg-fixed{display:inline-block;margin-top:6px;padding:2px 8px;border-radius:4px;font-size:12px;font-weight:700}
body.editorial .alg-void{background:#f4f4f5;color:#737373!important}
body.editorial .alg-check{background:#fff7ed;color:#9a3412!important}
body.editorial .alg-fixed{background:#f0f9ff;color:#075985!important}
.alg-row.is-void>span:not(.alg-what),.alg-row.is-void .alg-what strong{text-decoration:line-through;color:#a3a3a3!important}
.alg-row.is-check{background:#fffbf5}

/* 매달 나가는 비용 */
.alg-sec{margin-top:32px}
body.editorial .alg-sec h3{margin:0;padding-bottom:8px;border-bottom:1px solid #e5e5e5;font-size:15px;font-weight:800}
body.editorial .alg-sec h3 small{display:block;margin-top:4px;font-size:12.5px;font-weight:500;color:#8e8e8e!important}
.alg-rec{display:grid;grid-template-columns:minmax(0,1fr) 170px 110px 80px;gap:12px;align-items:center;min-height:52px;padding:8px 4px;border-bottom:1px solid #f0f0f1;font-size:14px}
.alg-rec>span:nth-child(n+2){text-align:right}
.alg-rec>span:nth-child(3){font-weight:700}
body.editorial .alg-rec strong{display:block;font-weight:700}
body.editorial .alg-rec small{display:block;margin-top:2px;font-size:12.5px;color:#8e8e8e!important}
.alg-rec.off{opacity:.55}

@media(max-width:900px){
 .alg-stats{grid-template-columns:minmax(0,1fr)}
 .alg-group:nth-child(2){margin-top:14px}
 .alg-group.alg-held{grid-template-columns:repeat(2,minmax(0,1fr))}
 .alg-held .alg-stat:nth-of-type(3){border-left:0}
 .alg-held .alg-stat:nth-of-type(n+3){border-top:1px solid #f0f0f1}
 .alg-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
 .alg-actions{width:100%;margin-left:0}
 .alg-actions .amb-btn{flex:1 1 auto}
 .alg-group{grid-template-columns:repeat(2,minmax(0,1fr))}
 .alg-group:first-child .alg-stat:nth-of-type(3){padding-left:0;border-left:0}
 .alg-group:first-child .alg-stat:nth-of-type(n+3){border-top:1px solid #f0f0f1}
 body.editorial .alg-stat strong{font-size:18px}
 .alg-stat{padding-right:8px}
 .alg-stat+.alg-stat{padding-left:8px}
 .alg-grid{grid-template-columns:minmax(0,1fr)}
 .alg-grid .wide{grid-column:auto}
 .alg-form{padding:16px 14px}
 .alg-bar .amb-search{width:100%}
 .alg-row{grid-template-columns:minmax(0,1fr) auto;row-gap:2px;padding:12px 2px}
 .alg-row.alg-head{display:none}
 .alg-row .alg-date{grid-column:1/-1;order:-1}
 .alg-row .alg-what{grid-column:1/-1}
 .alg-row>span:nth-child(n+3):empty{display:none}
 .alg-row>span:nth-child(n+3):not(:empty){grid-column:1/-1;display:flex;justify-content:space-between}
 .alg-row>span:nth-child(n+3):not(:empty)::before{content:attr(data-label);font-weight:600;color:#8e8e8e}
 .alg-rec{grid-template-columns:minmax(0,1fr) auto;row-gap:4px}
 .alg-rec>span:nth-child(2){grid-column:1;text-align:left;font-size:13px;color:#737373}
 .alg-rec>span:nth-child(3){grid-column:2;grid-row:1}
 .alg-rec>span:nth-child(4){grid-column:2;grid-row:2}
}
