
  * { 
    box-sizing: border-box; 
    font-family: 'Pretendard', 'Malgun Gothic', -apple-system, sans-serif; 
    -webkit-print-color-adjust: exact !important; 
    print-color-adjust: exact !important; 
  }
  
  :root {
    --bg-dark: #0b0f19;
    --card-dark: #121826;
    --card-border: #1e293b;
    --sidebar-bg: #0d1322;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
  }

  body { 
    margin: 0; 
    padding: 0; 
    background-color: var(--bg-dark); 
    color: var(--text-main);
    display: flex; 
    min-height: 100vh;
    width: 100vw;
    overflow-x: hidden;
  }

  .app-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
  }

  .sidebar {
    width: 240px;
    min-width: 240px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
  }
  .brand-box { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 20px; }
  .brand-icon { font-size: 24px; background: #1e293b; width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; border: 1px solid #334155; }
  .brand-text-title { font-size: 15px; font-weight: 900; color: #ffffff; letter-spacing: -0.3px; }
  .brand-text-sub { font-size: 11px; color: #38bdf8; font-weight: bold; margin-top: 2px; }

  .nav-group { display: flex; flex-direction: column; gap: 5px; flex: 1; }
  .nav-item {
    display: flex; align-items: center; gap: 10px; padding: 11px 12px; color: #94a3b8; font-size: 13px; font-weight: 600; border-radius: 8px; cursor: pointer; border: none; background: transparent; width: 100%; text-align: left; transition: all 0.15s;
  }
  .nav-item:hover { background: #1e293b; color: #f8fafc; }
  .nav-item.active { background: #1e3a8a; color: #60a5fa; font-weight: 800; }
  .nav-item.active::after { content: "●"; margin-left: auto; font-size: 8px; color: #60a5fa; }

  .user-profile-bottom { padding: 12px; background: #1e293b; border-radius: 8px; display: flex; flex-direction: column; gap: 8px; margin-top: auto; }

  /* 🖥️ 대시보드 본문 영역: 우측 끝까지 100% 꽉 찬 레이아웃 */
  .main-area { 
    flex: 1; 
    width: calc(100% - 240px);
    display: flex; 
    flex-direction: column; 
    overflow-y: auto; 
    min-height: 100vh; 
    background: var(--bg-dark); 
  }
  
  .top-header { 
    background: var(--card-dark); 
    border-bottom: 1px solid var(--card-border); 
    padding: 12px 24px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    width: 100%;
    flex-wrap: wrap; 
    gap: 10px; 
  }
  .site-selector { background: #1e293b; color: #38bdf8; border: 1px solid #334155; padding: 7px 12px; border-radius: 6px; font-size: 13.5px; font-weight: 800; cursor: pointer; outline: none; }
  .date-selector { background: #1e293b; color: #ffffff; border: 1px solid #334155; padding: 6px 10px; border-radius: 6px; font-size: 13px; font-weight: bold; outline: none; }

  .neon-digital-clock {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 21px;
    font-weight: 900;
    color: #fbbf24;
    background: transparent;
    border: none;
    padding: 0 4px;
    letter-spacing: 0.5px;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
  }
  .clock-day-text { font-size: 15px; font-weight: bold; color: #38bdf8; margin-left: 2px; }

  .content-body { padding: 20px 24px; flex: 1; width: 100%; display: flex; flex-direction: column; }
  .view-pane { display: none; flex-direction: column; width: 100%; }
  .view-pane.active-pane { display: flex; }

  .worker-mobile-topbar {
    display: none;
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; width: 100%; margin-bottom: 18px; }
  .kpi-card { background: var(--card-dark); border: 1px solid var(--card-border); border-radius: 12px; padding: 16px; display: flex; align-items: center; justify-content: space-between; }
  
  .dash-main-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; width: 100%; margin-bottom: 18px; }
  .dash-card { background: var(--card-dark); border: 1px solid var(--card-border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; }
  .todo-input-line { background: #1e293b; border: 1px solid #334155; color: #f8fafc; padding: 7px 10px; font-size: 12.5px; border-radius: 6px; margin-bottom: 6px; width: 100%; outline: none; }
  .meal-widget { background: #1e2433; border: 1px solid #334155; border-radius: 10px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; width: 100%; margin-bottom: 18px; }

  .filter-tabs-bar { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 6px; align-items: center; width: 100%; }
  .filter-tabs-bar::-webkit-scrollbar { height: 6px; }
  .filter-tabs-bar::-webkit-scrollbar-track { background: transparent; }
  .filter-tabs-bar::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
  .filter-tab-btn { 
    background: #1e293b; color: #94a3b8; border: 1px solid #334155; padding: 8px 16px; border-radius: 20px; 
    font-size: 13px; font-weight: bold; cursor: pointer; white-space: nowrap; transition: all 0.2s; 
  }
  .filter-tab-btn:hover { color: #f8fafc; border-color: #475569; }
  .filter-tab-btn.active { background: #2563eb; color: #ffffff; border-color: #3b82f6; font-weight: 900; box-shadow: 0 0 10px rgba(37,99,235,0.4); }

  .worker-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; width: 100%; }
  
  .w-card {
    background: var(--card-dark); 
    border: 1.5px solid var(--card-border); 
    border-radius: 14px; 
    display: flex; 
    flex-direction: row; 
    user-select: none; 
    position: relative; 
    transition: all 0.2s;
    cursor: pointer;
    min-height: 135px;
    overflow: hidden;
  }
  .w-card:hover { transform: translateY(-2px); border-color: #38bdf8; }
  .w-card.checked-in { background: #0c1e33; border-color: #0284c7; }

  .w-tier-badge {
    position: absolute; top: 10px; right: 10px; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 900; letter-spacing: 0.5px; user-select: none;
  }
  .w-tier-badge.tier-s { background: #422006; color: #fde047; border: 1.5px solid #fbbf24; box-shadow: 0 0 10px rgba(251, 191, 36, 0.5); }
  .w-tier-badge.tier-a { background: #0c253d; color: #7dd3fc; border: 1.5px solid #38bdf8; box-shadow: 0 0 8px rgba(56, 189, 248, 0.35); }
  .w-tier-badge.tier-b { background: #1e293b; color: #cbd5e1; border: 1.5px solid #64748b; }

  .w-bottom-gongsu-box {
    width: 100%; margin-top: 10px; padding: 8px 0; min-height: 38px; font-size: 14.5px; font-weight: 800; text-align: center; border-radius: 8px; transition: all 0.15s; user-select: none; display: flex; align-items: center; justify-content: center; letter-spacing: -0.3px; cursor: pointer;
  }
  .w-bottom-gongsu-box:hover { transform: scale(1.04); box-shadow: 0 0 14px rgba(255,255,255,0.25); }
  .w-bottom-gongsu-box.not-yet { background: #1e293b; color: #94a3b8; border: 1.2px dashed #475569; }
  .w-bottom-gongsu-box.g1 { 
    background: rgba(57, 255, 20, 0.15) !important; 
    color: #39ff14 !important; 
    border: 1.8px solid #39ff14 !important; 
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.4), inset 0 0 8px rgba(57, 255, 20, 0.2) !important; 
    text-shadow: 0 0 6px #39ff14 !important;
    font-weight: 900 !important;
  }
  .w-bottom-gongsu-box.g1-25 { 
    background: rgba(251, 191, 36, 0.18) !important; 
    color: #fde047 !important; 
    border: 1.8px solid #f59e0b !important; 
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.35), inset 0 0 8px rgba(245, 158, 11, 0.15) !important;
    text-shadow: 0 0 5px rgba(251, 191, 36, 0.5) !important;
    font-weight: 900 !important; 
  }
  .w-bottom-gongsu-box.g1-5 { 
    background: rgba(217, 70, 239, 0.20) !important; 
    color: #f0abfc !important; 
    border: 1.8px solid #d946ef !important; 
    box-shadow: 0 0 12px rgba(217, 70, 239, 0.4), inset 0 0 8px rgba(217, 70, 239, 0.2) !important;
    text-shadow: 0 0 6px rgba(217, 70, 239, 0.6) !important;
    font-weight: 900 !important; 
  }
  .w-bottom-gongsu-box.g2 { 
    background: rgba(244, 63, 94, 0.22) !important; 
    color: #fda4af !important; 
    border: 1.8px solid #f43f5e !important; 
    box-shadow: 0 0 14px rgba(244, 63, 94, 0.45), inset 0 0 8px rgba(244, 63, 94, 0.2) !important;
    text-shadow: 0 0 6px rgba(244, 63, 94, 0.6) !important;
    font-weight: 900 !important; 
  }
  .w-bottom-gongsu-box.g0-5 { 
    background: rgba(148, 163, 184, 0.16) !important; 
    color: #cbd5e1 !important; 
    border: 1.8px solid #94a3b8 !important; 
    font-weight: 900 !important; 
  }
  .w-bottom-gongsu-box.goff {
    background: rgba(224, 192, 151, 0.15) !important;
    color: #E0C097 !important;
    border: 1.8px solid #E0C097 !important;
}

  .schedule-layout-grid { display: grid; grid-template-columns: 7fr 3fr; gap: 20px; width: 100%; margin-top: 14px; }
  @media (max-width: 1180px) { .schedule-layout-grid { grid-template-columns: 1fr; } }
  .schedule-main-card { background: #0f1523; border: 1.5px solid #1e293b; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; }
  .schedule-nav-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
  .schedule-month-title-box { display: flex; align-items: center; gap: 16px; }
  .btn-sched-arrow { background: #1e293b; border: 1px solid #334155; color: #ffffff; width: 34px; height: 34px; border-radius: 8px; font-size: 14px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .sched-current-month-text { font-size: 22px; font-weight: 900; color: #ffffff; }
  .btn-sched-today { background: #1e293b; color: #cbd5e1; border: 1px solid #334155; padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: bold; cursor: pointer; }
  .schedule-weekdays-row { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 13.5px; font-weight: 800; padding: 10px 0; border-bottom: 1px solid #1e293b; }
  .schedule-dates-grid { display: grid; grid-template-columns: repeat(7, 1fr); border-left: 1px solid #1e293b; border-top: 1px solid #1e293b; }
  .sched-cell { min-height: 105px; border-right: 1px solid #1e293b; border-bottom: 1px solid #1e293b; padding: 6px 8px; background: #0f1523; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
  .sched-cell.today-highlight { border: 2.2px solid #39ff14 !important; box-shadow: inset 0 0 12px rgba(57, 255, 20, 0.25), 0 0 14px rgba(57, 255, 20, 0.5) !important; background: #0f1c24 !important; }
  .sched-badge-item { font-size: 11px; font-weight: bold; padding: 3px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sched-badge-process { background: #3b0764; color: #e9d5ff; border-left: 3px solid #c084fc; }
  .sched-badge-equip { background: #78350f; color: #fef08a; border-left: 3px solid #f59e0b; }
  .sched-badge-material { background: #064e3b; color: #a7f3d0; border-left: 3px solid #10b981; }

  .schedule-yearly-card { background: #0f1523; border: 1.5px solid #1e293b; border-radius: 16px; padding: 18px 16px; display: flex; flex-direction: column; }
  .yearly-mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
  .mini-month-box { background: #131a2c; border: 1.5px solid #1e293b; border-radius: 10px; padding: 8px 6px; cursor: pointer; text-align: center; }
  .mini-month-box.active-month-box { border-color: #3b82f6; background: #1e2c4f; }

  .member-mgmt-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; width: 100%; align-items: start; }
  .member-table-box { background: var(--card-dark); border: 1px solid var(--card-border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 160px); }
#memberListItemsContainer { overflow-y: auto; flex: 1; padding-right: 5px; }
  .member-detail-box { background: var(--card-dark); border: 1px solid var(--card-border); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; position: sticky; top: 20px; max-height: calc(100vh - 160px); overflow-y: auto; }
  .member-row-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid #1e293b; cursor: pointer; border-radius: 6px; }
  .member-row-item.selected { background: #1e3a8a; border-left: 4px solid #38bdf8; }

  .form-group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
  .form-input-box { background: #1e293b; border: 1px solid #334155; color: #f8fafc; padding: 8px 10px; border-radius: 6px; font-size: 13px; width: 100%; outline: none; }

  .zinc-outer-wrapper { max-width: 520px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
  .zinc-top-tab-bar { display: flex; background: #121826; border: 1px solid #1e293b; border-radius: 10px; padding: 4px; width: 100%; }
  .zinc-tab-btn { flex: 1; padding: 10px; text-align: center; font-size: 13.5px; font-weight: bold; color: #94a3b8; background: transparent; border: none; border-radius: 8px; cursor: pointer; }
  .zinc-tab-btn.active { background: #2563eb !important; color: #ffffff !important; font-weight: 900; }

  .zinc-calendar-card { background: #ffffff; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
  .zinc-cal-top-banner { background: #2563eb; color: #ffffff; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; }
  .zinc-dates-grid { display: grid; grid-template-columns: repeat(7, 1fr); background: #ffffff; }
  .zinc-cell { min-height: 72px; border-right: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; padding: 4px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; background: #ffffff; }
  .zinc-cal-bottom-bar { background: #111827; color: #ffffff; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; }

  /* 팝업 모달은 화면 전체를 덮는 완벽한 fixed 처리 */
  .modal-backdrop, .modal, .popup, .overlay { 
    display: none; 
    position: fixed !important; 
    top: 0 !important; 
    left: 0 !important; 
    width: 100vw !important; 
    height: 100vh !important; 
    background-color: rgba(11, 15, 25, 0.92) !important; 
    z-index: 999999 !important; 
    justify-content: center !important; 
    align-items: center !important; 
  }
  .modal-center-card, .modal-content, .popup-card {
    margin: auto !important;
    position: relative !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
  .modal-center-card { background: #121826; border: 1.5px solid #334155; border-radius: 16px; width: 440px; max-width: 90%; padding: 24px; display: flex; flex-direction: column; text-align: center; }

  /* 1. 모니터 화면(Screen)에서는 인쇄용 래퍼를 무조건 숨김 */
  @media screen {
    #real-print-wrapper { 
      display: none !important; 
    }
  }

  /* 2. 프린터 인쇄(Print) 시에는 다크모드 앱 화면을 숨기고 래퍼만 노출 */
  @media print {
    @page {
      size: A4 portrait;
      margin: 0 !important;
    }

    * {
      -webkit-print-color-adjust: exact !important;
      print-color-adjust: exact !important;
      box-sizing: border-box !important;
    }

    html, body {
      background: #ffffff !important;
      color: #000000 !important;
      margin: 0 !important;
      padding: 0 !important;
      width: 100% !important;
      height: 100% !important;
    }

    /* 기존 UI 화면 전체 강제 숨김 */
    body { padding: 2mm 5mm 5mm 5mm !important; /* safe area - top pulled up */ }
    body > div:not(#real-print-wrapper), 
    .app-layout, .sidebar, .top-header, .worker-mobile-topbar, 
    .main-area, .content-body, .view-pane, .modal-backdrop, .no-print, button, input, select {
      display: none !important;
    }

    /* 인쇄 래퍼만 A4 용지에 꽉 차게 노출 */
    #real-print-wrapper {
      display: block !important;
      position: absolute !important;
      left: 0 !important;
      top: 0 !important;
      width: 100% !important;
      background: #ffffff !important;
      color: #000000 !important;
    }

    .print-title {
      white-space: nowrap !important;
      text-align: center !important;
      font-size: 26px !important;
      letter-spacing: 5px !important;
      font-weight: 900 !important;
      color: #000000 !important;
      margin: 0 0 8px 0 !important;
      border-bottom: 2px solid #000000 !important;
      padding-bottom: 8px !important;
    }

    /* 표(Table) 선명하게 블랙으로 고정 */
    #real-print-wrapper table {
      width: 100% !important;
      border-collapse: collapse !important;
      border: 2px solid #000000 !important;
      margin-top: 14px !important;
      margin-bottom: 16px !important;
      table-layout: fixed !important;
    }

    #real-print-wrapper th, #real-print-wrapper td {
      border: 1px solid #000000 !important;
      padding: 8px 10px !important;
      font-size: 12.5px !important;
      text-align: center !important;
      color: #000000 !important;
      word-break: break-all !important;
    }

    #real-print-wrapper th {
      background-color: #f1f5f9 !important;
      font-weight: 900 !important;
    }
  }

  /* 뷰 모드 전환 CSS */
  .worker-card-grid.grid-view-mode {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
  }
  .worker-card-grid.grid-view-mode .w-card {
    flex-direction: column !important;
    min-height: 200px !important;
    padding: 18px 14px 14px 14px !important;
    align-items: center !important;
  }
  .worker-card-grid.grid-view-mode .w-card-left {
    flex: none !important;
    width: 100% !important;
    min-height: auto !important;
    background: transparent !important;
    border-right: none !important;
    padding-bottom: 12px !important;
  }
  .worker-card-grid.grid-view-mode .w-card-left img {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    margin: 0 auto !important;
    display: block !important;
    border: 2px solid #38bdf8 !important;
  }
  .worker-card-grid.grid-view-mode .w-card-left > div {
    font-size: 65px !important;
  }
  .worker-card-grid.grid-view-mode .w-card-right {
    padding: 0 !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
  }
  .worker-card-grid.grid-view-mode .w-card-right > div:nth-child(1) {
    padding-right: 0 !important;
    white-space: normal !important;
  }
  .worker-card-grid.grid-view-mode .w-card-right > div:nth-child(2) {
    margin-bottom: 16px !important;
    white-space: normal !important;
  }
    .filter-tab-btn * { pointer-events: none; }

  /* --- Accordion Menu Styles --- */
  .accordion-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
  }
  .accordion-menu::-webkit-scrollbar { width: 4px; }
  .accordion-menu::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
  
  .acc-group {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
  }
  .acc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: transparent;
    color: #cbd5e1;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .acc-header:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
  }
  .acc-header.open {
    color: #38bdf8;
  }
  .acc-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
  }
  .acc-header.open .acc-icon {
    transform: rotate(180deg);
  }
  .acc-content {
    display: none;
    flex-direction: column;
    padding-left: 12px;
    padding-top: 4px;
    padding-bottom: 8px;
    gap: 4px;
  }
  .acc-content.open {
    display: flex;
  }

/* 모든 종류의 모달 및 알림창 정중앙 고정 */
.modal, .modal-content, .modal-center-card, .popup-card, .modal-backdrop, #systemGlobalModal, #managementModal, #universalDarkModal, #customConfirmModal {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 99999 !important;
}

  .worker-card-grid.order-edit-mode .w-card {
      border: 2px dashed #f59e0b !important;
      cursor: grab !important;
  }
  .worker-card-grid.order-edit-mode .w-card * {
      pointer-events: none;
  }
  .sortable-ghost {
      opacity: 0.4;
      background-color: #334155;
  }

              .pdr-table-comp { width:100%; border-collapse:collapse; border:2px solid #000; table-layout:fixed; color:#000; page-break-inside:avoid; }
              .pdr-table-comp th, .pdr-table-comp td { border:1px solid #000 !important; padding:1px 0px !important; text-align:center; font-size:9px !important; line-height:1.0 !important; color:#000; overflow:hidden; white-space:nowrap; }
              .pdr-table-comp th { font-weight:900; background-color:transparent; }
            


  .w-tier-badge.tier-s { 
    background: linear-gradient(135deg, #78350f, #b45309) !important; 
    color: #fef08a !important; 
    border: 1.5px solid #fde047 !important; 
    box-shadow: 0 0 12px rgba(253, 224, 71, 0.7) !important; 
    font-weight: 900 !important;
  }
  .w-tier-badge.tier-common { 
    background: #1e293b; 
    color: #94a3b8; 
    border: 1px solid #475569; 
  }
  .w-card.is-gold-tier {
    background: linear-gradient(145deg, #111827, #1f1b13) !important;
  }


  .s-photo-gold-ring {
    border: 2.8px solid #fbbf24 !important;
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.85), inset 0 0 6px rgba(251, 191, 36, 0.3) !important;
  }
