/* === SONG YAN REWARD SYSTEM — STYLES === */
:root {
  --red: #8B2500;
  --red-light: #A63A1A;
  --red-dark: #5E1A00;
  --gold: #D4A017;
  --gold-light: #E8C456;
  --gold-pale: #F5E6B8;
  --cream: #FFF8F0;
  --cream-dark: #F5EDE0;
  --ink: #2C1810;
  --ink-light: #5A4235;
  --ink-muted: #8C7B6F;
  --border: #E0D5C8;
  --border-light: #EDE6DB;
  --white: #FFFFFF;
  --danger: #C0392B;
  --danger-light: #FDEDEB;
  --success: #27AE60;
  --success-light: #EAFAF1;
  --warn: #F39C12;
  --warn-light: #FEF9E7;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 2px 12px rgba(44,24,16,0.08);
  --shadow-lg: 0 8px 32px rgba(44,24,16,0.12);
  --font: 'Noto Sans SC', sans-serif;
  --font-serif: 'Noto Serif SC', serif;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* === HEADER === */
.app-header {
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 40%, var(--red-light) 100%);
  color: var(--cream);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(94,26,0,0.3);
}
.app-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 1rem; }
.brand-seal {
  width: 46px; height: 46px;
  border: 2px solid var(--gold);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
  background: rgba(212,160,23,0.1);
  transform: rotate(-3deg);
  letter-spacing: 0;
}
.brand-text h1 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cream);
}
.brand-dot { color: var(--gold); margin: 0 0.15em; }
.brand-sub {
  font-size: 0.72rem;
  color: rgba(255,248,240,0.6);
  letter-spacing: 0.1em;
  margin-top: 2px;
}
.header-right { display: flex; align-items: center; gap: 1rem; }
.user-info { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; }
.user-role {
  background: var(--gold);
  color: var(--red-dark);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
}
.user-name { color: var(--cream); font-weight: 500; }

/* === TAB NAV === */
.tab-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 72px;
  z-index: 90;
  box-shadow: 0 2px 8px rgba(44,24,16,0.04);
}
.tab-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  padding: 0 1rem;
  overflow-x: auto;
}
.tab-btn {
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-muted);
  background: none;
  border: none;
  padding: 1rem 1.4rem;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.tab-btn:hover { color: var(--red); background: rgba(139,37,0,0.03); }
.tab-btn.active {
  color: var(--red);
  border-bottom-color: var(--red);
  font-weight: 700;
}
.tab-icon { font-style: normal; font-size: 1rem; }

/* === MAIN CONTENT === */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
}
.panel { display: none; animation: fadeIn 0.3s ease; }
.panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* === PANEL HEADER === */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.panel-header h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.05em;
}
.panel-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* === FORM ELEMENTS === */
.search-input, .filter-select {
  font-family: var(--font);
  font-size: 0.82rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  transition: var(--transition);
}
.search-input:focus, .filter-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,160,23,0.15);
}
.search-input { width: 200px; }
.filter-select { min-width: 120px; }

/* === BUTTONS === */
.btn {
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--red);
  color: var(--cream);
}
.btn-primary:hover { background: var(--red-light); box-shadow: 0 4px 12px rgba(139,37,0,0.3); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #E74C3C; }
.btn-accent { background: var(--gold); color: var(--red-dark); }
.btn-accent:hover { background: var(--gold-light); }
.btn-outline {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
}
.btn-outline:hover { background: var(--red); color: var(--cream); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.75rem; }
.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  padding: 0.35rem 0.6rem;
}
.btn-ghost:hover { color: var(--danger); }

/* === TABLE === */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.data-table thead {
  background: linear-gradient(135deg, #F8F2EA, #F0E8DC);
}
.data-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--ink-light);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}
.data-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--ink);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover { background: rgba(212,160,23,0.04); }

/* === CHECKBOX COLUMN === */
.data-table th input[type="checkbox"],
.data-table td input[type="checkbox"] {
  width: 16px; height: 16px; cursor: pointer;
  accent-color: var(--primary);
}

