/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #0d1117;
  color: #c9d1d9;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ===== Header ===== */
header {
  background: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #58a6ff;
}

nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-link {
  color: #8b949e;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-link:hover {
  color: #c9d1d9;
  background: #21262d;
}

/* ===== Main ===== */
main {
  flex: 1;
  padding: 32px 0;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 24px;
  color: #f0f6fc;
}

h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: #f0f6fc;
}

/* ===== Table ===== */
.table-controls {
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

#search-input {
  width: 100%;
  max-width: 320px;
  padding: 8px 12px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #c9d1d9;
  font-size: 0.9rem;
}

#search-input:focus {
  outline: none;
  border-color: #58a6ff;
}

.sort-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.sort-label {
  font-size: 0.85rem;
  color: #8b949e;
}

.btn-sort {
  background: #21262d;
  color: #8b949e;
  border: 1px solid #30363d;
  width: auto;
}

.btn-sort:hover {
  background: #30363d;
  color: #c9d1d9;
}

.btn-sort.active {
  background: #1a3a2a;
  color: #3fb950;
  border-color: #3fb950;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #161b22;
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #30363d;
}

th {
  background: #21262d;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8b949e;
}

td {
  font-size: 0.95rem;
}

tr:hover td {
  background: #1c2128;
}

/* Подсветка привязанного персонажа */
tr.linked-member-row td {
  background: #0d2818;
}

tr.linked-member-row:hover td {
  background: #0f331e;
}

tr.linked-member-row td:first-child {
  border-left: 3px solid #3fb950;
}

.empty-message {
  text-align: center;
  color: #8b949e;
  padding: 40px 0;
  font-size: 1.1rem;
}

/* Ссылка на историю DKP в таблице */
.member-history-link {
  color: #58a6ff;
  text-decoration: none;
  cursor: pointer;
}

.member-history-link:hover {
  text-decoration: underline;
  color: #79c0ff;
}

/* ===== DKP Rules ===== */
.rules-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rule-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.2s;
}

.rule-card:hover {
  border-color: #58a6ff;
}

.rule-name {
  font-size: 0.9rem;
  color: #c9d1d9;
  font-weight: 600;
}

.rule-amount {
  font-size: 0.85rem;
  color: #3fb950;
  font-weight: 700;
  background: #0d2818;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Быстрый выбор правил */
.rules-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-rule-quick {
  background: #1a3a2a;
  color: #3fb950;
  border: 1px solid #3fb950;
  width: auto;
  font-size: 0.8rem;
  padding: 4px 10px;
}

.btn-rule-quick:hover {
  background: #0d2818;
  color: #56d364;
  border-color: #56d364;
}

/* ===== Login Card ===== */
.login-card {
  max-width: 400px;
  margin: 60px auto;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 32px;
}

.login-card h2 {
  text-align: center;
  margin-bottom: 24px;
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 16px;
  position: relative;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: #8b949e;
}

input, select {
  width: 100%;
  padding: 8px 12px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #c9d1d9;
  font-size: 0.95rem;
}

input:focus, select:focus {
  outline: none;
  border-color: #58a6ff;
}

.error-message {
  color: #f85149;
  font-size: 0.85rem;
  margin-top: 8px;
  text-align: center;
}

.success-message {
  color: #3fb950;
  font-size: 0.85rem;
  margin-top: 8px;
  text-align: center;
}

.form-footer-text {
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: #8b949e;
}

.nav-link-inline {
  color: #58a6ff;
  text-decoration: none;
  cursor: pointer;
}

.nav-link-inline:hover {
  text-decoration: underline;
}

/* ===== Buttons ===== */
.btn {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #238636;
  color: #fff;
  width: 100%;
}

.btn-primary:hover {
  background: #2ea043;
}

.btn-success {
  background: #238636;
  color: #fff;
}

.btn-success:hover {
  background: #2ea043;
}

.btn-danger {
  background: #da3633;
  color: #fff;
}

.btn-danger:hover {
  background: #f85149;
}

.btn-small {
  padding: 4px 12px;
  font-size: 0.8rem;
}

.btn-group {
  display: flex;
  gap: 8px;
}

/* ===== Admin Grid ===== */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.admin-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 24px;
}

