@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;800;900&display=swap');

/* ══════════════════════════════════════════════════
   DESIGN TOKENS — 입체 스타일 (Neumorphic 3D)
   배경: 부드러운 블루그레이 / 헤더: 다크 네이비 / 포인트: 남색
   카드·버튼·탭 전부 입체 뉴모픽 효과
══════════════════════════════════════════════════ */
:root {
    --primary:            #0F172A;   /* windowplatform 과 같은 남색 */
    --primary-dark:       #020617;
    --primary-light:      #1E293B;
    --primary-btn-bottom: #020617;
    --secondary:          #3B82F6;
    --secondary-dark:     #2563EB;
    --success:            #16A34A;
    --success-dark:       #16A34A;
    --danger:             #DC2626;
    --danger-dark:        #DC2626;
    --warning:            #F59E0B;
    --warning-dark:       #B45309;
    --info:               #3B82F6;

    /* ── Neumorphic Surface (카드=배경 동일색) ── */
    --bg:   #F8FAFC;
    --bg-2: #F1F5F9;
    --bg-3: #E2E8F0;
    --card: #FFFFFF;

    /* 그림자 두 색깔 */
    --shdw-dark:  rgba(15,23,42,.08);
    --shdw-light: rgba(255,255,255,.9);

    /* 텍스트 */
    --text:       #1E293B;
    --text-sub:   #64748B;
    --text-muted: #94A3B8;

    --border: #E2E8F0;

    /* ── 뉴모픽 그림자 세트 ── */
    --neu-xs: 0 1px 2px rgba(15,23,42,.06);
    --neu-sm: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
    --neu-md: 0 4px 10px rgba(15,23,42,.07), 0 1px 3px rgba(15,23,42,.05);
    --neu-lg: 0 10px 24px rgba(15,23,42,.09), 0 2px 6px rgba(15,23,42,.05);
    --neu-in-xs: inset 0 0 0 1px #E2E8F0;
    --neu-in-sm: inset 0 0 0 1px #E2E8F0;
    --neu-in-md: inset 0 0 0 1px #CBD5E1;

    --radius:    16px;
    --radius-lg: 22px;
    --radius-sm: 10px;
    --header-h:  64px;
}

/* ══════════════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Noto Sans KR', -apple-system, 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 18px;
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════════════
   HEADER — 다크 네이비 프리미엄
══════════════════════════════════════════════════ */
.header {
    background: linear-gradient(135deg, #0F172A 0%, #1A2744 100%);
    padding: 0 20px;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 24px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
}

.header-title {
    font-size: 20px;
    font-weight: 900;
    color: #FFFFFF;
    letter-spacing: -0.5px;
    flex: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-company-bar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    position: sticky;
    top: var(--header-h);
    z-index: 99;
    box-shadow: var(--neu-xs);
}

.header-company {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-sub);
    letter-spacing: 0.3px;
}

.header-icons     { display: flex; align-items: center; gap: 8px; }
.header-icons-row { display: flex; gap: 8px; }

.header-icon {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.90);
    width: 40px; height: 40px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.14s;
    backdrop-filter: blur(4px);
}
.header-icon:hover  { background: rgba(255,255,255,0.22); transform: translateY(-1px); }
.header-icon:active { transform: scale(0.90); }

/* ══════════════════════════════════════════════════
   ADMIN BAR
══════════════════════════════════════════════════ */
.admin-bar {
    background: #0F172A;
    color: rgba(255,255,255,0.70);
    text-align: right;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 700;
}

/* ══════════════════════════════════════════════════
   STATUS BAR
══════════════════════════════════════════════════ */
.today-status-bar {
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px;
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: inset 0 -3px 8px rgba(0,0,0,0.04);
}
.today-status-bar::-webkit-scrollbar { display: none; }

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 15px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: var(--neu-xs);
}
.status-chip.done    { background: #DCFCE7; color: #15803D; }
.status-chip.pending { background: #FEF3C7; color: #92400E; }
.status-chip.info    { background: #DBEAFE; color: #1D4ED8; }
.status-chip.warn    { background: #FFE4E6; color: #BE123C; }

/* ══════════════════════════════════════════════════
   CONTAINER
══════════════════════════════════════════════════ */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 28px 18px 120px;
}

/* ══════════════════════════════════════════════════
   CARDS — 입체 부유 (Neumorphic Raised)
══════════════════════════════════════════════════ */
.card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--neu-md);
    padding: 24px 22px;
    margin-bottom: 18px;
    border: none;
    transition: box-shadow 0.25s cubic-bezier(0.4,0,0.2,1),
                transform   0.25s cubic-bezier(0.4,0,0.2,1);
}
.card:hover {
    box-shadow: var(--neu-lg);
    transform: translateY(-4px);
}

.card-title {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    letter-spacing: -0.4px;
}
.card-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--shdw-dark) 0%, transparent 100%);
    margin-left: 6px;
    border-radius: 2px;
}
.card-title .icon { font-size: 22px; }