/* === BADGES === */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-reward { background: var(--success-light); color: var(--success); }
.badge-punish { background: var(--danger-light); color: var(--danger); }
.badge-gold { background: var(--gold-pale); color: #8B6914; }
.badge-warn { background: var(--warn-light); color: #B7791F; }
.badge-double { background: #F5B7B1; color: #922B21; }
.badge-signed { background: var(--success-light); color: var(--success); }
.badge-unsigned { background: #F0F0F0; color: #999; }

/* === EXCELLENT SECTION === */
.excellent-content { display: flex; flex-direction: column; gap: 2rem; }
.excellent-section {}
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.title-icon { font-style: normal; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.emp-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.emp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.emp-card .card-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.emp-card .card-team { font-size: 0.78rem; color: var(--ink-muted); margin-bottom: 0.6rem; }
.emp-card .card-reason {
  font-size: 0.78rem;
  color: var(--ink-light);
  padding: 0.5rem;
  background: var(--cream);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
}
.team-card {
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  color: var(--cream);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}
.team-card .card-name { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; color: var(--gold-light); }
.team-card .card-members { font-size: 0.8rem; color: rgba(255,248,240,0.8); margin-top: 0.5rem; }

/* === POINTS === */
.points-rule-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.rule-badge {
  background: var(--gold-pale);
  color: #8B6914;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  border-left: 3px solid var(--gold);
}
.points-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 900px) {
  .points-grid { grid-template-columns: 1fr; }
}

/* === DASHBOARD === */
.dashboard-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card .stat-label { font-size: 0.78rem; color: var(--ink-muted); margin-bottom: 0.3rem; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 900; color: var(--ink); font-family: var(--font-serif); }
.stat-card .stat-sub { font-size: 0.72rem; color: var(--ink-muted); margin-top: 0.2rem; }
.stat-card.red { border-left-color: var(--danger); }
.stat-card.green { border-left-color: var(--success); }
.stat-card.gold { border-left-color: var(--gold); }

.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 900px) { .charts-row { grid-template-columns: 1fr; } }
.chart-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.chart-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-light);
}

/* PIE CHART */
.pie-chart-area { display: flex; align-items: center; gap: 2rem; min-height: 180px; }
.pie-visual {
  width: 160px; height: 160px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.pie-legend { display: flex; flex-direction: column; gap: 0.5rem; }
.pie-legend-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; }
.pie-legend-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }

