/* ===== CSS VARIABLES ===== */
:root {
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ===== THEME VARIABLES ===== */
html[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-sidebar: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-primary: #e2e8f0;
  --border-secondary: #cbd5e1;
  --accent-primary: #3b82f6;
  --accent-secondary: #60a5fa;
  --accent-hover: #2563eb;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --hover: #f1f5f9;
  --highlight: #e5e7eb;
}

html[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-sidebar: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border-primary: #334155;
  --border-secondary: #475569;
  --accent-primary: #8b5cf6;
  --accent-secondary: #a78bfa;
  --accent-hover: #7c3aed;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --hover: #334155;
  --highlight: #4b5563;
}

/* ===== RESET & BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 14px;
  overflow-x: hidden;
}

/* ===== APP LAYOUT ===== */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 240px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-primary);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
}

.logo i {
  color: var(--accent-primary);
  font-size: 18px;
}

.logo-text {
  color: var(--text-primary);
}

.version {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}

.theme-toggle {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 10px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--hover);
  color: var(--text-primary);
}

/* ===== SIDEBAR NAVIGATION ===== */
.sidebar-nav {
  flex: 1;
  padding: 16px 20px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 20px;
}

.nav-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.time-info {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-family: 'Courier New', monospace;
  text-align: center;
  margin-bottom: 16px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.filter-label i {
  color: var(--accent-primary);
  width: 16px;
}

input[type="text"], input[type="date"] {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

input[type="text"]:focus, input[type="date"]:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

input::placeholder {
  color: var(--text-muted);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
}

.logout-container {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-primary);
}

.logout-btn {
  padding: 8px 16px;
  font-size: 0.875rem;
  width: fit-content;
  transition: all 0.2s ease;
}

.pagination-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
  padding: 20px;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.pagination-info {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

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

.pagination-controls .btn {
  padding: 8px 12px;
  font-size: 0.875rem;
  min-width: 40px;
}

.pagination-ellipsis {
  padding: 8px 4px;
  color: var(--text-secondary);
  font-weight: bold;
}

.btn-primary {
  background: var(--accent-color);
  color: white;
  border: 1px solid var(--accent-color);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-icon {
  padding: 10px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
}

.btn-icon:hover {
  background: var(--hover);
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

/* ===== SIDEBAR FOOTER ===== */
.sidebar-footer {
  padding: 24px;
  border-top: 1px solid var(--border-primary);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.user-details {
  flex: 1;
}

.user-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.user-role {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.page-title i {
  color: var(--accent-primary);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb i {
  font-size: 10px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
}

.stat-item i {
  color: var(--accent-primary);
}

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

/* ===== LOGS CONTAINER ===== */
.logs-container {
  flex: 1;
  padding: 32px;
  overflow: hidden;
}

.logs-table-wrapper {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.logs-table {
  width: 100%;
  border-collapse: collapse;
}

.logs-table thead th {
  background: var(--bg-tertiary);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-primary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.logs-table thead th i {
  color: var(--accent-primary);
  margin-right: 8px;
}

.logs-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-primary);
  vertical-align: top;
  transition: var(--transition);
  font-size: 13px;
  line-height: 1.4;
}

.logs-table tbody tr:nth-child(even) {
  background: var(--bg-secondary);
}

.logs-table tbody tr:nth-child(odd) {
  background: var(--bg-primary);
}

.logs-table tbody tr.search-match {
  background: color-mix(in oklab, var(--accent-primary) 10%, transparent);
  border-left: 3px solid var(--accent-primary);
}

.logs-table tbody tr:hover {
  background: var(--hover) !important;
}

.logs-table tbody tr:last-child td {
  border-bottom: none;
}

.col-date {
  width: 200px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 500;
}

.col-message {
  color: var(--text-primary);
  line-height: 1.6;
}

.col-message a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.col-message a:hover {
  text-decoration: underline;
}

.log-type {
  display: inline-block;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  margin-top: 8px;
  border: 1px solid var(--border-primary);
}

.col-info {
  width: 250px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 32px;
  text-align: center;
}

.empty-icon {
  width: 80px;
  height: 80px;
  background: var(--bg-tertiary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.empty-icon i {
  font-size: 32px;
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: white;
}

.loading-spinner i {
  font-size: 32px;
  color: var(--accent-primary);
}

.loading-spinner span {
  font-size: 16px;
  font-weight: 500;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  animation: slideIn 0.3s ease-out;
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--error);
}

.toast.warning {
  border-left: 4px solid var(--warning);
}

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

/* ===== ACCESS DENIED PAGE ===== */
.access-denied-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
}

.access-denied-content {
  text-align: center;
  max-width: 600px;
  padding: 40px;
  position: relative;
  z-index: 10;
}

.animated-cross {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 40px;
  animation: crossPulse 2s ease-in-out infinite;
}

.cross-line {
  position: absolute;
  background: var(--error);
  border-radius: 2px;
  animation: crossDraw 1.5s ease-in-out;
}

.cross-line-1 {
  width: 80px;
  height: 8px;
  top: 56px;
  left: 20px;
  transform: rotate(45deg);
}

.cross-line-2 {
  width: 80px;
  height: 8px;
  top: 56px;
  left: 20px;
  transform: rotate(-45deg);
}

.cross-circle {
  position: absolute;
  width: 120px;
  height: 120px;
  border: 4px solid var(--error);
  border-radius: 50%;
  top: 0;
  left: 0;
  animation: circlePulse 2s ease-in-out infinite;
}

.access-denied-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--error);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.access-denied-title i {
  font-size: 2.5rem;
  animation: iconShake 1s ease-in-out infinite;
}

.access-denied-message {
  margin-bottom: 40px;
}

.main-message {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.sub-message {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-style: italic;
}

.access-denied-info {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-tertiary);
  border-radius: 25px;
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.3s ease;
}

.info-item:hover {
  background: var(--hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.info-item i {
  color: var(--warning);
  font-size: 1.1rem;
}

.access-denied-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.access-denied-actions .btn {
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.access-denied-actions .btn-primary {
  background: var(--accent-primary);
  color: white;
}

.access-denied-actions .btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

.access-denied-actions .btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
}

.access-denied-actions .btn-secondary:hover {
  background: var(--hover);
  transform: translateY(-2px);
}

.decorative-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.floating-icon {
  position: absolute;
  font-size: 2rem;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.icon-1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.icon-2 {
  top: 30%;
  right: 15%;
  animation-delay: 1s;
}

.icon-3 {
  top: 60%;
  left: 20%;
  animation-delay: 2s;
}

.icon-4 {
  top: 70%;
  right: 10%;
  animation-delay: 3s;
}

.icon-5 {
  top: 40%;
  left: 50%;
  animation-delay: 4s;
}

/* Анимации */
@keyframes crossPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes crossDraw {
  0% { 
    width: 0;
    opacity: 0;
  }
  50% { 
    opacity: 1;
  }
  100% { 
    width: 80px;
    opacity: 1;
  }
}

@keyframes circlePulse {
  0%, 100% { 
    border-color: var(--error);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% { 
    border-color: var(--warning);
    box-shadow: 0 0 0 20px rgba(239, 68, 68, 0);
  }
}

@keyframes iconShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

@keyframes float {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg);
    opacity: 0.1;
  }
  50% { 
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.2;
  }
}

/* Темная тема для страницы запрета */
body.dark .access-denied-container {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

body.dark .info-item {
  background: #334155;
  border-color: #475569;
}

body.dark .info-item:hover {
  background: #475569;
}

body.dark .access-denied-actions .btn-secondary {
  background: #334155;
  border-color: #475569;
}

body.dark .access-denied-actions .btn-secondary:hover {
  background: #475569;
}

/* ===== HIGHLIGHT ===== */
mark {
  background: var(--highlight);
  color: inherit;
  padding: 1px 2px;
  border-radius: 2px;
  font-weight: normal;
  box-shadow: none;
  opacity: 0.6;
}

/* ===== PLAYER STATS PAGE ===== */
.player-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  padding: 24px 32px;
}

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

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.back-btn:hover {
  background: var(--hover);
  color: var(--text-primary);
}

.player-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
}

.player-content {
  padding: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.player-info {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.5rem !important;
  margin-bottom: 2rem;
}

/* Адаптивность для карточек */
@media (max-width: 1200px) {
  .player-info {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .player-info {
    grid-template-columns: 1fr;
  }
}

.info-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  height: fit-content;
}

.card-header {
  background: var(--bg-tertiary);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-primary);
}

.card-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-content {
  padding: 16px 20px;
}

.info-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-primary);
}

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

.info-item label {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.info-item span {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

.card-header {
  background: var(--bg-tertiary);
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-primary);
}

.card-header h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.card-header i {
  color: var(--accent-primary);
}

.card-content {
  padding: 24px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-item label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-item span {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.description-content {
  background: var(--bg-tertiary);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-primary);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 32px;
  text-align: center;
}

.error-icon {
  width: 80px;
  height: 80px;
  background: color-mix(in oklab, var(--error) 20%, transparent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.error-icon i {
  font-size: 32px;
  color: var(--error);
}

.error-state h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.error-state p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .content-header {
    padding: 20px 24px;
  }
  
  .logs-container {
    padding: 24px;
  }
  
  .player-content {
    padding: 24px;
  }
  
  .player-info {
    grid-template-columns: 1fr;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .content-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .logs-table thead th,
  .logs-table tbody td {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .col-date {
    width: 120px;
  }
  
  .col-info {
    width: 160px;
  }
}

/* IP Links */
.ip-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dotted #007bff;
  transition: all 0.2s ease;
}

.ip-link:hover {
  color: #0056b3;
  border-bottom-color: #0056b3;
  text-decoration: none;
}

.ip-link:visited {
  color: #6f42c1;
  border-bottom-color: #6f42c1;
}

/* IP Page Styles */
.ip-page {
  padding: 2rem;
}

.ip-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  text-align: center;
}

.ip-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
}

.ip-header .ip-address {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-top: 0.5rem;
}

.ip-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.ip-stat-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  text-align: center;
}

.ip-stat-card .stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 0.5rem;
}

.ip-stat-card .stat-label {
  color: #666;
  font-size: 0.9rem;
}

.ip-section {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
  overflow: hidden;
}

.ip-section-header {
  background: #f8f9fa;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
  color: #495057;
}

.ip-section-content {
  padding: 1.5rem;
}

.ip-accounts-table, .ip-bans-table {
  width: 100%;
  border-collapse: collapse;
}

.ip-accounts-table th, .ip-bans-table th {
  background: #f8f9fa;
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #e9ecef;
}

.ip-accounts-table td, .ip-bans-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

.ip-accounts-table tr:hover, .ip-bans-table tr:hover {
  background: #f8f9fa;
}

.player-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.player-link:hover {
  text-decoration: underline;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}

/* Ban Types */
.ban-type {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.ban-type.ip {
  background: #ff6b6b;
  color: white;
}

.ban-type.name {
  background: #4ecdc4;
  color: white;
}

/* Dark Theme */
body.dark {
  background: #1a1a1a;
  color: #e0e0e0;
}

body.dark .header {
  background: #2d2d2d;
  border-bottom: 1px solid #404040;
}

body.dark .sidebar {
  background: #2d2d2d;
  border-right: 1px solid #404040;
}

body.dark .sidebar-header h3 {
  color: #e0e0e0;
}

body.dark .nav-item {
  color: #b0b0b0;
}

body.dark .nav-item:hover {
  background: #404040;
  color: #ffffff;
}

body.dark .content-header {
  background: #2d2d2d;
  border-bottom: 1px solid #404040;
}

body.dark .content-header h2 {
  color: #e0e0e0;
}

body.dark .stats-grid .stat-card {
  background: #2d2d2d;
  border: 1px solid #404040;
}

body.dark .stat-card .stat-number {
  color: #4a9eff;
}

body.dark .stat-card .stat-label {
  color: #b0b0b0;
}

body.dark .content-section {
  background: #2d2d2d;
  border: 1px solid #404040;
}

body.dark .section-header {
  background: #404040;
  border-bottom: 1px solid #555555;
}

body.dark .section-header h3 {
  color: #e0e0e0;
}

body.dark .logs-table {
  background: #2d2d2d;
}

body.dark .logs-table th {
  background: #404040;
  color: #e0e0e0;
  border-bottom: 2px solid #555555;
}

body.dark .logs-table td {
  border-bottom: 1px solid #404040;
  color: #e0e0e0;
}

body.dark .logs-table tr:nth-child(even) {
  background: #2d2d2d;
}

body.dark .logs-table tr:nth-child(odd) {
  background: #1a1a1a;
}

body.dark .logs-table tr:hover {
  background: #404040 !important;
}

body.dark .btn {
  background: #4a9eff;
  color: white;
  border: 1px solid #4a9eff;
}

body.dark .btn:hover {
  background: #357abd;
  border-color: #357abd;
}

body.dark .btn-secondary {
  background: #6c757d;
  border-color: #6c757d;
}

body.dark .btn-secondary:hover {
  background: #545b62;
  border-color: #545b62;
}

body.dark .ip-link {
  color: #4a9eff;
  border-bottom-color: #4a9eff;
}

body.dark .ip-link:hover {
  color: #357abd;
  border-bottom-color: #357abd;
}

body.dark .player-link {
  color: #4a9eff;
}

body.dark .player-link:hover {
  color: #357abd;
}

body.dark .log-type {
  background: #404040;
  color: #e0e0e0;
}

body.dark .ban-type.ip {
  background: #ff6b6b;
  color: white;
}

body.dark .ban-type.name {
  background: #4ecdc4;
  color: white;
}

body.dark .empty-state {
  color: #b0b0b0;
}

body.dark .loading-overlay {
  background: rgba(26, 26, 26, 0.9);
}

body.dark .loading-text {
  color: #e0e0e0;
}

body.dark .error-state {
  background: #2d2d2d;
  border: 1px solid #404040;
}

body.dark .error-state h3 {
  color: #e0e0e0;
}

body.dark .error-state p {
  color: #b0b0b0;
}

body.dark .user-info {
  color: #e0e0e0;
}

body.dark .user-name {
  color: #e0e0e0;
}

body.dark .user-role {
  color: #b0b0b0;
}

/* Icon fixes */
.fas, .far, .fab {
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
  font-weight: 900;
}

body.dark .fas, body.dark .far, body.dark .fab {
  color: inherit;
}

/* Ensure icons are visible in dark theme */
body.dark .nav-item i,
body.dark .sidebar-header i,
body.dark .content-header i,
body.dark .section-header i,
body.dark .stat-icon i {
  color: inherit;
  opacity: 1;
}

/* Force hide loading overlay */
.loading-overlay.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Search Panel */
.search-panel {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin: 1rem;
  padding: 0;
  overflow: hidden;
}

.search-header {
  background: #e9ecef;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #dee2e6;
}

.search-header h4 {
  margin: 0;
  font-size: 0.9rem;
  color: #495057;
}

.btn-close {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
}

.btn-close:hover {
  background: #dee2e6;
  color: #495057;
}

.search-content {
  padding: 1rem;
}

.search-input {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid #ced4da;
  border-radius: 3px;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.search-btn {
  width: 100%;
  padding: 0.4rem;
  font-size: 0.85rem;
}

/* Dark theme for search panel */
body.dark .search-panel {
  background: #2d2d2d;
  border-color: #404040;
}

body.dark .search-header {
  background: #404040;
  border-bottom-color: #555555;
}

body.dark .search-header h4 {
  color: #e0e0e0;
}

body.dark .btn-close {
  color: #b0b0b0;
}

body.dark .btn-close:hover {
  background: #555555;
  color: #e0e0e0;
}

body.dark .search-input {
  background: #404040;
  border-color: #555555;
  color: #e0e0e0;
}

body.dark .search-input::placeholder {
  color: #b0b0b0;
}

/* Search match highlighting */
.search-match {
  background: #fff3cd !important;
  border-left: 4px solid #ffc107 !important;
}

body.dark .search-match {
  background: #664d03 !important;
  border-left-color: #ffc107 !important;
}

/* Dashboard Styles */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.chart-container {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

.chart-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #495057;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-header i {
  color: #007bff;
}

.chart-wrapper {
  position: relative;
  height: 300px;
}

.chart-content {
  padding: 1rem 0;
}

/* Dark theme for dashboard */
body.dark .chart-container {
  background: #2d2d2d;
  border-color: #404040;
}

body.dark .chart-header {
  border-bottom-color: #404040;
}

body.dark .chart-header h3 {
  color: #e0e0e0;
}

body.dark .chart-header i {
  color: #4a9eff;
}

/* Toast notifications */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

/* Auto Refresh Controls */
.auto-refresh-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.refresh-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #007bff;
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

.toggle-label {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
}

.refresh-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #6c757d;
}

.refresh-status.active {
  color: #28a745;
}

.refresh-status i {
  width: 14px;
}

.refresh-timer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #6c757d;
}

.refresh-timer i {
  width: 14px;
}

#countdown {
  font-weight: 600;
  color: #007bff;
}

/* Dark theme for auto refresh */
body.dark .toggle-label {
  color: #b0b0b0;
}

body.dark .refresh-status {
  color: #b0b0b0;
}

body.dark .refresh-status.active {
  color: #28a745;
}

body.dark .refresh-timer {
  color: #b0b0b0;
}

body.dark #countdown {
  color: #4a9eff;
}

/* Navigation Links */
.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  color: #6c757d;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 14px;
}

.nav-link:hover {
  background: #e9ecef;
  color: #495057;
}

.nav-link.active {
  background: #007bff;
  color: white;
}

.nav-link i {
  margin-right: 0.5rem;
  width: 14px;
  text-align: center;
  font-size: 14px;
}

/* Dark theme for navigation */
body.dark .nav-link {
  color: #b0b0b0;
}

body.dark .nav-link:hover {
  background: #404040;
  color: #e0e0e0;
}

body.dark .nav-link.active {
  background: #4a9eff;
  color: white;
}

/* Section Stats */
.section-stats {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
}

body.dark .section-stats {
  color: #b0b0b0;
}

/* Analysis Tabs */
.analysis-tabs {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin: 1rem;
  overflow: hidden;
}

.tab-header {
  background: #e9ecef;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #dee2e6;
}

.tab-header h4 {
  margin: 0;
  font-size: 0.9rem;
  color: #495057;
}

.tab-nav {
  padding: 0.5rem;
}

.tab-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  margin: 0.25rem 0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6c757d;
}

.tab-item:hover {
  background: #e9ecef;
  color: #495057;
}

.tab-item.active {
  background: #007bff;
  color: white;
}

.tab-item i {
  margin-right: 0.5rem;
  width: 16px;
}

.tab-item span {
  font-size: 0.9rem;
}

/* Suspicion Levels */
.suspicion-level {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.suspicion-level.high {
  background: #dc3545;
  color: white;
}

.suspicion-level.medium {
  background: #ffc107;
  color: #212529;
}

.suspicion-level.low {
  background: #28a745;
  color: white;
}

/* Ban Status */
.ban-status {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.ban-status.active-ban {
  background: #dc3545;
  color: white;
}

.ban-status.inactive-ban {
  background: #6c757d;
  color: white;
}

/* Dark theme for analysis tabs */
body.dark .analysis-tabs {
  background: #2d2d2d;
  border-color: #404040;
}

body.dark .tab-header {
  background: #404040;
  border-bottom-color: #555555;
}

body.dark .tab-header h4 {
  color: #e0e0e0;
}

body.dark .tab-item {
  color: #b0b0b0;
}

body.dark .tab-item:hover {
  background: #404040;
  color: #e0e0e0;
}

body.dark .tab-item.active {
  background: #4a9eff;
  color: white;
}

/* Инвентарь и аксессуары */
.inventory-section {
    margin-top: 15px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.inventory-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.inventory-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 15px;
    flex-wrap: nowrap;
    overflow-x: auto;
    min-width: 0;
}

.inventory-tab {
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
    font-size: 0.875rem;
}

.inventory-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.inventory-tab:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.inventory-tab.active:hover {
    background: var(--primary-hover);
    color: white;
}

.inventory-tab-content {
    display: block !important;
}

.inventory-tab-content.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.inventory-tab-content:not(.hidden) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Аксессуары */
.accessories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.accessory-slot {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.accessory-slot:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.accessory-slot.empty {
    border-style: dashed;
    opacity: 0.6;
}

.accessory-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    background: var(--bg-primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-secondary);
}

.accessory-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.accessory-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 5px;
    word-break: break-word;
}

.accessory-slot-name {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.accessory-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.accessory-slot:hover .accessory-remove-btn {
    opacity: 1;
}

.accessory-remove-btn:hover {
    background: var(--danger-hover);
}

/* Инвентарь */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.inventory-slot {
    aspect-ratio: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    width: 50px;
    height: 50px;
}

.inventory-slot:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.inventory-slot.empty {
    border-style: dashed;
    opacity: 0.4;
}

.inventory-slot-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 1px;
    background: var(--bg-secondary);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.inventory-slot-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 3px;
}

.inventory-slot-quantity {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--primary-color);
    color: white;
    padding: 1px 4px;
    border-radius: 3px;
    min-width: 16px;
    text-align: center;
}

.inventory-slot-name {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1;
}

.inventory-slot-remove {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 12px;
    height: 12px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.inventory-slot:hover .inventory-slot-remove {
    opacity: 1;
}

.inventory-slot-remove:hover {
    background: var(--danger-hover);
}

/* Темная тема для инвентаря */
.dark .inventory-section {
    background: var(--card-bg-dark);
    border-color: var(--border-color-dark);
}

.dark .inventory-tab {
    background: var(--bg-secondary-dark);
    border-color: var(--border-color-dark);
    color: var(--text-secondary-dark);
}

.dark .inventory-tab:hover {
    background: var(--hover-bg-dark);
    color: var(--text-primary-dark);
}

.dark .accessory-slot {
    background: var(--bg-secondary-dark);
    border-color: var(--border-color-dark);
}

.dark .accessory-icon {
    background: var(--bg-primary-dark);
    color: var(--text-secondary-dark);
}

.dark .accessory-name {
    color: var(--text-primary-dark);
}

.dark .accessory-slot-name {
    color: var(--text-secondary-dark);
}

.dark .inventory-grid {
    background: var(--bg-secondary-dark);
    border-color: var(--border-color-dark);
}

.dark .inventory-slot {
    background: var(--bg-primary-dark);
    border-color: var(--border-color-dark);
}

.dark .inventory-slot-icon {
    background: var(--bg-secondary-dark);
    color: var(--text-secondary-dark);
}

.dark .inventory-slot-quantity {
    background: var(--primary-color);
    color: white;
}

.dark .inventory-slot-name {
    color: var(--text-secondary-dark);
}