/* 人資「畫面先行」（假資料）：components/hr/dummyUi.js、pages/hrDaily*.js、pages/hrSettingsTabs.js。
   之後每頁接上真的資料時，可以一頁一頁把這裡的樣式搬進各自的 css。 */

.hr-page {
    max-width: 1100px;
}

/* 設定頁裡需要整個瀏覽器寬度的子頁（例如銷售流程的階段列）。 */
.hr-page.hr-page-wide {
    max-width: none;
}

.dummy-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
}

.dummy-banner {
    margin: 0 0 16px;
    padding: 10px 14px;
    background: #fffbeb;
    border: 1px dashed #f59e0b;
    border-radius: 8px;
    color: #92400e;
    font-size: 14px;
}

.hr-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 篩選列 */
.hr-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 16px;
}

.hr-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.hr-field-wide {
    flex: 1 1 100%;
}

.hr-field-label {
    font-size: 12px;
    color: #6b7280;
}

.hr-field input[type="text"],
.hr-field input[type="date"],
.hr-field input[type="month"],
.hr-field input[type="email"],
.hr-field select {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 14px;
}

.hr-field input[readonly] {
    background: #f3f4f6;
    color: #6b7280;
}

.hr-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hr-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

/* 按鈕：沿用全站按鈕外觀，只補小尺寸與次要樣式 */
.hr-dummy-btn.secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.hr-dummy-btn.hr-btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

/* 編輯｜複製｜刪除 */
.hr-row-actions {
    display: inline-flex;
    gap: 10px;
    white-space: nowrap;
}

.hr-link-btn {
    padding: 0;
    background: none;
    border: none;
    color: var(--primary-color, #2563eb);
    font-size: 14px;
    cursor: pointer;
}

.hr-link-btn.hr-link-danger {
    color: #dc2626;
}

/* 表格：窄螢幕時整張表左右捲動，不撐破頁面 */
.hr-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
}

.hr-table {
    margin: 0;
}

.hr-table th,
.hr-table td {
    padding: 10px 12px;
    font-size: 14px;
    white-space: nowrap;
}

.hr-table-empty {
    padding: 32px 12px !important;
    text-align: center;
    color: #9ca3af;
}

/* 分頁標籤 */
.hr-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
}

.hr-tab {
    flex: 0 0 auto;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    color: #6b7280;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.hr-tab.active {
    color: #111827;
    border-bottom-color: var(--primary-color, #2563eb);
}

/* 區塊 */
.hr-section {
    margin-bottom: 24px;
}

.hr-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.hr-section-head h3 {
    margin: 0;
    font-size: 17px;
}

.hr-section-hint {
    margin: 0 0 10px;
    font-size: 13px;
    color: #6b7280;
}

.hr-card {
    padding: 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.hr-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid #f3f4f6;
}

.hr-form-row:first-child {
    border-top: none;
}

.hr-form-row-text strong {
    display: block;
}

.hr-form-row-text span {
    font-size: 13px;
    color: #6b7280;
}

/* 出勤總覽：日期條與數字卡 */
.hr-daybar {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    overflow-x: auto;
}

.hr-day {
    flex: 0 0 auto;
    min-width: 52px;
    padding: 8px 6px;
    text-align: center;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
}

.hr-day strong {
    display: block;
    font-size: 16px;
}

.hr-day.today {
    background: var(--primary-color, #2563eb);
    border-color: var(--primary-color, #2563eb);
    color: white;
}

.hr-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.hr-stat {
    padding: 14px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.hr-stat-label {
    font-size: 13px;
    color: #6b7280;
}

.hr-stat-value {
    margin-top: 4px;
    font-size: 26px;
    font-weight: 700;
    color: #111827;
}

.hr-notice-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.hr-notice-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid #f3f4f6;
    font-size: 14px;
}

.hr-notice-list li:first-child {
    border-top: none;
}

.hr-notice-date {
    color: #6b7280;
    white-space: nowrap;
}

.hr-tag-important {
    padding: 1px 8px;
    border-radius: 4px;
    background: #ffedd5;
    color: #c2410c;
    font-size: 12px;
    white-space: nowrap;
}

/* 部門：組織圖 */
.hr-org {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.hr-org-card {
    width: 260px;
    padding: 14px 16px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 12px;
}

.hr-org-card h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.hr-org-warn {
    color: #b45309;
    font-size: 13px;
}

.hr-org-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
}

.hr-org-line {
    width: 2px;
    height: 20px;
    background: #d1d5db;
}

.hr-org-children {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* 出勤規則等表格裡的小標籤 */
.hr-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
}

.hr-color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    vertical-align: middle;
}

/* 手機：篩選欄位撐滿一列 */
html.view-mobile .hr-field {
    flex: 1 1 100%;
}

html.view-mobile .hr-org-card {
    width: 100%;
}

/* ───── 已接上真實資料的人資頁面（申請單、請假時數、簽核流程）共用 ───── */

button.hr-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.hr-field input[type="datetime-local"],
.hr-field input[type="number"],
.hr-field textarea {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    font-family: inherit;
}

.hr-modal-form .hr-field {
    margin-bottom: 12px;
}

.hr-form-error {
    margin: 0 0 12px;
    padding: 8px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #b91c1c;
    font-size: 14px;
}

/* 簽核進度：直屬主管 ✓ → 人資（輪到他） */
.hr-progress {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.hr-step {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
}

.hr-step.approved {
    background: #dcfce7;
    color: #166534;
}

.hr-step.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.hr-step.current {
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
}

.hr-step-arrow {
    color: #9ca3af;
}

/* 簽核流程設定：每一關一個下拉選單 */
.hr-flow-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hr-notice-error {
    color: #b91c1c;
}
