/* auto-built from core/css/main.css - do not edit directly */
/* ============================
   TOKENS — 디자인 토큰 단일 소스 (반드시 가장 먼저)
=============================== */

/* ---- ./core/tokens.css ---- */
/* ============================================================
   📐 TOKENS.CSS — 전체 디자인 토큰 단일 소스 v1.0
   모든 섹션 CSS는 하드코딩 대신 var() 참조로 작성한다.

   계층:
     tokens.css  ← 정의
     a4_doc.css  ← A4 문서 클래스 (.a4-doc, .a4-btn, ...)
     stat-bar.css← 요약 stat 카드 공통 클래스
     섹션 CSS    ← 섹션별 레이아웃, var() 참조만
============================================================ */

:root {

  /* ──────────────────────────────────────
     A4 문서 토큰
     (expense, income, cash, project 공통)
  ────────────────────────────────────── */
  --a4-ink:         #111;
  --a4-line:        #222;
  --a4-soft:        #666;
  --a4-bg:          #fff;
  --a4-head:        #f3f4f6;

  --a4-font:        11px;
  --a4-line-height: 1.15;
  --a4-cell-pad-y:  2px;
  --a4-cell-pad-x:  4px;
  --a4-row-height:  22px;

  /* ──────────────────────────────────────
     UI 공통 토큰
     (대시보드, 요약바, 어드민 UI 공통)
  ────────────────────────────────────── */
  --ui-radius:      8px;            /* 카드·칩·인풋 border-radius */
  --ui-border:      1px solid #e5e7eb;
  --ui-border-color:#e5e7eb;
  --ui-bg:          #fff;
  --ui-bg-soft:     #f9fafb;        /* 연한 카드 배경 */
  --ui-ink:         #111827;        /* 주 텍스트 */
  --ui-muted:       #6b7280;        /* 보조 텍스트 */
  --ui-head:        #f3f4f6;        /* 테이블 헤더 배경 */
  --ui-danger:      #b91c1c;
  --ui-positive:    #166534;

  --ui-shadow-sm:   0 2px 6px rgba(0,0,0,.05);
  --ui-shadow:      0 4px 12px rgba(0,0,0,.07);

  /* ──────────────────────────────────────
     Stat 카드 토큰 (요약바 공통)
     (dashboard KPI, expense-summary,
      income-summary 모두 동일하게)
  ────────────────────────────────────── */
  --stat-pad:       6px 10px;
  --stat-title-fs:  11px;
  --stat-value-fs:  15px;
  --stat-value-fw:  700;
}

/* ============================
   CORE (리셋 · 베이스 · 레이아웃)
=============================== */

/* ---- ./core/reset.css ---- */
/* ================================================================
   📁 reset.css — 브라우저 스타일 초기화 안정판 v4
   ✔ 모든 브라우저(Chrome/Safari/Edge/Firefox) 호환
   ✔ iOS 사파리 기본 스타일 제거
   ✔ 입력폼/버튼/리스트의 기본 디자인 삭제
   ✔ box-sizing 전역 통일
================================================================ */


/* ---------------------------------------------------------------
   1) 기본 box-sizing 통일
--------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


/* ---------------------------------------------------------------
   2) HTML / BODY 초기화
--------------------------------------------------------------- */
html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;

    /* 기본 폰트 스무딩 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* 모바일 뷰포트 점프 방지 */
    overscroll-behavior: none;
}


/* ---------------------------------------------------------------
   3) 기본 폰트(브라우저 기본) 리셋
--------------------------------------------------------------- */
body {
    font-family: -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.4;
    color: #111;
    background: #fff;
}


/* ---------------------------------------------------------------
   4) 링크 기본 스타일 리셋
--------------------------------------------------------------- */
a {
    color: inherit;
    text-decoration: none;
}


/* ---------------------------------------------------------------
   5) 버튼 초기화
--------------------------------------------------------------- */
button {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
}


/* ---------------------------------------------------------------
   6) 입력 폼 초기화
--------------------------------------------------------------- */
input,
textarea,
select {
    font: inherit;
    border: 0;
    background: transparent;
    outline: none;
}


/* iOS 자동 확대 방지 */
input,
textarea {
    font-size: 16px;
}


/* ---------------------------------------------------------------
   7) 리스트 리셋
--------------------------------------------------------------- */
ul,
ol {
    list-style: none;
}


/* ---------------------------------------------------------------
   8) 이미지 / 미디어 리셋
--------------------------------------------------------------- */
img,
video {
    display: block;
    max-width: 100%;
    height: auto;
    border: 0;
}


/* ---------------------------------------------------------------
   9) 테이블 리셋
--------------------------------------------------------------- */
table {
    border-collapse: collapse;
    border-spacing: 0;
}


/* ---------------------------------------------------------------
   10) 버튼/폼 hover outline 제거 (Windows)
--------------------------------------------------------------- */
*:focus {
    outline: none;
}


/* ---------------------------------------------------------------
   11) 모바일 웹에서 탭 하이라이트 제거
--------------------------------------------------------------- */
body {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}


/* ---------------------------------------------------------------
   12) strong / b 강제 굵기統一
--------------------------------------------------------------- */
strong,
b {
    font-weight: 700;
}

/* ---- ./core/base.css ---- */
/* ============================================================
   📘 BASE.CSS — 전체 공통 Reset + Typography + Layout Base v4
   - 모든 페이지의 기초 디자인
   - header / sidebar / cards / table 등 상위 레이아웃의 토대
   - 모바일 100% 대응
============================================================ */


/* ----------------------------------
   🔥 1) CSS RESET (부드럽고 안전한 리셋)
---------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body, div, span, header, footer, nav, section, article,
h1, h2, h3, h4, h5, h6,
p, a, img, table, tr, td, th, ul, li, button, input, textarea {
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}


/* ----------------------------------
   🔥 2) 기본 폰트 + 배경
---------------------------------- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Helvetica, Arial, sans-serif;
    background: #f5f6fa;      /* 전체 톤 */
    color: #1f2937;
    line-height: 1;
    font-size: 10px;
}


