/* ===== CSS VARIABLES ===== */
:root {
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #64748b;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #1f2937;
  --text-light: #6b7280;
  --text-lighter: #9ca3af;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --error: #ef4444;
  --error-light: #fef2f2;
  --purple: #8b5cf6;
  --purple-light: #f5f3ff;
  --gold: #f59e0b;
  --gold-light: #fffbeb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --header-height: 64px;
  --transition: 0.2s ease;
}

/* Dark theme */
body.dark {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #162032;
  --text: #f1f5f9;
  --text-light: #94a3b8;
  --text-lighter: #64748b;
  --border: #334155;
  --border-light: #1e293b;
  --primary-light: #1e3a5f;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.3);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.4);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input, textarea, select { font-family: inherit;   min-height: 44px;
}
a { text-decoration: none; color: inherit; }

/* ===== AUTH PAGE ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 24px;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.auth-logo-icon { font-size: 28px; }
.auth-logo-text { font-size: 22px; font-weight: 700; color: var(--primary); }

.auth-card h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.auth-subtitle { color: var(--text-light); margin-bottom: 28px; }

.auth-error {
  background: var(--error-light);
  color: var(--error);
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
}

.auth-toggle { margin-top: 20px; text-align: center; color: var(--text-light); font-size: 13px; }
.auth-toggle a { color: var(--primary); font-weight: 600; }
.auth-toggle a:hover { text-decoration: underline; }

/* ===== LAYOUT ===== */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-left { flex-shrink: 0; }
.app-logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 22px; }
.logo-text { font-size: 18px; font-weight: 700; color: var(--primary); letter-spacing: -0.3px; }

.app-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  padding-bottom: 2px;
}
.app-nav::-webkit-scrollbar { height: 2px; }
.app-nav::-webkit-scrollbar-track { background: transparent; }
.app-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 1px; }

.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--transition);
  min-height: 36px;
  position: relative;
}
.nav-btn:hover { background: var(--surface-2); color: var(--text); }
.nav-btn.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.nav-btn svg { opacity: 0.7; }
.nav-btn.active svg { opacity: 1; }

.pro-badge-nav {
  font-size: 9px;
  font-weight: 700;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  margin-left: 2px;
}

.header-right { flex-shrink: 0; margin-left: auto; }

.logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  min-height: 36px;
}
.logout-btn:hover { background: var(--error-light); color: var(--error); border-color: var(--error); }

.app-main {
  margin-top: var(--header-height);
  padding: 32px;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  margin-top: var(--header-height);
}

/* ===== PAGE STYLES ===== */
.page { display: none; }
.page.active { display: block; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.4px; }
.page-subtitle { color: var(--text-light); margin-top: 2px; font-size: 14px; }

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon-blue { background: var(--primary-light); color: var(--primary); }
.stat-icon-green { background: var(--success-light); color: var(--success); }
.stat-icon-gold { background: var(--gold-light); color: var(--gold); }
.stat-icon-purple { background: var(--purple-light); color: var(--purple); }

.stat-content { flex: 1; min-width: 0; }
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-value-sm { font-size: 1.1rem; font-weight: 700; }
.stat-meta { font-size: 11px; color: var(--text-lighter); margin-top: 4px; }

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ===== CARD ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h3 { font-size: 15px; font-weight: 600; }

