:root{--ink:#18212f;--muted:#6b7482;--line:#e4e8ee;--blue:#175cd3;--green:#11845b;--soft:#f4f7fb;--orange:#d66b0a}*{box-sizing:border-box}body{margin:0;background:#f5f7fa;color:var(--ink);font:16px/1.5 -apple-system,BlinkMacSystemFont,"Pretendard","Noto Sans KR",sans-serif}.topbar{height:72px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,calc((100% - 1180px)/2));position:sticky;top:0;z-index:10}.brand{display:flex;gap:12px;align-items:center;color:var(--ink);text-decoration:none;font-weight:800}.brand small{display:block;font-size:11px;color:var(--muted);font-weight:500}.brand-mark{width:38px;height:38px;border-radius:11px;background:linear-gradient(145deg,#174ea6,#2f80ed);color:white;display:grid;place-items:center}.user,.user form{display:flex;align-items:center;gap:12px}.link{border:0;background:none;color:var(--muted);cursor:pointer}.shell{width:min(1180px,calc(100% - 40px));margin:38px auto 100px}.hero,.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:28px}.eyebrow{font-size:13px;font-weight:800;letter-spacing:.08em;color:var(--blue);text-transform:uppercase}h1{font-size:clamp(30px,4vw,46px);line-height:1.15;margin:8px 0}h2{margin:34px 0 16px;font-size:22px}p{color:var(--muted)}.primary,.next-actions a{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:12px;background:var(--blue);color:#fff;text-decoration:none;font-weight:800;padding:13px 20px;cursor:pointer}.primary.big{padding:17px 24px;font-size:17px}.primary.full{width:100%}.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.kpis article{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px}.kpis span,.kpis small{display:block;color:var(--muted)}.kpis strong{display:block;font-size:28px;margin:8px 0}.kpis .warn{border-left:4px solid var(--orange)}.menu-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.menu-grid a{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px;color:var(--ink);text-decoration:none;display:grid;grid-template-columns:52px 1fr;column-gap:14px;align-items:center;transition:.2s}.menu-grid a:hover{border-color:#9bbcf1;transform:translateY(-2px);box-shadow:0 10px 24px #1b3b6b12}.menu-grid b{grid-row:1/3;width:52px;height:52px;border-radius:15px;background:#edf4ff;color:var(--blue);display:grid;place-items:center;font-size:25px}.menu-grid span{font-weight:800;font-size:18px}.menu-grid small{color:var(--muted)}.section-head{display:flex;align-items:center;justify-content:space-between}.section-head a{color:var(--blue)}.doc-list{background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden}.doc-list>a{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;color:var(--ink);text-decoration:none;border-bottom:1px solid var(--line)}.doc-list>a:last-child{border:0}.doc-list small{display:block;color:var(--muted);margin-top:3px}.steps{padding:10px 16px;border-radius:99px;background:#e9f1ff;color:var(--blue);font-weight:700;font-size:13px}.wizard{width:min(760px,100%);display:grid;gap:14px}.field-card{display:flex;align-items:center;gap:16px;background:#fff;border:1px solid var(--line);padding:17px;border-radius:16px}.field-card i{font-style:normal;background:var(--blue);color:#fff;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-weight:800}.field-card label{width:100%;font-weight:800}.field-card select,.field-card input,.stack input{display:block;width:100%;margin-top:7px;border:1px solid #cbd3df;border-radius:10px;padding:13px;font:inherit;background:#fff}.field-card.optional span{color:var(--muted);font-size:12px}.two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.helper,.notice,.empty{padding:18px;border-radius:14px;background:#eaf4ff;color:#24558f}.notice.error{background:#fff0ef;color:#a82d25}.empty{background:#fff;border:1px dashed #bac4d1;text-align:center;padding:55px;color:var(--muted)}.empty a{color:var(--blue)}.paper{background:#fff;border:1px solid var(--line);border-radius:18px;padding:34px}.paper-head{display:flex;justify-content:space-between}.table{margin:30px 0;border-top:2px solid var(--ink)}.tr{display:grid;grid-template-columns:2fr repeat(3,1fr);padding:12px;border-bottom:1px solid var(--line)}.th{font-weight:800;background:var(--soft)}.totals{display:flex;justify-content:flex-end;gap:20px}.next-actions{display:flex;gap:10px;margin-top:18px;flex-wrap:wrap}.next-actions a:not(.primary){background:#fff;color:var(--ink);border:1px solid var(--line)}.actions{display:flex;gap:8px}.actions button{padding:10px 14px;border:1px solid var(--line);background:#fff;border-radius:10px}.login-card{width:min(440px,100%);margin:9vh auto;background:#fff;border:1px solid var(--line);border-radius:22px;padding:38px}.stack{display:grid;gap:18px}.stack label{font-weight:700}.mobile-nav{display:none}
@media(max-width:760px){.topbar{height:62px;padding:0 18px}.user{font-size:0}.shell{width:calc(100% - 28px);margin-top:24px}.hero,.page-head{align-items:flex-start;flex-direction:column}.hero .primary{width:100%}.kpis{grid-template-columns:1fr 1fr}.kpis article{padding:17px}.kpis strong{font-size:22px}.menu-grid{grid-template-columns:1fr 1fr}.menu-grid a{grid-template-columns:40px 1fr;padding:15px}.menu-grid b{width:40px;height:40px;font-size:20px}.menu-grid span{font-size:15px}.menu-grid small{display:none}.two{grid-template-columns:1fr}.steps{white-space:nowrap;overflow:auto;max-width:100%}.paper{padding:18px;overflow:auto}.paper-head,.totals{flex-direction:column}.table{min-width:550px}.mobile-nav{position:fixed;display:flex;bottom:0;left:0;right:0;height:66px;background:#fff;border-top:1px solid var(--line);z-index:20;justify-content:space-around}.mobile-nav a{color:var(--ink);text-decoration:none;display:grid;place-items:center;font-size:20px}.mobile-nav span{display:block;font-size:11px}.doc-list>a{align-items:flex-start}.doc-list>a>strong{font-size:14px}.actions{width:100%}.login-card{margin:3vh auto;padding:26px}}@media(max-width:430px){.kpis,.menu-grid{grid-template-columns:1fr}.menu-grid a{grid-template-columns:48px 1fr}.menu-grid b{width:48px;height:48px}.menu-grid small{display:block}}

.erp-login{width:min(500px,100%);padding:42px;box-shadow:0 22px 60px #1d3d6817}.login-symbol{display:grid;place-items:center;width:62px;height:62px;margin-bottom:20px;border-radius:18px;background:linear-gradient(145deg,#174ea6,#2f80ed);color:#fff;font-size:28px;font-weight:900}.erp-login .primary{width:100%}.login-help{display:block;margin-top:18px;color:var(--muted);text-align:center}
.pictogram{display:block;width:1.3em;height:1.3em;margin:auto;color:inherit;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;overflow:visible}.mobile-nav .pictogram{width:1.35rem;height:1.35rem}

/* 데스크톱 화면은 공통 본문과 상단 메뉴를 화면 폭에 맞춰 사용합니다. */
@media (min-width:761px){
  .shell{width:calc(100% - 48px);max-width:none}
  .topbar{padding-left:clamp(18px,3vw,56px);padding-right:clamp(18px,3vw,56px)}
}

/* 데스크톱 전체 폭 공통 정렬: 고정 최소폭 때문에 오른쪽이 잘리지 않도록 합니다. */
html,body{min-width:0;max-width:100%;overflow-x:hidden}
.topbar,.workspace-tabs{width:100%;max-width:none;box-sizing:border-box}
.shell,.shell.wide-shell{min-width:0;box-sizing:border-box}
.shell>*{min-width:0;max-width:100%}
.hero,.page-head{min-width:0;flex-wrap:wrap}
.hero>*,.page-head>*{min-width:0}
@media(min-width:761px){
     .shell{width:calc(100% - clamp(32px,4vw,96px));margin-left:auto;margin-right:auto}
   }

/* 모든 업무 화면 공통: 데스크톱 폭을 넘겨 내용이 잘리지 않도록 합니다. */
*,*::before,*::after{box-sizing:border-box}
img,svg,video,canvas,iframe{max-width:100%}
.shell,.shell>*{min-width:0;max-width:100%}
.shell *{min-width:0}
.shell table{width:100%;max-width:100%;table-layout:auto}
.shell th,.shell td{overflow-wrap:anywhere}
.shell a,.shell button{max-width:100%;overflow-wrap:anywhere}
.shell input,.shell select,.shell textarea{max-width:100%;min-width:0}
/* Stable desktop layout: keep wide screens readable without clipping or accidental wrapping. */
html, body {
  min-width: 0;
  max-width: none;
  overflow-x: auto;
}

@media (min-width: 761px) {
  .shell,
  .shell.wide-shell {
    width: calc(100% - clamp(32px, 4vw, 96px));
    max-width: none;
    min-width: 0;
    box-sizing: border-box;
  }

  .shell .kpis,
  .shell .analysis-kpis,
  .shell .balance-cards,
  .shell .simple-modules {
    min-width: 0;
    align-items: stretch;
  }

  .shell .kpis > *,
  .shell .analysis-kpis > *,
  .shell .balance-cards > *,
  .shell .simple-modules > * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .shell .kpis strong,
  .shell .analysis-kpis strong,
  .shell .balance-cards strong {
    display: block;
    max-width: 100%;
    font-size: clamp(24px, 2.1vw, 40px);
    line-height: 1.12;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
  }

  .shell .table-wrap,
  .shell .ledger-table-wrap,
  .shell .scroll-table,
  .shell .data-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .shell table {
    max-width: none;
    min-width: 760px;
    table-layout: auto;
  }
}

@media (min-width: 761px) and (max-width: 1360px) {
  .shell .kpis,
  .shell .analysis-kpis,
  .shell .balance-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  html, body {
    overflow-x: hidden;
  }

  .shell .kpis,
  .shell .analysis-kpis,
  .shell .balance-cards,
  .shell .simple-modules {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 공통 데스크톱 안전 영역: 제목·버튼·작업 메뉴가 오른쪽에서 잘리지 않게 합니다. */
@media (min-width: 761px) {
  .shell .hero,
  .shell .page-head,
  .shell .section-head,
  .shell .section-heading,
  .shell .actions,
  .shell .next-actions {
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
  }

  .shell .hero > *,
  .shell .page-head > *,
  .shell .section-head > *,
  .shell .section-heading > * {
    min-width: 0;
    max-width: 100%;
  }

  .shell .hero > :first-child,
  .shell .page-head > :first-child,
  .shell .section-heading > :first-child {
    flex: 1 1 520px;
  }

  .shell .hero > :last-child,
  .shell .page-head > :last-child,
  .shell .section-head > :last-child,
  .shell .section-heading > :last-child,
  .shell .actions > *,
  .shell .next-actions > * {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .shell .hero .primary,
  .shell .page-head .primary,
  .shell .section-head a,
  .shell .actions > *,
  .shell .next-actions > * {
    white-space: normal;
    text-align: center;
  }
}