/* ----------------------------------
   🔥 3) 기본 레이아웃
---------------------------------- */
#app,
body,
html {
    min-height: 100vh;
}

.main-area {
    padding: 24px;
    min-height: calc(100vh - 60px);
    background: #f5f6fa;
    transition: margin-left .25s ease;
}


/* ----------------------------------
   🔥 4) 페이지 제목 스타일
---------------------------------- */
.page-header {
    margin-bottom: 22px;
}

.page-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}


/* ----------------------------------
   🔥 5) Input 기본값
---------------------------------- */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    font-size: 14px;
    transition: border-color .2s ease, background .2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #4b73ff;
    background: #f8fbff;
    outline: none;
}


/* ----------------------------------
   🔥 6) 폼 그룹 기본 구조
---------------------------------- */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}


/* ----------------------------------
   🔥 7) 공통 그리드 (flex)
---------------------------------- */
.row {
    display: flex;
    gap: 12px;
}

.col {
    flex: 1;
}


/* ----------------------------------
   🔥 8) 버튼 초기화 (버튼 전용은 buttons.css에서 디자인)
---------------------------------- */
button {
    cursor: pointer;
    border: none;
    background: transparent;
}


/* ----------------------------------
   🔥 9) 숨김 처리 (접근성-friendly)
---------------------------------- */
.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    border: 0;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}


/* ----------------------------------
   🔥 10) 모바일 처리
---------------------------------- */
@media (max-width: 768px) {
    .main-area {
        padding: 18px;
    }

    .page-header h2 {
        font-size: 20px;
    }
}

/* ---- ./core/core.css ---- */
/* ============================================================
   🌐 CORE.CSS — 전체 관리자 시스템 공통 규칙 v6
   🔥 base.css 위에서 동작하는 상위 레이어
   🔥 레이아웃 · 그리드 · 유틸리티 · 테마 · 컴포넌트 기본 통합
============================================================ */


/* ------------------------------------------------------------
   1) 전체 레이아웃 구조
------------------------------------------------------------ */

/* 전체 화면 높이 보장 */
html, body {
    height: 100%;
    overflow-x: hidden;
}

/* app 전체 컨테이너 (사용 안 해도 문제 없음) */
#app {
    min-height: 100vh;
}

/* 메인 콘텐츠 영역 */
.main-area {
    padding: 24px;
    min-height: calc(100vh - 60px);
    background: #f5f6fa;
    transition: margin-left .25s ease;
}

/* 모바일: 사이드바 오버레이면 margin 제거 */
@media (max-width: 1023px) {
    .main-area {
        margin-left: 0 !important;
        padding: 18px;
    }
}


/* ------------------------------------------------------------
   2) Grid 시스템 (Flex 기반)
------------------------------------------------------------ */