.admin-card-full {
  grid-column: 1 / -1;
}

/* ===== Collapsible ===== */
.collapsible-header {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.collapsible-header:hover {
  opacity: 0.8;
}

.collapsible-arrow {
  color: #8b949e;
  font-size: 0.8rem;
  min-width: 16px;
  text-align: center;
}

.collapsible-body {
  max-height: 400px;
  overflow-y: auto;
  margin-top: 16px;
  padding-right: 4px;
}

/* ===== Notification Badge ===== */
.notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #da3633;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 10px;
  line-height: 1;
}

/* ===== Profile Grid ===== */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ===== Account Badge ===== */
.account-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.account-badge.registered {
  background: #1a3a2a;
  color: #3fb950;
  border: 1px solid #3fb950;
}

.account-badge.not-registered {
  background: #3d1a1a;
  color: #f85149;
  border: 1px solid #f85149;
}

/* ===== Link Request Card ===== */
.link-request-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.link-request-info {
  flex: 1;
}

.link-request-info p {
  margin: 4px 0;
  font-size: 0.9rem;
  color: #c9d1d9;
}

.link-request-info .request-label {
  color: #8b949e;
  font-size: 0.8rem;
}

.link-request-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.link-request-actions .btn {
  width: auto;
}

/* ===== Account Card (admin) ===== */
.account-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.account-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.account-card-username {
  font-size: 1rem;
  font-weight: 600;
  color: #f0f6fc;
}

.account-card-details {
  font-size: 0.85rem;
  color: #8b949e;
  margin-bottom: 12px;
}

.account-card-details span {
  display: inline-block;
  margin-right: 16px;
}

.account-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.account-card-actions .btn {
  width: auto;
}

/* ===== Profile Info ===== */
.profile-info-item {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #30363d;
}

.profile-info-item:last-child {
  border-bottom: none;
}

.profile-info-label {
  font-size: 0.8rem;
  color: #8b949e;
  margin-bottom: 4px;
}

.profile-info-value {
  font-size: 1rem;
  color: #f0f6fc;
  font-weight: 600;
}

/* ===== Profile History Scroll ===== */
.profile-history-scroll {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 8px;
  margin-top: 8px;
}

/* ===== History Month Group ===== */
.history-month-group {
  margin-bottom: 4px;
}

.history-month-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #21262d;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 4px;
}

.history-month-header:hover {
  background: #30363d;
}

.history-month-toggle {
  color: #8b949e;
  font-size: 0.8rem;
  min-width: 16px;
  text-align: center;
}

.history-month-label {
  color: #f0f6fc;
  font-size: 0.9rem;
  font-weight: 600;
  flex: 1;
}

.history-month-count {
  color: #8b949e;
  font-size: 0.8rem;
  background: #161b22;
  padding: 2px 8px;
  border-radius: 10px;
}

.history-month-body {
  padding: 4px 0 8px 12px;
}

/* ===== History Day Group ===== */
.history-day-group {
  margin-bottom: 2px;
}

.history-day-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #1c2128;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 2px;
}

.history-day-header:hover {
  background: #21262d;
}

.history-day-toggle {
  color: #8b949e;
  font-size: 0.75rem;
  min-width: 14px;
  text-align: center;
}

.history-day-label {
  color: #c9d1d9;
  font-size: 0.85rem;
  font-weight: 500;
  flex: 1;
}

.history-day-count {
  color: #8b949e;
  font-size: 0.75rem;
  background: #161b22;
  padding: 1px 6px;
  border-radius: 8px;
}

.history-day-body {
  padding: 2px 0 4px 16px;
}

/* ===== History Reason Group ===== */
.history-reason-group {
  margin-bottom: 2px;
}

.history-reason-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 2px;
}

.history-reason-header:hover {
  background: #1c2128;
}

.history-reason-toggle {
  color: #8b949e;
  font-size: 0.75rem;
  min-width: 14px;
  text-align: center;
}

.history-reason-label {
  color: #d29922;
  font-size: 0.8rem;
  font-weight: 600;
  flex: 1;
}

.history-reason-count {
  color: #8b949e;
  font-size: 0.75rem;
  background: #21262d;
  padding: 1px 6px;
  border-radius: 8px;
}

