
    /* 디자인 코드 */
    body, input, select, button, textarea { margin: 0; font-family: Arial, sans-serif; color: #0f172a; }
    body { background: #f3f6fb; font-size: 14px; }
    .wrap { width: 100%; max-width: 100%; margin: 0 auto; padding: 20px; box-sizing: border-box; }

.date-break-cell{
    white-space: normal;
    line-height: 1.35;
}

.id-break-cell{
    white-space: normal;
    line-height: 1.3;
}

      
    .topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
    h1 { margin: 0; font-size: 28px; font-weight: 800; color: #0b1f44; }

    .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border: none; border-radius: 12px; text-decoration: none; font-weight: 800; cursor: pointer; font-size: 14px; box-sizing: border-box; white-space: nowrap; }
    .link-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
    .section { background: #fff; border-radius: 20px; padding: 18px; box-shadow: 0 8px 24px rgba(0,0,0,.08); margin-bottom: 18px; }
    .section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
    .section-title { font-size: 21px; font-weight: 800; color: #0b1f44; } .section-title .hint { font-size: 15px; font-weight: 700; color: #2563eb; margin-left: 8px; }

    .inline-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
    .search-box { margin-bottom: 12px; } .search-box input { width: 100%; height: 46px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 0 12px; box-sizing: border-box; font-size: 15px; }
    .filters { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 12px; }
    .filter-item label { display: block; font-size: 13px; color: #475569; font-weight: 700; margin-bottom: 6px; }
    .filter-item input, .filter-item select { width: 100%; height: 44px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 0 10px; box-sizing: border-box; font-size: 15px; background: #fff; }
    .filter-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }

    .chart-box { position: relative; width: 100%; height: 360px; margin-bottom: 18px; padding: 12px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fcfdff; box-sizing: border-box; }
 /* 👇 탭 버튼들이 한 줄로 나란히 서게 정렬 */
    .period-row, .mode-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
    
    /* 👇 탭 버튼 모양 통일 (둥근 사각형, 높이 36px 고정) */
    .period-btn, .mode-btn { 
        height: 36px; padding: 0 16px; border: none; border-radius: 8px !important; 
        background: #e2e8f0; color: #334155; font-weight: 800; cursor: pointer; font-size: 13px; 
        display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; margin: 0;
    }
    
    /* 👇 (이게 바로 새로 추가된 녀석입니다!) 우측 조연 버튼들 크기 완벽 통일 */
    .btn-sm { 
        height: 36px !important; padding: 0 14px !important; font-size: 13px !important; 
        border-radius: 8px !important; display: inline-flex !important; 
        align-items: center; justify-content: center; box-sizing: border-box; white-space: nowrap;
    }


    .summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
    .kpi-card { border: 1px solid #e5e7eb; border-radius: 16px; padding: 16px; background: #fcfdff; }
    .kpi-title { font-size: 14px; font-weight: 800; color: #475569; margin-bottom: 10px; } .kpi-line { font-size: 16px; line-height: 1.9; } .kpi-line b { color: #0b1f44; }

    .table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { width: 100%; min-width: 950px; border-collapse: collapse; table-layout: fixed; }
    th, td { padding: 10px 6px; border-bottom: 1px solid #e5e7eb; vertical-align: middle; text-align: center; font-size: 13px; box-sizing: border-box; word-break: break-all; white-space: normal; }
    th { background: #eef4ff; font-weight: 800; color: #1e3a8a; word-break: keep-all; cursor: pointer; user-select: none; font-size: 14px; }
    th.sort-asc::after { content:" ▲"; font-size:11px; } th.sort-desc::after { content:" ▼"; font-size:11px; }
    .clickable { cursor: pointer; } .clickable:hover { background: #f8fbff; }
    .empty { padding: 24px; text-align: center; color: #64748b; font-weight: 700; font-size: 15px; }
   /* 🔵 1. 메인 핵심 버튼 (홈, 등록, 새로고침, 조회) */
    .btn-dark, .btn-green, .btn-blue, .btn-red,
    #refreshBtn, #openInputBtn, #applyBtn, a[href="index.html"].btn { 
        background: #0E306D !important; 
        color: #ffffff !important; 
        border: 1px solid #0E306D !important; 
        font-weight: 800 !important; /* 👈 두께 800으로 통일! */
        transition: all 0.2s ease; 
    }
    .btn-dark:hover, .btn-green:hover, .btn-blue:hover, .btn-red:hover,
    #refreshBtn:hover, #openInputBtn:hover, #applyBtn:hover, a[href="index.html"].btn:hover { 
        background: #09204a !important; 
        border-color: #09204a !important; 
        box-shadow: 0 4px 10px rgba(14, 48, 109, 0.25) !important; 
        transform: translateY(-1px); 
    }

    /* ⚪ 2. 서브 보조 버튼 (초기화, 접기, 엑셀 등) - 튀지 않는 차분한 회색 */
    .btn-light, #resetBtn, .action-btn { 
        background: #e2e8f0 !important; 
        color: #334155 !important; 
        border: none !important; 
        font-weight: 800 !important; /* 👈 여기도 700에서 800으로 수정! */
        transition: all 0.2s ease; 
    }
    .btn-light:hover, #resetBtn:hover, .action-btn:hover { 
        background: #cbd5e1 !important; 
        color: #0f172a !important;
    }

    /* 🔵 3. 활성화된 탭 버튼 (전체/SWING, 당월/금주 등) */
    .period-btn.active, .mode-btn.active { 
        background: #0E306D !important; 
        color: #ffffff !important; 
        border-color: #0E306D !important; 
        font-weight: 800 !important; /* 👈 여기도 두께 800 보장! */
    }

    #rawTable th:nth-child(1), #rawTable td:nth-child(1) { width: 9%; }
    #rawTable th:nth-child(2), #rawTable td:nth-child(2) { width: 8%; }
    #rawTable th:nth-child(3), #rawTable td:nth-child(3) { width: 8%; }
    #rawTable th:nth-child(4), #rawTable td:nth-child(4) { width: 10%; }
    #rawTable th:nth-child(5), #rawTable td:nth-child(5) { width: 8%; }
    #rawTable th:nth-child(6) { width: 19%; text-align: center; }
    #rawTable td:nth-child(6) { width: 19%; text-align: left; font-size: 12px; padding: 10px 8px; }
    #rawTable th:nth-child(7), #rawTable td:nth-child(7) { width: 8%; }
    #rawTable th:nth-child(8), #rawTable td:nth-child(8) { width: 9%; }
    #rawTable th:nth-child(9), #rawTable td:nth-child(9) { width: 10%; }
    #rawTable th:nth-child(10), #rawTable td:nth-child(10) { width: 11%; }

/* 사전승인리스트 열 너비 최적화 (총 10칸) */
    #approvalTable th:nth-child(1) { width: 10%; } /* 식별번호 */
    #approvalTable th:nth-child(2) { width: 9%; }  /* 등록일 */
    #approvalTable th:nth-child(3) { width: 9%; }  /* 작업일 */
    #approvalTable th:nth-child(4) { width: 9%; }  /* 소속담당 */
    #approvalTable th:nth-child(5) { width: 9%; }  /* 소속지점 */
    #approvalTable th:nth-child(6) { width: 9%; }  /* 작업구성원 */
    #approvalTable th:nth-child(7) { width: 9%; }  /* 관리감독자 */
    #approvalTable th:nth-child(8) { width: 9%; }  /* 작업구분 */
    #approvalTable th:nth-child(9) { width: 9%; }  /* 승인방식 */
    #approvalTable th:nth-child(10) { width: 18%; } /* SWING 승주 작업 */

    .center-cell { text-align: center !important; vertical-align: middle !important; }
    .center-cell > div, .center-cell > span { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 34px; line-height: 1.3; }

    .input-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; height: 34px; border: none; border-radius: 10px; padding: 0 12px; font-weight: 800; cursor: pointer; background: #e0ecff; color: #1d4ed8; font-size: 13px; box-sizing: border-box; }
    .input-btn:hover { background:#cfe0ff; }
    .select-inline { display: inline-flex; align-items: center; justify-content: center; width: 100%; max-width: 88px; height: 34px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 700; padding: 0 8px; box-sizing: border-box; }

    .badge { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 800; box-sizing: border-box; text-align: center; white-space: nowrap; }
    .badge-green { background: #dcfce7; color: #166534; }
    .badge-red { background: #fee2e2; color: #991b1b; }
    .badge-gray { background: #e5e7eb; color: #374151; }
    .badge-blue { background: #dbeafe; color: #1d4ed8; }

    .clickable-text { cursor: pointer; color: #1d4ed8; text-decoration: underline; font-weight: 700; }
    .clickable-text:hover { color: #1e3a8a; }
    .hover-scale { cursor: pointer; transition: transform 0.1s; display: inline-block; }
    .hover-scale:hover { transform: scale(1.03); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

    .filter-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: #eef4ff; color: #1d4ed8; font-size: 13px; font-weight: 800; }
    .collapsed { display: none !important; }
    .pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; align-items: center; justify-content: center; }
    .page-btn { border: none; border-radius: 8px; padding: 8px 12px; cursor: pointer; font-weight: 800; background: #f1f5f9; color: #475569; font-size: 14px; transition: 0.2s; }
    .page-btn:hover { background: #e2e8f0; } .page-btn.active { background: #0f172a; color: #fff; }

    .modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); align-items: center; justify-content: center; padding: 20px; z-index: 9999; }
    .modal { width: 100%; max-width: 980px; max-height: 90vh; overflow-y: auto; background: #fff; border-radius: 18px; padding: 24px; box-sizing: border-box; }
    .modal h3 { margin: 0 0 16px 0; font-size: 22px; color: #0b1f44; }

    .detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
    .detail-item { font-size: 14px; line-height: 1.6; background: #f8fafc; padding: 12px; border-radius: 10px; border: 1px solid #e2e8f0; }
    .detail-item b { display: block; color: #1e3a8a; margin-bottom: 4px; } .detail-item.full { grid-column: 1 / -1; }

    .photo-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
    .photo-thumb { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid #cbd5e1; cursor: pointer; background: #f8fafc; }

    .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .form-group label { display: block; font-size: 14px; font-weight: 800; margin-bottom: 6px; }
    .form-group select, .form-group textarea { width: 100%; box-sizing: border-box; border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px; font-size: 14px; background: #fff; }
    .form-group textarea { min-height: 95px; resize: vertical; }

    .reason-list { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
    .reason-item { border: 1px solid #dbe3f0; border-radius: 12px; padding: 14px; background: #fff; cursor: pointer; transition: 0.2s; }
    .reason-item:hover { border-color: #93c5fd; } .reason-item.active { border-color: #2563eb; background: #eff6ff; }
    .reason-head { display: flex; align-items: flex-start; gap: 10px; }
    .reason-title { font-size: 15px; font-weight: 800; color: #0f172a; margin-bottom: 4px; }
    .reason-desc { font-size: 13px; color: #475569; line-height: 1.6; }
    .reason-radio { margin-top: 3px; cursor: pointer; }
    .sub-box { margin-top: 12px; padding: 14px; border: 1px solid #dbe3f0; border-radius: 12px; background: #f8fbff; }
    .sub-box-title { font-size: 14px; font-weight: 800; color: #1e3a8a; margin-bottom: 8px; }
    .notice-box { margin-top: 12px; padding: 12px; border-radius: 12px; background: #f8fafc; border: 1px solid #e5e7eb; font-size: 14px; line-height: 1.6; color: #334155; }

    @media (max-width: 1100px) { .summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
    @media (max-width: 900px) { .filters { grid-template-columns: repeat(2, minmax(0,1fr)); } .detail-grid, .form-grid { grid-template-columns: 1fr; } }
    @media (max-width: 640px) { .filters { grid-template-columns: 1fr; } .summary-grid { grid-template-columns: 1fr; } .chart-box { height: 280px; } .wrap { padding: 12px; } table { min-width: 900px; } th, td { padding: 8px 4px; font-size: 12px; } }

   /* --- style.css 맨 하단 수정 코드 --- */

/* 뱃지 및 상태 버튼 글씨 수집 중앙 정렬 */
.badge, .btn, .action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    vertical-align: middle;
} /* 👈 여기에 닫는 괄호가 빠져있었습니다! */

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.empty {
    animation: pulse 1.5s infinite;
    font-weight: bold;
    color: #6b7280;
    text-align: center;
    padding: 20px;
}

/* --- 차트/버튼/표 겹침 방지 추가 --- */
.chart-box {
    position: relative;
    width: 100%;
    height: 420px;
    min-height: 420px;
    margin-bottom: 28px;
    overflow: hidden;
}

#teamChart {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

#teamPeriodButtons,
#branchPeriodButtons {
    position: relative;
    z-index: 2;
    margin-bottom: 12px;
}

.table-wrap,
.dashboard-table-wrap {
    margin-top: 20px;
}

#chartLoading {
  pointer-events: none;
}

#chartLoading[style*="display: none"] {
  visibility: hidden;
}