* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0d1117;
  color: #c9d1d9;
  font-size: 13px;
  line-height: 1.5;
}

/* Login */
.login-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: #0d1117;
}
.login-box {
  background: #161b22; border: 1px solid #30363d;
  border-radius: 12px; padding: 40px; width: 360px; text-align: center;
}
.login-box h1 { font-size: 22px; color: #58a6ff; margin-bottom: 8px; }
.login-box p { color: #8b949e; margin-bottom: 20px; }
.login-error { color: #f85149; font-size: 12px; margin-top: 12px; }

/* Dashboard */
.dashboard { max-width: 1400px; margin: 0 auto; padding: 20px 24px; }
.header {
  display: flex; align-items: center; justify-content: space-between;
  background: #161b22; border-bottom: 1px solid #30363d;
  padding: 16px 24px; position: sticky; top: 0; z-index: 100;
}
.header h1 { font-size: 18px; color: #58a6ff; font-weight: 600; }
.header-meta { display: flex; align-items: center; gap: 12px; }
.status-indicator {
  font-size: 11px; padding: 4px 10px; border-radius: 10px; font-weight: 600;
}
.status-indicator.online { background: #23863633; color: #3fb950; }
.status-indicator.offline { background: #f8514933; color: #f85149; }

/* Tabs */
.tabs {
  display: flex; gap: 4px; padding: 12px 0 0;
  background: #161b22; border-bottom: 1px solid #30363d;
}
.tab {
  padding: 8px 16px; background: transparent; color: #8b949e;
  border: none; border-bottom: 2px solid transparent;
  cursor: pointer; font-size: 13px; font-weight: 500;
  transition: all .15s;
}
.tab:hover { color: #c9d1d9; }
.tab.active { color: #58a6ff; border-bottom-color: #58a6ff; }
.tab-content { display: none; padding-top: 16px; }
.tab-content.active { display: block; }

/* Buttons */
.btn {
  padding: 8px 16px; border: none; border-radius: 6px;
  cursor: pointer; font-size: 12px; font-weight: 600; transition: all .15s;
}
.btn-primary { background: #1f6feb; color: #fff; }
.btn-primary:hover { background: #388bfd; }
.btn-ghost { background: #21262d; color: #c9d1d9; border: 1px solid #30363d; }
.btn-ghost:hover { background: #30363d; }

/* Form */
.form-input {
  width: 100%; padding: 10px 12px; background: #0d1117; color: #c9d1d9;
  border: 1px solid #30363d; border-radius: 6px; font-size: 13px;
}
.form-input:focus { outline: none; border-color: #58a6ff; }

/* Search */
.search-box {
  width: 100%; max-width: 400px; padding: 8px 12px;
  background: #161b22; color: #c9d1d9; border: 1px solid #30363d;
  border-radius: 6px; font-size: 13px; margin-bottom: 16px;
}
.search-box:focus { outline: none; border-color: #58a6ff; }

/* Stats */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-box { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 14px; text-align: center; }
.stat-box .label { font-size: 11px; color: #8b949e; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.stat-box .value { font-size: 22px; font-weight: 700; color: #c9d1d9; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { text-align: left; padding: 10px 12px; color: #8b949e; font-weight: 600; border-bottom: 1px solid #30363d; background: #161b22; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #21262d; }
.data-table tr:hover td { background: #161b22; }
.trainer-email { color: #58a6ff; font-size: 12px; }
.num { text-align: right; font-family: monospace; font-size: 13px; }

/* Badges */
.status-badge { font-size: 10px; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; }
.status-completed { background: #23863633; color: #3fb950; }
.status-signed_off { background: #8957e533; color: #8957e5; }
.status-in_progress { background: #d2992233; color: #d29922; }
.status-needs_work { background: #f0883e33; color: #f0883e; }
.status-default { background: #30363d; color: #8b949e; }

.lang-badge { font-size: 9px; padding: 1px 6px; border-radius: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.lang-primary { background: #23863633; color: #3fb950; }
.lang-ambiguous { background: #d2992233; color: #d29922; }
.lang-other { background: #1f6feb33; color: #58a6ff; }
.lang-unknown { background: #30363d; color: #8b949e; }

/* Bars */
.lang-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.lang-bar-label { width: 100px; font-size: 12px; color: #c9d1d9; }
.lang-bar-track { flex: 1; height: 8px; background: #21262d; border-radius: 4px; overflow: hidden; }
.lang-bar-fill { height: 100%; border-radius: 4px; }
.lang-bar-count { width: 50px; text-align: right; font-size: 12px; color: #8b949e; }

/* Empty */
.empty { text-align: center; padding: 60px 20px; color: #484f58; }
.empty-title { font-size: 18px; font-weight: 600; color: #8b949e; margin-bottom: 8px; }

/* Filters */
.filters { display: flex; gap: 8px; margin-bottom: 16px; }

/* Pagination */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 16px; }
.page-btn { padding: 4px 10px; background: #21262d; color: #8b949e; border: 1px solid #30363d; border-radius: 4px; cursor: pointer; font-size: 12px; }
.page-btn.active { background: #1f6feb; color: #fff; }
.page-btn:hover:not(.active) { background: #30363d; }

/* Trainer language summary bars */
.trainer-lang-summary { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.trainer-lang-bar { display: flex; align-items: center; gap: 4px; font-size: 10px; }
.trainer-lang-pill { padding: 1px 5px; border-radius: 4px; font-weight: 600; }
.trainer-lang-track { width: 40px; height: 4px; background: #21262d; border-radius: 2px; overflow: hidden; }
.trainer-lang-fill { height: 100%; border-radius: 2px; }

/* Button row */
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Sortable table headers */
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: #58a6ff; }
.data-table th.sort-asc::after { content: ' ▲'; font-size: 10px; color: #58a6ff; }
.data-table th.sort-desc::after { content: ' ▼'; font-size: 10px; color: #58a6ff; }

/* Top Trainers by Language cards */
.toplang-card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 12px; }
.toplang-header { font-size: 13px; font-weight: 600; color: #58a6ff; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #21262d; }
.toplang-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.toplang-table th { text-align: left; padding: 3px 6px; color: #8b949e; font-weight: 600; border-bottom: 1px solid #21262d; }
.toplang-table td { padding: 3px 6px; color: #c9d1d9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.toplang-table tr:hover td { background: #0d1117; }
