* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Arial, sans-serif; background: #0f172a; color: #e2e8f0; }
a { color: #93c5fd; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrapper { max-width: 1100px; margin: 0 auto; padding: 24px; }
.header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px; background: #111827; border-bottom: 1px solid #1f2937;
}
.header-left, .header-right { display: flex; gap: 16px; align-items: center; }
.brand { font-size: 20px; font-weight: bold; color: #f8fafc; }
.card {
  background: #111827; border: 1px solid #1f2937; border-radius: 12px;
  padding: 24px; margin-top: 24px;
}
h1, h2, h3 { margin-top: 0; color: #f8fafc; }
p { line-height: 1.6; }
.form-grid { display: grid; gap: 12px; max-width: 420px; }
label { display: grid; gap: 6px; font-size: 14px; }
input {
  width: 100%; padding: 12px; border-radius: 8px; border: 1px solid #334155;
  background: #0b1220; color: #f8fafc;
}
button {
  padding: 12px 16px; border: 0; border-radius: 8px; cursor: pointer;
  background: #2563eb; color: white; font-weight: bold;
}
button:hover { background: #1d4ed8; }
.muted { color: #94a3b8; }
.error {
  margin-top: 12px; padding: 12px; border-radius: 8px;
  background: #7f1d1d; color: #fecaca; display: none;
}
.layout {
  display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 65px);
}
.sidebar {
  background: #111827; border-right: 1px solid #1f2937; padding: 24px 16px;
}
.sidebar a {
  display: block; padding: 10px 12px; border-radius: 8px; margin-bottom: 8px;
  color: #e2e8f0;
}
.sidebar a.active { background: #1d4ed8; color: #fff; }
.content { padding: 24px; }


.password-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.password-row input {
  flex: 1;
}

.secondary {
  padding: 10px 12px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  cursor: pointer;
  border-radius: 8px;
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.checkbox-row input {
  width: auto;
}

/*
 * Имя файла: app.css
 * Блок: admin layout/header normalization
 * Назначение: единая шапка и сетка админки
 * Версия: 0.3.0
 * Дата изменения: 2026-04-29
 */

.header,
.page-header {
  min-height: 64px;
}

.header-right,
.header-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.header-right a,
.header-right button,
.header-links a,
.header-links button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #1e293b;
  color: #dbeafe;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.header-right a:hover,
.header-right button:hover,
.header-links a:hover,
.header-links button:hover {
  background: #2563eb;
  color: #fff;
  text-decoration: none;
}

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.sidebar {
  background: #0b1220;
  border-right: 1px solid #1f2937;
  padding: 18px;
}

.sidebar-title {
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
}

.sidebar-nav,
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar a,
.sidebar-nav a {
  display: block;
  padding: 10px 12px;
  border: 1px solid #1f2937;
  border-radius: 8px;
  background: #111827;
  color: #bfdbfe;
  text-decoration: none;
}

.sidebar a:hover,
.sidebar-nav a:hover,
.sidebar a.active,
.sidebar-nav a.active {
  background: #1d4ed8;
  color: #fff;
  text-decoration: none;
}

.content {
  min-width: 0;
  padding: 24px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.page-header h1 {
  margin-bottom: 6px;
}

.page-header p {
  margin: 0;
  color: #94a3b8;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid #1f2937;
  }

  .page-header {
    flex-direction: column;
  }

  .header-right,
  .header-links {
    justify-content: flex-start;
  }
}

/*
 * Имя файла: app.css
 * Блок: stable header order
 * Назначение: стабильный порядок кнопок в шапке
 * Версия: 0.3.1
 * Дата изменения: 2026-04-29
 */

.header-right > *,
.header-links > *,
.game-actions > a,
.game-actions > button,
.game-actions > .race-switcher {
  flex: 0 0 auto;
}

/*
 * Имя файла: app.css
 * Блок: unified portal headers
 * Назначение: единый стиль шапки для portal/help/forum/account/admin
 * Версия: 0.4.0
 * Дата изменения: 2026-04-29
 */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 0 24px;
  background: #111827;
  border-bottom: 1px solid #1f2937;
  color: #ffffff;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-left {
  min-width: 220px;
}

.header-right {
  justify-content: flex-end;
  margin-left: auto;
}

.header .brand {
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
}

.header-right a,
.header-right button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #1e293b;
  color: #dbeafe;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.header-right a:hover,
.header-right button:hover {
  background: #2563eb;
  color: #ffffff;
}

.header-right [hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .header-right {
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-left: 0;
  }
}