/* ══════════════════════════════════════════════════
   CAT TABS — 입체 누름 버튼 (3D Press Effect)
══════════════════════════════════════════════════ */
.cat-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 22px;
    animation: fadeInUp 0.25s ease;
}

.cat-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 22px 12px;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4,0,0.2,1);
    text-align: center;
    min-height: 100px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    background: var(--bg);
    border: none;
    color: var(--text-sub);
    letter-spacing: -0.2px;
    box-shadow: var(--neu-md);
    position: relative;
    overflow: hidden;
}

/* 하단 오렌지 강조 바 */
.cat-tab::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 50%; height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-dark));
    border-radius: 3px 3px 0 0;
    transition: transform 0.22s cubic-bezier(0.4,0,0.2,1);
}

.cat-tab::before {
    font-size: 34px;
    line-height: 1;
    display: block;
    transition: transform 0.20s cubic-bezier(0.4,0,0.2,1);
    filter: drop-shadow(2px 3px 5px rgba(0,0,0,0.14));
}

.cat-tab[data-key="policy"]::before    { content: '📜'; }
.cat-tab[data-key="safety"]::before    { content: '🛡️'; }
.cat-tab[data-key="health"]::before    { content: '💊'; }
.cat-tab[data-key="education"]::before { content: '🎓'; }
.cat-tab[data-key="etc"]::before       { content: '📁'; }
.cat-tab[data-key="absent"]::before    { content: '👥'; }
.cat-tab[data-key="transport"]::before { content: '🚚'; }

/* 눌림 (클릭 시) */
.cat-tab:active {
    box-shadow: var(--neu-in-md);
    transform: translateY(2px);
}

/* 호버 — 올라오는 효과 */
.cat-tab:hover {
    color: var(--primary);
    box-shadow: var(--neu-lg);
    transform: translateY(-4px);
}
.cat-tab:hover::before { transform: scale(1.18) translateY(-2px); }
.cat-tab:hover::after  { transform: translateX(-50%) scaleX(1); }

/* 활성 — 눌린 상태 고정 */
.cat-tab.active {
    box-shadow: var(--neu-in-md);
    color: var(--primary);
    transform: none;
    font-weight: 900;
}
.cat-tab.active::before {
    filter: drop-shadow(2px 3px 5px rgba(249,115,22,0.30));
}
.cat-tab.active::after  { transform: translateX(-50%) scaleX(1); }

/* ══════════════════════════════════════════════════
   ABSENT SUB-TABS
══════════════════════════════════════════════════ */
.absent-tab-btn {
    display: block;
    width: 100%;
    padding: 14px 0;
    background: var(--bg);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-sub);
    transition: all 0.18s cubic-bezier(0.4,0,0.2,1);
    text-align: center;
    box-shadow: var(--neu-sm);
}
.absent-tab-btn:hover  { color: var(--primary); box-shadow: var(--neu-md); transform: translateY(-2px); }
.absent-tab-btn:active { box-shadow: var(--neu-in-sm); transform: translateY(1px); }
.absent-tab-btn.active { box-shadow: var(--neu-in-sm); color: var(--primary); font-weight: 900; }

/* ══════════════════════════════════════════════════
   SUB-TABS — Segmented 3D Control (오목한 트레이)
══════════════════════════════════════════════════ */
.sub-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg);
    box-shadow: var(--neu-in-sm);
    border-radius: 50px;
    padding: 5px;
    border: none;
}
.sub-tabs::-webkit-scrollbar { display: none; }

.sub-tab {
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4,0,0.2,1);
    color: var(--text-sub);
    white-space: nowrap;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.sub-tab:hover  { color: var(--primary); }
