Files
dbx-main/app/static/erp-shell.css
king b970542482 fix(shell): 모바일에서 grid 해제로 본문 풀폭 강제
특이도 조정만으론 부족. 모바일(≤900px)에서 .erp-app grid를 아예
display:block 으로 해제해 데스크탑 collapsed :has 규칙과의 칸 분배
충돌을 원천 제거. 사이드바는 fixed 오버레이(z-index 1000), 본문은
width:100%. body 높이/overflow도 모바일에선 auto로 풀어 콘텐츠 잘림
방지. CSS 캐시버스트 v20260615b.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 14:40:31 +09:00

313 lines
12 KiB
CSS

/* ════════════════════════════════════════════════════
ERP Shell — 좌측 사이드바 + 우측 콘텐츠 레이아웃
erp.css 의 토큰을 그대로 사용한다. 같이 로드 필수.
════════════════════════════════════════════════════ */
:root {
--erp-sidebar-w: 240px;
--erp-sidebar-w-collapsed: 64px;
--erp-topbar-h: 56px;
}
/* ── 페이지 전체 컨테이너 ──
뷰포트(예: 1883×938)에 고정 — 문서 전체 세로 스크롤 제거.
넘치는 콘텐츠는 .erp-page 내부에서만 처리한다(CORM/Order 는 별도 창이라 무관). */
body.erp-app-body { background: var(--color-canvas-white); height: 100vh; overflow: hidden; }
.erp-app {
display: grid;
grid-template-columns: var(--erp-sidebar-w) 1fr;
height: 100vh;
transition: grid-template-columns .18s ease;
}
.erp-app:has(.erp-sidebar[data-collapsed="true"]) {
grid-template-columns: var(--erp-sidebar-w-collapsed) 1fr;
}
/* ── 사이드바 ── */
.erp-sidebar {
position: sticky; top: 0;
height: 100vh;
border-right: 1px solid var(--color-subtle-ash);
background: var(--color-canvas-white);
display: flex; flex-direction: column;
overflow: hidden;
z-index: 40;
}
.erp-sidebar-head {
height: var(--erp-topbar-h);
display: flex; align-items: center; justify-content: space-between;
padding: 0 var(--sp-12) 0 var(--sp-16);
border-bottom: 1px solid var(--color-subtle-ash);
flex-shrink: 0;
}
.erp-sidebar-brand {
display: inline-flex; align-items: center; gap: var(--sp-8);
color: var(--color-deep-black);
}
.erp-sidebar-logo { height: 22px; width: auto; display: block; }
.erp-sidebar-system {
font-weight: 600; font-size: 14px; letter-spacing: -0.2px;
}
.erp-sidebar[data-collapsed="true"] .erp-sidebar-system { display: none; }
.erp-sidebar-toggle {
width: 28px; height: 28px; border-radius: 8px;
display: inline-flex; align-items: center; justify-content: center;
background: transparent; border: 1px solid transparent; cursor: pointer;
color: var(--color-midtone-gray);
}
.erp-sidebar-toggle:hover { background: var(--color-ghost-gray); color: var(--color-deep-black); }
.erp-sidebar[data-collapsed="true"] .erp-sidebar-toggle svg { transform: rotate(180deg); }
.erp-sidebar-nav {
flex: 1; overflow-y: auto;
padding: var(--sp-12) var(--sp-8);
display: flex; flex-direction: column; gap: 2px;
}
.erp-sidebar-group {
font-size: 12px; font-weight: 600;
color: var(--color-midtone-gray);
text-transform: uppercase; letter-spacing: 0.06em;
padding: var(--sp-12) var(--sp-12) var(--sp-6);
}
.erp-sidebar[data-collapsed="true"] .erp-sidebar-group { opacity: 0; height: 0; padding: 0; pointer-events: none; }
.erp-sidebar-item {
display: flex; align-items: center; gap: 12px;
padding: 11px var(--sp-12);
border-radius: 10px;
color: var(--color-rich-black);
font-size: 16px; font-weight: 500;
cursor: pointer;
transition: background .12s ease, color .12s ease;
border: 1px solid transparent;
text-decoration: none;
white-space: nowrap;
}
/* 실행중(is-active) 메뉴는 hover 시 변화 없음. 그 외 메뉴만 진한 회색. */
.erp-sidebar-item:hover:not(.is-disabled):not(.is-active) { background: #d9d9d9; }
.erp-sidebar-item.is-active {
background: var(--color-deep-black);
color: var(--color-canvas-white);
}
.erp-sidebar-item.is-disabled {
color: var(--color-midtone-gray);
cursor: not-allowed;
}
.erp-sidebar-icon {
width: 22px; height: 22px;
display: inline-flex; align-items: center; justify-content: center;
flex-shrink: 0;
}
.erp-sidebar-icon svg { width: 21px; height: 21px; }
.erp-sidebar-label { flex: 1; }
.erp-sidebar-badge {
background: var(--color-ghost-gray); color: var(--color-midtone-gray);
padding: 2px 8px; border-radius: var(--r-badge);
font-size: 11px; font-weight: 500;
}
.erp-sidebar-item.is-active .erp-sidebar-badge {
background: rgba(255,255,255,0.18); color: var(--color-canvas-white);
}
.erp-sidebar-ext { color: var(--color-midtone-gray); display: inline-flex; }
.erp-sidebar[data-collapsed="true"] .erp-sidebar-badge,
.erp-sidebar[data-collapsed="true"] .erp-sidebar-ext {
display: none;
}
/* 접힌 상태: 아이콘 위 / 프로그램 이름 작은 글씨 아래 */
.erp-sidebar[data-collapsed="true"] .erp-sidebar-item {
flex-direction: column; gap: 3px; padding: 8px 2px;
justify-content: center; text-align: center;
}
.erp-sidebar[data-collapsed="true"] .erp-sidebar-label {
flex: none; font-size: 10px; line-height: 1.1; font-weight: 500;
white-space: normal; word-break: keep-all;
}
.erp-sidebar-foot {
padding: var(--sp-8);
border-top: 1px solid var(--color-subtle-ash);
display: flex; flex-direction: column; gap: 2px;
flex-shrink: 0;
}
/* ── 콘텐츠 영역 ── */
.erp-content { display: flex; flex-direction: column; min-width: 0; height: 100vh; min-height: 0; }
.erp-topbar {
height: var(--erp-topbar-h); flex-shrink: 0;
position: sticky; top: 0; z-index: 30;
background: var(--color-canvas-white);
border-bottom: 1px solid var(--color-subtle-ash);
display: flex; align-items: center; justify-content: space-between;
padding: 0 var(--sp-24);
gap: var(--sp-16);
}
.erp-topbar-left { display: flex; align-items: center; gap: var(--sp-12); min-width: 0; }
.erp-topbar-title h1 {
font-size: 16px; font-weight: 600; margin: 0; line-height: 1.2;
letter-spacing: -0.2px;
}
.erp-topbar-title p {
margin: 2px 0 0; color: var(--color-midtone-gray); font-size: 12px;
}
.erp-topbar-right { display: flex; align-items: center; gap: var(--sp-12); }
.erp-sidebar-mobile-toggle {
display: none;
width: 32px; height: 32px; border-radius: 8px;
align-items: center; justify-content: center;
background: transparent; border: 1px solid var(--color-subtle-ash); cursor: pointer;
color: var(--color-rich-black);
}
.erp-page {
padding: var(--sp-24);
max-width: 1550px; width: 100%; margin: 0 auto;
flex: 1 1 auto; min-height: 0;
overflow-y: auto; /* 넘치면 페이지 영역만 스크롤(문서 전체 X) */
display: flex; flex-direction: column;
}
/* 달력 등 "한 화면 채움" 페이지: 첫 섹션이 남은 높이를 모두 차지 */
.erp-page > .vac,
.erp-page > .cpg { flex: 1 1 auto; min-height: 0; }
/* ── 홈 대시보드 타일 ── */
.erp-hero { margin: var(--sp-8) 0 var(--sp-24); }
.erp-hero-title { font-size: 28px; font-weight: 600; margin: 0; letter-spacing: -0.6px; }
.erp-hero-sub { margin: 6px 0 0; color: var(--color-midtone-gray); font-size: 13px; }
.erp-home-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: var(--sp-16);
}
.erp-tile {
border: 1px solid var(--color-subtle-ash);
border-radius: var(--r-card);
padding: var(--sp-20);
background: var(--color-canvas-white);
display: flex; flex-direction: column; gap: 8px;
}
.erp-tile-head {
display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px;
}
.erp-tile-label {
font-size: 11px; color: var(--color-midtone-gray); text-transform: uppercase; letter-spacing: 0.08em;
}
.erp-tile-title { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }
.erp-tile-desc { margin: 0 0 8px; color: var(--color-midtone-gray); font-size: 13px; }
.erp-tile-list { margin: 0; padding-left: 18px; color: var(--color-rich-black); font-size: 13px; }
.erp-tile-list li { margin: 4px 0; }
/* ── 개인경비 페이지 ── */
.erp-expense { display: flex; flex-direction: column; gap: var(--sp-20); }
.erp-summary-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: var(--sp-12);
}
.erp-summary-card {
border: 1px solid var(--color-subtle-ash);
border-radius: var(--r-card);
padding: var(--sp-16);
display: flex; flex-direction: column; gap: 6px;
background: var(--color-canvas-white);
}
.erp-summary-card--mini { padding: var(--sp-12) var(--sp-16); }
.erp-summary-label { font-size: 12px; color: var(--color-midtone-gray); }
.erp-summary-value { font-size: 20px; font-weight: 600; letter-spacing: -0.3px; font-variant-numeric: tabular-nums; }
.erp-summary-value--sm { font-size: 16px; }
.erp-card-block {
border: 1px solid var(--color-subtle-ash);
border-radius: var(--r-card);
background: var(--color-canvas-white);
overflow: hidden;
}
.erp-card-block-head {
display: flex; align-items: baseline; justify-content: space-between;
padding: var(--sp-16) var(--sp-20);
border-bottom: 1px solid var(--color-subtle-ash);
}
.erp-card-block-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }
.erp-muted { color: var(--color-midtone-gray); font-size: 12px; }
.erp-form-grid {
display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
gap: var(--sp-12); padding: var(--sp-16) var(--sp-20);
}
.erp-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--color-midtone-gray); }
.erp-field-wide { grid-column: span 2; }
.erp-field input, .erp-field select {
border: 1px solid var(--color-subtle-ash);
border-radius: var(--r-input);
padding: 6px 10px;
font-family: inherit; font-size: 14px; color: var(--color-rich-black);
background: var(--color-canvas-white);
outline: none;
}
.erp-field input:focus, .erp-field select:focus {
border-color: var(--color-rich-black);
box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}
.erp-form-actions {
grid-column: 1 / -1;
display: flex; justify-content: flex-end; gap: var(--sp-8);
padding-top: 4px;
}
.erp-btn-sm { padding: 4px 10px !important; font-size: 12px !important; }
.erp-table-wrap { overflow-x: auto; }
.erp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.erp-table thead th {
text-align: left;
font-weight: 500; color: var(--color-midtone-gray);
padding: 10px var(--sp-16);
border-bottom: 1px solid var(--color-subtle-ash);
background: var(--color-canvas-white);
}
.erp-table tbody td {
padding: 10px var(--sp-16);
border-bottom: 1px solid var(--color-subtle-ash);
vertical-align: middle;
}
.erp-table tbody tr:last-child td { border-bottom: 0; }
.erp-table tbody tr:hover { background: var(--color-ghost-gray); }
.erp-row-sub { font-size: 12px; color: var(--color-midtone-gray); margin-top: 2px; }
.erp-empty { text-align: center; color: var(--color-midtone-gray); padding: var(--sp-24); }
/* ── 반응형 ── */
@media (max-width: 900px) {
/* 모바일: grid 자체 해제(데스크탑 collapsed :has 규칙과의 특이도 싸움 회피).
사이드바는 흐름 밖 떠있는 오버레이, 본문은 풀폭 block. */
body.erp-app-body { height: auto; overflow: auto; }
.erp-app,
.erp-app:has(.erp-sidebar[data-collapsed="true"]) { display: block; }
.erp-sidebar {
position: fixed; left: 0; top: 0; height: 100vh; z-index: 1000;
width: var(--erp-sidebar-w);
transform: translateX(-100%);
transition: transform .2s ease;
box-shadow: 0 0 0 1px var(--color-subtle-ash);
}
/* 모바일선 데스크탑 접힘 무시 — 메뉴 열면 풀폭으로 */
.erp-sidebar[data-collapsed="true"] { width: var(--erp-sidebar-w); }
.erp-sidebar.is-open { transform: translateX(0); }
.erp-sidebar-mobile-toggle { display: inline-flex; }
.erp-content { width: 100%; min-width: 0; }
.erp-form-grid { grid-template-columns: 1fr 1fr; }
.erp-field-wide { grid-column: span 2; }
}
@media (max-width: 560px) {
.erp-form-grid { grid-template-columns: 1fr; }
.erp-field-wide { grid-column: auto; }
.erp-page { padding: var(--sp-16); }
}