/* ============================================
   InnoEval - Main Stylesheet
   Bright, Colorful, Mobile-First
   Font: Nunito + Syne
============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=Nunito:wght@400;500;600;700;800&display=swap');

/* ============================================
   CSS VARIABLES
============================================ */
:root {
  /* Brand palette */
  --c-violet:   #7C3AED;
  --c-violet-l: #EDE9FE;
  --c-violet-d: #5B21B6;
  --c-pink:     #EC4899;
  --c-pink-l:   #FCE7F3;
  --c-cyan:     #06B6D4;
  --c-cyan-l:   #CFFAFE;
  --c-emerald:  #10B981;
  --c-emerald-l:#D1FAE5;
  --c-amber:    #F59E0B;
  --c-amber-l:  #FEF3C7;
  --c-orange:   #F97316;
  --c-orange-l: #FFEDD5;
  --c-red:      #EF4444;
  --c-red-l:    #FEE2E2;
  --c-blue:     #3B82F6;
  --c-blue-l:   #DBEAFE;

  /* UI */
  --bg:         #F8F5FF;
  --bg-card:    #FFFFFF;
  --text:       #1E1B4B;
  --text-muted: #6B7280;
  --border:     #E5E7EB;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 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 25px rgba(0,0,0,.1);
  --radius:     12px;
  --radius-sm:  8px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --transition: all .2s ease;

  /* Gradients */
  --grad-violet: linear-gradient(135deg, #7C3AED, #EC4899);
  --grad-cyan:   linear-gradient(135deg, #06B6D4, #10B981);
  --grad-amber:  linear-gradient(135deg, #F59E0B, #EF4444);
  --grad-blue:   linear-gradient(135deg, #3B82F6, #7C3AED);
  --grad-bg:     linear-gradient(135deg, #F8F5FF 0%, #EDE9FE 50%, #FCE7F3 100%);
}

/* ============================================
   RESET & BASE
============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-violet); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--c-violet-d); }
ul, ol { list-style: none; }
input, select, textarea, button { font-family: inherit; }

/* ============================================
   TYPOGRAPHY
============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.1rem; }
.text-muted { color: var(--text-muted); }
.text-sm    { font-size: .875rem; }
.text-xs    { font-size: .75rem; }
.fw-600     { font-weight: 600; }
.fw-700     { font-weight: 700; }
.fw-800     { font-weight: 800; }

/* ============================================
   LAYOUT
============================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media(min-width:640px)  { .container { padding: 0 1.5rem; } }
@media(min-width:1024px) { .container { padding: 0 2rem; } }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap  { flex-wrap: wrap; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.items-center { align-items: center; }

/* ============================================
   NAVBAR
============================================ */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--grad-violet);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.navbar-brand .brand-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--grad-violet);
  -webkit-text-fill-color: initial;
  display: inline-block;
}
.navbar-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.navbar-nav a {
  padding: .4rem .9rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.navbar-nav a:hover, .navbar-nav a.active {
  background: var(--c-violet-l);
  color: var(--c-violet);
}
.navbar-user {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad-violet);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  font-family: 'Syne', sans-serif;
}
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  color: var(--text);
}
@media(max-width:768px) {
  .hamburger { display: flex; flex-direction: column; gap: 4px; }
  .hamburger span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: var(--transition); }
  .navbar-nav { 
    display: none; 
    position: fixed; top: 64px; left: 0; right: 0; 
    background: #fff; 
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: .25rem;
    box-shadow: var(--shadow-md);
    z-index: 99;
  }
  .navbar-nav.open { display: flex; }
  .navbar-nav a { width: 100%; }
}

/* ============================================
   SIDEBAR (Admin/Judge layouts)
============================================ */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--text);
  position: fixed;
  top: 0; left: 0;
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform .3s ease;
}
.sidebar-logo {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--grad-violet);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-logo small {
  display: block;
  font-size: .65rem;
  font-weight: 400;
  color: rgba(255,255,255,.4);
  -webkit-text-fill-color: rgba(255,255,255,.4);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}