.history-reason-body {
  padding: 2px 0 4px 16px;
}

/* ===== Log Entry (profile history & modal) ===== */
.log-entry {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #21262d;
  gap: 8px;
}

.log-date {
  color: #8b949e;
  font-size: 0.8rem;
  min-width: 140px;
  flex-shrink: 0;
}

.log-delta {
  font-weight: 600;
  min-width: 60px;
  text-align: right;
  flex-shrink: 0;
}

.log-reason {
  color: #c9d1d9;
  font-size: 0.8rem;
  text-align: right;
  flex: 1;
  padding-left: 12px;
  word-break: break-word;
}

/* ===== Auction Tabs ===== */
.auction-tab {
  background: #21262d;
  color: #8b949e;
  border: 1px solid #30363d;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.auction-tab:hover {
  background: #30363d;
  color: #c9d1d9;
}

.auction-tab.active {
  background: #1a3a2a;
  color: #3fb950;
  border-color: #3fb950;
}

/* ===== Auction ===== */
#auction-controls {
  margin-bottom: 20px;
}

#auction-controls .btn {
  width: auto;
}

.auction-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.auction-card:hover {
  border-color: #58a6ff;
}

.auction-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.auction-card-header h3 {
  margin-bottom: 0;
  font-size: 1.15rem;
}

.auction-status {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
}

.auction-status.active {
  background: #1a3a2a;
  color: #3fb950;
  border: 1px solid #3fb950;
}

.auction-status.closed {
  background: #3d1a1a;
  color: #f85149;
  border: 1px solid #f85149;
}

.auction-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.auction-info-item {
  font-size: 0.9rem;
  color: #8b949e;
}

.auction-info-item span {
  color: #c9d1d9;
  font-weight: 600;
}

.auction-card-actions {
  display: flex;
  gap: 8px;
}

.auction-card-actions .btn {
  width: auto;
}

.auction-timer {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f0f6fc;
  text-align: center;
  padding: 8px;
  background: #21262d;
  border-radius: 6px;
  margin-bottom: 12px;
}

.auction-timer.urgent {
  color: #f85149;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.bid-list {
  margin-top: 12px;
  border-top: 1px solid #30363d;
  padding-top: 12px;
}

.bid-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9rem;
  color: #8b949e;
}

.bid-item .bidder-name {
  color: #c9d1d9;
}

.bid-item .bid-amount {
  color: #d29922;
  font-weight: 600;
}

.winner-badge {
  display: inline-block;
  background: #3fb950;
  color: #0d1117;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 32px;
  max-width: 600px;
  width: 90%;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.5rem;
  color: #8b949e;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #f0f6fc;
}

/* ===== History Modal (график фиксирован внизу, история скроллится) ===== */
.history-modal-content {
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  padding-bottom: 16px;
  overflow: hidden;
}

.history-modal-body-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  margin-bottom: 16px;
  padding-right: 4px;
}

#history-modal-chart-wrapper {
  flex-shrink: 0;
  border-top: 1px solid #30363d;
  padding-top: 16px;
}

/* ===== History Page ===== */
.history-entry {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.history-entry-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.history-entry-header:hover {
  background: #1c2128;
}

.history-entry-solo .history-entry-header {
  cursor: default;
}

.history-entry-solo .history-entry-header:hover {
  background: transparent;
}

.history-date {
  color: #8b949e;
  font-size: 0.85rem;
  min-width: 160px;
}

.history-reason {
  color: #c9d1d9;
  font-size: 0.9rem;
  flex: 1;
}

.history-delta {
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 80px;
  text-align: right;
}

.history-member-name {
  color: #58a6ff;
  font-size: 0.85rem;
  min-width: 120px;
  text-align: right;
}

/* ===== DKP Member Dropdown ===== */
.dkp-member-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 2px;
  background: #161b22;
  border: 1px solid #58a6ff;
  border-radius: 6px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.dkp-member-option {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #c9d1d9;
  border-bottom: 1px solid #30363d;
  transition: background 0.15s;
}

.dkp-member-option:last-child {
  border-bottom: none;
}

.dkp-member-option:hover {
  background: #1c2128;
  color: #f0f6fc;
}

.dkp-member-dkp {
  color: #8b949e;
  font-size: 0.8rem;
  font-weight: 600;
}

.dkp-member-empty {
  color: #8b949e;
  cursor: default;
  justify-content: center;
}

.dkp-member-empty:hover {
  background: transparent;
}

/* ===== Footer ===== */
footer {
  background: #161b22;
  border-top: 1px solid #30363d;
  padding: 16px 0;
  text-align: center;
  color: #8b949e;
  font-size: 0.85rem;
}

/* ===== Toast Notifications ===== */
#toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 3.7s forwards;
  max-width: 360px;
}