.card-body { padding: 16px 20px; }
.card-toolbar {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

/* ===== FORM STYLES ===== */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-group-full { grid-column: 1 / -1; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
textarea,
select {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 44px;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
textarea { resize: vertical; min-height: 80px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  min-height: 44px;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: var(--error-light); color: var(--error); }
.btn-danger:hover { background: var(--error); color: white; }
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 12px; font-size: 12px; min-height: 32px; }
.btn-lg { padding: 14px 28px; font-size: 16px; min-height: 52px; }

/* ===== SEARCH & FILTER ===== */
.search-input {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}
.filter-select { min-width: 160px; width: auto; }

/* ===== TABLE ===== */
.table-container { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.data-table th:hover { color: var(--text); }
.data-table th[data-sort]::after { content: ' ↕'; opacity: 0.4; font-size: 10px; }
.data-table th.sort-asc::after { content: ' ↑'; opacity: 1; color: var(--primary); }
.data-table th.sort-desc::after { content: ' ↓'; opacity: 1; color: var(--primary); }

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-2); }

.empty-cell { text-align: center; color: var(--text-lighter); padding: 40px !important; font-style: italic; }

/* ===== STAR RATING ===== */
.star-rating {
  display: flex;
  gap: 6px;
}
.star {
  font-size: 28px;
  background: none;
  color: #d1d5db;
  padding: 4px;
  border-radius: 4px;
  transition: color var(--transition), transform var(--transition);
  min-height: auto;
}
.star:hover, .star.active { color: var(--gold); }
.star:hover { transform: scale(1.15); }

.rating-stars { color: var(--gold); letter-spacing: 1px; }
.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.rating-5 { background: #dcfce7; color: #15803d; }
.rating-4 { background: #d1fae5; color: #059669; }
.rating-3 { background: #fef9c3; color: #a16207; }
.rating-2 { background: #ffedd5; color: #c2410c; }
.rating-1 { background: #fee2e2; color: #dc2626; }

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[style*="flex"] {
  display: flex !important;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.modal-content {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
  display: block !important;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-header h2 { font-size: 1.2rem; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-light);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  border: none;
  min-height: auto;
  cursor: pointer;
}
.modal-close:hover { background: var(--error-light); color: var(--error); }

/* ===== PRO LOCK OVERLAY ===== */
.pro-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--radius);
}
body.dark .pro-lock-overlay { background: rgba(15, 23, 42, 0.9); }

.pro-lock-content {
  text-align: center;
  padding: 40px;
  max-width: 400px;
}
.pro-lock-icon { font-size: 48px; margin-bottom: 16px; }
.pro-lock-content h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.pro-lock-content p { color: var(--text-light); margin-bottom: 24px; line-height: 1.6; }

#rankingsPage, #okrsPage, #departmentsPage, #reportsPage { position: relative; min-height: 300px; }

/* ===== RANKINGS ===== */
.trend-up { color: var(--success); font-weight: 700; }
.trend-down { color: var(--error); font-weight: 700; }
.trend-stable { color: var(--text-lighter); font-weight: 600; }
.rank-number { font-weight: 700; color: var(--text-light); }
.rank-1 .rank-number { color: #f59e0b; font-size: 18px; }
.rank-2 .rank-number { color: #94a3b8; font-size: 16px; }
.rank-3 .rank-number { color: #b45309; font-size: 15px; }

/* ===== OKRs ===== */
.okrs-list { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.okr-card {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 18px 20px;
  border: 1px solid var(--border);
}
.okr-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}
.okr-title { font-weight: 700; font-size: 14px; }
.okr-meta { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.okr-status {
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.status-on_track { background: #dcfce7; color: #15803d; }
.status-at_risk { background: #fef9c3; color: #a16207; }
.status-behind { background: #fee2e2; color: #dc2626; }
.status-completed { background: #dbeafe; color: #1d4ed8; }

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}
.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}
.progress-low { background: var(--error); }
.progress-mid { background: var(--warning); }
.progress-high { background: var(--success); }

.okr-actions { display: flex; gap: 6px; margin-top: 12px; justify-content: flex-end; }

/* ===== DEPARTMENT COMPARISON ===== */
.dept-comp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.dept-comp-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.dept-comp-name { font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.dept-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dept-metric { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.dept-metric:last-child { border-bottom: none; }
.dept-metric-label { font-size: 12px; color: var(--text-light); }
.dept-metric-value { font-size: 14px; font-weight: 700; }

/* ===== REPORTS ===== */
.reports-list { display: flex; flex-direction: column; gap: 16px; }
.report-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.report-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.report-title { font-size: 16px; font-weight: 700; }
.report-date { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.report-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.report-metric {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}
.report-metric-val { font-size: 1.5rem; font-weight: 700; }
.report-metric-label { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.report-flags { margin-top: 12px; }
.report-flag-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; }
.flag-icon { color: var(--error); }

/* ===== CRON STATUS ===== */
.cron-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--success-light);
  color: var(--success);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.cron-dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.cron-job-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.cron-job-row:last-child { border-bottom: none; }
.cron-job-name { font-weight: 600; font-size: 14px; }
.cron-job-schedule { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.cron-job-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--success); }

/* ===== SETTINGS ===== */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 16px;
}
.setting-row:last-child { border-bottom: none; }
.setting-label { font-weight: 600; font-size: 14px; }
.setting-desc { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.theme-btns { display: flex; gap: 8px; }
.theme-btn {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  min-height: 38px;
}
.theme-btn:hover { border-color: var(--primary); color: var(--primary); }
.theme-btn.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 700; }

/* ===== EMPTY STATES ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}
.empty-state-sm {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-lighter);
  font-style: italic;
}
.empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ===== RANGE INPUT ===== */
.range-input { padding: 0; border: none; background: none; cursor: pointer; height: 24px; min-height: auto; }
.range-input:focus { box-shadow: none; }

/* ===== DEPT BREAKDOWN ===== */
.dept-bar-item { margin-bottom: 12px; }
.dept-bar-label { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 13px; }
.dept-bar-name { font-weight: 600; }
.dept-bar-val { color: var(--primary); font-weight: 700; }
.dept-bar-track { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.dept-bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--primary), #818cf8); transition: width 0.6s ease; }

/* ===== RECENT REVIEWS ===== */
.review-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.review-item:last-child { border-bottom: none; }
.review-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.review-info { flex: 1; min-width: 0; }
.review-name { font-weight: 600; font-size: 13px; }
.review-week { font-size: 11px; color: var(--text-lighter); }
.review-rating { font-size: 12px; }

/* ===== ACTION BUTTONS ===== */
.action-btns { display: flex; gap: 6px; }
.btn-icon {
  width: 30px; height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  min-height: auto;
}
.btn-edit { background: var(--primary-light); color: var(--primary); }
.btn-edit:hover { background: var(--primary); color: white; }
.btn-delete { background: var(--error-light); color: var(--error); }
.btn-delete:hover { background: var(--error); color: white; }

/* ===== PRO FEATURE BADGE ===== */
.pro-feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

/* ===== EMPLOYEE AVATAR ===== */
.emp-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
  margin-right: 8px;
}
.emp-cell { display: flex; align-items: center; }
.emp-details { }
.emp-name { font-weight: 600; }
.emp-dept { font-size: 11px; color: var(--text-lighter); }

/* ===== TOAST NOTIFICATIONS ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: var(--surface);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  z-index: 9999;
  animation: toastIn 0.3s ease;
  box-shadow: var(--shadow-md);
  max-width: 320px;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--error); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== ACCOUNT SETTINGS ===== */
.account-settings-section { display: flex; flex-direction: column; gap: 20px; max-width: 720px; }
.account-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.account-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.account-detail { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.account-detail:last-of-type { border-bottom: none; }
.account-detail-label { font-size: 13px; color: var(--text-light); font-weight: 500; }
.account-detail-value { font-size: 14px; font-weight: 600; }
.account-manage-btn {
  margin-top: 16px;
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 44px;
}
.account-manage-btn:hover { background: var(--primary-dark); }
.status-badge { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.status-badge.active { background: var(--success-light); color: var(--success); }
.status-badge.free { background: var(--surface-2); color: var(--text-light); }
.status-badge.trialing { background: var(--primary-light); color: var(--primary); }
.status-badge.canceled { background: var(--error-light); color: var(--error); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .report-metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .app-main { padding: 20px 16px; }
  .app-header { padding: 0 16px; gap: 12px; }
  .logo-text { display: none; }
  .nav-btn span:not(.pro-badge-nav) { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group-full { grid-column: auto; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .report-metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 20px; }
  .modal-content { padding: 20px; }
  .app-nav { gap: 0; }
}