/* ═══════════════════════════════════════════════════
   PGC EVALUATION SYSTEM — Main Stylesheet
   Universidad de Cundinamarca · INTELELIER
   ═══════════════════════════════════════════════════ */

:root {
  /* UdeC Green Palette */
  --green-50: #E8F5E9;
  --green-100: #C8E6C9;
  --green-200: #A5D6A7;
  --green-300: #81C784;
  --green-400: #4CAF50;
  --green-500: #388E3C;
  --green-600: #2E7D32;
  --green-700: #1B5E20;
  --green-accent: #69F0AE;
  --green-accent-dark: #00E676;

  /* Neutrals */
  --gray-0: #FFFFFF;
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-150: #EEEEEE;
  --gray-200: #E0E0E0;
  --gray-300: #BDBDBD;
  --gray-400: #9E9E9E;
  --gray-500: #757575;
  --gray-600: #616161;
  --gray-700: #424242;
  --gray-800: #212121;
  --gray-900: #121212;

  /* Semantic */
  --success: #2E7D32;
  --success-light: #E8F5E9;
  --warning: #F57F17;
  --warning-light: #FFF8E1;
  --danger: #C62828;
  --danger-light: #FFEBEE;
  --info: #1565C0;
  --info-light: #E3F2FD;

  /* Layout */
  --sidebar-w: 240px;
  --topbar-h: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.08);
  --shadow-green: 0 4px 24px rgba(27,94,32,0.25);

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;

  /* Transitions */
  --t-fast: 120ms cubic-bezier(0.4,0,0.2,1);
  --t-base: 200ms cubic-bezier(0.4,0,0.2,1);
  --t-slow: 350ms cubic-bezier(0.4,0,0.2,1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--gray-50); color: var(--gray-800); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ── UTILITY ── */
.hidden { display: none !important; }
.active { display: block !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.text-green { color: var(--green-700); }
.text-muted { color: var(--gray-500); }
.fw-600 { font-weight: 600; }
.font-mono { font-family: var(--font-mono); }

/* ════════════════════════════════════════
   AUTH SCREEN
════════════════════════════════════════ */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--gray-900);
}
.auth-screen.active { display: flex; }

.auth-bg {
  position: absolute; inset: 0;
  pointer-events: none;
}
.auth-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(105,240,174,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105,240,174,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}
.auth-bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}
.blob-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(27,94,32,0.4) 0%, transparent 70%);
  top: -150px; left: -150px;
}
.blob-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(46,125,50,0.3) 0%, transparent 70%);
  bottom: -100px; right: -100px;
}

.auth-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 460px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.auth-brand { width: 100%; }
.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.auth-logo-text {
  display: flex;
  flex-direction: column;
}
.auth-logo-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gray-0);
  letter-spacing: -0.02em;
}
.auth-logo-sub {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--green-accent);
  text-transform: uppercase;
}

.auth-card {
  width: 100%;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: 2rem;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-card-header { margin-bottom: 1.5rem; }
.auth-card-header h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--gray-0);
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.auth-card-header p {
  color: var(--gray-400);
  font-size: 0.875rem;
  margin-top: 0.375rem;
}

.auth-tabs {
  display: flex;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  margin-bottom: 1.5rem;
}
.auth-tab {
  flex: 1;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-400);
  transition: all var(--t-base);
}
.auth-tab.active {
  background: var(--green-700);
  color: var(--gray-0);
  box-shadow: var(--shadow-green);
}

.auth-form { display: none; flex-direction: column; gap: 1rem; }
.auth-form.active { display: flex; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-400);
}
.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  color: var(--gray-0);
  font-size: 0.9rem;
  transition: all var(--t-base);
  outline: none;
}
.form-input::placeholder { color: var(--gray-600); }
.form-input:focus {
  border-color: var(--green-400);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
}
.form-input option { background: var(--gray-800); }

.input-with-icon { position: relative; }
.input-with-icon .form-input { padding-right: 2.75rem; }
.input-icon-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  transition: color var(--t-fast);
}
.input-icon-btn:hover { color: var(--gray-300); }

.form-error {
  font-size: 0.8rem;
  color: #FF8A80;
  padding: 0.5rem 0.75rem;
  background: rgba(198,40,40,0.15);
  border-radius: var(--radius-sm);
  border-left: 3px solid #C62828;
}

/* Light mode form inputs (inside app) */
.panel-section .form-input, .modal .form-input {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  color: var(--gray-800);
}
.panel-section .form-input::placeholder, .modal .form-input::placeholder { color: var(--gray-400); }
.panel-section .form-input:focus, .modal .form-input:focus {
  border-color: var(--green-500);
  background: var(--gray-0);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}
