/* ===== AUTH SEITE ===== */
.auth-body {
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.auth-container {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo .logo-icon {
  font-size: 56px;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 8px rgba(231,76,60,0.4));
}

.auth-logo h1 {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #e74c3c, #f39c12);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.auth-logo p {
  color: var(--text-muted);
  font-size: 14px;
}

.auth-tabs {
  display: flex;
  background: var(--bg-dark);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--primary);
  color: white;
}

.tab-btn:hover:not(.active) {
  color: var(--text-light);
  background: var(--border);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-message {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  font-weight: 600;
}

.auth-message.success {
  background: rgba(46,204,113,0.15);
  border: 1px solid var(--success);
  color: var(--success);
}

.auth-message.error {
  background: rgba(231,76,60,0.15);
  border: 1px solid var(--danger);
  color: var(--danger);
}

/* ===== GAME LAYOUT ===== */
.game-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo {
  font-size: 24px;
}

.sidebar-company {
  flex: 1;
  min-width: 0;
}

.sidebar-company-name {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-balance {
  font-size: 12px;
  color: var(--success);
  font-weight: 600;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: var(--bg-card);
  color: var(--text-light);
}

.nav-item.active {
  background: rgba(231,76,60,0.1);
  color: var(--primary);
  border-left-color: var(--primary);
}

.nav-item .nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
}

.user-info { flex: 1; }
.user-name { font-size: 13px; font-weight: 600; }
.user-rep { font-size: 11px; color: var(--text-muted); }

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ===== HEADER ===== */
.game-header {
  height: var(--header-height);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  flex-shrink: 0;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  flex: 1;
}

.header-stats {
  display: flex;
  gap: 20px;
}

.header-stat {
  text-align: center;
}

.header-stat-value {
  font-size: 14px;
  font-weight: 700;
}

.header-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ===== CONTENT AREA ===== */
.content-area {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ===== MAP VIEW ===== */
#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ===== SIDE PANEL (rechts) ===== */
.side-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 380px;
  height: 100%;
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  z-index: 10;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.side-panel.open {
  transform: translateX(0);
}

.side-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-panel-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
}

.side-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.side-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* ===== CONTENT PANELS (für nicht-Karten-Ansichten) ===== */
.content-panel {
  height: 100%;
  overflow-y: auto;
  padding: 20px;
  display: none;
}

.content-panel.active {
  display: block;
}

/* ===== MAP CONTROLS ===== */
.map-controls {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-btn {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.map-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.map-btn.active {
  background: var(--primary);
  border-color: var(--primary);
}

/* ===== LOCATION POPUP ===== */
.location-popup {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  color: var(--text-light) !important;
  min-width: 220px;
}

.location-popup .leaflet-popup-content-wrapper {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-light);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.location-popup .leaflet-popup-tip {
  background: var(--bg-panel);
}

.popup-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 8px;
}

.popup-info {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.popup-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
