/* ============================================
   GP ARIZONA RP — Admin Panel Styles
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:        #e3342f;
  --red-dark:   #cc1f1a;
  --sidebar-bg: #1a1a1a;
  --sidebar-w:  248px;
  --topbar-h:   48px;
  --text:       #222;
  --text-muted: #888;
  --border:     #e5e5e5;
  --bg:         #f5f5f5;
  --white:      #fff;
  --active-bg:  #7b1e1e;
  --link-red:   #c0392b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

/* ---- TOPBAR ---- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 20px;
  z-index: 100;
}

.topbar-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--white);
}
.brand-gp {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -1px;
}
.brand-sub {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2px;
  color: #aaa;
}

.topbar-right {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.server-badge {
  background: #555;
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background .15s;
}
.server-badge:hover { background: #666; }
.server-badge .arrow { font-size: 10px; }

/* Dropdown */
.server-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 200px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  z-index: 200;
  overflow: hidden;
}
.server-menu.open { display: block; }

.server-menu-title {
  padding: 10px 16px 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}
.server-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  transition: background .1s;
}
.server-option:hover { background: #f5f5f5; }
.server-option.active { font-weight: 600; color: var(--red); }
.server-option.active .s-dot { background: var(--red); }
.s-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ccc;
  flex-shrink: 0;
}
.server-menu-divider {
  border-top: 1px solid var(--border);
  margin: 4px 0;
}
.logout-link { color: var(--red) !important; }

/* ---- LAYOUT ---- */
.layout {
  display: flex;
  padding-top: var(--topbar-h);
  min-height: 100vh;
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  min-height: calc(100vh - var(--topbar-h));
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  overflow-y: auto;
  padding: 16px 0;
}

.sidebar ul { list-style: none; }

.nav-section-title {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 20px 6px;
  font-weight: 600;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: #ccc;
  text-decoration: none;
  font-size: 13.5px;
  border-radius: 0;
  transition: background .15s, color .15s;
}
.nav-item a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active a {
  background: var(--active-bg);
  color: #fff;
}
.nav-icon { font-size: 14px; }

/* ---- MAIN CONTENT ---- */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 32px;
  min-height: calc(100vh - var(--topbar-h));
}

/* ---- PAGE TITLE ---- */
.page-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text);
}

/* ---- CARD / PANEL ---- */
.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden;
}
.panel-header {
  background: #f7f7f7;
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #444;
}

/* ---- FORMS ---- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; color: var(--text-muted); }
.form-group input,
.form-group select,
.form-group textarea {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
  background: var(--white);
}
.form-group input:focus,
.form-group select:focus { border-color: var(--red); }
.form-group input.error { border-color: var(--red); box-shadow: 0 0 0 2px rgba(227,52,47,.15); }

.form-actions {
  padding: 0 20px 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s;
}
.btn:hover { opacity: .88; }
.btn-red { background: var(--red); color: #fff; }
.btn-gray { background: #777; color: #fff; }
.btn-small { padding: 5px 12px; font-size: 12px; }

/* ---- TAG (filter chip) ---- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f0f0f0;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 8px;
  font-size: 12px;
  color: var(--text);
}
.tag-remove {
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  font-size: 13px;
}
.tag-remove:hover { color: var(--red); }

.tags-input {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 8px;
  min-height: 36px;
  background: var(--white);
}

/* ---- TABLE ---- */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead tr {
  border-bottom: 2px solid #111;
}
thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
thead th .th-sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}
tbody tr { border-bottom: 1px solid #f0f0f0; }
tbody tr:last-child { border-bottom: none; }
tbody td {
  padding: 12px 14px;
  vertical-align: top;
  line-height: 1.5;
}

/* IP badges */
.ip-wrap { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; }
.ip-label { color: var(--text-muted); }
.ip-badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 500;
  margin-right: 3px;
}

/* Player link */
.player-link { color: var(--link-red); font-weight: 600; text-decoration: none; }
.player-link:hover { text-decoration: underline; }
.admin-link { color: var(--link-red); font-weight: 600; }

/* Money highlight */
.money-cell { color: var(--link-red); font-size: 12px; }

/* ---- PROFILE ---- */
.profile-card {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px;
}
.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #aaa;
  flex-shrink: 0;
  overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info { flex: 1; }
.profile-info p { margin-bottom: 8px; font-size: 14px; }
.profile-info strong { font-weight: 600; }
.role-badge { color: #27ae60; font-weight: 600; }

.info-section { padding: 20px; }
.info-row {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); min-width: 200px; }
.info-value { font-weight: 600; color: var(--text); }
.info-value.red { color: var(--link-red); }

/* ---- ADMIN LEVEL COLORS ---- */
.lvl-1 { color: #6cb2eb; }
.lvl-2 { color: #38c172; }
.lvl-3 { color: #f6993f; }
.lvl-4 { color: #3490dc; }
.lvl-5 { color: #9561e2; }
.lvl-6 { color: #4dc0b5; }
.lvl-7 { color: #e3342f; }
.lvl-8 { color: #e3342f; }
.lvl-err { color: #aaa; }

/* ---- AUTH PAGES ---- */
.auth-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 80px;
}
.auth-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 28px;
}
.auth-brand .brand-gp { font-size: 28px; font-weight: 700; color: #222; }
.auth-brand .brand-sub { font-size: 12px; letter-spacing: 2px; color: #888; }

.auth-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 100%;
  max-width: 520px;
  overflow: hidden;
}
.auth-box-header {
  background: #f7f7f7;
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  font-size: 14px;
  color: #444;
}
.auth-form { padding: 20px; }
.auth-field {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
}
.auth-field label { font-size: 13px; color: var(--text); }
.auth-field input {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
}
.auth-field input:focus { border-color: var(--red); }
.auth-field input.error { border-color: var(--red); box-shadow: 0 0 0 2px rgba(227,52,47,.15); }
.auth-actions { display: flex; align-items: center; gap: 16px; }
.auth-link { color: var(--red); text-decoration: none; font-size: 13px; }
.auth-link:hover { text-decoration: underline; }

.alert {
  padding: 10px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 13px;
}
.alert-danger { background: #fde8e8; border: 1px solid #f5c6cb; color: #c0392b; }
.alert-success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }

/* ---- TOTAL ROW ---- */
.table-footer {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ---- SEARCH PAGE ---- */
.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 20px;
}
.search-label { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; display: block; }
.search-input {
  border: 1px solid var(--red);
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 13px;
  width: 100%;
  outline: none;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 16px; }
}

/* ========== AURA-LAND БРЕНДИНГ ========== */
.brand-gp {
    color: #8b5cf6 !important;
}
.brand-sub {
    color: #a78bfa !important;
}
.btn-red {
    background: #8b5cf6 !important;
}
.btn-red:hover {
    background: #7c3aed !important;
}
.nav-item.active a {
    background: #7c3aed !important;
}
.auth-link {
    color: #8b5cf6 !important;
}