.sub-tab:active { transform: scale(0.96); }
.sub-tab.active {
    background: var(--bg);
    box-shadow: var(--neu-sm);
    color: var(--primary);
    font-weight: 900;
}

/* ══════════════════════════════════════════════════
   BUTTONS — 물리적 3D 누름 버튼
══════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 28px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: all 0.12s cubic-bezier(0.4,0,0.2,1);
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: -0.2px;
    position: relative;
}

/* 오렌지 primary — 물리 3D 버튼 */
.btn-primary {
    background: linear-gradient(160deg, var(--primary-light) 0%, var(--primary) 100%);
    color: white;
    box-shadow:
        0 2px 0 var(--primary-btn-bottom),
        0 9px 24px rgba(15,23,42,0.38);
    text-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 3px 0 var(--primary-btn-bottom),
        0 14px 32px rgba(15,23,42,0.52);
}
.btn-primary:active {
    transform: translateY(4px);
    box-shadow:
        0 1px 0 var(--primary-btn-bottom),
        0 4px 10px rgba(15,23,42,0.22);
}

.btn-success {
    background: linear-gradient(160deg, #4ADE80 0%, #22C55E 100%);
    color: white;
    box-shadow: 0 5px 0 #15803D, 0 9px 22px rgba(34,197,94,0.38);
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.btn-success:hover  { transform: translateY(-2px); box-shadow: 0 7px 0 #15803D, 0 14px 30px rgba(34,197,94,0.50); }
.btn-success:active { transform: translateY(4px);  box-shadow: 0 1px 0 #15803D, 0 4px 10px rgba(34,197,94,0.20); }

.btn-danger {
    background: linear-gradient(160deg, #F87171 0%, #EF4444 100%);
    color: white;
    box-shadow: 0 5px 0 #B91C1C, 0 9px 22px rgba(239,68,68,0.38);
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.btn-danger:hover  { transform: translateY(-2px); box-shadow: 0 7px 0 #B91C1C, 0 14px 30px rgba(239,68,68,0.50); }
.btn-danger:active { transform: translateY(4px);  box-shadow: 0 1px 0 #B91C1C, 0 4px 10px rgba(239,68,68,0.20); }

.btn-warning {
    background: linear-gradient(160deg, #FCD34D 0%, #F59E0B 100%);
    color: white;
    box-shadow: 0 5px 0 #B45309, 0 9px 22px rgba(245,158,11,0.38);
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.btn-warning:hover  { transform: translateY(-2px); box-shadow: 0 7px 0 #B45309, 0 14px 30px rgba(245,158,11,0.50); }
.btn-warning:active { transform: translateY(4px);  box-shadow: 0 1px 0 #B45309, 0 4px 10px rgba(245,158,11,0.20); }

.btn-outline {
    background: var(--bg);
    color: var(--primary);
    box-shadow: var(--neu-sm);
}
.btn-outline:hover  { box-shadow: var(--neu-md); transform: translateY(-2px); }
.btn-outline:active { box-shadow: var(--neu-in-sm); transform: translateY(0); }

.btn-block { width: 100%; margin-top: 4px; }
.btn:disabled { opacity: 0.38; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-md { padding: 12px 22px; font-size: 15px; }

.sig-actions, .file-actions, .photo-preview + div { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ══════════════════════════════════════════════════
   FORMS — 오목한 뉴모픽 입력창
══════════════════════════════════════════════════ */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-sub);
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: var(--radius);
    font-size: 18px;
    font-family: inherit;
    transition: all 0.20s;
    background: var(--bg);
    color: var(--text);
    box-shadow: var(--neu-in-sm);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    box-shadow: var(--neu-in-md), 0 0 0 3px rgba(249,115,22,0.12);
}
.form-select option { background: #EDF2F7; color: var(--text); }
.form-textarea      { resize: vertical; min-height: 90px; }

/* ══════════════════════════════════════════════════
   FILE LIST
══════════════════════════════════════════════════ */
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border: none;
    border-radius: var(--radius);
    margin-bottom: 10px;
    transition: all 0.20s cubic-bezier(0.4,0,0.2,1);
    background: var(--bg);
    box-shadow: var(--neu-sm);
}
.file-item:hover { box-shadow: var(--neu-md); transform: translateY(-2px); }

.file-name {
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text);
    flex: 1;
    transition: color 0.14s;
}
.file-name:hover { color: var(--primary); }
.file-actions    { display: flex; gap: 7px; }

/* ══════════════════════════════════════════════════
   LIST ITEMS
══════════════════════════════════════════════════ */
.list-item {
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.20s cubic-bezier(0.4,0,0.2,1);
    background: var(--bg);
    border: none;
    box-shadow: var(--neu-sm);
    -webkit-tap-highlight-color: transparent;
}
.list-item:hover  { box-shadow: var(--neu-md); transform: translateY(-3px); }
.list-item:active { box-shadow: var(--neu-in-sm); transform: translateY(0); }

.list-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.list-item-title  { font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: -0.3px; }
.list-item-info   { font-size: 14px; color: var(--text-sub); margin-top: 2px; }

/* ══════════════════════════════════════════════════
   STATUS BADGES
══════════════════════════════════════════════════ */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 13px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.2px;
    box-shadow: var(--neu-xs);
}
.status-waiting  { background: #FEF9C3; color: #854D0E; }
.status-worker   { background: #DBEAFE; color: #1E40AF; }
.status-admin    { background: #EDE9FE; color: #5B21B6; }
.status-safety   { background: #DCFCE7; color: #15803D; }
.status-director { background: #FFEDD5; color: #C2410C; }
.status-ceo      { background: #FEE2E2; color: #B91C1C; }
.status-done     { background: #DCFCE7; color: #15803D; }

/* ══════════════════════════════════════════════════
   FLOW STEPS
══════════════════════════════════════════════════ */
.flow-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 22px;
    flex-wrap: wrap;
    padding: 18px;
    background: var(--bg);
    border-radius: var(--radius);
    border: none;
    box-shadow: var(--neu-in-sm);
}
.flow-step {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 800;
    background: var(--bg);
    color: var(--text-sub);
    border: none;
    box-shadow: var(--neu-xs);
    position: relative;
    transition: all 0.2s;
}
.flow-step.done    { background: #DCFCE7; color: #15803D; box-shadow: 3px 3px 8px #BFD8C5, -3px -3px 8px #FFFFFF; }
.flow-step.current {
    background: linear-gradient(160deg, var(--primary-light) 0%, var(--primary) 100%);
    color: white;
    box-shadow: 0 4px 0 var(--primary-btn-bottom), 0 8px 22px rgba(15,23,42,0.42);
    animation: pulse-3d 2s infinite;
    text-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.flow-step.pending { background: var(--bg); color: var(--text-muted); box-shadow: var(--neu-in-xs); }

.flow-step.done::after {
    content: '✓';
    position: absolute;
    top: -7px; right: -5px;
    width: 18px; height: 18px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(34,197,94,0.45);
}

.flow-arrow {
    width: 20px; height: 2px;
    background: var(--shdw-dark);
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin: 0 2px;
}
.flow-arrow::after {
    content: '';
    position: absolute;
    right: -4px; top: 50%;
    transform: translateY(-50%);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid var(--text-muted);
}

@keyframes pulse-3d {
    0%,100% { box-shadow: 0 4px 0 var(--primary-btn-bottom), 0 8px 22px rgba(15,23,42,0.42); }
    50%      { box-shadow: 0 4px 0 var(--primary-btn-bottom), 0 14px 34px rgba(15,23,42,0.62), 0 0 0 6px rgba(249,115,22,0.12); }
}

/* ══════════════════════════════════════════════════
   SIGNATURE
══════════════════════════════════════════════════ */
.sig-canvas {
    width: 100%;
    height: 150px;
    border: none;
    border-radius: var(--radius);
    cursor: crosshair;
    touch-action: none;
    background: var(--bg);
    transition: box-shadow 0.18s;
    box-shadow: var(--neu-in-md);
}
.sig-canvas:hover { box-shadow: var(--neu-in-md), 0 0 0 3px rgba(249,115,22,0.15); }
.sig-actions      { display: flex; gap: 8px; margin-top: 10px; }

/* ══════════════════════════════════════════════════
   PHOTO UPLOAD
══════════════════════════════════════════════════ */
.photo-upload-area {
    border: 2px dashed rgba(249,115,22,0.28);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
    box-shadow: var(--neu-in-sm);
}
.photo-upload-area:hover {
    border-color: rgba(249,115,22,0.55);
    box-shadow: var(--neu-in-md), 0 0 0 3px rgba(249,115,22,0.08);
}
.photo-upload-area .icon { font-size: 40px; margin-bottom: 8px; }
.photo-preview           { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.photo-thumb {
    position: relative;
    width: 90px; height: 90px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--neu-sm);
    transition: all 0.16s;
}
.photo-thumb:hover { transform: scale(1.06); box-shadow: var(--neu-md); }
.photo-thumb img   { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb .remove-btn {
    position: absolute;
    top: 4px; right: 4px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px; height: 22px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    box-shadow: 0 2px 0 var(--danger-dark), 0 4px 8px rgba(239,68,68,0.35);
}

/* ══════════════════════════════════════════════════
   WORKER GRID
══════════════════════════════════════════════════ */
.worker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}
.worker-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    background: var(--bg);
    border: none;
    box-shadow: var(--neu-xs);
    transition: all 0.16s;
    color: var(--text-sub);
}
.worker-chip:hover  { box-shadow: var(--neu-sm); color: var(--text); transform: translateY(-1px); }
.worker-chip.signed { background: #DCFCE7; color: #15803D; font-weight: 800; box-shadow: 3px 3px 8px #BBDFC9, -3px -3px 8px #FFFFFF; }
.worker-chip .check { color: var(--success-dark); font-weight: 900; }

/* ══════════════════════════════════════════════════
   MODAL — 부드러운 시트
══════════════════════════════════════════════════ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}
.modal-overlay.show { display: flex; }

.modal {
    background: var(--bg);
    border-radius: 28px 28px 0 0;
    width: 100%;
    max-width: 640px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 10px 24px 44px;
    position: relative;
    box-shadow: 0 -8px 48px rgba(0,0,0,0.24), var(--neu-md);
    animation: sheet-up 0.30s cubic-bezier(0.32,0.72,0,1);
}
.modal::before {
    content: '';
    display: block;
    width: 44px; height: 5px;
    background: var(--shdw-dark);
    border-radius: 3px;
    margin: 12px auto 20px;
    box-shadow: var(--neu-xs);
}

@keyframes sheet-up {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 22px; right: 20px;
    background: var(--bg);
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-sub);
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.14s;
    font-weight: 800;
    box-shadow: var(--neu-sm);
}
.modal-close:hover  { background: #FEE2E2; color: var(--danger); box-shadow: 0 2px 0 var(--danger-dark), var(--neu-xs); }
.modal-close:active { transform: translateY(2px); box-shadow: var(--neu-in-sm); }

.modal-title {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 20px;
    padding-right: 44px;
    color: var(--text);
    letter-spacing: -0.4px;
}

/* ══════════════════════════════════════════════════
   CHECK ITEMS
══════════════════════════════════════════════════ */
.check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    border-bottom: 1px solid var(--border);
    transition: all 0.14s;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
}
.check-item:hover                  { background: var(--bg-2); box-shadow: var(--neu-in-xs); }
.check-item input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--primary); }
.check-item label                  { font-size: 17px; flex: 1; font-weight: 500; }

/* ══════════════════════════════════════════════════
   LOADING
══════════════════════════════════════════════════ */
.loading { text-align: center; padding: 44px; color: var(--text-sub); font-size: 18px; }
.spinner {
    display: inline-block;
    width: 44px; height: 44px;
    border: 4px solid var(--shdw-dark);
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    box-shadow: var(--neu-xs);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════ */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 300; }
.toast {
    background: var(--bg);
    color: var(--text);
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
    animation: slideIn 0.28s ease;
    max-width: 320px;
    box-shadow: var(--neu-lg);
    border-left: 4px solid var(--primary);
}
.toast.success { background: #F0FDF4; border-left-color: var(--success-dark); box-shadow: 8px 8px 20px #BFD8C0, -8px -8px 20px #FFFFFF; }
.toast.error   { background: #FEF2F2; border-left-color: var(--danger);       box-shadow: 8px 8px 20px #D8BFBF, -8px -8px 20px #FFFFFF; }

@keyframes slideIn {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}

/* ══════════════════════════════════════════════════
   DETAIL SECTION
══════════════════════════════════════════════════ */
.detail-section {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 14px;
    border: none;
    box-shadow: var(--neu-in-sm);
}
.detail-section h4 { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 10px; }

.content-box {
    background: var(--bg);
    border: none;
    border-radius: var(--radius-sm);
    padding: 16px;
    font-size: 17px;
    line-height: 1.8;
    white-space: pre-wrap;
    color: var(--text-sub);
    box-shadow: var(--neu-in-sm);
}

.divider {
    height: 2px;
    background: linear-gradient(90deg, var(--shdw-dark) 0%, transparent 100%);
    border-radius: 2px;
    margin: 24px 0;
}

/* ══════════════════════════════════════════════════
   VIEW TOGGLE
══════════════════════════════════════════════════ */
.view        { display: none; }
.view.active { display: block; }

/* ══════════════════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════════════════ */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: var(--shdw-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ══════════════════════════════════════════════════
   LOGIN MODAL
══════════════════════════════════════════════════ */
#adminAuthModal { align-items: center; padding: 24px; }
#adminAuthModal .modal {
    border-radius: var(--radius-lg);
    animation: modal-center-in 0.26s cubic-bezier(0.32,0.72,0,1);
    max-width: 360px;
}
@keyframes modal-center-in {
    from { transform: scale(0.90) translateY(16px); opacity: 0; }
    to   { transform: scale(1)    translateY(0);    opacity: 1; }
}

/* ══════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cat-tabs          { animation: fadeInUp 0.26s ease; }
.card              { animation: fadeInUp 0.30s ease backwards; }
.card:nth-child(1) { animation-delay: 0.04s; }
.card:nth-child(2) { animation-delay: 0.08s; }
.card:nth-child(3) { animation-delay: 0.12s; }
.card:nth-child(4) { animation-delay: 0.16s; }

/* HIDDEN */
#tbmListCard,#diaryListCard,#permitListCard,#inspectListCard,#riskListCard { display: none !important; }

/* ══════════════════════════════════════════════════
   DESKTOP
══════════════════════════════════════════════════ */
@media (min-width: 900px) {
    .container     { padding: 30px 36px 90px; }
    .cat-tabs      { grid-template-columns: repeat(4, 1fr); }
    .modal         { border-radius: var(--radius-lg); max-height: 82vh; }
    .modal-overlay { align-items: center; padding: 24px; }
    @keyframes sheet-up {
        from { transform: scale(0.93) translateY(20px); opacity: 0; }
        to   { transform: scale(1)    translateY(0);    opacity: 1; }
    }
}

/* ══════════════════════════════════════════════════
   MOBILE — 그림자 크기 조정
══════════════════════════════════════════════════ */
@media (max-width: 600px) {
    :root {
        --neu-xs: 0 1px 2px rgba(15,23,42,.06);
        --neu-sm: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
        --neu-md: 0 4px 10px rgba(15,23,42,.07), 0 1px 3px rgba(15,23,42,.05);
        --neu-lg: 0 10px 24px rgba(15,23,42,.09), 0 2px 6px rgba(15,23,42,.05);
        --neu-in-xs: inset 0 0 0 1px #E2E8F0;
        --neu-in-sm: inset 0 0 0 1px #E2E8F0;
        --neu-in-md: inset 0 0 0 1px #CBD5E1;
    }
    body            { font-size: 17px; }
    .container      { padding: 16px 14px 110px; }
    .card           { padding: 20px 16px; margin-bottom: 14px; }
    .card-title     { font-size: 20px; }
    .worker-grid    { grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); }
    .photo-thumb    { width: 80px; height: 80px; }
    .flow-steps     { padding: 10px; gap: 4px; }
    .flow-step      { padding: 6px 11px; font-size: 12px; }
    .flow-arrow     { width: 12px; }
    .btn            { padding: 13px 22px; font-size: 16px; }
    .btn-sm         { padding: 8px 14px; font-size: 13px; }
    .cat-tab        { padding: 20px 10px; font-size: 15px; min-height: 92px; }
    .cat-tab::before   { font-size: 30px; }
    .list-item-title   { font-size: 17px; }
    .status-badge      { font-size: 12px; padding: 4px 10px; }
    .header-title      { font-size: 18px; }
    .sub-tab           { font-size: 14px; padding: 9px 15px; }
    .cat-tabs          { gap: 12px; }
}