.panel-section .form-group label, .modal .form-group label {
  color: var(--gray-600);
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--green-700);
  color: var(--gray-0);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--t-base);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--green-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-green);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.btn-full { width: 100%; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--t-base);
  white-space: nowrap;
}
.btn-secondary:hover { background: var(--gray-200); border-color: var(--gray-300); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--danger-light);
  color: var(--danger);
  border: 1.5px solid rgba(198,40,40,0.2);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--t-base);
}
.btn-danger:hover { background: var(--danger); color: white; }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8rem; }
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  transition: all var(--t-fast);
  color: var(--gray-500);
}
.btn-icon:hover { background: var(--gray-100); color: var(--gray-700); }
.btn-icon.green:hover { background: var(--green-50); color: var(--green-700); }
.btn-icon.red:hover { background: var(--danger-light); color: var(--danger); }

/* Demo accounts */
.auth-demo-accounts {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.demo-label { font-size: 0.75rem; color: var(--gray-500); margin-bottom: 0.5rem; }
.demo-btns { display: flex; gap: 0.5rem; }
.demo-btn {
  flex: 1;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  transition: all var(--t-fast);
}
.demo-admin { background: rgba(27,94,32,0.3); color: var(--green-accent); border: 1px solid rgba(105,240,174,0.2); }
.demo-admin:hover { background: rgba(27,94,32,0.5); }
.demo-docente { background: rgba(21,101,192,0.3); color: #82B1FF; border: 1px solid rgba(130,177,255,0.2); }
.demo-docente:hover { background: rgba(21,101,192,0.5); }
.demo-estudiante { background: rgba(245,127,23,0.3); color: #FFD54F; border: 1px solid rgba(255,213,79,0.2); }
.demo-estudiante:hover { background: rgba(245,127,23,0.5); }

.auth-footer {
  font-size: 0.75rem;
  color: var(--gray-600);
  text-align: center;
}

/* ════════════════════════════════════════
   APP LAYOUT
════════════════════════════════════════ */
.app {
  display: flex;
  min-height: 100vh;
  background: var(--gray-100);
}
.app.hidden { display: none; }

/* ── SIDEBAR ── */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--gray-900);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--t-slow);
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.sidebar-logo-text { display: flex; flex-direction: column; }
.sidebar-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--gray-0);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.sidebar-sub {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--green-accent);
  text-transform: uppercase;
}
.sidebar-toggle-mobile {
  display: none;
  color: var(--gray-400);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-600);
  padding: 0.75rem 0.75rem 0.375rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--gray-400);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--t-fast);
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--gray-200); }
.nav-item.active {
  background: rgba(46,125,50,0.25);
  color: var(--green-accent);
  border-left: none;
}
.nav-item.active svg { color: var(--green-accent); }
.nav-item svg { flex-shrink: 0; opacity: 0.8; }
.nav-badge {
  margin-left: auto;
  background: var(--green-700);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

.sidebar-bottom {
  padding: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  transition: background var(--t-fast);
  cursor: pointer;
}
.sidebar-user:hover { background: rgba(255,255,255,0.05); }
.sidebar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.sidebar-user-info { overflow: hidden; }
.sidebar-user-name {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-200);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  display: block;
  font-size: 0.7rem;
  color: var(--gray-500);
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--gray-500);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--t-fast);
  width: 100%;
}
.sidebar-logout:hover { background: rgba(198,40,40,0.15); color: #FF8A80; }

/* ── TOPBAR ── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  flex: 1;
  transition: margin var(--t-slow);
}
.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: var(--gray-0);
  border-bottom: 1px solid var(--gray-150);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1rem;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 1rem; flex: 1; }
.topbar-menu-btn {
  display: none;
  color: var(--gray-600);
  padding: 0.375rem;
  border-radius: var(--radius-sm);
}
.topbar-menu-btn:hover { background: var(--gray-100); }

.topbar-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gray-100);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.375rem 0.75rem;
  max-width: 280px;
  width: 100%;
  transition: all var(--t-base);
}
.topbar-search:focus-within {
  border-color: var(--green-400);
  background: var(--gray-0);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}
.topbar-search svg { color: var(--gray-400); flex-shrink: 0; }
.topbar-search input {
  background: none;
  border: none;
  outline: none;
  font-size: 0.85rem;
  color: var(--gray-700);
  width: 100%;
}
.topbar-search input::placeholder { color: var(--gray-400); }

.topbar-right { display: flex; align-items: center; gap: 0.75rem; }
.topbar-nav-tabs { display: flex; gap: 0.125rem; }
.topbar-tab {
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-500);
  transition: all var(--t-fast);
  cursor: pointer;
}
.topbar-tab:hover { color: var(--gray-700); background: var(--gray-100); }
.topbar-tab.active { color: var(--green-700); background: var(--green-50); font-weight: 600; }

.topbar-notif {
  position: relative;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--gray-500);
  transition: all var(--t-fast);
}
.topbar-notif:hover { background: var(--gray-100); color: var(--gray-700); }
.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--green-accent-dark);
  border-radius: 50%;
  border: 2px solid var(--gray-0);
}
.topbar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  padding: 2rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  animation: contentFade 0.25s ease;
}
@keyframes contentFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════
   PAGE HEADER
════════════════════════════════════════ */
.page-header {
  margin-bottom: 1.75rem;
}
.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--green-50);
  color: var(--green-700);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  border: 1px solid var(--green-100);
  margin-bottom: 0.625rem;
}
.page-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gray-900);
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 0.375rem;
}
.page-title span { color: var(--green-700); }
.page-subtitle {
  font-size: 0.9rem;
  color: var(--gray-500);
  max-width: 540px;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* ════════════════════════════════════════
   CARDS & PANELS
════════════════════════════════════════ */
.card {
  background: var(--gray-0);
  border: 1px solid var(--gray-150);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-base);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card-header-left { display: flex; flex-direction: column; }
.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-800);
  letter-spacing: -0.01em;
}
.card-subtitle { font-size: 0.8rem; color: var(--gray-500); margin-top: 1px; }
.card-body { padding: 1.25rem 1.5rem; }

