/* ==========================================================================
   admin.css — стили админ-панели
   ========================================================================== */

.admin-body {
  background: var(--cream);
  min-height: 100vh;
}

.admin-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}
.admin-header__inner {
  display: flex; justify-content: space-between; align-items: center;
  height: 64px;
}
.admin-header__actions {
  display: flex; align-items: center; gap: 12px;
}
.admin-user {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--emerald-800);
  padding: 6px 12px;
  background: var(--emerald-100);
  border-radius: 999px;
}

.admin-main { padding-block: 32px 64px; }

/* ---- Login ---- */
.login-view {
  min-height: calc(100vh - 64px - 96px);
  display: grid; place-items: center;
  padding-block: 48px;
}
.login-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.login-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--emerald-900);
  margin-bottom: 8px;
}
.login-card__lead {
  font-size: 14px;
  color: var(--ink-400);
  margin-bottom: 24px;
}

/* ---- Dashboard ---- */
.dashboard {
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}
.stat-card__label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-400);
  margin-bottom: 8px;
}
.stat-card__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  color: var(--emerald-800);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ---- Tabs ---- */
.tabs {
  display: flex; gap: 4px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 24px;
}
.tab {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-500);
  padding: 10px 18px;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
}
.tab:hover { color: var(--emerald-700); }
.tab.is-active {
  color: var(--emerald-800);
  border-bottom-color: var(--gold-500);
}

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ---- Toolbar ---- */
.toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.filter-input {
  width: 100%;
  max-width: 480px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  font-size: 14px;
}
.filter-input:focus {
  outline: none;
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(45, 134, 89, 0.15);
}

.filters-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-500);
}
.filter-group label {
  font-weight: 600;
  white-space: nowrap;
}
.filter-group select {
  padding: 7px 10px;
  font-size: 13px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-900);
  -webkit-appearance: auto;
  appearance: auto;
  cursor: pointer;
}
.filter-group select:focus {
  outline: none;
  border-color: var(--emerald-600);
}
.toolbar__right { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }

.filter-summary {
  font-size: 13px;
  color: var(--ink-500);
  margin-bottom: 10px;
  padding: 8px 12px;
  background: var(--cream-warm);
  border-radius: var(--radius);
}
.filter-summary strong { color: var(--emerald-800); }

/* ---- Table ---- */
.table-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
.submissions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.submissions-table th {
  text-align: left;
  padding: 14px 16px;
  background: var(--cream-warm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.submissions-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-700);
  vertical-align: top;
}
.submissions-table tr:last-child td { border-bottom: none; }
.submissions-table tr:hover td { background: var(--cream); }
.submissions-table .empty {
  text-align: center;
  padding: 48px;
  color: var(--ink-400);
}
.submissions-table .col-date {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--ink-500);
  white-space: nowrap;
}
.submissions-table .col-count {
  text-align: center;
  font-weight: 700;
  color: var(--emerald-800);
}
.submissions-table .col-actions { text-align: right; white-space: nowrap; }
.submissions-table .row-detail td {
  background: var(--cream);
  padding: 0;
}
.submissions-table .row-detail-inner {
  padding: 16px 20px;
  border-left: 3px solid var(--gold-500);
  margin-left: 12px;
}
.submissions-table .row-detail-inner h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-500);
  margin-bottom: 12px;
}

/* participant mini-table */
.participants-mini {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}
.participants-mini th,
.participants-mini td {
  padding: 6px 12px 6px 0;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.participants-mini th {
  font-weight: 600;
  color: var(--ink-400);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.participants-mini tr:last-child td { border-bottom: none; }

.btn-icon {
  width: 32px; height: 32px;
  display: inline-grid; place-items: center;
  border-radius: 6px;
  color: var(--ink-500);
  transition: all 0.15s ease;
  margin-left: 4px;
}
.btn-icon:hover { background: var(--cream-warm); color: var(--emerald-700); }
.btn-icon.danger:hover { color: var(--danger); background: rgba(185, 28, 28, 0.06); }
.btn-icon svg { width: 16px; height: 16px; }

/* ---- Nominations admin ---- */
.nominations-admin {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
}
@media (max-width: 880px) {
  .nominations-admin { grid-template-columns: 1fr; }
}

.nomination-form-card,
.nominations-list-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--emerald-900);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

/* Public submissions page */
.admin-hint {
  background: rgba(184, 134, 11, 0.06);
  border: 1px solid rgba(184, 134, 11, 0.2);
  border-left: 3px solid var(--gold-500);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ink-700);
}
.admin-hint a { font-weight: 600; color: var(--emerald-700); }
.admin-hint--success {
  background: rgba(20, 83, 45, 0.06);
  border-color: rgba(20, 83, 45, 0.2);
  border-left-color: var(--emerald-700);
  color: var(--emerald-800);
}
.admin-hint .ru,
.admin-hint .tat { display: block; }
body.lang-tat .admin-hint .ru { display: none; }
body.lang-ru .admin-hint .tat { display: none; }