.flex {
    display: flex;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gap-6 { gap: 6px; }
.gap-10 { gap: 10px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }


/* ------------------------------------------------------------
   3) 공통 spacing 시스템 (padding/margin)
------------------------------------------------------------ */

.p-0 { padding: 0 !important; }
.p-10 { padding: 10px !important; }
.p-20 { padding: 20px !important; }

.pt-10 { padding-top: 10px !important; }
.pb-10 { padding-bottom: 10px !important; }
.pl-10 { padding-left: 10px !important; }
.pr-10 { padding-right: 10px !important; }

.m-0 { margin: 0 !important; }
.mt-10 { margin-top: 10px !important; }
.mb-10 { margin-bottom: 10px !important; }
.ml-10 { margin-left: 10px !important; }
.mr-10 { margin-right: 10px !important; }

.mt-20 { margin-top: 20px !important; }
.mb-20 { margin-bottom: 20px !important; }


/* ------------------------------------------------------------
   4) 카드/박스 공통 규칙
------------------------------------------------------------ */

.box,
.card-base {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.box-title,
.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 14px;
}


/* ------------------------------------------------------------
   5) ALERT / BADGE 기본 정의
------------------------------------------------------------ */

.badge {
    display: inline-block;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
    line-height: 1;
}

.badge-blue { background: #e5efff; color: #3d68ff; }
.badge-red { background: #ffe5e5; color: #ff4b4b; }
.badge-green { background: #e7f8e7; color: #1e8a1e; }
.badge-gray { background: #f1f1f1; color: #555; }


/* ------------------------------------------------------------
   6) 로딩 스피너
------------------------------------------------------------ */

.loading-center {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #4b73ff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ------------------------------------------------------------
   7) 공통 Transition
------------------------------------------------------------ */
.transition {
    transition: all .2s ease;
}

.fade-in {
    animation: fadeIn .25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ------------------------------------------------------------
   8) 테마 색상 변수 (확장 가능)
------------------------------------------------------------ */
:root {
    --color-primary: #4b73ff;
    --color-primary-light: #e8eeff;
    --color-danger: #ff4b4b;
    --color-success: #30a750;
    --color-gray: #6b7280;
}


/* ------------------------------------------------------------
   9) Default Shadow Preset
------------------------------------------------------------ */

.shadow-sm {
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.shadow-md {
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.shadow-lg {
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}


/* ------------------------------------------------------------
   10) 상태 태그 공통
------------------------------------------------------------ */

.status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.status-ing {
    background: #fdf4ce;
    color: #ad7d00;
}

.status-done {
    background: #e7f8e7;
    color: #1e8a1e;
}

.status-hold {
    background: #ffe5e5;
    color: #d12c2c;
}

/* ------------------------------------------------------------
   11) 모바일 가독성 보정
------------------------------------------------------------ */

@media (max-width: 480px) {
    .card-base,
    .box {
        padding: 14px;
    }

    .page-header h2 {
        font-size: 18px;
    }
}

/* ---- ./core/layout.css ---- */
/* ===================================================
   📁 파일 위치: /영일전기철물2/core/css/core/layout.css
   ✅ 덮어쓰기 지시: Layout Core v2.0 — 레이아웃 변수화 + sidebar/main-area 충돌 제거
   - layout.css에서 sidebar/overlay 직접 스타일링 제거 (sidebar.css로 위임)
   - main-area: header/side 기준 margin/padding-top만 담당
   - html.sidebar-collapsed 연동(사이드바 접힘)
=================================================== */

:root {
    --app-header-h: 60px;
    --app-sidebar-w: 260px;
    --app-main-top-gap: 16px;
}

/* 전체 가로 삐져나감 방지 */
html,
body {
    overflow-x: hidden;
}

/* ✅ 메인 영역: sidebar 폭만큼 밀고, 헤더 높이만큼 위 패딩 확보 */
.main-area {
    margin-left: var(--app-sidebar-w);
    padding-top: calc(var(--app-header-h) + var(--app-main-top-gap));
    transition: margin-left .25s ease;
}

/* ✅ 데스크탑에서 sidebar 접힘 상태 */
html.sidebar-collapsed .main-area {
    margin-left: 0 !important;
}

/* ✅ 로그인 페이지(헤더/사이드바 자체가 없으니) */
body[data-page="login"] .main-area {
    margin-left: 0 !important;
    padding-top: 24px !important;
    min-height: 100vh;
}

/* ✅ 모바일(사이드바는 offcanvas) */
@media (max-width: 980px) {
    .main-area {
        margin-left: 0 !important;
        padding-top: calc(var(--app-header-h) + 12px);
    }

    html.sidebar-collapsed .main-area {
        margin-left: 0 !important;
    }
}

/* ---- ./core/layout.mobile.css ---- */
/* ===================================================
   📁 파일 위치: /영일전기철물2/core/css/core/layout.mobile.css
   ✅ 덮어쓰기 지시: Layout Mobile v2.0 — (sidebar.css 기준) 모바일 보정만 남기기
   - 여기서는 sidebar/overlay 스타일 금지(충돌 원인)
   - main-area 모바일 보정 + 기존 햄버거 버튼 중복 방지(선택)
=================================================== */

/* ✅ header 햄버거 버튼 사용 */

/* 모바일 전용 여백/간격 보정만 */
@media (max-width: 980px) {
    .main-area {
        margin-left: 0 !important;
        padding-top: calc(var(--app-header-h) + 12px);
    }
}

@media (max-width: 640px) {
    .main-area {
        padding: 12px;
        padding-top: calc(var(--app-header-h) + 8px);
    }
}

/* ============================
   COMPONENTS
=============================== */

/* ---- ./components/buttons.css ---- */
/* ============================================================
   🟦 BUTTONS — 전역 버튼 스타일
   공통 버튼 + Variants + 사이즈 + 유틸리티
============================================================ */

/* ------------------------------
   공통 변수 (core.css에 있는 값과 통일)
------------------------------ */
:root {
    --btn-radius: 10px;
    --btn-font: 15px;
    --btn-padding: 10px 16px;

    --color-primary: #4a82ff;
    --color-primary-dark: #2f5fe8;
    --color-primary-light: #e8f0ff;

    --color-danger: #ff4d4d;
    --color-danger-dark: #d93636;

    --color-gray-100: #f5f5f7;
    --color-gray-200: #e3e5e8;
    --color-gray-300: #cfd1d4;
    --color-gray-700: #555;
    --color-gray-900: #222;

    --transition-fast: 0.15s ease;
    --transition-mid: 0.25s ease;
}

/* ------------------------------
   기본 버튼 형태
------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: var(--btn-padding);
    font-size: var(--btn-font);
    font-weight: 500;

    border-radius: var(--btn-radius);
    border: 0;
    cursor: pointer;

    transition: background var(--transition-fast),
                box-shadow var(--transition-fast),
                transform var(--transition-fast);

    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* 버튼 비활성화 */
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}

/* 클릭감 */
.btn:active {
    transform: scale(0.96);
}

/* ------------------------------
   PRIMARY 버튼
------------------------------ */
.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-dark);
    box-shadow: 0 4px 12px rgba(74, 130, 255, 0.25);
}

/* ------------------------------
   DANGER 버튼
------------------------------ */
.btn-danger {
    background: var(--color-danger);
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    background: var(--color-danger-dark);
    box-shadow: 0 4px 12px rgba(255, 77, 77, 0.25);
}

/* ------------------------------
   GHOST 버튼 (투명)
------------------------------ */
.btn-ghost {
    background: transparent;
    border: 1px solid var(--color-gray-300);
    color: var(--color-gray-700);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--color-gray-100);
}

/* ------------------------------
   OUTLINE 버튼
------------------------------ */
.btn-outline {
    background: #fff;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--color-primary-light);
}

/* ------------------------------
   LIGHT 버튼 (흰색)
------------------------------ */
.btn-light {
    background: #fff;
    border: 1px solid var(--color-gray-200);
    color: var(--color-gray-900);
}

.btn-light:hover:not(:disabled) {
    background: var(--color-gray-100);
}

/* ------------------------------
   SIZE 옵션
------------------------------ */
.btn-sm {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 8px;
}

.btn-lg {
    padding: 14px 20px;
    font-size: 17px;
    border-radius: 12px;
}

/* ------------------------------
   FULL WIDTH
------------------------------ */
.btn-block {
    width: 100%;
}

/* ------------------------------
   ICON ONLY
------------------------------ */
.btn-icon {
    padding: 8px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    justify-content: center;
}

/* 모바일 터치감 개선 */
@media (max-width: 480px) {
    .btn {
        font-size: 14px;
    }
    .btn-lg {
        font-size: 15px;
    }
}

/* ---- ./components/cards.css ---- */
/* ============================================================
   🟩 CARDS — 카드 UI 전역 스타일
   리스트 카드 / 대시보드 카드 / 데이터 카드 통합
============================================================ */

/* ------------------------------
   공통 변수
------------------------------ */
:root {
    --card-bg: #fff;
    --card-radius: 14px;
    --card-padding: 16px;
    --card-shadow: 0 4px 12px rgba(0,0,0,0.06);
    --card-border: 1px solid #e5e7eb;

    --color-gray-400: #d1d5db;
    --color-gray-600: #4b5563;
}

/* ------------------------------
   카드 기본 스타일
------------------------------ */
.card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    padding: var(--card-padding);

    border: var(--card-border);
    box-shadow: var(--card-shadow);

    transition: transform 0.20s ease, box-shadow 0.20s ease;
}

/* 호버 효과 */
.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}

/* ------------------------------
   리스트 카드 스타일
------------------------------ */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* 각 아이템 */
.card-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--card-radius);
    padding: 14px 16px;
    cursor: pointer;

    display: flex;
    flex-direction: column;
    gap: 6px;

    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.card-item:hover {
    background: #fafafa;
    box-shadow: 0 4px 10px rgba(0,0,0,0.07);
}