.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }
.sidebar-section {
  padding: .25rem 1.5rem .5rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  margin-top: .75rem;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1.5rem;
  color: rgba(255,255,255,.65);
  font-weight: 600;
  font-size: .9rem;
  transition: var(--transition);
  border-left: 3px solid transparent;
  margin: .1rem 0;
}
.sidebar-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar-nav a.active {
  color: #fff;
  background: rgba(124,58,237,.25);
  border-left-color: var(--c-violet);
}
.sidebar-nav a .nav-icon { font-size: 1.1rem; width: 1.4rem; text-align: center; }
.sidebar-nav a .nav-badge {
  margin-left: auto;
  background: var(--c-violet);
  color: #fff;
  font-size: .7rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-weight: 700;
}
.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.main-content {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
  background: var(--bg);
}
.top-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: .75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}
.page-content { padding: 2rem; }

@media(max-width:1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .page-content { padding: 1rem; }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 199;
}
.sidebar-overlay.show { display: block; }

/* ============================================
   CARDS
============================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.card-body  { padding: 1.5rem; }
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,.015);
}

/* Colored card tops */
.card-accent { border-top: 4px solid var(--accent-color, var(--c-violet)); }

/* ============================================
   STAT CARDS
============================================ */
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--card-grad, var(--grad-violet));
}
.stat-card .stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  background: var(--icon-bg, var(--c-violet-l));
}
.stat-card .stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: .25rem;
}
.stat-card .stat-label { font-size: .85rem; color: var(--text-muted); font-weight: 600; }
.stat-card .stat-change {
  font-size: .8rem;
  font-weight: 600;
  margin-top: .5rem;
}
.stat-card .stat-change.up   { color: var(--c-emerald); }
.stat-card .stat-change.down { color: var(--c-red); }

/* ============================================
   BUTTONS
============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .9rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: .35rem .85rem; font-size: .8rem; }
.btn-lg { padding: .75rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { padding: .5rem; width: 38px; height: 38px; }

.btn-primary   { background: var(--grad-violet); color: #fff; border-color: transparent; }
.btn-primary:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 15px rgba(124,58,237,.4); }

.btn-success   { background: var(--c-emerald); color: #fff; }
.btn-success:hover { background: #059669; }

.btn-danger    { background: var(--c-red); color: #fff; }
.btn-danger:hover { background: #DC2626; }

.btn-warning   { background: var(--c-amber); color: #fff; }
.btn-warning:hover { background: #D97706; }

.btn-info      { background: var(--c-cyan); color: #fff; }
.btn-info:hover { background: #0891B2; }

.btn-outline-primary {
  background: transparent;
  color: var(--c-violet);
  border-color: var(--c-violet);
}
.btn-outline-primary:hover {
  background: var(--c-violet-l);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover { background: rgba(0,0,0,.05); color: var(--text); }

.btn-white { background: #fff; color: var(--c-violet); box-shadow: var(--shadow-md); }
.btn-white:hover { box-shadow: var(--shadow-lg); }

/* ============================================
   FORMS
============================================ */
.form-group  { margin-bottom: 1.25rem; }
.form-label  {
  display: block;
  font-weight: 700;
  font-size: .875rem;
  margin-bottom: .4rem;
  color: var(--text);
}
.form-label .required { color: var(--c-red); margin-left: .2rem; }
.form-control {
  width: 100%;
  padding: .65rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: var(--transition);
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--c-violet);
  box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}