/* BAR CHART */
.bar-chart-area { display: flex; flex-direction: column; gap: 0.8rem; }
.bar-row { display: flex; align-items: center; gap: 0.8rem; }
.bar-label { width: 60px; font-size: 0.8rem; font-weight: 600; text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; height: 28px; background: var(--cream-dark); border-radius: 4px; display: flex; gap: 2px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; transition: width 0.6s ease; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; color: #fff; min-width: 24px; border-radius: 3px; }
.bar-fill.reward-bar { background: var(--success); }
.bar-fill.punish-bar { background: var(--danger); }

/* TREND */
.trend-chart-area { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding: 0 0.5rem; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.trend-bar-group { display: flex; gap: 3px; align-items: flex-end; width: 100%; }
.trend-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  transition: height 0.5s ease;
  min-height: 4px;
}
.trend-bar.r { background: var(--success); }
.trend-bar.p { background: var(--danger); }
.trend-label { font-size: 0.65rem; color: var(--ink-muted); white-space: nowrap; }

/* WARNING */
.warning-area { display: flex; flex-direction: column; gap: 0.6rem; }
.warning-item {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.warning-item.red { background: var(--danger-light); color: var(--danger); border-left: 3px solid var(--danger); }
.warning-item.yellow { background: var(--warn-light); color: #B7791F; border-left: 3px solid var(--warn); }
.warning-item.green { background: var(--success-light); color: var(--success); border-left: 3px solid var(--success); }
.warning-icon { font-style: normal; font-size: 1.1rem; }

/* RANKING */
.ranking-area { display: flex; flex-direction: column; gap: 0.5rem; }
.rank-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  transition: var(--transition);
}
.rank-row:hover { background: var(--cream); }
.rank-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.72rem;
  flex-shrink: 0;
  background: var(--cream-dark);
  color: var(--ink-muted);
}
.rank-row:nth-child(1) .rank-num { background: var(--gold); color: #fff; }
.rank-row:nth-child(2) .rank-num { background: #C0C0C0; color: #fff; }
.rank-row:nth-child(3) .rank-num { background: #CD7F32; color: #fff; }
.rank-name { flex: 1; font-weight: 500; }
.rank-value { font-weight: 700; color: var(--red); }

/* === ADMIN === */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.admin-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.admin-card.full-width { grid-column: 1 / -1; }
.admin-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-light);
}
.template-downloads { display: flex; flex-direction: column; gap: 0.6rem; }
.template-downloads .btn { text-align: left; }
.rule-config { display: flex; flex-direction: column; gap: 0.8rem; }
.rule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
}
.rule-row:last-child { border-bottom: none; }
.rule-label { color: var(--ink-light); }
.rule-value { font-weight: 700; color: var(--red); }

/* === MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,24,16,0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 2rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalIn 0.25s ease;
}
.modal.modal-wide { max-width: 720px; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 1.05rem; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ink-muted);
  line-height: 1;
}
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}
.form-group { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-light);
  margin-bottom: 0.3rem;
}
.form-input, .form-select, .form-textarea {
  font-family: var(--font);
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--white);
  transition: var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,160,23,0.15);
}
.form-textarea { resize: vertical; min-height: 70px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }

/* Signature pad */
.signature-area { border: 2px dashed var(--border); border-radius: var(--radius-sm); padding: 0.5rem; text-align: center; }
.signature-canvas { border: 1px solid var(--border-light); border-radius: 4px; cursor: crosshair; background: #fff; }
.signature-actions { margin-top: 0.5rem; display: flex; gap: 0.5rem; justify-content: center; }

/* TOAST */
#toast-container {
  position: fixed;
  top: 80px;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  max-width: 360px;
}
.toast.success { background: var(--success); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }
.toast.warning { background: var(--warn); color: #fff; }
.toast.info { background: var(--red); color: var(--cream); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

/* ALERT BANNER */
.alert-banner {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.alert-banner.warn { background: var(--warn-light); color: #8B6914; border: 1px solid #F7DC6F; }

/* === STAFF MANAGEMENT === */
.staff-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.staff-stat-badge {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.staff-stat-badge .stat-num {
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--red);
  font-family: var(--font-serif);
}

/* === VIEW TOGGLE === */
.view-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.view-btn {
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border: none;
  background: var(--white);
  color: var(--ink-muted);
  cursor: pointer;
  transition: var(--transition);
}
.view-btn.active {
  background: var(--red);
  color: var(--cream);
}
.view-btn:not(.active):hover {
  background: var(--cream-dark);
}

/* === POINTS CARD VIEW === */
.points-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem;
}
.points-emp-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}
.points-emp-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.points-card-header {
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, #F8F2EA, #F0E8DC);
}
.points-card-name { font-weight: 700; font-size: 1rem; }
.points-card-team { font-size: 0.75rem; color: var(--ink-muted); }
.points-card-score {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--red);
}
.points-card-score-label { font-size: 0.65rem; color: var(--ink-muted); text-align: right; }
.points-card-stats {
  padding: 0.8rem 1.2rem;
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border-light);
}
.points-card-stat {
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
.points-card-stat .v { font-weight: 700; font-size: 0.95rem; }
.points-card-stat .l { font-size: 0.68rem; color: var(--ink-muted); }
.points-card-history {
  padding: 0.8rem 1.2rem;
  max-height: 180px;
  overflow-y: auto;
}
.points-card-history-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-light);
  margin-bottom: 0.4rem;
}
.points-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border-light);
}
.points-history-item:last-child { border-bottom: none; }
.points-history-item .ph-date { color: var(--ink-muted); font-size: 0.72rem; width: 80px; flex-shrink: 0; }
.points-history-item .ph-reason { flex: 1; color: var(--ink-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.points-history-item .ph-value { font-weight: 700; width: 50px; text-align: right; flex-shrink: 0; }

/* === SEARCHABLE EMPLOYEE SELECT === */
.emp-search-wrap { position: relative; }
.emp-search-input {
  font-family: var(--font);
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--white);
  transition: var(--transition);
}
.emp-search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,160,23,0.15);
}
.emp-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  max-height: 180px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: var(--shadow-lg);
  display: none;
}
.emp-search-dropdown.open { display: block; }
.emp-search-option {
  padding: 0.5rem 0.8rem;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  transition: var(--transition);
}
.emp-search-option:hover { background: var(--cream); }
.emp-search-option .opt-team { color: var(--ink-muted); font-size: 0.75rem; }

/* === BATCH EXCHANGE === */
.batch-emp-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.82rem;
}
.batch-emp-row:last-child { border-bottom: none; }
.batch-emp-row .be-name { flex: 1; font-weight: 500; }
.batch-emp-row .be-pts { color: var(--red); font-weight: 700; width: 60px; text-align: right; }
.batch-emp-row .be-days { color: var(--ink-muted); width: 60px; text-align: right; }

/* Responsive */
@media (max-width: 768px) {
  .app-header { padding: 0 1rem; }
  .header-inner { height: 60px; }
  .brand-text h1 { font-size: 1.1rem; }
  .brand-sub { display: none; }
  .main-content { padding: 1rem; }
  .panel-header { flex-direction: column; align-items: flex-start; }
  .panel-actions { width: 100%; }
  .search-input { width: 100%; }
  .admin-grid { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stat-cards { grid-template-columns: 1fr; }
  .charts-row { grid-template-columns: 1fr; }
  .tab-btn { padding: 0.8rem 0.8rem; font-size: 0.78rem; }
  .tab-icon { display: none; }
}