.card-item.active {
    border-color: #4a82ff;
    background: #f3f7ff;
}

/* 제목 */
.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #111;
}

/* 부제목 / 보조 텍스트 */
.card-sub {
    font-size: 14px;
    color: #555;
}

/* 아주 작은 텍스트 */
.card-meta {
    font-size: 12px;
    color: #888;
}

/* ------------------------------
   대시보드 카드 그리드
------------------------------ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.card-stat {
    padding: 20px;
    border-radius: var(--card-radius);
    background: var(--card-bg);
    border: var(--card-border);
    box-shadow: var(--card-shadow);

    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-stat .value {
    font-size: 20px;
    font-weight: bold;
    color: #1f2937;
}

.card-stat .label {
    font-size: 14px;
    color: #6b7280;
}

/* ------------------------------
   카드 안의 테이블 (간단 버전)
------------------------------ */
.card-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.card-table th,
.card-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.card-table th {
    text-align: left;
    color: #666;
    font-weight: 500;
}

/* ------------------------------
   카드 안의 구분선
------------------------------ */
.card-divider {
    height: 1px;
    background: #eee;
    margin: 12px 0;
}

/* ------------------------------
   모바일 대응
------------------------------ */
@media (max-width: 480px) {
    .card {
        padding: 14px;
        border-radius: 12px;
    }

    .card-item {
        padding: 12px 14px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- ./components/header.css ---- */
/* ============================================================
   📌 header.css — 영일전기철물2 공통 헤더 스타일
   ------------------------------------------------------------
   - 상단 고정
   - 모바일 햄버거 버튼 지원
   - 관리자 액션 버튼 정렬
=========================================================== */

/* 헤더 전체 영역 */
.top-bar {
    width: 100%;
    height: var(--app-header-h, 60px);
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    gap: 16px;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* 좌/우 래퍼 */
.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-bar-left {
    min-width: 0;
}

.top-bar-right {
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* 좌측 모바일 햄버거 */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-btn span {
    width: 100%;
    height: 2px;
    border-radius: 3px;
    background: #111;
}

/* 로고 영역 */
.top-bar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.top-bar-logo .logo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-primary, #4b73ff);
    box-shadow: 0 0 0 4px rgba(75, 115, 255, 0.12);
    flex-shrink: 0;
}

/* 제목 */
.top-bar .title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* DEV 배지 */
.top-bar .dev-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    margin-left: 6px;
}

/* 우측 액션 (구형 .actions + 신규 .top-bar-right 둘 다 지원) */
.top-bar .actions,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* 링크/라벨 */
.top-bar .actions a,
.top-bar-right a {
    color: #1f2937;
    font-size: 14px;
    text-decoration: none;
}

/* 관리자 님 */
.top-bar .actions span,
.top-bar-right .user-label {
    font-size: 14px;
    color: #4b5563;
}

.top-bar-right .logout-link {
    color: #ef4444;
    font-weight: 600;
}

.top-bar-right .logout-link:hover {
    text-decoration: underline;
}

/* ============================
   📱 모바일 대응
=============================== */
@media (max-width: 768px) {

    .hamburger-btn {
        display: flex;
    }

    .top-bar {
        padding: 0 12px;
        gap: 8px;
    }

    /* 모바일: 겹침 방지, 좌측 정렬 */
    .top-bar .title {
        position: static;
        transform: none;
        font-size: 15px;
        max-width: 56vw;
    }

    .top-bar-right {
        flex-wrap: nowrap;
        gap: 8px;
    }

    /* 우측 버튼 너무 많으면 감춤 */
    .top-bar .actions,
    .top-bar-right {
        gap: 10px;
    }

    .top-bar .actions span,
    .top-bar-right .user-label {
        display: none;
    }
}

@media (max-width: 520px) {
    /* 모바일 초소형: 새로고침/동선 버튼 숨김 */
    .top-bar-right .btn-ghost {
        display: none;
    }
    .top-bar-logo .logo-dot {
        display: none;
    }
}

/* ---- ./components/modal.css ---- */
/* =========================================================
   📁 파일 위치: \\192.168.1.4\web\영일전기철물2\core\css\components\modal.css
   ✅ 덮어쓰기 지시: schedule_list 전용 #calModal 강제 표시/정렬 패치 v1.0
   - 전역 .modal / .modal-body / .modal-overlay와 충돌해도 #calModal은 정상
   - “절반만 뜸” 방지: modal-box를 fixed 정중앙으로 고정
========================================================= */

#calModal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;

    /* ✅ show는 class로 제어 (#calModal.show) */
    display: none !important;

    /* 혹시 전역 애니메이션/투명도 규칙이 있으면 무력화 */
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
}

#calModal.show {
    display: block !important;
}

