/* Extracted from app.css for route-specific maintainability. */
/* =========================
   업무 링크(/worklinks) — 목업 스타일
   ========================= */
#dashboard-stack.content-area:has(.worklinks-page) { padding-bottom: 12px !important; }
.worklinks-page { max-width: 720px; margin: 0 auto; }
@media screen and (min-width: 801px) {
  body:has(#dashboard-stack .worklinks-page) .app-top-header { display: none !important; }
  body:has(#dashboard-stack .worklinks-page) .metric-header-fixed { display: none !important; }
  body:has(#dashboard-stack .worklinks-page) #dashboard-stack.content-area {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  body:has(#dashboard-stack .worklinks-page) #dashboard-content { padding: 0 !important; }
  body:has(#dashboard-stack .worklinks-page) .worklinks-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-bottom: 0 !important;
  }
}
@media screen and (max-width: 800px) {
  /* /worklinks: 앱 공통 상단바 숨김 — 페이지 상단바가 상단부터 */
  body:has(#dashboard-stack .worklinks-page) .app-top-header { display: none !important; }
  /* /worklinks: 상단바 풀폭 */
  body:has(#dashboard-stack .worklinks-page) #dashboard-stack.content-area {
    margin-top: env(safe-area-inset-top, 0px) !important;
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  body:has(#dashboard-stack .worklinks-page) .metric-header-fixed { display: none !important; }
  body:has(#dashboard-stack .worklinks-page) #dashboard-content { padding: 0 !important; }
  .worklinks-page { max-width: none !important; width: 100% !important; }
}

/* ── 주간 업무(/work/weekly) — 통일 톤 */
.weekly-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 0 24px;
    box-sizing: border-box;
}
.opinion-page,
.profile-page,
.history-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 0 24px;
    box-sizing: border-box;
}
@media screen and (min-width: 801px) {
    .opinion-page {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 0 24px !important;
    }
    .opinion-page .technote-topbar {
        margin: 0 !important;
    }
    .opinion-page .weekly-body {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}
.blockbar-page {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 0 24px;
    box-sizing: border-box;
}
.stat-page { width: 100%; box-sizing: border-box; }
.weekly-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.weekly-card { background: #fff; border-radius: 12px; border: 0.5px solid #e5e7eb; overflow: hidden; }
.profile-page .weekly-card { overflow: visible; }
.weekly-ch { display: flex; align-items: center; gap: 7px; padding: 11px 14px 10px; border-bottom: 0.5px solid #f3f4f6; }
.weekly-ci { width: 22px; height: 22px; border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.weekly-ci-b { background: #eff6ff; }
.weekly-ci-g { background: #f0fdf4; }
.weekly-ct { font-size: 13px; font-weight: 500; color: #111827; }
.weekly-cb { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.profile-page .weekly-cb { overflow: visible; }
.profile-page .SingleDatePicker_picker,
.profile-page .SingleDatePicker_picker__portal {
    z-index: 20050 !important;
}
.weekly-fr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.weekly-fi { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.weekly-fl { font-size: 11px; font-weight: 500; color: #374151; }
.weekly-inp, .weekly-inp input {
    height: 40px;
    border-radius: 9px;
    border: 0.5px solid #e5e7eb;
    font-size: 13px;
    padding: 0 12px;
    outline: none;
    color: #111827;
    background: #fafafa;
    width: 100%;
    box-sizing: border-box;
}
.weekly-inp::placeholder { color: #9ca3af; font-size: 12px; }
.weekly-fi > div.weekly-inp {
    height: auto;
    padding: 0;
    border: none;
    background: transparent;
}
.weekly-fi > div.weekly-inp .DateRangePicker,
.weekly-fi > div.weekly-inp .DateRangePickerInput {
    width: 100% !important;
    box-sizing: border-box !important;
}
.weekly-fi > div.weekly-inp .DateRangePickerInput {
    height: 40px;
    border-radius: 9px;
    border: 0.5px solid #e5e7eb;
    background: #fafafa;
    display: flex;
    align-items: center;
}
.weekly-fi > div.weekly-inp .DateInput {
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
    background: transparent;
}
.weekly-fi > div.weekly-inp .DateInput_input {
    height: 38px;
    padding: 0 10px;
    border: none;
    background: transparent;
    font-size: 12px;
    text-align: center;
}
.weekly-fi > div.weekly-inp .DateRangePickerInput_arrow {
    flex: 0 0 auto;
    padding: 0 4px;
}

.weekly-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.weekly-btn {
    height: 40px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #0f172a;
    font-weight: 800;
    font-size: 13px;
    padding: 0 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.weekly-btn--primary { background: #1a2744; border-color: #1a2744; color: #fff; }
.weekly-btn--ghost { background: #fafafa; border-color: #e5e7eb; color: #334155; font-weight: 700; }
.weekly-msg { font-size: 12px; color: #64748b; min-height: 18px; }

@media screen and (min-width: 901px) {
    body:has(#dashboard-stack .weekly-work-page) .app-top-header,
    body:has(#dashboard-stack .weekly-work-page) .metric-header-fixed {
        display: none !important;
    }
    body:has(#dashboard-stack .weekly-work-page) #dashboard-stack.content-area {
        margin-top: 0 !important;
        padding: 0 !important;
        background: #f0f2f5 !important;
    }
    body:has(#dashboard-stack .weekly-work-page) #dashboard-content {
        padding: 0 !important;
    }
    body:has(#dashboard-stack .weekly-work-page) .weekly-work-page {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        background: #f0f2f5 !important;
    }
    body:has(#dashboard-stack .weekly-work-page) .weekly-page {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 0 28px !important;
        box-sizing: border-box !important;
    }
    body:has(#dashboard-stack .weekly-work-page) .weekly-page .technote-topbar {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    body:has(#dashboard-stack .weekly-work-page) .weekly-body {
        width: 100% !important;
        max-width: none !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr) !important;
        grid-template-areas:
            "filter filter"
            "result preview" !important;
        gap: 12px !important;
        padding: 0 !important;
        align-items: start !important;
    }
    body:has(#dashboard-stack .weekly-work-page) .weekly-body > .weekly-card:nth-of-type(1) {
        grid-area: filter !important;
    }
    body:has(#dashboard-stack .weekly-work-page) .weekly-body > .weekly-card:nth-of-type(2) {
        grid-area: result !important;
        min-width: 0 !important;
    }
    body:has(#dashboard-stack .weekly-work-page) .weekly-body > .weekly-card:nth-of-type(3) {
        grid-area: preview !important;
        min-width: 0 !important;
    }
    body:has(#dashboard-stack .weekly-work-page) .weekly-card {
        border-radius: 12px !important;
        border: 0.5px solid #e5e7eb !important;
        background: #ffffff !important;
        overflow: hidden !important;
    }
    body:has(#dashboard-stack .weekly-work-page) .weekly-body > .weekly-card:nth-of-type(1) .weekly-cb {
        display: grid !important;
        grid-template-columns: minmax(620px, 1fr) max-content !important;
        column-gap: 14px !important;
        align-items: end !important;
    }
    body:has(#dashboard-stack .weekly-work-page) .weekly-fr {
        grid-template-columns: minmax(360px, 520px) minmax(320px, 1fr) !important;
        gap: 10px !important;
    }
    body:has(#dashboard-stack .weekly-work-page) .weekly-actions {
        justify-content: flex-end !important;
        flex-wrap: nowrap !important;
    }
    body:has(#dashboard-stack .weekly-work-page) .weekly-msg {
        grid-column: 1 / -1 !important;
    }
    body:has(#dashboard-stack .weekly-work-page) #weekly-work-table .dash-table-container {
        width: 100% !important;
    }
    body:has(#dashboard-stack .weekly-work-page) #weekly-work-table .dash-spreadsheet-container {
        max-height: calc(100vh - 310px) !important;
    }
    body:has(#dashboard-stack .weekly-work-page) #weekly-work-report-preview {
        max-height: calc(100vh - 310px) !important;
        overflow: auto !important;
    }
}

@media screen and (min-width: 901px) and (max-width: 1180px) {
    body:has(#dashboard-stack .weekly-work-page) .weekly-body {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "filter"
            "result"
            "preview" !important;
    }
    body:has(#dashboard-stack .weekly-work-page) .weekly-body > .weekly-card:nth-of-type(1) .weekly-cb {
        grid-template-columns: 1fr !important;
    }
    body:has(#dashboard-stack .weekly-work-page) .weekly-actions {
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }
}
.blockbar-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.blockbar-table { width: 100%; min-width: 520px; }
