:root {
  --chroma-nav: #0d2f3f;
  --chroma-accent: #0f5d66;
  --chroma-bg: #f7f8fa;
  --chroma-text: #0f172a;
}

.app-container { max-width: 1320px; }

.app-navbar {
  background: var(--chroma-nav);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-navbar .nav-link {
  color: rgba(255, 255, 255, 0.82);
}

.app-navbar .nav-link.active,
.app-navbar .nav-link:hover {
  color: #fff;
}

.app-page { padding-bottom: 1rem; }

.page-breadcrumb .breadcrumb {
  --bs-breadcrumb-divider-color: rgba(15, 23, 42, .35);
}

.page-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(15, 23, 42, .35);
}

.page-header {
  padding-top: .25rem;
}

.page-title {
  letter-spacing: -.01em;
}

.page-actions .btn {
  white-space: nowrap;
}

.app-breadcrumb {
  font-size: .875rem;
  color: rgba(15, 23, 42, .7);
}

.app-card {
  background: #fff;
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 .125rem .375rem rgba(15, 23, 42, .08);
}

@media (prefers-reduced-motion: no-preference) {
  .app-card {
    transition: transform .12s ease, box-shadow .12s ease;
  }

  a:hover > .app-card,
  .app-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 .4rem 1.25rem rgba(15, 23, 42, .10);
  }
}

.app-card--active {
  border: 2px solid var(--chroma-accent);
}

.app-card-label {
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, .55);
}

.app-card-title {
  font-weight: 700;
  color: var(--chroma-text);
}

.app-btn-primary {
  background: var(--chroma-accent);
  border-color: var(--chroma-accent);
  color: #fff;
}

.app-btn-primary:hover {
  background: #0c5058;
  border-color: #0c5058;
  color: #fff;
}

.app-btn-ghost {
  background: transparent;
  border: 1px solid rgba(15, 23, 42, .18);
  color: var(--chroma-text);
}

.app-btn-ghost:hover {
  border-color: rgba(15, 23, 42, .35);
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .25rem .5rem;
  border-radius: 999px;
  background: rgba(15, 93, 102, .10);
  color: var(--chroma-accent);
  font-size: .75rem;
  font-weight: 600;
}

.app-kpi {
  background: rgba(15, 93, 102, .06);
  border-radius: .75rem;
  padding: .75rem;
}

.app-sidebar {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 .125rem .375rem rgba(15, 23, 42, .08);
  padding: 1rem;
}

.app-sidebar-item {
  border: 0;
  border-radius: .75rem;
  margin-bottom: .5rem;
  background: rgba(15, 23, 42, .02);
}

.app-sidebar-item.active {
  background: rgba(15, 93, 102, .10);
}

.app-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(15, 93, 102, .12);
  color: var(--chroma-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .75rem;
}

.app-dropzone {
  border: 2px dashed rgba(15, 93, 102, .35);
  border-radius: 1rem;
  background: rgba(15, 93, 102, .04);
  transition: background .15s ease, border-color .15s ease;
}

.app-dropzone.dragover {
  background: rgba(15, 93, 102, .08);
  border-color: rgba(15, 93, 102, .7);
}

.filter-bar {
  background: #fff;
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 .125rem .375rem rgba(15, 23, 42, .08);
}

.empty-state {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 .125rem .375rem rgba(15, 23, 42, .08);
  padding: 2rem;
  text-align: center;
}

.empty-state-title {
  font-weight: 700;
  color: var(--chroma-text);
}

.empty-state-subtitle {
  color: rgba(15, 23, 42, .65);
}

.app-muted {
  color: rgba(15, 23, 42, .65);
}

.app-card--dashed {
  border: 2px dashed rgba(15, 23, 42, .12);
  box-shadow: none;
}

.app-icon-bubble {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 93, 102, .10);
  color: var(--chroma-accent);
  flex: 0 0 auto;
}

.app-upload-dropzone {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem;
}

.app-upload-dropzone .app-dropzone-title {
  font-weight: 700;
  color: rgba(15, 23, 42, .70);
}

.app-upload-dropzone .app-dropzone-subtitle {
  font-size: .75rem;
  color: rgba(15, 23, 42, .55);
}

.app-student-tile {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: .75rem;
  padding: .75rem;
  background: rgba(15, 23, 42, .01);
}

.app-student-tile--ok {
  background: rgba(15, 93, 102, .06);
  border-color: rgba(15, 93, 102, .18);
}

.app-student-status {
  font-size: .6875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
}

.app-student-status--warn {
  color: #b45309;
}

.app-student-status--ok {
  color: var(--chroma-accent);
}

.app-empty-hero {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: rgba(15, 93, 102, .08);
  color: rgba(15, 93, 102, .55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-tabbar {
  border-bottom: 1px solid rgba(15, 23, 42, .10);
}

.app-tabbar .nav-link {
  border: 0;
  border-bottom: 2px solid transparent;
  color: rgba(15, 23, 42, .65);
  padding: .75rem 1rem;
}

.app-tabbar .nav-link.active {
  color: var(--chroma-text);
  border-bottom-color: var(--chroma-accent);
  font-weight: 700;
}

.filter-bar .form-control,
.filter-bar .form-select {
  background: rgba(15, 23, 42, .01);
}

a { color: var(--chroma-accent); }

/* ==========================================================================
   ENHANCED SPACING & POLISH
   ========================================================================== */

/* Better card spacing */
.app-card {
  background: #fff;
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 .125rem .5rem rgba(15, 23, 42, .06);
}

.app-card .card-body {
  padding: 1.25rem;
}

.app-card .card-header {
  padding: 1rem 1.25rem;
  background: transparent;
  border-bottom: 1px solid rgba(15, 23, 42, .06);
  font-weight: 600;
}

/* Stat pills with better visuals */
.cf-stat-pill,
.app-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.cf-stat-pill.primary,
.app-stat-pill.primary {
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
  border-color: rgba(13, 110, 253, 0.12);
}

.cf-stat-pill.success,
.app-stat-pill.success {
  background: rgba(25, 135, 84, 0.08);
  color: #198754;
  border-color: rgba(25, 135, 84, 0.12);
}

.cf-stat-pill.warning,
.app-stat-pill.warning {
  background: rgba(255, 193, 7, 0.12);
  color: #997404;
  border-color: rgba(255, 193, 7, 0.2);
}

.cf-stat-pill.info,
.app-stat-pill.info {
  background: rgba(13, 202, 240, 0.08);
  color: #0aa2c0;
  border-color: rgba(13, 202, 240, 0.12);
}

/* Better section headers */
.cf-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.cf-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--chroma-text);
}

/* Class card improvements */
.cf-class-card .card {
  transition: all 0.2s ease;
  border: 1px solid rgba(15, 23, 42, .06);
}

.cf-class-card:hover .card {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, .08);
}

.cf-class-card.selected .card {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* Button alignment fixes */
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.page-actions .btn {
  white-space: nowrap;
}

/* Better empty states */
.empty-state {
  background: linear-gradient(145deg, #fafbfc, #f5f7f9);
  border-radius: 1rem;
  box-shadow: 0 .125rem .375rem rgba(15, 23, 42, .05);
  padding: 2.5rem;
  text-align: center;
}

/* Quick access bar styling */
.cf-quick-access {
  background: rgba(13, 148, 136, .04);
  border: 1px dashed rgba(13, 148, 136, .2);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Photo card group styling */
.photo-card.group-photo {
  border-color: #a78bfa;
  background: linear-gradient(145deg, #faf5ff, #fff);
}

.photo-card.group-photo .photo-type {
  color: #7c3aed;
  font-weight: 600;
}