.form-control::placeholder { color: #9CA3AF; }
.form-control.is-invalid { border-color: var(--c-red); }
.form-control.is-valid   { border-color: var(--c-emerald); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: .3rem; }
.form-error { font-size: .8rem; color: var(--c-red); margin-top: .3rem; font-weight: 600; }

.input-group {
  display: flex;
  align-items: stretch;
}
.input-group .form-control {
  flex: 1;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.input-group .btn {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.input-prefix, .input-suffix {
  display: flex;
  align-items: center;
  padding: 0 .85rem;
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--text-muted);
  font-size: .9rem;
}
.input-prefix { border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-suffix { border-left: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-prefix + .form-control, .form-control + .input-suffix {
  border-radius: 0;
}
.input-prefix + .form-control { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Rating input (1-10 scale) */
.rating-group {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-top: .5rem;
}
.rating-btn {
  width: 38px; height: 38px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: .85rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.rating-btn:hover   { border-color: var(--c-violet); color: var(--c-violet); }
.rating-btn.active  { background: var(--c-violet); border-color: var(--c-violet); color: #fff; }
.rating-btn.low     { background: var(--c-red); border-color: var(--c-red); color: #fff; }
.rating-btn.mid     { background: var(--c-amber); border-color: var(--c-amber); color: #fff; }
.rating-btn.high    { background: var(--c-emerald); border-color: var(--c-emerald); color: #fff; }

/* ============================================
   BADGES
============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .3px;
}
.badge-primary   { background: var(--c-violet-l); color: var(--c-violet-d); }
.badge-success   { background: var(--c-emerald-l); color: #065F46; }
.badge-danger    { background: var(--c-red-l); color: #991B1B; }
.badge-warning   { background: var(--c-amber-l); color: #92400E; }
.badge-info      { background: var(--c-cyan-l); color: #164E63; }
.badge-secondary { background: #F3F4F6; color: #4B5563; }
.badge-pink      { background: var(--c-pink-l); color: #9D174D; }
.badge-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: block;
}

/* ============================================
   ALERTS
============================================ */
.alert {
  padding: .9rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-weight: 500;
  border: 1px solid transparent;
}
.alert-success { background: var(--c-emerald-l); color: #065F46; border-color: #A7F3D0; }
.alert-danger  { background: var(--c-red-l); color: #991B1B; border-color: #FCA5A5; }
.alert-warning { background: var(--c-amber-l); color: #92400E; border-color: #FDE68A; }
.alert-info    { background: var(--c-cyan-l); color: #164E63; border-color: #A5F3FC; }
.alert .alert-icon { font-size: 1.1rem; margin-top: .1rem; }

/* ============================================
   TABLES (DataTables friendly)
============================================ */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.table th {
  background: var(--bg);
  padding: .75rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(124,58,237,.03); }
.table-striped tbody tr:nth-child(even) { background: rgba(0,0,0,.02); }

/* DataTables overrides */
.dataTables_wrapper { font-size: .875rem; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .35rem .75rem;
  font-size: .875rem;
  font-family: inherit;
  color: var(--text);
}
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
  outline: none;
  border-color: var(--c-violet);
}
.dataTables_paginate .paginate_button {
  padding: .3rem .65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: .85rem;
  border: 2px solid transparent;
  transition: var(--transition);
  color: var(--text-muted) !important;
}
.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button:hover {
  background: var(--c-violet-l) !important;
  color: var(--c-violet) !important;
  border-color: transparent;
}
.dataTables_wrapper .dataTables_info { font-size: .85rem; color: var(--text-muted); }

/* ============================================
   PROGRESS BARS
============================================ */
.progress {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--grad-violet);
  transition: width .5s ease;
}
.progress-bar.success { background: var(--c-emerald); }
.progress-bar.warning { background: var(--c-amber); }
.progress-bar.danger  { background: var(--c-red); }

/* ============================================
   STEPS / WIZARD
============================================ */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: .5rem;
}
.step {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  z-index: 1;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.step.active .step-circle  { background: var(--grad-violet); color: #fff; border-color: transparent; }
.step.done .step-circle    { background: var(--c-emerald); color: #fff; border-color: transparent; }
.step-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: .3rem;
  text-align: center;
  white-space: nowrap;
}
.step.active .step-label { color: var(--c-violet); }
.step.done .step-label   { color: var(--c-emerald); }
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 30px;
}
.step.done + .step .step-line,
.step.done .step-line { background: var(--c-emerald); }
.step-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ============================================
   MODALS
============================================ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.modal-backdrop.show { opacity: 1; pointer-events: all; }
.modal {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(.97);
  transition: transform .25s ease;
}
.modal-backdrop.show .modal { transform: none; }
.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body    { padding: 1.5rem; }
.modal-footer  { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: .75rem; justify-content: flex-end; }
.modal-close { background: none; border: none; cursor: pointer; font-size: 1.3rem; color: var(--text-muted); line-height: 1; padding: .2rem; }
.modal-close:hover { color: var(--text); }
.modal-lg { max-width: 800px; }
.modal-sm { max-width: 400px; }

/* ============================================
   TOASTS
============================================ */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}
.toast {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: .85rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  max-width: 360px;
  border-left: 4px solid var(--c-violet);
  pointer-events: all;
  animation: slideIn .3s ease;
  font-weight: 600;
  font-size: .9rem;
}
.toast.success { border-left-color: var(--c-emerald); }
.toast.error   { border-left-color: var(--c-red); }
.toast.warning { border-left-color: var(--c-amber); }
.toast.info    { border-left-color: var(--c-cyan); }
@keyframes slideIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: none; } }
@keyframes fadeOut { to { opacity:0; transform: translateX(20px); } }
.toast.fade-out { animation: fadeOut .3s ease forwards; }

/* ============================================
   HERO / AUTH PAGES
============================================ */
.auth-page {
  min-height: 100vh;
  background: var(--grad-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.auth-card {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(124,58,237,.15);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-logo .logo-icon {
  width: 64px; height: 64px;
  border-radius: var(--radius-lg);
  background: var(--grad-violet);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 1rem;
}
.auth-logo h1 { font-size: 1.8rem; margin-bottom: .25rem; }

/* ============================================
   QR CODE DISPLAY
============================================ */
.qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #EDE9FE, #FCE7F3);
  border-radius: var(--radius-xl);
}
.qr-wrapper canvas, .qr-wrapper img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   PROJECT CARD
============================================ */
.project-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}
.project-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.project-card-top {
  height: 8px;
  background: var(--grad-violet);
}
.project-card-body { padding: 1.25rem; }
.project-title { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.project-team  { font-size: .85rem; color: var(--text-muted); margin-bottom: .75rem; }
.project-meta  { display: flex; gap: .5rem; flex-wrap: wrap; }
.score-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .7rem;
  background: var(--grad-violet);
  color: #fff;
  border-radius: 999px;
  font-weight: 800;
  font-size: .9rem;
  font-family: 'Syne', sans-serif;
}

/* ============================================
   MERIT LIST
============================================ */
.merit-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: .5rem;
  background: #fff;
  transition: var(--transition);
}
.merit-row:hover { box-shadow: var(--shadow); }
.merit-rank {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--grad-violet);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}
.merit-rank.gold   { background: linear-gradient(135deg, #F59E0B, #D97706); box-shadow: 0 4px 12px rgba(245,158,11,.4); }
.merit-rank.silver { background: linear-gradient(135deg, #9CA3AF, #6B7280); }
.merit-rank.bronze { background: linear-gradient(135deg, #D97706, #92400E); }

/* ============================================
   UTILITIES
============================================ */
.p-0  { padding: 0; }
.p-1  { padding: .5rem; }
.p-2  { padding: 1rem; }
.p-3  { padding: 1.5rem; }
.p-4  { padding: 2rem; }
.px-1 { padding-left: .5rem; padding-right: .5rem; }
.px-2 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: .5rem; padding-bottom: .5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.me-1 { margin-right: .5rem; }
.me-2 { margin-right: 1rem; }
.ms-auto { margin-left: auto; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.d-none       { display: none !important; }
.d-flex       { display: flex; }
.d-block      { display: block; }
.w-100        { width: 100%; }
.rounded      { border-radius: var(--radius); }
.rounded-full { border-radius: 999px; }
.opacity-50   { opacity: .5; }
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }
.shadow   { box-shadow: var(--shadow); }
.shadow-md{ box-shadow: var(--shadow-md); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================
   GRADIENT TEXT UTILITY
============================================ */
.text-gradient-violet {
  background: var(--grad-violet);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-cyan {
  background: var(--grad-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   CHART CONTAINER
============================================ */
.chart-container { position: relative; }
.chart-container canvas { border-radius: var(--radius); }

/* ============================================
   EMPTY STATE
============================================ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: .5;
}
.empty-state h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.empty-state p  { font-size: .9rem; }

/* ============================================
   SCORE CIRCLES (Judge evaluation)
============================================ */
.score-circle {
  position: relative;
  width: 80px; height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.score-circle svg { position: absolute; top: 0; left: 0; transform: rotate(-90deg); }
.score-circle .score-num {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  z-index: 1;
}
.score-circle .score-total { font-size: .7rem; color: var(--text-muted); }

/* ============================================
   LOADING SPINNER
============================================ */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--c-violet);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   FILE UPLOAD
============================================ */
.file-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg);
}
.file-drop:hover, .file-drop.dragging {
  border-color: var(--c-violet);
  background: var(--c-violet-l);
}
.file-drop .upload-icon { font-size: 2.5rem; margin-bottom: .75rem; opacity: .5; }

/* ============================================
   RESPONSIVE UTILITIES
============================================ */
@media(max-width:640px) {
  .hide-mobile { display: none !important; }
  .btn-lg { padding: .65rem 1.25rem; font-size: .95rem; }
  .auth-card { padding: 1.75rem; }
  .page-content { padding: 1rem; }
}
@media(min-width:641px) {
  .hide-desktop { display: none !important; }
}