/* STAT CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--gray-0);
  border: 1px solid var(--gray-150);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card.green::before { background: linear-gradient(90deg, var(--green-700), var(--green-400)); }
.stat-card.blue::before { background: linear-gradient(90deg, #1565C0, #42A5F5); }
.stat-card.orange::before { background: linear-gradient(90deg, #E65100, #FFB74D); }
.stat-card.purple::before { background: linear-gradient(90deg, #4527A0, #9575CD); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon.green { background: var(--green-50); color: var(--green-700); }
.stat-icon.blue { background: #E3F2FD; color: #1565C0; }
.stat-icon.orange { background: #FFF3E0; color: #E65100; }
.stat-icon.purple { background: #EDE7F6; color: #4527A0; }
.stat-info { flex: 1; min-width: 0; }
.stat-value {
  font-family: var(--font-display);
  font-size: 1.875rem;
  line-height: 1;
  color: var(--gray-900);
  letter-spacing: -0.04em;
  margin-bottom: 0.25rem;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--gray-500);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-change {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.stat-change.up { color: var(--green-600); }
.stat-change.down { color: var(--danger); }

/* ════════════════════════════════════════
   TABLES
════════════════════════════════════════ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table thead tr {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.data-table th {
  padding: 0.625rem 1rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gray-500);
  white-space: nowrap;
}
.data-table tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--t-fast);
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table td {
  padding: 0.75rem 1rem;
  color: var(--gray-700);
  vertical-align: middle;
}
.data-table td strong { color: var(--gray-900); font-weight: 600; }

/* ── TABLE ELEMENTS ── */
.td-avatar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.td-avatar-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.625rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-green { background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-100); }
.badge-blue { background: #E3F2FD; color: #1565C0; border: 1px solid #BBDEFB; }
.badge-orange { background: #FFF3E0; color: #E65100; border: 1px solid #FFE0B2; }
.badge-purple { background: #EDE7F6; color: #4527A0; border: 1px solid #D1C4E9; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200); }
.badge-red { background: var(--danger-light); color: var(--danger); border: 1px solid rgba(198,40,40,0.2); }

/* ── STAR RATING ── */
.star-rating {
  display: flex;
  gap: 2px;
  align-items: center;
}
.star-rating .star {
  width: 18px; height: 18px;
  color: var(--gray-300);
  cursor: pointer;
  transition: color var(--t-fast), transform var(--t-fast);
}
.star-rating .star.filled { color: #F9A825; }
.star-rating .star:hover, .star-rating .star.hover { color: #F9A825; transform: scale(1.15); }
.star-rating-display .star { cursor: default; width: 16px; height: 16px; }

/* ── SCORE BAR ── */
.score-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 120px;
}
.score-track {
  flex: 1;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
}
.score-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--green-500), var(--green-accent));
  transition: width var(--t-slow);
}
.score-label { font-size: 0.75rem; font-weight: 700; color: var(--gray-700); min-width: 24px; }

/* ════════════════════════════════════════
   EVALUATION FORM (Step Wizard)
════════════════════════════════════════ */
.wizard-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
  padding: 0;
}
.wizard-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  position: relative;
}
.wizard-step::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  transition: background var(--t-base);
}
.wizard-step:last-child::after { display: none; }
.wizard-step.completed::after { background: var(--green-500); }

