/* ==============================
   SKYTECH ACCOUNTING - Main CSS
   ============================== */
:root {
  --primary: #1e40af;
  --primary-light: #3b82f6;
  --primary-dark: #1e3a8a;
  --secondary: #0f766e;
  --accent: #f59e0b;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --info: #0284c7;
  --bg: #f1f5f9;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --radius: 10px;
  --radius-sm: 6px;
  --sidebar-w: 240px;
  --header-h: 60px;
  --font: 'Sarabun', 'Segoe UI', sans-serif;
}

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

html, body {
  font-family: var(--font);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  height: 100%;
}

/* ---- LAYOUT ---- */
#app { display: flex; height: 100vh; overflow: hidden; }

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 100%);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  transition: transform .3s;
  z-index: 100;
}

.sidebar-logo {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.sidebar-logo h1 { color: #fff; font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.sidebar-logo span { color: rgba(255,255,255,.65); font-size: 12px; }

.sidebar-user {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
  flex-shrink: 0;
}
.sidebar-user-info { overflow: hidden; }
.sidebar-user-name { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { color: rgba(255,255,255,.6); font-size: 11px; }

.sidebar-nav { flex: 1; padding: 8px 0; }
.nav-section-label {
  color: rgba(255,255,255,.45);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 16px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  transition: background .2s, color .2s;
  border-radius: var(--radius-sm);
  margin: 1px 6px;
  font-size: 14px;
  text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.2); color: #fff; font-weight: 600; }
.nav-item .icon { width: 20px; text-align: center; font-size: 16px; }
.nav-sub { padding-left: 2.5rem; font-size: 0.88em; opacity: .85; }
.nav-sub.active { opacity: 1; }
.nav-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.sidebar-footer {
  padding: 12px 6px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.btn-logout {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  background: rgba(255,255,255,.08);
  border: none;
  color: rgba(255,255,255,.8);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font);
  transition: background .2s;
}
.btn-logout:hover { background: rgba(220,38,38,.5); color: #fff; }

/* ---- MAIN CONTENT ---- */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  height: var(--header-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}
.topbar-title { font-size: 17px; font-weight: 700; flex: 1; }
.topbar-date { color: var(--text-muted); font-size: 13px; }

.content { flex: 1; overflow-y: auto; padding: 24px; }

/* ---- PAGE ---- */
.page { display: none; }
.page.active { display: block; }
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.page-title { font-size: 20px; font-weight: 700; }

/* ---- CARDS ---- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform .2s, box-shadow .2s;
  border-left: 4px solid var(--primary);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card.green { border-color: var(--success); }
.stat-card.yellow { border-color: var(--warning); }
.stat-card.red { border-color: var(--danger); }
.stat-card.teal { border-color: var(--secondary); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: rgba(30,64,175,.1);
  color: var(--primary);
  flex-shrink: 0;
}
.stat-card.green .stat-icon { background: rgba(22,163,74,.1); color: var(--success); }
.stat-card.yellow .stat-icon { background: rgba(217,119,6,.1); color: var(--warning); }
.stat-card.red .stat-icon { background: rgba(220,38,38,.1); color: var(--danger); }
.stat-card.teal .stat-icon { background: rgba(15,118,110,.1); color: var(--secondary); }

.stat-info { flex: 1; }
.stat-label { color: var(--text-muted); font-size: 12px; font-weight: 500; margin-bottom: 2px; }
.stat-value { font-size: 24px; font-weight: 700; line-height: 1.2; }
.stat-sub { color: var(--text-muted); font-size: 12px; margin-top: 2px; }

/* ---- GRID ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* ---- TABLE ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th { background: var(--bg); font-weight: 600; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
tr:hover td { background: rgba(30,64,175,.03); }

/* ---- BADGE/STATUS ---- */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
}
.badge-draft { background: #f1f5f9; color: #475569; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-approved { background: #dcfce7; color: #15803d; }
.badge-paid { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-invoice { background: #dbeafe; color: #1d4ed8; }
.badge-quotation { background: #f3e8ff; color: #7c3aed; }
.badge-quotation_project { background: #ede9fe; color: #5b21b6; }
.badge-billing { background: #fef9c3; color: #854d0e; }
.badge-receipt { background: #dcfce7; color: #15803d; }
.badge-purchase_order { background: #ffe4e6; color: #be123c; }
.badge-purchase_requisition { background: #fce7f3; color: #9d174d; }
.badge-goods_received_note { background: #e0f2fe; color: #0369a1; }
.badge-payment_voucher { background: #fee2e2; color: #991b1b; }
.badge-receipt_voucher { background: #d1fae5; color: #065f46; }
.badge-delivery_note { background: #ffedd5; color: #9a3412; }
.badge-delivery_order { background: #fef9c3; color: #713f12; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font);
  font-weight: 500;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #b45309; }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { padding: 6px; width: 32px; height: 32px; justify-content: center; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideIn .2s ease;
}
/* Draggable modal state */
.modal-overlay.dragging-mode {
  pointer-events: none;
}
.modal.is-draggable {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-height: 90vh;
  margin: 0;
}
.modal.is-draggable .modal-header {
  cursor: move;
  user-select: none;
}
.modal-sm { max-width: 420px; }
.modal-md { max-width: 600px; }
.modal-lg { max-width: 860px; }
@keyframes slideIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
  background: none; border: none; font-size: 20px;
  cursor: pointer; color: var(--text-muted);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ---- LOGIN PAGE ---- */
#login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--secondary) 100%);
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h1 { font-size: 24px; font-weight: 800; color: var(--primary); }
.login-logo p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.login-error {
  background: #fee2e2; color: var(--danger);
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 16px; display: none;
}

/* ---- CHART CONTAINER ---- */
.chart-container { position: relative; height: 260px; }

/* ---- SEARCH & FILTER BAR ---- */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  align-items: center; margin-bottom: 16px;
}
.filter-bar .form-control { width: auto; min-width: 140px; }

/* ---- CALENDAR ---- */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-day-header {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 8px 0;
}
.cal-day {
  min-height: 80px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  cursor: pointer;
  transition: background .15s;
}
.cal-day:hover { background: #f8faff; }
.cal-day.today { border-color: var(--primary); }
.cal-day.other-month .cal-day-num { color: var(--border); }
.cal-day-num { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 2px; }
.cal-day.today .cal-day-num {
  background: var(--primary);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.cal-event {
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 3px;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-event-general { background: #dbeafe; color: #1d4ed8; }
.cal-event-deadline { background: #fee2e2; color: #991b1b; }
.cal-event-meeting { background: #f3e8ff; color: #7c3aed; }
.cal-event-payment { background: #dcfce7; color: #15803d; }
.cal-event-activity { font-weight: 600; border-radius: 3px; }

/* ---- DOCUMENT ITEMS TABLE ---- */
.items-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.items-table th { background: var(--bg); padding: 8px 10px; font-size: 12px; }
.items-table td { padding: 6px 10px; }
.items-table .num-col { text-align: right; }
.items-table tfoot td { font-weight: 700; border-top: 2px solid var(--border); }

/* ---- TOAST ---- */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #1e293b; color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: var(--shadow-md);
  animation: toastIn .3s ease;
  max-width: 320px;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }
@keyframes toastIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ---- EMPTY STATE ---- */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; color: var(--text); margin-bottom: 6px; }

/* ---- ACTIVITY FEED ---- */
.activity-item {
  display: flex; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(30,64,175,.1);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.activity-content { flex: 1; }
.activity-title { font-size: 13px; font-weight: 600; }
.activity-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .sidebar { position: fixed; left: -240px; height: 100%; }
  .sidebar.open { left: 0; }
  .grid-2, .form-row { grid-template-columns: 1fr; }
  .grid-3, .form-row-3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .content { padding: 16px; }
}

/* ---- PRINT ---- */
@media print {
  .sidebar, .topbar, .btn, .modal-overlay { display: none !important; }
  .main { display: block; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ---- UTILITIES ---- */
.text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.section-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; }

/* ---- TAB NAVIGATION ---- */
.tab-nav { display:flex; gap:4px; border-bottom:2px solid var(--border); margin-bottom:16px; flex-wrap:wrap; }
.tab-btn { padding:8px 18px; border:none; background:transparent; cursor:pointer; font-family:var(--font); font-size:14px; color:var(--text-muted); border-bottom:3px solid transparent; margin-bottom:-2px; border-radius:var(--radius-sm) var(--radius-sm) 0 0; transition:all .2s; }
.tab-btn:hover { color:var(--primary); background:#f8fafc; }
.tab-btn.active { color:var(--primary); border-bottom-color:var(--primary); font-weight:700; background:#fff; }

/* ---- KANBAN BOARD ---- */
.kanban-board { display:flex; gap:12px; overflow-x:auto; padding-bottom:16px; min-height:420px; align-items:flex-start; }
.kanban-col { min-width:200px; max-width:220px; flex-shrink:0; background:#f8fafc; border-radius:var(--radius); padding:10px; border:1px solid var(--border); }
.kanban-col-title { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; margin-bottom:10px; padding-bottom:8px; border-bottom:2px solid var(--border); display:flex; justify-content:space-between; align-items:center; }
.kanban-col-count { background:var(--primary); color:#fff; border-radius:999px; padding:1px 7px; font-size:11px; }
.kanban-cards { min-height:60px; }
.kanban-card { background:#fff; border-radius:var(--radius-sm); padding:10px 12px; margin-bottom:8px; box-shadow:var(--shadow); cursor:pointer; border-left:3px solid var(--primary-light); transition:box-shadow .15s; position:relative; }
.kanban-card:hover { box-shadow:var(--shadow-md); }
.kanban-card.won { border-left-color:var(--success); }
.kanban-card.lost { border-left-color:var(--danger); opacity:.7; }
.kanban-card-title { font-size:13px; font-weight:600; margin-bottom:3px; }
.kanban-card-sub { font-size:11px; color:var(--text-muted); }
.kanban-card-value { font-size:12px; font-weight:700; color:var(--success); margin-top:4px; }
.kanban-drop-zone { min-height:40px; border:2px dashed #d1d5db; border-radius:var(--radius-sm); display:flex; align-items:center; justify-content:center; font-size:12px; color:var(--text-muted); }

/* ---- KPI / STAT CARDS ---- */
.kpi-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:16px; }
.kpi-group-label { font-size:11px; font-weight:700; color:var(--text-muted); letter-spacing:.8px; text-transform:uppercase; margin:8px 0 6px; padding-left:2px; border-left:3px solid var(--primary); padding-left:8px; }
.kpi-card { background:#fff; border-radius:var(--radius); padding:16px 20px; box-shadow:var(--shadow); text-align:center; }
.kpi-value { font-size:26px; font-weight:800; color:var(--primary); line-height:1.1; }
.kpi-label { font-size:12px; color:var(--text-muted); margin-top:4px; }

/* ---- STAGE BADGE COLORS ---- */
.stage-Lead { background:#e0f2fe; color:#0369a1; }
.stage-Visit { background:#fef3c7; color:#92400e; }
.stage-Quote { background:#f3e8ff; color:#7c3aed; }
.stage-Negotiation { background:#ffedd5; color:#c2410c; }
.stage-Order { background:#d1fae5; color:#065f46; }
.stage-Won { background:#d1fae5; color:#15803d; }
.stage-Lost { background:#fee2e2; color:#991b1b; }
.stage-badge { display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:600; }

/* ---- ACTIVITY STATUS ---- */
.act-status-Pending { background:#fef3c7; color:#92400e; }
.act-status-Completed { background:#d1fae5; color:#15803d; }
.act-status-Cancelled { background:#f1f5f9; color:#475569; }

/* ---- PRODUCT DETAIL TABS ---- */
.prod-dtab { padding:10px 16px; border:none; border-bottom:2px solid transparent; background:none; cursor:pointer; font-size:13px; color:var(--text-muted); margin-bottom:-1px; transition:color .15s,border-color .15s; }
.prod-dtab:hover { color:var(--primary); }
.prod-dtab.active { color:var(--primary); border-bottom-color:var(--primary); font-weight:600; }

/* ---- STOCK STATUS BADGES ---- */
.stock-ok   { background:#d1fae5; color:#065f46; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:600; }
.stock-low  { background:#fef3c7; color:#92400e; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:600; }
.stock-out  { background:#fee2e2; color:#991b1b; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:600; }

/* ---- FULFILLMENT STATUS BADGES ---- */
.badge-fs { font-size:11px; border-radius:4px; padding:2px 7px; font-weight:600; white-space:nowrap; }
.badge-fs-pending       { background:#e2e8f0; color:#475569; }
.badge-fs-waiting_stock { background:#fef3c7; color:#92400e; }
.badge-fs-preparing     { background:#dbeafe; color:#1d4ed8; }
.badge-fs-ready         { background:#d1fae5; color:#065f46; }
.badge-fs-shipped       { background:#ede9fe; color:#5b21b6; }
.badge-fs-delivered     { background:#dcfce7; color:#166534; }

/* ---- REPORT TABS ---- */
.rep-tab { padding:11px 18px; border:none; border-bottom:2px solid transparent; background:none; cursor:pointer; font-size:13px; color:var(--text-muted); transition:color .15s,border-color .15s; white-space:nowrap; }
.rep-tab:hover { color:var(--primary); }
.rep-tab.active { color:var(--primary); border-bottom-color:var(--primary); font-weight:600; }

/* ---- PIC STATS PERIOD BUTTONS ---- */
.pic-period-btn { padding:4px 14px; font-size:0.82em; border:1px solid var(--border); border-radius:20px; cursor:pointer; background:transparent; color:var(--text-muted); transition:background .15s,color .15s,border-color .15s; }
.pic-period-btn:hover { border-color:var(--primary); color:var(--primary); }
.pic-period-btn.active { background:var(--primary); color:#fff; border-color:transparent; font-weight:600; }