/* backdrop */
#calModal>#calModalBack,
#calModal>.modal-back {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, .45) !important;
    backdrop-filter: blur(2px) !important;
    z-index: 2147483001 !important;
    pointer-events: auto !important;
}

/* ✅ 핵심: box는 무조건 fixed */
#calModal>.modal-box {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;

    width: min(720px, calc(100vw - 24px)) !important;
    max-height: min(82vh, calc(100vh - 80px)) !important;

    margin: 0 !important;
    /* ✅ auto/12px 같은 거 전부 차단 */
    opacity: 1 !important;

    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 16px !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .25) !important;

    overflow: hidden !important;

    display: flex !important;
    flex-direction: column !important;

    z-index: 2147483002 !important;
}

/* header */
#calModal .modal-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

/* close */
#calModal .xbtn {
    border: 0 !important;
    background: transparent !important;
    font-size: 22px !important;
    cursor: pointer !important;
    line-height: 1 !important;
    padding: 4px 8px !important;
    border-radius: 10px !important;
}

/* body (전역 .modal-body 영향 차단) */
#calModal .modal-body {
    padding: 14px 16px !important;
    overflow: auto !important;
    flex: 1 1 auto !important;
}

/* mobile */
@media (max-width: 480px) {
    #calModal>.modal-box {
        width: min(94vw, calc(100vw - 16px)) !important;
        border-radius: 14px !important;
        max-height: min(88vh, calc(100vh - 40px)) !important;
    }
}

/* print */
@media print {
    #calModal {
        display: none !important;
    }
}

/* ---- ./components/table.css ---- */
/* ============================================================
   📘 TABLES — 공용 관리자 테이블 스타일 v4
   - 고객관리, 견적, 현장관리, 재고, 비용 등 전 테이블 통일
   - 모바일 100% 대응
============================================================ */


/* ----------------------------------
   공통 wrpper
---------------------------------- */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 18px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}


/* ----------------------------------
   테이블 기본
---------------------------------- */
table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: #1f2937;
    min-width: 760px; /* 모바일에서 깨짐 방지 */
}

.data-table thead {
    background: #f3f4f6;
}