.toast-success {
  background: #1a3a2a;
  border: 1px solid #3fb950;
  color: #3fb950;
}

.toast-error {
  background: #3d1a1a;
  border: 1px solid #f85149;
  color: #f85149;
}

.toast-info {
  background: #1a2a3a;
  border: 1px solid #58a6ff;
  color: #58a6ff;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100px); }
}

/* ===== Notification Container (sound notifications) ===== */
#notification-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.notification {
  pointer-events: auto;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  animation: notificationIn 0.3s ease;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification-hiding {
  opacity: 0;
  transform: translateX(100px);
}

.notification-info {
  background: #1a2a3a;
  border: 1px solid #58a6ff;
  color: #58a6ff;
}

.notification-success {
  background: #1a3a2a;
  border: 1px solid #3fb950;
  color: #3fb950;
}

.notification-warning {
  background: #3d2e1a;
  border: 1px solid #d29922;
  color: #d29922;
}

.notification-error {
  background: #3d1a1a;
  border: 1px solid #f85149;
  color: #f85149;
}

.notification-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.notification-text {
  flex: 1;
  line-height: 1.3;
}

.notification-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.6;
  padding: 0 4px;
  flex-shrink: 0;
}

.notification-close:hover {
  opacity: 1;
}

@keyframes notificationIn {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== Sound Toggle Button (fixed top-right) ===== */
.sound-toggle-fixed {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9999;
  background: #21262d;
  border: 1px solid #30363d;
  color: #8b949e;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.2s;
}

.sound-toggle-fixed:hover {
  color: #c9d1d9;
  background: #30363d;
}

.sound-toggle-fixed.sound-off {
  color: #484f58;
  border-color: #21262d;
}

/* ===== Admin Log ===== */
.admin-log-entry {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-log-text {
  color: #c9d1d9;
  font-size: 0.85rem;
}

.admin-log-text strong {
  color: #f0f6fc;
}

.admin-log-date {
  color: #8b949e;
  font-size: 0.75rem;
  white-space: nowrap;
  margin-left: 12px;
}

/* ===== Nav Toggle (mobile) ===== */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid #30363d;
  color: #c9d1d9;
  font-size: 1.3rem;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .admin-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
  }

  nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 4px;
    padding-top: 12px;
  }

  nav.nav-open {
    display: flex;
  }

  .nav-link {
    display: block;
    width: 100%;
    text-align: center;
  }

  .auction-card-body {
    grid-template-columns: 1fr;
  }

  .link-request-card {
    flex-direction: column;
    gap: 12px;
  }

  .link-request-actions {
    width: 100%;
  }

  .link-request-actions .btn {
    flex: 1;
  }

  .history-entry-header {
    flex-wrap: wrap;
  }

  .history-date {
    min-width: 100%;
  }

  .table-controls {
    flex-direction: column;
    align-items: stretch;
  }

  #search-input {
    max-width: 100%;
  }

  .sort-controls {
    justify-content: center;
  }

  .admin-log-entry {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .admin-log-date {
    margin-left: 0;
  }

  #toast-container {
    left: 20px;
    right: 20px;
  }

  .toast {
    max-width: 100%;
  }

  #notification-container {
    left: 20px;
    right: 20px;
  }

  .notification {
    max-width: 100%;
  }

  /* Кнопка звука не перекрывает гамбургер на мобильных */
  .sound-toggle-fixed {
    top: 14px;
    right: 60px;
    font-size: 0.75rem;
    padding: 4px 10px;
  }
}