.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--gray-200);
  background: var(--gray-0);
  color: var(--gray-500);
  transition: all var(--t-base);
  z-index: 1;
}
.wizard-step.active .step-circle {
  border-color: var(--green-700);
  background: var(--green-700);
  color: white;
  box-shadow: 0 0 0 4px rgba(27,94,32,0.15);
}
.wizard-step.completed .step-circle {
  border-color: var(--green-500);
  background: var(--green-500);
  color: white;
}
.step-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gray-400);
  white-space: nowrap;
  transition: color var(--t-base);
}
.wizard-step.active .step-label { color: var(--green-700); }
.wizard-step.completed .step-label { color: var(--green-600); }

.wizard-panel { display: none; }
.wizard-panel.active { display: block; animation: contentFade 0.2s ease; }

.panel-section {
  background: var(--gray-0);
  border: 1px solid var(--gray-150);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.panel-section-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--gray-100);
}
.section-indicator {
  width: 4px;
  height: 20px;
  background: var(--green-700);
  border-radius: 2px;
}
.panel-section-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

/* PROJECT CARD PREVIEW */
.project-preview-card {
  background: linear-gradient(135deg, var(--green-700) 0%, var(--green-600) 100%);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  color: white;
  margin-top: 0.75rem;
  display: none;
  animation: slideUp 0.2s ease;
}
.project-preview-card.visible { display: block; }
.project-preview-id {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  opacity: 0.7;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.project-preview-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.project-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.project-preview-tag {
  background: rgba(255,255,255,0.15);
  padding: 0.2rem 0.625rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.members-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.75rem;
}
.member-chip {
  background: rgba(255,255,255,0.2);
  padding: 0.2rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  border: 1px solid rgba(255,255,255,0.3);
}

/* STAR RATING INPUT (large) */
.rating-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.rating-stars-large {
  display: flex;
  gap: 6px;
}
.rating-stars-large .star-btn {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gray-200);
  background: var(--gray-50);
  color: var(--gray-300);
  transition: all var(--t-fast);
  cursor: pointer;
}
.rating-stars-large .star-btn svg { width: 22px; height: 22px; }
.rating-stars-large .star-btn:hover,
.rating-stars-large .star-btn.hover { border-color: #F9A825; background: #FFF8E1; color: #F9A825; }
.rating-stars-large .star-btn.filled { border-color: #F9A825; background: #FFF8E1; color: #F9A825; }
.rating-label { font-size: 0.85rem; color: var(--gray-500); font-style: italic; }

/* PHOTO UPLOAD */
.photo-upload-zone {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: all var(--t-base);
  cursor: pointer;
  background: var(--gray-50);
}
.photo-upload-zone:hover, .photo-upload-zone.dragover {
  border-color: var(--green-400);
  background: var(--green-50);
}
.photo-upload-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.875rem;
}
.photo-upload-zone h4 { font-size: 0.9rem; font-weight: 600; color: var(--gray-700); margin-bottom: 0.25rem; }
.photo-upload-zone p { font-size: 0.78rem; color: var(--gray-500); }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb-remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: background var(--t-fast);
}
.photo-thumb-remove:hover { background: var(--danger); }
.photo-add-btn {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  border: 2px dashed var(--gray-200);
  background: var(--gray-50);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 0.72rem;
  font-weight: 500;
  transition: all var(--t-fast);
}
.photo-add-btn:hover { border-color: var(--green-400); color: var(--green-600); background: var(--green-50); }

/* FINALIZE BUTTON */
.btn-finalize {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 2rem;
  background: var(--gray-900);
  color: white;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all var(--t-base);
  text-transform: uppercase;
}
.btn-finalize:hover { background: var(--green-700); transform: translateY(-2px); box-shadow: var(--shadow-green); }
.btn-finalize-note { font-size: 0.72rem; color: var(--gray-500); margin-top: 0.5rem; letter-spacing: 0.03em; text-transform: uppercase; }