.data-table thead th {
    padding: 14px 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.data-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.18s ease;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.data-table td {
    padding: 12px 12px;
    vertical-align: middle;
    font-size: 14px;
    color: #374151;
}


/* ----------------------------------
   상태 뱃지
---------------------------------- */
.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge.green  { background: #e8f8ef; color: #0e9f6e; }
.badge.blue   { background: #e3f0ff; color: #3b82f6; }
.badge.orange { background: #fff2db; color: #d97706; }
.badge.red    { background: #ffe4e6; color: #e11d48; }


/* ----------------------------------
   관리 버튼 작은 아이콘용
---------------------------------- */
.table-actions button {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background .2s ease, color .2s ease;
}

.btn-edit {
    background: #eff6ff;
    color: #2563eb;
}
.btn-edit:hover {
    background: #dbeafe;
}

.btn-delete {
    background: #fee2e2;
    color: #dc2626;
}
.btn-delete:hover {
    background: #fecaca;
}


/* ----------------------------------
   "데이터 없음" 영역
---------------------------------- */
.table-empty {
    text-align: center;
    padding: 40px 0;
    font-size: 14px;
    color: #6b7280;
}


/* ----------------------------------
   모바일 대응
---------------------------------- */
@media (max-width: 600px) {
    .table-wrap {
        border-radius: 8px;
    }

    .data-table th,
    .data-table td {
        padding: 10px;
        font-size: 13px;
    }

    .table-actions button {
        padding: 5px 8px;
    }
}

/* ---- ./components/sidebar.css ---- */
/* ===================================================
   📁 파일 위치: /영일전기철물2/core/css/components/sidebar.css
   ✅ 덮어쓰기 지시: Sidebar Core v2.2 — sidebar/overlay 정의 단일화 + open 클래스 제거 + is-open-mobile만 사용
=================================================== */

:root {
    --app-header-h: 60px;
    --app-sidebar-w: 260px;
}

/* overlay (모바일에서 사이드바 열릴 때만 의미 있음) */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(2px);

    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* sidebar 기본(데스크탑: 열림) */
.sidebar {
    position: fixed;
    top: var(--app-header-h);
    left: 0;
    width: var(--app-sidebar-w);
    height: calc(100vh - var(--app-header-h));

    background: #ffffff;
    border-right: 1px solid #e5e7eb;

    padding: 16px 12px;
    overflow-y: auto;

    z-index: 2050;

    transform: translateX(0);
    transition: transform .22s ease;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #c9ccd1;
    border-radius: 4px;
}

/* 데스크탑 접힘: 완전 숨김 */
.sidebar.is-collapsed {
    transform: translateX(-105%);
}

/* 타이틀/서브타이틀 */
.sidebar-header {
    padding: 6px 4px 10px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 10px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 900;
    margin: 0;
    color: #111827;
}

.sidebar-subtitle {
    font-size: 12px;
    opacity: .75;
    margin-top: 4px;
    color: #374151;
}

/* 메뉴 */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
}

.sidebar-menu li {
    margin-bottom: 6px;
}

.sidebar-menu .menu-section {
    padding: 12px 10px 6px;
    font-size: 12px;
    color: #6b7280;
    font-weight: 700;
}

.sidebar-menu a {
    display: block;
    padding: 10px 10px;
    border-radius: 10px;
    color: #111827;
    text-decoration: none;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    transition: background .15s ease, transform .15s ease;
}

.sidebar-menu a:hover {
    background: #f3f4f6;
}

.sidebar-menu a.active,
.sidebar-menu li.active > a {
    background: #e8eefc;
    border-color: #dbeafe;
    color: #2b59ff;
    font-weight: 800;
}

/* NEW 배지 */
.badge-new {
    margin-left: 6px;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 800;
    vertical-align: middle;
}

/* 모바일: 기본 닫힘 + is-open-mobile로 열기 */
@media (max-width: 980px) {
    .sidebar {
        top: 0;
        height: 100vh;
        transform: translateX(-105%);
    }

    .sidebar.is-open-mobile {
        transform: translateX(0);
    }

    .sidebar.is-collapsed {
        transform: translateX(-105%);
    }
}

/* ============================
   PAGES
=============================== */

/* ---- ./pages/dashboard.css ---- */
/* =====================================================================
   📁 dashboard.css — 대시보드 전용 스타일 v4
   ✔ 카드형 위젯 + 그리드 + 모바일 반응형 포함
   ✔ 아침/저녁 브리핑 페이지도 동일 테마 적용
===================================================================== */


/* --------------------------------------------------------------
   🟦 1) 기본 대시보드 전체 레이아웃
-------------------------------------------------------------- */
.dashboard-wrap {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
}


/* --------------------------------------------------------------
   🔳 2) 카드 그리드
-------------------------------------------------------------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}


/* --------------------------------------------------------------
   🟩 3) 위젯 카드 기본 디자인
-------------------------------------------------------------- */
.dashboard-card {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform .15s ease, box-shadow .15s ease;
    cursor: default;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.07);
}

.dashboard-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.dashboard-card .value {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #111;
}

.dashboard-card .desc {
    font-size: 13px;
    color: #777;
}


/* --------------------------------------------------------------
   🔥 4) 통계 유형별 색상 포인트
-------------------------------------------------------------- */
.card-blue {
    border-left: 6px solid #4a82ff;
}

.card-green {
    border-left: 6px solid #2ecc71;
}

.card-orange {
    border-left: 6px solid #f39c12;
}

.card-red {
    border-left: 6px solid #e74c3c;
}


/* --------------------------------------------------------------
   ⏳ 5) 로딩 상태
-------------------------------------------------------------- */
.dashboard-loading {
    text-align: center;
    padding: 30px 10px;
    color: #666;
    font-size: 14px;
}


/* --------------------------------------------------------------
   📊 6) 그래프/표(Card Large)
-------------------------------------------------------------- */
.dashboard-card-large {
    grid-column: span 2;
    background: #fff;
    padding: 24px;
    border-radius: 14px;
    border: 1px solid #e6e6e6;
}

.dashboard-chart-area {
    width: 100%;
    min-height: 230px;
    background: #f5f7fb;
    border-radius: 12px;
}


/* --------------------------------------------------------------
   📱 7) 모바일 최적화 (기본 대시보드)
-------------------------------------------------------------- */
@media (max-width: 780px) {
    .dashboard-card-large {
        grid-column: span 1;
    }
}

@media (max-width: 500px) {
    .dashboard-wrap {
        padding: 16px;
    }

    .dashboard-grid {
        gap: 14px;
    }

    .dashboard-card {
        padding: 16px;
    }

    .dashboard-card .value {
        font-size: 22px;
    }
}


/* ==============================================================
   🌅 8) 아침 브리핑 전용 레이아웃 (dashboard_morning.php)
   - main-area 안에서만 좌측 정렬 + 3열 그리드
   - 가운데 정렬(page-inner 기본) 끄는 게 핵심
=============================================================== */

/* 8-1) 가운데 정렬 끄고 main-area 기준으로 꽉 채우기 */
.page-inner.morning-dashboard {
    max-width: none;
    /* base.css 의 max-width: 1200px 제거 */
    /* margin: 0 auto; 중앙 정렬 제거 */
    padding: 20px 20px 40px;
}

/* 8-2) 아침 브리핑 각 줄(grid) */
.morning-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

/* 8-3) 카드 공통 스타일 (모닝 전용) */
.morning-dashboard .dash-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    padding: 18px 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

/* 경고 카드 (오늘 바로 확인해야 할 것) */
.morning-dashboard .dash-card-warn {
    border-left: 4px solid #ff4b4b;
    background: #fff6f6;
}

/* 돈 요약 카드 */
.morning-dashboard .dash-card-money {
    border-left: 4px solid #2ecc71;
}

/* 카드 헤더 */
.morning-dashboard .dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.morning-dashboard .dash-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.morning-dashboard .dash-subtext {
    font-size: 12px;
    color: #777;
}

/* 작은 칩 / 뱃지 */
.morning-dashboard .dash-chip-danger {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: #ffe5e5;
    color: #c0392b;
    font-size: 11px;
    font-weight: 600;
}

/* 리스트 스타일 */
.morning-dashboard .dash-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.morning-dashboard .dash-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f1f1;
}

.morning-dashboard .dash-list li:last-child {
    border-bottom: 0;
}

.morning-dashboard .dash-list-tight li {
    padding: 4px 0;
}

/* 숫자/태그 스타일 */
.morning-dashboard .dash-num {
    font-weight: 700;
    font-size: 14px;
}

.morning-dashboard .dash-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f3f4ff;
    font-size: 12px;
}

/* 헬퍼 텍스트 */
.morning-dashboard .dash-helper {
    margin-top: 8px;
    font-size: 11px;
    color: #999;
}

.morning-dashboard .dash-helper-right {
    margin-top: 6px;
    text-align: right;
    font-size: 11px;
    color: #aaa;
}

/* 8-4) 지표/메트릭 가로 정렬 블록 */
.morning-dashboard .dash-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 6px;
}

