/* ═══════════════════════════════════════
   薪水管理模組樣式
═══════════════════════════════════════ */

/* ── 員工列表 ── */
.emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 20px; }
.emp-card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.emp-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.emp-avatar-lg { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #2563eb, #7c3aed); color: white; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.emp-info { flex: 1; min-width: 0; }
.emp-name { font-size: 15px; font-weight: 700; }
.emp-type-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; margin-top: 3px; }
.emp-type-badge.monthly { background: #eff6ff; color: #2563eb; }
.emp-type-badge.daily { background: #fff7ed; color: #d97706; }
.emp-edit-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 6px; border-radius: 6px; flex-shrink: 0; }
.emp-edit-btn:hover { background: var(--bg); color: var(--text); }
.emp-salary { font-size: 14px; color: var(--text-muted); margin-bottom: 6px; }
.emp-salary strong { color: var(--text); }
.emp-insurance { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.btn-salary-action { width: 100%; padding: 10px; background: var(--primary-light); color: var(--primary); border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: background 0.15s; }
.btn-salary-action:hover { background: #dbeafe; }

/* ── 員工表單 ── */
.ins-preview { min-height: 20px; margin-top: 6px; }
.ins-hint { font-size: 12px; color: var(--success); font-weight: 600; }

/* ── 月薪作業 ── */
.month-nav-bar { display: flex; align-items: center; justify-content: center; gap: 16px; background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 16px; }
.month-nav-btn { background: none; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; transition: all 0.15s; }
.month-nav-btn:hover { background: var(--bg); color: var(--text); }
.month-nav-label { font-size: 18px; font-weight: 700; min-width: 130px; text-align: center; }

.monthly-list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; }
.monthly-emp-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.1s; }
.monthly-emp-row:last-child { border-bottom: none; }
.monthly-emp-row:hover { background: #f8fafc; }
.me-avatar { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #2563eb, #7c3aed); color: white; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.me-info { flex: 1; min-width: 0; }
.me-name { font-size: 14px; font-weight: 700; }
.me-type { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.me-status { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.me-netpay { font-size: 14px; font-weight: 700; color: var(--success); }
.badge-salary { padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.badge-salary.finalized { background: var(--success-bg); color: var(--success); }
.badge-salary.pending { background: #fef3c7; color: #d97706; }

/* ── 薪資單 ── */
.salary-slip { background: white; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); padding: 32px; max-width: 600px; margin: 0 auto 24px; }
.slip-header { text-align: center; padding-bottom: 20px; border-bottom: 2px solid var(--text); margin-bottom: 20px; }
.slip-company { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.slip-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.slip-emp { font-size: 16px; color: var(--text-muted); }
.slip-body { margin-bottom: 20px; }
.slip-section-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; margin-top: 12px; }
.slip-row { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.slip-row.total { font-weight: 700; font-size: 15px; border-bottom: 2px solid #1e293b; padding-bottom: 8px; }
.slip-net { display: flex; justify-content: space-between; font-size: 22px; font-weight: 700; color: var(--success); padding: 14px 0; border-top: 2px solid var(--success); border-bottom: 2px solid var(--success); margin: 12px 0; }
.slip-note { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.slip-footer { display: flex; justify-content: space-around; margin-top: 48px; }
.slip-sign { text-align: center; font-size: 13px; color: var(--text-muted); }
.slip-sign-line { width: 120px; height: 1px; background: var(--text); margin: 0 auto 8px; }

/* ── 列印 ── */
@media print {
  .sidebar, .topbar, .bottom-nav, .fab, .no-print, .form-actions { display: none !important; }
  .main { overflow: visible !important; }
  .content { padding: 0 !important; overflow: visible !important; }
  .app { display: block !important; height: auto !important; overflow: visible !important; }
  .salary-slip { box-shadow: none !important; border: 1px solid #ccc !important; margin: 0 !important; max-width: 100% !important; border-radius: 0 !important; }
}

/* ── 手機 ── */
@media (max-width: 768px) {
  .emp-grid { grid-template-columns: 1fr; }
  .slip-net { font-size: 18px; }
  .month-nav-label { font-size: 16px; min-width: 100px; }
}