/* ════════════════════════════════════════
   CHARTS (CSS-based)
════════════════════════════════════════ */
.chart-bar-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.chart-bar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.chart-bar-label {
  font-size: 0.78rem;
  color: var(--gray-600);
  min-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-bar-track {
  flex: 1;
  height: 28px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}
.chart-bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--green-700), var(--green-accent));
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 2rem;
}
.chart-bar-val {
  font-size: 0.72rem;
  font-weight: 700;
  color: white;
}
.chart-bar-count { font-size: 0.75rem; color: var(--gray-500); min-width: 32px; text-align: right; }

/* ════════════════════════════════════════
   MODAL
════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease;
}
.modal-overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--gray-0);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalSlide 0.2s ease;
}
.modal.modal-lg { max-width: 760px; }
@keyframes modalSlide {
  from { opacity: 0; transform: translateY(-24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-150);
}
.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}
.modal-close {
  color: var(--gray-400);
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all var(--t-fast);
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }
.modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--gray-150);
}

/* ════════════════════════════════════════
   TOAST
════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--gray-900);
  color: var(--gray-0);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: toastIn 0.25s ease, toastOut 0.25s ease 2.75s forwards;
  max-width: 320px;
  border-left: 3px solid transparent;
}
.toast.success { border-left-color: var(--green-accent); }
.toast.error { border-left-color: #FF5252; }
.toast.info { border-left-color: #40C4FF; }
@keyframes toastIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100%); } }

/* ════════════════════════════════════════
   MOBILE OVERLAY
════════════════════════════════════════ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* ════════════════════════════════════════
   EMPTY STATES
════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--gray-500);
}
.empty-state svg { color: var(--gray-300); margin-bottom: 1rem; }
.empty-state h4 { font-size: 1rem; font-weight: 600; color: var(--gray-700); margin-bottom: 0.375rem; }
.empty-state p { font-size: 0.85rem; max-width: 280px; }

/* ════════════════════════════════════════
   MISC COMPONENTS
════════════════════════════════════════ */
.divider { height: 1px; background: var(--gray-150); margin: 1rem 0; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-600);
  font-family: var(--font-mono);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-1 { gap: 0.25rem; }
.gap-3 { gap: 0.75rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }

/* Avatar colors */
.av-green { background: linear-gradient(135deg, #1B5E20, #4CAF50); }
.av-blue  { background: linear-gradient(135deg, #1565C0, #42A5F5); }
.av-orange{ background: linear-gradient(135deg, #E65100, #FFA726); }
.av-purple{ background: linear-gradient(135deg, #4527A0, #9575CD); }
.av-teal  { background: linear-gradient(135deg, #00695C, #26A69A); }
.av-red   { background: linear-gradient(135deg, #B71C1C, #EF5350); }

/* File import area */
.import-zone {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-base);
  background: var(--gray-50);
}
.import-zone:hover { border-color: var(--green-400); background: var(--green-50); }
.import-zone h4 { font-size: 0.9rem; font-weight: 600; color: var(--gray-700); margin: 0.5rem 0 0.25rem; }
.import-zone p { font-size: 0.78rem; color: var(--gray-500); }

/* Tabs component */
.tab-strip {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 1.5rem;
}
.tab-strip-item {
  padding: 0.625rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--t-fast);
  cursor: pointer;
  white-space: nowrap;
}
.tab-strip-item:hover { color: var(--gray-700); }
.tab-strip-item.active { color: var(--green-700); border-bottom-color: var(--green-700); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: contentFade 0.2s ease; }

/* Filter row */
.filter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.filter-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--gray-0);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--gray-700);
  transition: all var(--t-base);
}
.filter-input input, .filter-input select {
  background: none;
  border: none;
  outline: none;
  font-size: 0.85rem;
  color: var(--gray-700);
  min-width: 140px;
}
.filter-input:focus-within {
  border-color: var(--green-400);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.show { display: block; }
  .sidebar-toggle-mobile { display: flex; }
  .main-wrapper { margin-left: 0; }
  .topbar-menu-btn { display: flex; }
  .topbar-nav-tabs { display: none; }
  .main-content { padding: 1.25rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .wizard-steps .step-label { display: none; }
}
@media (max-width: 600px) {
  .auth-container { padding: 1rem; }
  .auth-card { padding: 1.5rem 1.25rem; }
  .form-row { grid-template-columns: 1fr; }
  .main-content { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .page-title { font-size: 1.625rem; }
  .data-table { font-size: 0.8rem; }
  .data-table th, .data-table td { padding: 0.5rem 0.75rem; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .filter-input { width: 100%; }
}
@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* Print styles */
@media print {
  .sidebar, .topbar, .page-actions, .btn-primary, .btn-secondary { display: none !important; }
  .main-wrapper { margin-left: 0; }
  .main-content { padding: 0; }
}