.morning-dashboard .dash-metrics-horizontal {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.morning-dashboard .dash-metrics-sub {
    margin-top: 12px;
}

.morning-dashboard .metric-item {
    border-radius: 10px;
    background: #f8f9ff;
    padding: 10px 12px;
}

.morning-dashboard .metric-label {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}

.morning-dashboard .metric-value {
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

.morning-dashboard .metric-value.metric-total {
    color: #2c3e50;
    font-size: 16px;
}

/* 8-5) 체크리스트 */
.morning-dashboard .dash-checklist {
    list-style: none;
    margin: 0;
    padding-left: 14px;
}

.morning-dashboard .dash-checklist li {
    font-size: 13px;
    padding: 4px 0;
    position: relative;
}

.morning-dashboard .dash-checklist li::before {
    content: "•";
    position: absolute;
    left: -10px;
    color: #4a82ff;
}

/* 8-6) 최근 7일 요약 박스 */
.morning-dashboard .dash-7days {
    margin-top: 8px;
}

/* 8-7) 모바일 레이아웃 (모닝 전용) */
@media (max-width: 1023px) {
    .page-inner.morning-dashboard {
        padding: 16px 12px 28px;
    }

    .morning-row {
        grid-template-columns: 1fr;
    }

    .morning-dashboard .dash-metrics,
    .morning-dashboard .dash-metrics-horizontal {
        grid-template-columns: 1fr;
    }
}.expense-summary-section {
    margin-bottom: 24px;
}

.expense-summary-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.expense-card {
    background: #fff;
    border-radius: 16px;
    padding: 18px 22px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.expense-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
    font-size: 13px;
    color: #666;
}

.expense-card-total {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.expense-card-range {
    font-size: 11px;
    color: #aaa;
}

.expense-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 4px;
}

.expense-summary-table th {
    text-align: left;
    padding: 3px 0;
    color: #777;
    font-weight: 500;
}

.expense-summary-table td {
    text-align: right;
    padding: 3px 0;
    font-weight: 500;
}.kpi7-card {
    margin-top: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.kpi7-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.kpi7-sub {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: #94a3b8;
}

.kpi7-meta {
    font-size: 0.75rem;
    color: #cbd5f5;
}

.kpi7-list {
    margin-top: 8px;
    border-top: 1px solid #eef2f7;
}

.kpi7-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-top: 1px dashed #f1f5f9;
    font-size: 0.9rem;
}

.kpi7-row:first-child {
    border-top: none;
}

.kpi7-label {
    color: #475569;
}

.kpi7-value {
    font-weight: 600;
    color: #111827;
}

/* ---- ./pages/customer.css ---- */
/* =====================================================================
   📁 customer.css — 고객관리(Customer Management) 전용 스타일 v4
   ✔ 리스트 / 상세 / 검색바 / 상태 배지 / 버튼 전용 디자인
   ✔ PC + 모바일 모두 자연스럽게 표시
   ✔ ERP 시스템 루틴에 딱 맞게 최소 + 강력 조합
===================================================================== */


/* --------------------------------------------------------------
   🔵 1) 고객관리 전체 컨테이너
-------------------------------------------------------------- */
.customer-wrap {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}


/* --------------------------------------------------------------
   🔎 2) 검색 영역
-------------------------------------------------------------- */
.customer-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.customer-search input {
    flex: 1;
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    transition: border .2s ease;
}

.customer-search input:focus {
    border-color: #4a82ff;
    background: #fff;
}


/* --------------------------------------------------------------
   🟦 3) 신규등록 버튼
-------------------------------------------------------------- */
.customer-new-btn {
    padding: 10px 18px;
    background: #4a82ff;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: background .15s ease;
}

.customer-new-btn:hover {
    background: #2f6af8;
}


/* --------------------------------------------------------------
   📋 4) 고객 리스트 박스
-------------------------------------------------------------- */
.customer-list {
    margin-top: 15px;
}

.customer-card {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
    border: 1px solid #eee;
}

.customer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.customer-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
}

.customer-card .sub {
    font-size: 14px;
    color: #666;
}


/* --------------------------------------------------------------
   🟨 5) 상태 배지
-------------------------------------------------------------- */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    border-radius: 20px;
    font-weight: 600;
}

.status-active {
    background: #e8f0ff;
    color: #3164ff;
}

.status-stop {
    background: #ffeaea;
    color: #e65252;
}

.status-hold {
    background: #fff5d9;
    color: #d18a00;
}


/* --------------------------------------------------------------
   📄 6) 상세 패널
-------------------------------------------------------------- */
.customer-detail {
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    border: 1px solid #eee;
    margin-top: 20px;
}

.customer-detail h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.customer-detail .field {
    margin-bottom: 14px;
}

.customer-detail .field label {
    font-size: 14px;
    color: #555;
    display: block;
    margin-bottom: 3px;
}

.customer-detail .field div {
    font-size: 15px;
    font-weight: 600;
}


/* --------------------------------------------------------------
   🛠 7) 상세 하단 버튼 영역
-------------------------------------------------------------- */
.customer-detail-actions {
    margin-top: 22px;
    display: flex;
    gap: 10px;
}

.customer-btn-edit {
    padding: 10px 14px;
    background: #4a82ff;
    color: #fff;
    border-radius: 8px;
}

.customer-btn-delete {
    padding: 10px 14px;
    background: #ff4b4b;
    color: #fff;
    border-radius: 8px;
}


/* --------------------------------------------------------------
   📱 8) 모바일 최적화
-------------------------------------------------------------- */
@media (max-width: 600px) {

    .customer-wrap {
        padding: 16px;
    }

    .customer-card {
        padding: 14px;
    }

    .customer-detail {
        padding: 18px;
    }

    .customer-detail-actions {
        flex-direction: column;
        gap: 8px;
    }
}

/* ---- ./pages/project.css ---- */
/* =====================================================================
   📁 dashboard.css — 대시보드 전용 스타일 v5
   ✔ 카드형 위젯 + 그리드 + 모바일 반응형
   ✔ 아침/저녁 브리핑 페이지 공용 스타일 포함
===================================================================== */


