:root {
  --rhythm-primary: #2553A0;
  --rhythm-primary-dark: #1c3f7d;
  --rhythm-accent: #E8590C;
  --rhythm-bg: #F4F6FA;
  --rhythm-surface: #FFFFFF;
  --rhythm-border: #E1E6EF;
  --rhythm-text: #1F2937;
  --rhythm-muted: #6B7686;
  --sidebar-width: 236px;
}

* { box-sizing: border-box; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--rhythm-bg);
  color: var(--rhythm-text);
  font-size: 0.925rem;
  margin: 0;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────── */

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--rhythm-primary-dark), var(--rhythm-primary));
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  padding: 1.25rem 1rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-bottom: 1.25rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--rhythm-accent);
}

.brand-title {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.72rem;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(255,255,255,0.82);
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
  transition: background 0.15s ease;
}

.nav-link i { width: 18px; text-align: center; opacity: 0.9; }

.nav-link:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.nav-link.active {
  background: #fff;
  color: var(--rhythm-primary-dark);
}

.sidebar-footer {
  font-size: 0.7rem;
  opacity: 0.6;
  padding-top: 0.75rem;
}

/* ── Content ─────────────────────────────────────────── */

.content {
  margin-left: var(--sidebar-width);
  padding: 1.75rem 2rem;
  flex: 1;
  min-width: 0;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-title {
  font-weight: 700;
  font-size: 1.4rem;
  margin: 0;
}

.page-sub {
  color: var(--rhythm-muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.btn-primary {
  background: var(--rhythm-primary);
  border-color: var(--rhythm-primary);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--rhythm-primary-dark);
  border-color: var(--rhythm-primary-dark);
}

.card-surface {
  background: var(--rhythm-surface);
  border: 1px solid var(--rhythm-border);
  border-radius: 14px;
}

/* ── Stat cards (dashboard) ──────────────────────────── */

.stat-card {
  background: var(--rhythm-surface);
  border: 1px solid var(--rhythm-border);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: rgba(37,83,160,0.1);
  color: var(--rhythm-primary);
  flex-shrink: 0;
}

.stat-icon.accent { background: rgba(232,89,12,0.12); color: var(--rhythm-accent); }
.stat-icon.warn { background: rgba(220,53,69,0.12); color: #dc3545; }

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-label {
  color: var(--rhythm-muted);
  font-size: 0.78rem;
}

/* ── Students grid ───────────────────────────────────── */

.student-card {
  background: var(--rhythm-surface);
  border: 1px solid var(--rhythm-border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  height: 100%;
}

.student-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--rhythm-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Kanban ───────────────────────────────────────────── */

.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.kanban-column {
  background: #EDF1F8;
  border-radius: 14px;
  padding: 0.85rem;
  min-height: 200px;
}

.kanban-column.drag-over {
  background: #DCE6F6;
  outline: 2px dashed var(--rhythm-primary);
}

.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0 0.15rem;
}

.kanban-column-title {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--rhythm-muted);
}

.kanban-count {
  background: #fff;
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rhythm-primary);
}

.kanban-card {
  background: var(--rhythm-surface);
  border: 1px solid var(--rhythm-border);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.6rem;
  cursor: grab;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}

.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: 0.4; }

.kanban-card-title {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
}

.kanban-card-price {
  color: var(--rhythm-accent);
  font-weight: 700;
  font-size: 0.95rem;
}

.kanban-card-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

/* ── Tasks ────────────────────────────────────────────── */

.task-row {
  background: var(--rhythm-surface);
  border: 1px solid var(--rhythm-border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.6rem;
}

.task-row.overdue { border-left: 4px solid #dc3545; }
.task-row.done { opacity: 0.55; }
.task-row.done .task-title { text-decoration: line-through; }

.task-title { font-weight: 600; font-size: 0.9rem; }
.task-due { color: var(--rhythm-muted); font-size: 0.78rem; }
.task-due.overdue-text { color: #dc3545; font-weight: 600; }

.empty-hint {
  color: var(--rhythm-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1.5rem 0.5rem;
}
