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

:root {
  --ink: #12274D;
  --blue: #1B3A6B;
  --sky: #3D6FB4;
  --amber: #E8A33D;
  --paper: #F7F8FA;
  --line: #DCE1E8;
  --slate: #5B6472;
  --white: #FFFFFF;
  --good: #2E8B57;
  --warn: #C4472B;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, .num {
  font-family: 'Manrope', sans-serif;
}

a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

/* --- Шапка --- */
.top {
  background: var(--ink);
  color: var(--white);
  padding: 18px 16px 0;
}

.top-inner {
  max-width: 920px;
  margin: 0 auto;
}

.brand {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.brand span { color: var(--amber); }

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.tabs a {
  color: rgba(255,255,255,0.7);
  padding: 10px 14px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.tabs a.active {
  color: var(--white);
  border-bottom-color: var(--amber);
}

.tabs a:hover { text-decoration: none; color: var(--white); }

/* --- Hero-цифра --- */
.hero {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0 6px;
}

.hero .num {
  font-size: 46px;
  font-weight: 800;
  color: var(--ink);
  border-bottom: 5px solid var(--amber);
  padding-bottom: 2px;
  line-height: 1.1;
}

.hero .label {
  color: var(--slate);
  font-size: 15px;
}

.hero-sub {
  color: var(--slate);
  margin-bottom: 24px;
  font-size: 14px;
}

/* --- Метрики-строка --- */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 24px 0;
}

.metric {
  padding: 16px 14px;
  border-right: 1px solid var(--line);
}
.metric:last-child { border-right: none; }

.metric .v {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue);
}

.metric .l {
  color: var(--slate);
  font-size: 13px;
  margin-top: 2px;
}

/* --- Секции --- */
section { margin: 32px 0; }

section h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--ink);
}

/* --- Список последней активности (это реальная хронология — нумерация уместна) --- */
.timeline { list-style: none; padding: 0; margin: 0; }

.timeline li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.timeline .t-date {
  color: var(--slate);
  min-width: 78px;
  flex-shrink: 0;
}

.timeline .t-name { font-weight: 600; }

.timeline .t-amt {
  margin-left: auto;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
}

/* --- Таблица --- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  font-weight: 600;
  color: var(--slate);
  font-size: 12.5px;
  padding: 8px 10px;
  border-bottom: 2px solid var(--line);
}
td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tr:hover td { background: rgba(61,111,180,0.04); }

.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.pill.active { background: rgba(46,139,87,0.12); color: var(--good); }
.pill.ended { background: rgba(196,71,43,0.1); color: var(--warn); }
.pill.razovoe { background: rgba(61,111,180,0.1); color: var(--sky); }

/* --- Фильтры --- */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filters a {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.filters a.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.filters a:hover { text-decoration: none; border-color: var(--sky); }

.day-group { margin-bottom: 18px; }
.day-group h3 {
  font-size: 13px;
  color: var(--slate);
  font-weight: 600;
  margin: 0 0 6px;
  text-transform: none;
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  margin-top: 8px;
  border-top: 2px solid var(--ink);
  font-weight: 700;
  font-size: 16px;
}

.empty {
  color: var(--slate);
  padding: 30px 0;
  text-align: center;
}

@media (max-width: 560px) {
  .hero .num { font-size: 36px; }
  .metric .v { font-size: 19px; }
  th:nth-child(3), td:nth-child(3) { display: none; }
  .students-table th:nth-child(3), .students-table td:nth-child(3) { display: table-cell; }
  .students-table th:nth-child(4), .students-table td:nth-child(4) { display: none; }
}