/* --------------------------------------------------------------
   🟦 1) 대시보드 전체 레이아웃
-------------------------------------------------------------- */
.dashboard-wrap {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.dashboard-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
}


/* --------------------------------------------------------------
   🔳 2) 카드 그리드
-------------------------------------------------------------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}


/* --------------------------------------------------------------
   🟩 3) 위젯 카드 기본 디자인
-------------------------------------------------------------- */
.dashboard-card {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform .15s ease, box-shadow .15s ease;
    cursor: default;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.07);
}

.dashboard-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.dashboard-card .value {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #111;
}

.dashboard-card .desc {
    font-size: 13px;
    color: #777;
}


/* --------------------------------------------------------------
   🔥 4) 통계 유형별 색상 포인트
-------------------------------------------------------------- */
.card-blue {
    border-left: 6px solid #4a82ff;
}

.card-green {
    border-left: 6px solid #2ecc71;
}

.card-orange {
    border-left: 6px solid #f39c12;
}

.card-red {
    border-left: 6px solid #e74c3c;
}


/* --------------------------------------------------------------
   ⏳ 5) 로딩 상태
-------------------------------------------------------------- */
.dashboard-loading {
    text-align: center;
    padding: 30px 10px;
    color: #666;
    font-size: 14px;
}


/* --------------------------------------------------------------
   📊 6) 그래프/표(Card Large)
-------------------------------------------------------------- */
.dashboard-card-large {
    grid-column: span 2;
    background: #fff;
    padding: 24px;
    border-radius: 14px;
    border: 1px solid #e6e6e6;
}

.dashboard-chart-area {
    width: 100%;
    min-height: 230px;
    background: #f5f7fb;
    border-radius: 12px;
}


/* --------------------------------------------------------------
   📱 7) 모바일 최적화
-------------------------------------------------------------- */
@media (max-width: 780px) {
    .dashboard-card-large {
        grid-column: span 1;
    }
}

@media (max-width: 500px) {
    .dashboard-wrap {
        padding: 16px;
    }

    .dashboard-grid {
        gap: 14px;
    }

    .dashboard-card {
        padding: 16px;
    }

    .dashboard-card .value {
        font-size: 22px;
    }
}


/* =====================================================================
   🌅 Morning / Evening 브리핑 공통 레이아웃
   (/sections/dashboard_morning.php 에서 쓰는 클래스들)
===================================================================== */

/* 페이지 컨테이너 정렬 */
.page-inner.morning-dashboard {
    max-width: 800px;
    padding: 20px 20px 40px;
}

/* 상단 타이틀 */
.page-inner.morning-dashboard .page-header {
    margin-bottom: 18px;
}

.page-inner.morning-dashboard .page-header h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
}

.page-inner.morning-dashboard .page-header p {
    font-size: 13px;
    color: #6b7280;
}

/* 한 줄(Row) */
.morning-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

/* 비용 요약 줄은 한 카드만 크게 */
.morning-row-finance {
    grid-template-columns: minmax(0, 1fr);
}

/* 모바일/태블릿 대응 */
@media (max-width: 1024px) {
    .page-inner.morning-dashboard {
        padding: 16px 12px 30px;
    }

    .morning-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* 카드 공통 (모닝용) */
.morning-dashboard .dash-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

/* 오늘 바로 확인 카드 - 은은한 노랑 */
.morning-dashboard .dash-card-warn {
    background: #fff7e0;
    border: 1px solid #ffe0a6;
}

/* 이번달 비용 카드 - 살짝 파란 톤 */
.morning-dashboard .dash-card-money {
    background: linear-gradient(135deg, #f5f9ff, #ffffff);
    border: 1px solid #dbeafe;
}

/* 카드 헤더 */
.morning-dashboard .dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.morning-dashboard .dash-card-header h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.morning-dashboard .dash-subtext {
    font-size: 12px;
    color: #6b7280;
}

/* Danger Chip */
.morning-dashboard .dash-chip-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-weight: 600;
}

/* 리스트 공통 */
.morning-dashboard .dash-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.morning-dashboard .dash-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    padding: 5px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.morning-dashboard .dash-list li:last-child {
    border-bottom: 0;
}

.morning-dashboard .dash-num {
    font-weight: 700;
}

/* “예: 2건” 같은 태그 느낌 */
.morning-dashboard .dash-tag {
    font-size: 12px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f3f4ff;
    color: #4b5563;
}

/* 체크리스트 */
.morning-dashboard .dash-checklist {
    list-style: disc;
    padding-left: 18px;
    margin: 0;
    font-size: 13px;
}

.morning-dashboard .dash-checklist li+li {
    margin-top: 4px;
}

/* 지표/비용 숫자 묶음 */
.morning-dashboard .dash-metrics {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.morning-dashboard .dash-metrics-horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px 20px;
}

/* 개별 메트릭 */
.morning-dashboard .metric-item {
    min-width: 150px;
}

.morning-dashboard .metric-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 2px;
}

.morning-dashboard .metric-value {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

/* 총 지출 같은 굵은 값 */
.morning-dashboard .metric-total {
    color: #e5533d;
    font-size: 16px;
}

/* 도움말 텍스트 */
.morning-dashboard .dash-helper {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 6px;
}

.morning-dashboard .dash-helper-right {
    text-align: right;
}.task-list,
.checklist {
    padding: 10px;
    background: #fafafa;
    border-radius: 8px;
}

.task-item {
    border-bottom: 1px solid #ddd;
    padding: 8px 0;
}

.task-item:last-child {
    border-bottom: 0;
}

.check-item {
    padding: 4px 0;
}

.empty {
    color: #888;
    font-size: 0.9em;
    text-align: center;
    padding: 8px 0;
}
