* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0f1e;
}

#cesiumContainer {
  width: 100%;
  height: 100%;
}

/* Hide Cesium default UI (keep credits visible) */
.cesium-viewer-toolbar,
.cesium-viewer-animationContainer,
.cesium-viewer-timelineContainer,
.cesium-viewer-fullscreenContainer {
  display: none !important;
}

.cesium-viewer-bottom {
  display: block !important;
  z-index: 10;
}

.cesium-credit-logoContainer,
.cesium-credit-textContainer {
  display: inline-block !important;
  opacity: 0.85;
}

.cesium-credit-expand-link {
  display: inline !important;
  color: #aaa !important;
}

/* Views */
.view {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* ===== AUTH ===== */
.auth-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: url('assets/BergweltHahnenkamm_RolfMarke_01.jpg') center/cover no-repeat;
  padding: 32px;
  position: relative;
}

.auth-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 15, 0.6);
  backdrop-filter: blur(2px);
}

.photo-credit {
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
}

.auth-footer-sep {
  color: rgba(255, 255, 255, 0.35);
  font-size: 14px;
}

.landing-hero {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.landing-logo {
  height: 240px;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.5));
}

.landing-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.5);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: rgba(10, 15, 30, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 32px;
  backdrop-filter: blur(16px);
  position: relative;
}

.auth-card h3 {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

.form-group {
  margin-bottom: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: rgba(255, 160, 0, 0.5);
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.auth-error {
  color: #ff5555;
  font-size: 13px;
  margin-bottom: 12px;
  min-height: 18px;
}

.auth-success {
  color: #55cc55;
  font-size: 13px;
  margin-bottom: 12px;
  min-height: 18px;
}

.auth-card button[type="submit"] {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: none;
  background: #ffa000;
  color: #000;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.auth-card button[type="submit"]:hover {
  background: #ffb333;
}

.auth-card button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-toggle {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.auth-toggle a {
  color: #ffa000;
  text-decoration: none;
}

.auth-toggle a:hover {
  text-decoration: underline;
}

/* ===== TOP NAV ===== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 128px;
  background: rgba(10, 14, 30, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.top-nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo-link {
  display: flex;
  align-items: center;
  margin-right: 12px;
  text-decoration: none;
}

.nav-logo {
  height: 56px;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.3));
  transition: opacity 0.2s;
}

.nav-logo:hover {
  opacity: 0.8;
}

.nav-tab {
  padding: 6px 16px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-tab.active {
  color: #ff8800;
  border-color: rgba(255, 136, 0, 0.3);
  background: rgba(255, 136, 0, 0.08);
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-nav-right span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

/* ===== HOME PAGE ===== */
.home-container {
  padding-top: 84px !important;
}

.home-loading {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  padding: 60px 0;
  font-size: 15px;
}

.home-stats-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.home-stat-big {
  background: rgba(10, 14, 25, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  transition: border-color 0.2s;
  backdrop-filter: blur(8px);
}

.home-stat-big:hover {
  border-color: rgba(255, 136, 0, 0.3);
}

.home-stat-number {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.home-stat-title {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 6px;
}

.home-stat-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 12px 0 28px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.home-section {
  background: rgba(10, 14, 25, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(8px);
}

.home-section h3 {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
}

.home-section-full {
  grid-column: 1 / -1;
}

.home-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.home-section-header h3 {
  margin-bottom: 0;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #44dd66;
  box-shadow: 0 0 6px rgba(68, 221, 102, 0.5);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.online-count {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.online-users-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.online-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(68, 221, 102, 0.08);
  border: 1px solid rgba(68, 221, 102, 0.15);
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.online-user:hover {
  background: rgba(68, 221, 102, 0.15);
}

.online-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.home-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.home-table thead th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.home-table tbody td {
  padding: 9px 10px;
  color: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.home-table .rank {
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  width: 28px;
}

.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

.sortable:hover {
  color: #ff8800;
}

.sort-arrow {
  font-size: 9px;
  margin-left: 3px;
  color: #ff8800;
}

.clickable-row {
  cursor: pointer;
  transition: background 0.15s;
}

.clickable-row:hover {
  background: rgba(255, 136, 0, 0.06);
}

.activity-pilot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #ff8800;
}

.activity-pilot:hover {
  text-decoration: underline;
}

.activity-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.activity-table {
  font-size: 13px;
}

.text-muted {
  color: rgba(255, 255, 255, 0.35);
}

.home-empty {
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
  padding: 16px 0;
  text-align: center;
}

/* ===== DASHBOARD ===== */
.dashboard-container {
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at top, rgba(15, 20, 40, 1) 0%, rgba(5, 8, 15, 1) 100%);
  overflow-y: auto;
  padding: 24px 128px;
  padding-top: 84px;
  position: relative;
}

.dashboard-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 800px;
  background: url('assets/BergweltHahnenkamm_RolfMarke_01.jpg') center top / cover no-repeat;
  opacity: 0.3;
  mask-image: linear-gradient(180deg, black 0%, black 15%, transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, black 0%, black 15%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.dashboard-container > * {
  position: relative;
  z-index: 1;
}

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

.dashboard-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-title h2 {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

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

.dashboard-user span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.btn-primary {
  padding: 8px 18px;
  border-radius: 6px;
  border: none;
  background: #ffa000;
  color: #000;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #ffb333;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ===== Dashboard Banner Zone ===== */
.dash-banner-zone {
  position: relative;
}

.dash-banner-bg,
.dash-banner-overlay {
  display: none;
}

.dash-banner-inner {
  position: relative;
  z-index: 1;
  padding-bottom: 20px;
}

/* ===== Dashboard Hero ===== */
.dash-hero {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
}

.dash-hero-content {
  position: relative;
  display: flex;
  gap: 20px;
  align-items: stretch;
  padding: 24px;
  background: rgba(10, 14, 25, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  backdrop-filter: blur(8px);
}

.dash-profile-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 360px;
  min-width: 0;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  padding: 16px;
}

.profile-card-top {
  display: flex;
  gap: 14px;
  align-items: center;
}

.profile-card-identity {
  flex: 1;
  min-width: 0;
}

.profile-card-identity h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.profile-card-identity .pilot-realname {
  margin-top: 0;
}

.profile-card-identity .pilot-location {
  margin-top: 2px;
}

.dash-profile-card .card-banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.5s;
}

.dash-profile-card .card-banner-bg.has-image {
  opacity: 0.25;
}

.dash-profile-card .card-banner-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(5, 8, 15, 0.5) 0%, rgba(5, 8, 15, 0.2) 100%);
}

.dash-profile-card > *:not(.card-banner-bg) {
  position: relative;
  z-index: 1;
}

.dash-profile-card .pilot-profile-avatar-big {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.dash-profile-card .pilot-gliders {
  margin-top: 0;
}

.dash-profile-card .pilot-bio {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
  margin-top: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
  white-space: pre-line;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bio-link {
  color: #ffa000;
  text-decoration: none;
  word-break: break-all;
}

.bio-link:hover {
  text-decoration: underline;
  color: #ffb833;
}

.dash-stats-bar {
  flex: 1;
  display: flex;
  gap: 2px;
  justify-content: space-around;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 16px 20px;
}

/* Chart toggle buttons */
.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.chart-header h4 {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
  margin: 0;
}

.chart-toggle {
  display: flex;
  gap: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-toggle button {
  padding: 3px 10px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.chart-toggle button:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
}

.chart-toggle button.active {
  background: rgba(255, 136, 0, 0.15);
  color: #ff8800;
}

.chart-empty {
  color: rgba(255, 255, 255, 0.25);
  font-size: 12px;
  text-align: center;
  padding: 20px 0;
}

/* Stats Bar */
.stats-bar {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px 24px;
  margin-bottom: 20px;
  justify-content: space-around;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #ffa000;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
}

/* Detailed Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stats-card {
  background: rgba(10, 14, 25, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 14px 18px;
  backdrop-filter: blur(8px);
}

.stats-card-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 10px;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.stats-row span:last-child {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
}

/* Import Section */
.import-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 20px;
}

.import-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.upload-status {
  color: rgba(255, 160, 0, 0.8);
  font-size: 13px;
}

.file-drop-small {
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
  transition: border-color 0.2s, background 0.2s;
}

.file-drop-small.drag-over {
  border-color: rgba(255, 160, 0, 0.5);
  background: rgba(255, 160, 0, 0.05);
}

/* Flights Toolbar */
.flights-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

#flights-count {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

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

.sort-controls label {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}

#sort-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
}

#sort-select option {
  background: #1a1a2e;
  color: #fff;
}

/* Flight Cards */
.flights-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 32px;
}

.flight-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 14px 18px;
  transition: background 0.15s, border-color 0.15s;
}

.flight-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.flight-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.flight-date {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.flight-country {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.flight-takeoff {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.flight-card-body {
  display: flex;
  gap: 20px;
  align-items: baseline;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.flight-stat {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.flight-stat-value {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.flight-stat-unit {
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
}

.flight-stat-value.type-FAI_TRIANGLE { color: #ffa000; }
.flight-stat-value.type-FREE_TRIANGLE { color: #ff8844; }
.flight-stat-value.type-FLAT_TRIANGLE { color: #ffaa44; }
.flight-stat-value.type-FREE_FLIGHT { color: #66bbff; }
.flight-stat-value.type-FREE_DISTANCE { color: #88cc88; }

.flight-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flight-glider {
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
}

.flight-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-view-3d {
  background: rgba(255, 160, 0, 0.15);
  border: 1px solid rgba(255, 160, 0, 0.3);
  color: #ffa000;
  padding: 5px 14px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-view-3d:hover {
  background: rgba(255, 160, 0, 0.3);
}

.btn-view-3d:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-upload-igc {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.2s;
}

.btn-upload-igc:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 14px;
}

/* Back Button */
.btn-back {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.viewer-back {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
}

/* ===== 3D View Sidebar ===== */
.viewer-sidebar {
  position: absolute;
  top: 64px;
  left: 0;
  bottom: 0;
  width: 33.33%;
  max-width: 420px;
  min-width: 300px;
  z-index: 50;
  background: linear-gradient(90deg, rgba(5, 8, 18, 0.92) 0%, rgba(5, 8, 18, 0.85) 85%, rgba(5, 8, 18, 0) 100%);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.viewer-sidebar-header {
  padding: 20px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.viewer-sidebar-actions {
  padding: 8px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.viewer-sidebar-actions .btn-primary {
  font-size: 12px;
  padding: 6px 14px;
}

#follow-pilot-select {
  width: 100%;
  padding: 6px 10px;
  font-size: 12px;
  background: #1a1f30;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  cursor: pointer;
}

#follow-pilot-select option {
  background: #1a1f30;
  color: #fff;
}

.sidebar-flight-check-wrap {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 2px;
}

.sidebar-flight-check {
  width: 16px;
  height: 16px;
  accent-color: #ffa000;
  cursor: pointer;
}

.viewer-sidebar-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
}

.viewer-sidebar-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 3px;
}

.sidebar-tab {
  flex: 1;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.2s;
}

.sidebar-tab:hover {
  color: rgba(255, 255, 255, 0.8);
}

.sidebar-tab.active {
  background: rgba(255, 160, 0, 0.2);
  color: #ffa000;
}

.viewer-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px 10px 20px;
}

.viewer-sidebar-list::-webkit-scrollbar {
  width: 4px;
}

.viewer-sidebar-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.sidebar-loading,
.sidebar-empty {
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  text-align: center;
  padding: 30px 10px;
}

.sidebar-flight {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-flight:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 160, 0, 0.25);
}

.sidebar-flight.selected {
  background: rgba(255, 160, 0, 0.1);
  border-color: rgba(255, 160, 0, 0.4);
}

.sidebar-flight.loading {
  opacity: 0.5;
  pointer-events: none;
}

.sidebar-flight-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.sidebar-flight-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-flight-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-flight-pilot {
  font-size: 13px;
  color: #ffa000;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-flight-date {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
}

.sidebar-flight-location {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-flight-stats {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.sidebar-flight-type {
  font-weight: 600;
}

.sidebar-flight-glider {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 4px;
}

/* HUD */
#hud {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 2px;
  background: rgba(15, 20, 30, 0.85);
  border-radius: 8px;
  padding: 12px 24px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: top 0.2s;
}

/* When nav is visible over the viewer, push HUD below it */
.top-nav:not(.hidden) ~ #view-viewer #hud {
  top: 80px;
}

.hud-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.hud-item:last-child {
  border-right: none;
}

.hud-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
}

.hud-value {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.hud-value small {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 2px;
}

/* Controls */
#controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 20, 30, 0.85);
  border-radius: 8px;
  padding: 8px 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#controls button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

#controls button:hover {
  background: rgba(255, 255, 255, 0.2);
}

#controls button.active {
  background: rgba(255, 160, 0, 0.4);
  border-color: rgba(255, 160, 0, 0.6);
}

#speed-select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

#speed-select option {
  background: #1a1a2e;
  color: #fff;
}

#timeline {
  width: 300px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  margin: 0;
  display: block;
}

#timeline::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffa000;
  cursor: pointer;
  border: 2px solid #fff;
}

#timeline::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffa000;
  cursor: pointer;
  border: 2px solid #fff;
}

#time-display {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  min-width: 100px;
  text-align: center;
}

/* Settings Panel */
#settings-panel {
  position: absolute;
  bottom: 70px;
  right: 20px;
  z-index: 20;
  width: 340px;
  background: rgba(15, 20, 30, 0.92);
  border-radius: 10px;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  overflow: hidden;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
  font-size: 14px;
}

.settings-header button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.settings-header button:hover {
  color: #fff;
}

.settings-section {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-section:last-child {
  border-bottom: none;
}

.settings-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 8px;
}

#settings-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

#settings-panel label:last-child {
  margin-bottom: 0;
}

#settings-panel label > span:first-child {
  min-width: 90px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

#settings-panel input[type="range"] {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
}

#settings-panel input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffa000;
  cursor: pointer;
  border: 1.5px solid #fff;
}

#settings-panel input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffa000;
  cursor: pointer;
  border: 1.5px solid #fff;
}

#settings-panel input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #ffa000;
  cursor: pointer;
  flex-shrink: 0;
}

#settings-panel input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: none;
  cursor: pointer;
  padding: 0;
}

#settings-panel input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 1px;
}

#settings-panel input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 2px;
}

.set-value {
  min-width: 38px;
  text-align: right;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-variant-numeric: tabular-nums;
}

/* Delete Button */
.btn-delete-flight {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.2);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  margin-left: auto;
  line-height: 1;
  transition: color 0.2s;
}

.btn-delete-flight:hover {
  color: #ff4444;
}

/* Kudos */
.kudos-badge {
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  margin-right: 4px;
}

.kudos-wrapper {
  position: relative;
  display: inline-block;
}

.kudos-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 25, 45, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  z-index: 50;
  pointer-events: none;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.kudos-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.15);
}

.kudos-tooltip.has-content {
  display: none;
}

.kudos-wrapper:hover .kudos-tooltip.has-content {
  display: block;
  pointer-events: auto;
}

.kudos-user {
  color: #ff8800;
}

.kudos-more {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  cursor: pointer;
}

.kudos-more:hover {
  color: #ff8800;
  text-decoration: underline;
}

.btn-kudos, .btn-kudos-big {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-kudos:hover, .btn-kudos-big:hover {
  color: #ffaa00;
  border-color: rgba(255, 170, 0, 0.3);
}

.btn-kudos.active, .btn-kudos-big.active {
  color: #ffaa00;
  background: rgba(255, 170, 0, 0.1);
  border-color: rgba(255, 170, 0, 0.3);
}

.btn-kudos.own, .btn-kudos-big.own {
  pointer-events: none;
  opacity: 0.5;
  cursor: default;
}

.btn-comments, .btn-comments-big {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-comments:hover, .btn-comments-big:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.icon-kudos {
  font-size: 18px;
}

.icon-comment {
  font-size: 16px;
}

.icon-kudos-lg, .icon-comment-lg {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
}

.social-icons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.pilot-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pilot-profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

/* Comments */
.comments-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 12px;
  padding-top: 12px;
}

.comments-list {
  margin-bottom: 10px;
}

.comment {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.comment:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.comment-author {
  color: #ffa000;
  font-size: 12px;
  font-weight: 600;
}

.comment-date {
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
}

.comment-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.4;
}

.comment-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  align-items: center;
}

.comment-action-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 0;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.comment-action-btn:hover {
  color: rgba(255, 255, 255, 0.7);
}

.comment-action-btn.active {
  color: #ffaa00;
}

.comment-action-btn.delete:hover {
  color: #ff4444;
}

.comment-reply {
  margin-left: 24px;
  padding-left: 12px;
  border-left: 2px solid rgba(255, 255, 255, 0.06);
}

.comment-reply-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  margin-left: 24px;
  padding-left: 12px;
  border-left: 2px solid rgba(255, 136, 0, 0.2);
}

.comment-reply-form input {
  flex: 1;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 12px;
  outline: none;
}

.comment-reply-form input:focus {
  border-color: rgba(255, 160, 0, 0.4);
}

.comment-reply-form button {
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background: #ffa000;
  color: #000;
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
}

.comment-empty {
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  padding: 8px 0;
}

.comment-form {
  display: flex;
  gap: 8px;
}

.comment-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 13px;
  outline: none;
}

.comment-input:focus {
  border-color: rgba(255, 160, 0, 0.4);
}

.comment-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.btn-send-comment {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  background: #ffa000;
  color: #000;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}

.btn-send-comment:hover {
  background: #ffb333;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: rgba(15, 20, 35, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 28px;
}

.modal-card h3 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 20px;
}

.modal-card .form-group {
  margin-bottom: 14px;
}

.modal-card .form-group label {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  margin-bottom: 4px;
}

.modal-card input,
.modal-card select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 14px;
  outline: none;
}

.modal-card input:focus,
.modal-card select:focus {
  border-color: rgba(255, 160, 0, 0.4);
}

.modal-card select {
  cursor: pointer;
}

.modal-card select option {
  background: #1a1a2e;
  color: #fff;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Pilots */
.pilots-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 20px;
}

.pilots-header h2 {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}

.search-bar-inline {
  flex: 1;
  max-width: 320px;
}

.search-bar-inline input {
  width: 100%;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 14px;
  outline: none;
}

.search-bar-inline input:focus {
  border-color: rgba(255, 160, 0, 0.4);
}

.search-bar-inline input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.search-bar {
  margin-bottom: 20px;
}

.search-bar input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 14px;
  outline: none;
}

.search-bar input:focus {
  border-color: rgba(255, 160, 0, 0.4);
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.pilots-list {
  padding-bottom: 32px;
}

.pilots-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pilots-table thead th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.pilots-table thead th:hover {
  color: #ff8800;
}

.pilots-table thead th.sorted {
  color: #ff8800;
}

.pilots-table tbody td {
  padding: 12px 12px;
  color: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.pilots-table tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}

.pilots-table tbody tr:hover {
  background: rgba(255, 136, 0, 0.06);
}

.pilot-table-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pilot-table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pilot-table-displayname {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

.pilot-table-location {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
}

.btn-delete-user {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.2);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

.btn-delete-user:hover {
  color: #ff4444;
}

/* Pilot Profile */
.pilot-profile-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 20px;
}

.pilot-profile-top {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}

.pilot-profile-avatar-big {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.pilot-profile-info {
  flex: 1;
}

.pilot-profile-info h2 {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.pilot-realname {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  margin-top: 4px;
}

.pilot-location {
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  margin-top: 2px;
}

.pilot-member-since {
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  margin-top: 6px;
}

.pilot-bio {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pilot-gliders {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.pilot-glider-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(255, 136, 0, 0.1);
  border: 1px solid rgba(255, 136, 0, 0.2);
  color: #ff8800;
  font-size: 12px;
}

/* Pilot Stats Charts */
.pilot-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.pilot-chart-card {
  background: rgba(10, 14, 25, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(8px);
}

.pilot-chart-card h4 {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
  font-weight: 500;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 100px;
  overflow-x: auto;
}

.chart-bar-group {
  flex: 1;
  min-width: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.chart-bar {
  width: 100%;
  max-width: 32px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #ff8800, #cc6600);
  transition: height 0.3s ease;
  min-height: 2px;
}

.chart-bar-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
}

.chart-bar-value {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
}

/* ===== CLICKABLE CARDS ===== */
.flight-card.clickable {
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}

.flight-card.clickable:hover {
  border-color: rgba(255, 136, 0, 0.5);
  transform: translateY(-1px);
}

/* ===== FLIGHT DETAIL PAGE ===== */
.fd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fd-pilot {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fd-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.fd-pilot-name {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.fd-date {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

.fd-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fd-kudos.own {
  pointer-events: none;
  opacity: 0.6;
}

.fd-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.fd-info-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px 16px;
}

.fd-info-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 4px;
}

.fd-info-value {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
}

.fd-main-content {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}

.fd-left-col {
  flex: 1;
  min-width: 0;
}

.fd-right-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#fd-map-container {
  width: 100%;
  height: 400px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.fd-charts-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fd-chart-wrapper {
  position: relative;
}

.fd-chart-label {
  position: absolute;
  top: 4px;
  right: 12px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 1;
}

#fd-altitude-chart,
#fd-speed-chart {
  width: 100%;
  height: 120px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.fd-scrubber {
  width: 100%;
  margin: 4px 0;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
}

.fd-scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffa000;
  cursor: pointer;
}

.fd-scrubber::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffa000;
  cursor: pointer;
  border: none;
}

.fd-scrubber-info {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-family: monospace;
  min-height: 18px;
}

.fd-map-legend {
  background: rgba(10, 14, 25, 0.85);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.fd-legend-bar {
  width: 120px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #0064ff, #00ffcc, #00ff00, #ffff00, #ff0000);
}

.fd-legend-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}

@media (max-width: 900px) {
  .fd-main-content {
    flex-direction: column;
  }
  .fd-left-col {
    flex: none;
  }
}

.fd-stats-section {
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
}

.fd-stats-section h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #ffa000;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fd-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.fd-stat-row:last-child {
  border-bottom: none;
}

.fd-stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.fd-stat-value {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  text-align: right;
}

.fd-stat-coords {
  font-family: monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.fd-stat-sub-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 8px;
  padding-bottom: 2px;
  border-bottom: none;
}

.fd-map-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.fd-play-2d {
  font-size: 12px;
  padding: 5px 14px;
}

.fd-xcontest-link {
  display: inline-block;
  color: #ff8800;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 24px;
}

.fd-xcontest-link:hover {
  text-decoration: underline;
}

.fd-comments-section {
  margin-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}

.fd-comments-section h3 {
  font-size: 16px;
  color: #fff;
  margin-bottom: 16px;
}

/* ===== PROFILE PAGE ===== */
.profile-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 40px;
}

/* Hero: Banner + Identity */
.pf-hero {
  position: relative;
  margin-bottom: 8px;
}

.pf-banner {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a2040 0%, #0d1225 100%);
}

.pf-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pf-banner-edit {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.2s;
  z-index: 2;
}

.pf-banner-edit:hover {
  background: rgba(0,0,0,0.75);
}

.pf-banner-status {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 2;
}

.pf-identity {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-top: -44px;
  padding: 0 24px;
  position: relative;
  z-index: 3;
}

.pf-identity-text {
  padding-bottom: 6px;
}

/* Tabs */
.pf-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin: 20px 0 0;
  padding: 0 4px;
}

.pf-tab {
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.pf-tab:hover {
  color: rgba(255,255,255,0.7);
}

.pf-tab.active {
  color: #ff8800;
  border-bottom-color: #ff8800;
}

/* Tab Content */
.pf-tab-content {
  display: none;
  padding: 24px 0 0;
}

.pf-tab-content.active {
  display: block;
}

/* Section blocks inside tabs */
.pf-section {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.pf-section-header {
  margin-bottom: 16px;
}

.pf-section-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.pf-section-header p {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  line-height: 1.5;
}

.pf-section-header p code {
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  color: #ff8800;
}

.pf-bio-group {
  grid-column: 1 / -1;
}

.pf-bio-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 140px;
}

.pf-bio-group textarea:focus {
  border-color: #ff8800;
  outline: none;
}

.pf-bio-group textarea::placeholder {
  color: rgba(255,255,255,0.25);
}

.profile-avatar-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.15);
}

.profile-avatar-upload {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ff8800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  border: 2px solid #0a0f1e;
  transition: background 0.2s;
}

.profile-avatar-upload:hover {
  background: #e07700;
}

.profile-display-name {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.profile-username {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 4px;
}

.profile-form {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 24px;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.profile-form-grid .form-group {
  margin-bottom: 0;
}

.profile-form-grid .form-group label {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 6px;
}

.profile-form-grid input,
.profile-form-grid select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 14px;
}

.profile-form-grid input:focus,
.profile-form-grid select:focus {
  border-color: #ff8800;
  outline: none;
}

.profile-form-grid select {
  appearance: auto;
}

.profile-form-grid select option {
  background: #1a1f30;
}

.profile-section-title {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  margin-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-section-title:first-child {
  margin-top: 0;
}

.profile-section-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 16px;
  line-height: 1.5;
}

.profile-section-desc code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  color: #ff8800;
}

.profile-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

.profile-form textarea:focus {
  border-color: #ff8800;
  outline: none;
}

.profile-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.profile-form-actions {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.profile-save-status {
  font-size: 13px;
  transition: opacity 0.3s;
}

.profile-save-status.success {
  color: #55cc55;
}

.profile-save-status.error {
  color: #ff5555;
}

.bio-char-count {
  text-align: right;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 4px;
}

/* Banner */
.banner-preview {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.banner-upload-label {
  cursor: pointer;
  display: inline-block;
}

/* Devices */
.devices-list {
  margin-bottom: 14px;
}

.devices-empty {
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
  padding: 10px 0;
}

.device-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

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

.device-manufacturer {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.device-code {
  background: rgba(255, 136, 0, 0.1);
  border: 1px solid rgba(255, 136, 0, 0.2);
  color: #ff8800;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-family: monospace;
}

.glider-check-date {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
}

/* Glider cards with stats */
.glider-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 8px;
}

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

.glider-stats-row {
  display: flex;
  gap: 24px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.glider-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.glider-stat-value {
  font-size: 16px;
  font-weight: 600;
  color: #ff8800;
}

.glider-stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}

.btn-device-remove {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-device-remove:hover {
  color: #ff4444;
  background: rgba(255, 68, 68, 0.1);
}

.device-add-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.device-input {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 13px;
  flex: 1;
  min-width: 150px;
}

.device-input:focus {
  border-color: #ff8800;
  outline: none;
}

.device-input option {
  background: #1a1f30;
}

/* Device detection popup */
.device-popup .device-info {
  background: rgba(255, 168, 0, 0.1);
  border: 1px solid rgba(255, 168, 0, 0.3);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
  text-align: center;
}

.device-popup .device-name {
  color: #ffa000;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.device-popup .device-id {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-family: monospace;
}

.device-popup p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin-bottom: 18px;
}

.device-popup-actions {
  display: flex;
  gap: 10px;
}

.device-popup-actions button {
  flex: 1;
}

/* Sync notification toast — centered on screen */
.sync-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20, 25, 45, 0.95);
  border: 1px solid rgba(255, 160, 0, 0.5);
  color: #fff;
  padding: 16px 32px;
  border-radius: 10px;
  font-size: 15px;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  max-width: 600px;
  text-align: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.sync-toast.show {
  opacity: 1;
}

/* Multiple Cam button */
#btn-overview-cam {
  background: rgba(0, 170, 255, 0.15);
  border-color: rgba(0, 170, 255, 0.3);
}

#btn-overview-cam:hover {
  background: rgba(0, 170, 255, 0.3);
}

#btn-overview-cam.active {
  background: rgba(0, 170, 255, 0.45);
  border-color: rgba(0, 170, 255, 0.7);
}

/* Timeline wrapper with annotations */
#timeline-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#timeline-annotations {
  position: relative;
  width: 300px;
  height: 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 2px;
}

.timeline-ann-bar {
  position: absolute;
  height: 3px;
  border-radius: 1.5px;
  opacity: 0.7;
  min-width: 4px;
}

.timeline-ann-bar:nth-child(1) { top: 0; }
.timeline-ann-bar:nth-child(2) { top: 4px; }
.timeline-ann-bar:nth-child(3) { top: 8px; }
.timeline-ann-bar:nth-child(4) { top: 0; }
.timeline-ann-bar:nth-child(5) { top: 4px; }
.timeline-ann-bar:nth-child(6) { top: 8px; }
.timeline-ann-bar:nth-child(7) { top: 0; }
.timeline-ann-bar:nth-child(8) { top: 4px; }

/* Separator between selected and unselected flights */
.sidebar-selection-sep {
  height: 1px;
  background: rgba(255, 160, 0, 0.35);
  margin: 4px 16px;
}

/* Disabled checkbox in sidebar */
.sidebar-flight-check:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Deselect & Sync buttons in sidebar */
.btn-deselect,
.btn-sync {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.15);
  color: #ccc;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background 0.2s;
}

.btn-deselect:hover {
  background: rgba(255, 80, 80, 0.2);
  color: #ff8080;
}

.btn-sync {
  color: #80d0ff;
  border-color: rgba(0,170,255,0.25);
}

.btn-sync:hover {
  background: rgba(0,170,255,0.2);
}

/* Multi-pilot live stats panel — right side */
.multi-stats-panel {
  position: absolute;
  top: 80px;
  right: 16px;
  z-index: 10;
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 260px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.multi-stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #ddd;
}

.multi-stat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.multi-stat-pilot {
  flex: 1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.multi-stat-val {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  min-width: 52px;
  text-align: right;
  color: rgba(255,255,255,0.7);
}

/* ===== Theme toggle button ===== */
.nav-theme-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.nav-theme-btn:hover {
  background: rgba(255,255,255,0.1);
}

/* Donate nav tab highlight */
.nav-donate {
  color: rgba(255, 200, 50, 0.7) !important;
}
.nav-donate:hover {
  color: #ffc832 !important;
}

/* ===== Danger Zone (account deletion) ===== */
.profile-danger-zone {
  margin-top: 24px;
  padding: 20px 24px;
  border: 1px solid rgba(220, 50, 50, 0.25);
  border-radius: 12px;
  background: rgba(220, 50, 50, 0.04);
}

.profile-section-title.danger {
  color: #dc3232;
  border-bottom-color: rgba(220, 50, 50, 0.2);
}

.btn-danger {
  background: rgba(220, 50, 50, 0.12);
  color: #dc3232;
  border: 1px solid rgba(220, 50, 50, 0.3);
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-danger:hover {
  background: rgba(220, 50, 50, 0.22);
  border-color: rgba(220, 50, 50, 0.5);
}

.light-theme .profile-danger-zone {
  background: rgba(220, 50, 50, 0.04);
  border-color: rgba(220, 50, 50, 0.2);
}

.light-theme .btn-danger {
  background: rgba(220, 50, 50, 0.08);
  border-color: rgba(220, 50, 50, 0.25);
}

.light-theme .btn-danger:hover {
  background: rgba(220, 50, 50, 0.15);
  border-color: rgba(220, 50, 50, 0.4);
}

/* Minimal nav (impressum when logged out) */
.nav-minimal .nav-tab,
.nav-minimal .nav-theme-btn,
.nav-minimal #nav-logout {
  display: none !important;
}

.nav-minimal #nav-login {
  display: inline-flex !important;
}

.nav-login-btn {
  padding: 6px 18px;
  font-size: 13px;
  border-radius: 6px;
}

/* Auth footer */
.auth-footer {
  position: absolute;
  bottom: 16px;
  right: 24px;
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 1;
}

.impressum-link {
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  text-decoration: none;
}
.impressum-link:hover {
  color: rgba(255,255,255,0.7);
}

/* ===== Static pages (Donate, Planned, Impressum) ===== */
.static-page {
  max-width: 800px;
  margin: 0 auto;
}

.static-page h2 {
  font-size: 28px;
  color: #fff;
  margin-bottom: 20px;
}

.static-page p {
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  margin-bottom: 16px;
  font-size: 15px;
}

.static-page h3 {
  color: #fff;
  font-size: 18px;
  margin: 24px 0 8px;
}

/* Donate */
.donate-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}

.donate-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.donate-card h3 {
  margin-top: 0;
}

.donate-btn {
  display: inline-block;
  margin-top: 12px;
  text-decoration: none;
}

.donate-note {
  text-align: center;
  font-style: italic;
  margin-top: 24px;
}

/* Planned Features */
.planned-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

.planned-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
}

.planned-item.done {
  opacity: 0.65;
}

.planned-status {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.planned-item strong {
  color: #fff;
  font-size: 15px;
}

.planned-item p {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  margin: 4px 0 0;
}

.planned-note {
  text-align: center;
  font-style: italic;
  margin-top: 24px;
}

/* Impressum */
.impressum-content {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 32px;
}

/* ===== LIGHT THEME ===== */
body.light-theme {
  background: #f0f2f5;
}

.light-theme .top-nav {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.light-theme .nav-tab {
  color: rgba(0, 0, 0, 0.5);
}

.light-theme .nav-tab:hover {
  color: #222;
  background: rgba(0, 0, 0, 0.05);
}

.light-theme .nav-tab.active {
  color: #e07000;
  border-color: rgba(224, 112, 0, 0.3);
  background: rgba(224, 112, 0, 0.08);
}

.light-theme .top-nav-right span {
  color: rgba(0, 0, 0, 0.6);
}

.light-theme .nav-theme-btn {
  border-color: rgba(0,0,0,0.15);
}
.light-theme .nav-theme-btn:hover {
  background: rgba(0,0,0,0.06);
}

.light-theme .btn-secondary {
  color: #555;
  border-color: rgba(0,0,0,0.2);
}
.light-theme .btn-secondary:hover {
  background: rgba(0,0,0,0.05);
}

.light-theme .dashboard-container {
  background: radial-gradient(ellipse at top, #eef1f6 0%, #dde2ea 100%);
}

.light-theme .dashboard-container::before {
  opacity: 0.15;
}

.light-theme .static-page h2,
.light-theme .static-page h3 {
  color: #222;
}

.light-theme .static-page p {
  color: #555;
}

.light-theme .planned-item,
.light-theme .donate-card,
.light-theme .impressum-content {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.1);
}

.light-theme .planned-item strong {
  color: #222;
}

.light-theme .planned-item p {
  color: #777;
}

/* Light theme — cards & flight list */
.light-theme .flight-card {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.1);
  color: #333;
}

.light-theme .flight-card:hover {
  background: #fff;
  border-color: rgba(0,0,0,0.18);
}

.light-theme .flight-card h3,
.light-theme .flight-takeoff {
  color: #222;
}

.light-theme .flight-date,
.light-theme .flight-country {
  color: #888;
}

.light-theme .flight-stat-value {
  color: #333;
}

.light-theme .flight-stat-unit {
  color: #999;
}

.light-theme .flight-glider {
  color: #999;
}

.light-theme .flight-card-footer .btn-view-3d {
  background: rgba(224,112,0,0.1);
  border-color: rgba(224,112,0,0.3);
}

/* Light theme — dashboard banner */
.light-theme .dash-banner-overlay {
  background: linear-gradient(180deg, rgba(240,242,245,0) 0%, rgba(240,242,245,1) 100%);
}

.light-theme .dash-stat-label,
.light-theme .stat-label {
  color: #888;
}

.light-theme .dash-stat-value,
.light-theme .stat-value {
  color: #222;
}

.light-theme .stats-bar,
.light-theme .dash-stats-bar {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
}

.light-theme .stats-card {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
  backdrop-filter: none;
}

.light-theme .stats-card-title {
  color: #888;
}

.light-theme .stats-row {
  color: #555;
}

.light-theme .stats-row span:last-child {
  color: #999;
}

.light-theme .chart-header h4 {
  color: #888;
}

.light-theme .chart-toggle {
  border-color: rgba(0,0,0,0.1);
}

.light-theme .chart-toggle button {
  color: #999;
}

.light-theme .chart-toggle button.active {
  color: #e07000;
  background: rgba(224,112,0,0.1);
}

/* Light theme — home page */
.light-theme .home-stat-big,
.light-theme .home-section {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.1);
}

.light-theme .home-stat-big:hover {
  border-color: rgba(224,112,0,0.3);
}

.light-theme .home-stat-number {
  color: #222;
}

.light-theme .home-stat-title {
  color: #888;
}

.light-theme .home-stat-secondary {
  color: #999;
}

.light-theme .home-section h3 {
  color: #222;
}

.light-theme .home-table thead th {
  color: #999;
  border-bottom-color: rgba(0,0,0,0.08);
}

.light-theme .home-table tbody td {
  color: #555;
  border-bottom-color: rgba(0,0,0,0.05);
}

.light-theme .home-table .rank {
  color: #bbb;
}

.light-theme .clickable-row:hover {
  background: rgba(224,112,0,0.05);
}

.light-theme .online-user {
  background: rgba(68,221,102,0.06);
  border-color: rgba(68,221,102,0.15);
  color: #444;
}

.light-theme .online-count {
  color: #888;
}

.light-theme .text-muted {
  color: #bbb;
}

.light-theme .home-empty {
  color: #bbb;
}

/* Light theme — forms, inputs */
.light-theme input[type="text"],
.light-theme input[type="email"],
.light-theme input[type="password"],
.light-theme input[type="date"],
.light-theme select,
.light-theme textarea {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.15);
  color: #222;
}

.light-theme input::placeholder {
  color: #999;
}

/* Light theme — import / drop zone */
.light-theme .file-drop-small {
  border-color: rgba(0,0,0,0.15);
  color: #888;
  background: rgba(0,0,0,0.02);
}

.light-theme .import-section {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
}

.light-theme .import-section .btn-primary {
  background: #e07000;
}

.light-theme .empty-state {
  color: #bbb;
}

.light-theme .upload-status {
  color: #666;
}

/* Light theme — sort & toolbar */
.light-theme .sort-controls label,
.light-theme .flights-toolbar span {
  color: #666;
}

.light-theme .sort-controls select {
  background: rgba(0,0,0,0.04);
  color: #333;
  border-color: rgba(0,0,0,0.15);
}

/* Light theme — pilots page */
.light-theme .pilots-header h2 {
  color: #222;
}

.light-theme .search-bar-inline input,
.light-theme .search-bar input {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.15);
  color: #222;
}

.light-theme .search-bar-inline input::placeholder,
.light-theme .search-bar input::placeholder {
  color: #999;
}

.light-theme .pilots-table thead th {
  color: #999;
  border-bottom-color: rgba(0,0,0,0.1);
}

.light-theme .pilots-table tbody td {
  color: #555;
  border-bottom-color: rgba(0,0,0,0.06);
}

.light-theme .pilots-table tbody tr:hover {
  background: rgba(224,112,0,0.05);
}

.light-theme .pilot-table-displayname {
  color: #222;
}

.light-theme .pilot-table-location {
  color: #999;
}

.light-theme .pilot-table-avatar {
  border-color: rgba(0,0,0,0.1);
}

/* Light theme — pilot profile */
.light-theme .pilot-profile-card {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.1);
}

/* Light theme — profile */
.light-theme .profile-card {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.1);
}

/* Light theme — settings panel */
.light-theme #settings-panel {
  background: rgba(255,255,255,0.95);
  border-color: rgba(0,0,0,0.12);
  color: #333;
}

.light-theme .settings-title {
  color: #222;
}

.light-theme #settings-panel label > span:first-child {
  color: #555;
}

.light-theme .settings-header {
  border-bottom-color: rgba(0,0,0,0.1);
}

.light-theme .settings-header span {
  color: #222;
}

/* Light theme — flight detail */
.light-theme .fd-stat-label {
  color: #777;
}

.light-theme .fd-stat-value {
  color: #222;
}

.light-theme .fd-stats-section {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
}

.light-theme .fd-pilot-name {
  color: #222;
}

/* Light theme — 3D viewer sidebar */
.light-theme .viewer-sidebar {
  background: linear-gradient(90deg, rgba(245,247,250,0.95) 0%, rgba(245,247,250,0.9) 85%, rgba(245,247,250,0) 100%);
}

.light-theme .viewer-sidebar-header {
  border-bottom-color: rgba(0,0,0,0.08);
}

.light-theme .viewer-sidebar-header h3 {
  color: #222;
}

.light-theme .sidebar-tab {
  background: rgba(0,0,0,0.04);
  color: #666;
  border-color: rgba(0,0,0,0.08);
}

.light-theme .sidebar-tab.active {
  background: rgba(224,112,0,0.12);
  color: #e07000;
  border-color: rgba(224,112,0,0.3);
}

.light-theme .sidebar-flight {
  background: rgba(255,255,255,0.7);
  border-color: rgba(0,0,0,0.08);
}

.light-theme .sidebar-flight:hover {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.14);
}

.light-theme .sidebar-flight.selected {
  border-color: rgba(224,112,0,0.4);
  background: rgba(224,112,0,0.06);
}

.light-theme .sidebar-flight-pilot {
  color: #222;
}

.light-theme .sidebar-flight-date {
  color: #999;
}

.light-theme .sidebar-flight-location {
  color: #666;
}

.light-theme .sidebar-flight-stats {
  color: #777;
}

.light-theme .sidebar-flight-glider {
  color: #999;
}

.light-theme .sidebar-selection-sep {
  background: rgba(224,112,0,0.3);
}

.light-theme .btn-deselect,
.light-theme .btn-sync {
  border-color: rgba(0,0,0,0.12);
  color: #666;
  background: rgba(0,0,0,0.04);
}

.light-theme #follow-pilot-select {
  background: #fff;
  color: #333;
  border-color: rgba(0,0,0,0.15);
}

.light-theme #follow-pilot-select option {
  background: #fff;
  color: #333;
}

/* Light theme — HUD */
.light-theme #hud {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.1);
}

.light-theme .hud-label {
  color: #999;
}

.light-theme .hud-value {
  color: #222;
}

.light-theme .hud-value small {
  color: #999;
}

.light-theme .hud-item {
  border-right-color: rgba(0,0,0,0.1);
}

/* Light theme — Controls bar */
.light-theme #controls {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.1);
}

.light-theme #controls button {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.12);
  color: #444;
}

.light-theme #controls button:hover {
  background: rgba(0,0,0,0.1);
}

.light-theme #controls button.active {
  background: rgba(224,112,0,0.15);
  border-color: rgba(224,112,0,0.4);
  color: #e07000;
}

.light-theme #speed-select {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.12);
  color: #444;
}

.light-theme #speed-select option {
  background: #fff;
  color: #333;
}

.light-theme #timeline {
  background: rgba(0,0,0,0.12);
}

.light-theme #time-display {
  color: #666;
}

/* Light theme — multi stats panel */
.light-theme .multi-stats-panel {
  background: rgba(255,255,255,0.92);
  border-color: rgba(0,0,0,0.1);
}

.light-theme .multi-stat-pilot {
  color: #222;
}

.light-theme .multi-stat-val {
  color: #666;
}

.light-theme .multi-stat-row {
  color: #555;
}

/* Light theme — sync toast */
.light-theme .sync-toast {
  background: rgba(255,255,255,0.95);
  border-color: rgba(224,112,0,0.4);
  color: #333;
}

/* Light theme — back button */
.light-theme .btn-back {
  color: #666;
  border-color: rgba(0,0,0,0.1);
  background: rgba(0,0,0,0.03);
}

.light-theme .btn-back:hover {
  background: rgba(0,0,0,0.06);
  color: #222;
}

/* Light theme — dashboard title */
.light-theme .dashboard-header h2 {
  color: #222;
}

/* Light theme — nav donate */
.light-theme .nav-donate {
  color: rgba(200, 120, 0, 0.8) !important;
}

/* Light theme — #btn-overview-cam */
.light-theme #btn-overview-cam {
  background: rgba(0,140,220,0.08);
  border-color: rgba(0,140,220,0.2);
}

.light-theme #btn-overview-cam.active {
  background: rgba(0,140,220,0.18);
  border-color: rgba(0,140,220,0.45);
  color: #0080cc;
}

/* ===== Donate profile ===== */
.donate-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 24px 0;
  padding: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
}

.donate-profile-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.12);
}

.donate-profile-text {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  margin: 0;
}

.light-theme .donate-profile {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.1);
}

.light-theme .donate-profile-img {
  border-color: rgba(0,0,0,0.12);
}

.light-theme .donate-profile-text {
  color: #555;
}

/* ===== Route type icons ===== */
.route-type-icon {
  width: 72px;
  height: 72px;
  vertical-align: middle;
  margin-right: 8px;
  opacity: 0.85;
}

.light-theme .route-type-icon {
  filter: brightness(0.3);
}

/* ===== XContest button ===== */
.btn-xcontest {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  background: rgba(0,140,220,0.12);
  border: 1px solid rgba(0,140,220,0.3);
  color: #3ba8e0;
  transition: background 0.15s, border-color 0.15s;
}

.btn-xcontest:hover {
  background: rgba(0,140,220,0.2);
  border-color: rgba(0,140,220,0.5);
}

.light-theme .btn-xcontest {
  background: rgba(0,120,200,0.08);
  border-color: rgba(0,120,200,0.25);
  color: #0078c8;
}

/* ===== Light theme — profile page (settings) ===== */
.light-theme .profile-form {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.1);
}

.light-theme .profile-section-title {
  color: #222;
  border-bottom-color: rgba(0,0,0,0.1);
}

.light-theme .profile-section-desc {
  color: #888;
}

.light-theme .profile-section-desc code {
  background: rgba(0,0,0,0.06);
  color: #e07000;
}

.light-theme .profile-display-name {
  color: #222;
}

.light-theme .profile-username {
  color: #999;
}

.light-theme .profile-form-grid .form-group label {
  color: #666;
}

.light-theme .profile-form-grid input,
.light-theme .profile-form-grid select {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.15);
  color: #222;
}

.light-theme .profile-form-grid select option {
  background: #fff;
  color: #333;
}

.light-theme .pf-bio-group textarea {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.15);
  color: #222;
}

.light-theme .pf-bio-group textarea::placeholder {
  color: #999;
}

.light-theme .bio-char-count {
  color: #bbb;
}

.light-theme .profile-avatar-upload {
  background: rgba(0,0,0,0.6);
}

/* Light theme — new profile layout */
.light-theme .pf-banner {
  background: linear-gradient(135deg, #e8ecf2 0%, #d0d8e4 100%);
}

.light-theme .pf-banner-edit {
  background: rgba(255,255,255,0.7);
  color: #333;
}

.light-theme .pf-banner-edit:hover {
  background: rgba(255,255,255,0.9);
}

.light-theme .pf-tabs {
  border-bottom-color: rgba(0,0,0,0.1);
}

.light-theme .pf-tab {
  color: #999;
}

.light-theme .pf-tab:hover {
  color: #555;
}

.light-theme .pf-tab.active {
  color: #e07000;
  border-bottom-color: #e07000;
}

.light-theme .pf-section {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
}

.light-theme .pf-section-header h3 {
  color: #222;
}

.light-theme .pf-section-header p {
  color: #888;
}

.light-theme .pf-section-header p code {
  background: rgba(0,0,0,0.06);
  color: #e07000;
}

.light-theme .banner-preview {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.1);
}

.light-theme .devices-empty {
  color: #bbb;
}

.light-theme .device-item {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
}

.light-theme .device-manufacturer {
  color: #333;
}

.light-theme .device-code {
  color: #e07000;
  background: rgba(224,112,0,0.08);
}

.light-theme .glider-check-date {
  color: #999;
}

.light-theme .glider-card {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
}

.light-theme .glider-stats-row {
  border-top-color: rgba(0,0,0,0.06);
}

.light-theme .glider-stat-value {
  color: #e07000;
}

.light-theme .glider-stat-label {
  color: #999;
}

.light-theme .btn-device-remove {
  color: #ccc;
}

.light-theme .btn-device-remove:hover {
  color: #e04040;
}

/* ===== Light theme — dashboard profile card ===== */
.light-theme .profile-card-identity h2 {
  color: #222;
}

.light-theme .dash-profile-card .pilot-bio {
  color: #555;
  border-top-color: rgba(0,0,0,0.08);
}

.light-theme .dash-profile-card .card-banner-bg::after {
  background: linear-gradient(135deg, rgba(245,247,250,0.5) 0%, rgba(245,247,250,0.2) 100%);
}

/* ===== Light theme — pilot chart cards ===== */
.light-theme .pilot-chart-card {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
  backdrop-filter: none;
}

.light-theme .pilot-chart-card h4 {
  color: #888;
}

.light-theme .chart-bar-label {
  color: #bbb;
}

.light-theme .chart-bar-value {
  color: #666;
}

/* ===== Light theme — flight detail comments ===== */
.light-theme .fd-comments-section h3 {
  color: #222;
}

.light-theme .comment {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
}

.light-theme .comment-author {
  color: #222;
}

.light-theme .comment-date {
  color: #bbb;
}

.light-theme .comment-text {
  color: #444;
}

.light-theme .comment-empty {
  color: #bbb;
}

.light-theme .comment-input {
  background: rgba(0,0,0,0.04) !important;
  border-color: rgba(0,0,0,0.15) !important;
  color: #222 !important;
}

.light-theme .comment-action-btn {
  color: #999;
}

.light-theme .comment-action-btn:hover {
  color: #666;
}

.light-theme .comment-action-btn.active {
  color: #e07000;
}

.light-theme .comment-reply-form input {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.15);
  color: #222;
}

/* ===== Light theme — flight detail page ===== */
.light-theme .fd-header {
  border-bottom-color: rgba(0,0,0,0.08);
}

.light-theme .fd-date {
  color: #888;
}

.light-theme .fd-avatar {
  border-color: rgba(0,0,0,0.1);
}

.light-theme .fd-stats-section h4 {
  color: #666;
}

.light-theme .fd-stat-sub-header {
  color: #999;
}

.light-theme .fd-stat-coords {
  color: #888;
}

.light-theme .fd-map-header {
  border-bottom-color: rgba(0,0,0,0.08);
}

.light-theme .fd-chart-label {
  color: #888;
}

.light-theme .fd-scrubber-info {
  color: #666;
}

.light-theme .fd-map-legend {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.1);
  color: #666;
}

/* ===== Light theme — banner more colorful ===== */
.light-theme .dash-banner-zone {
  background: linear-gradient(135deg, rgba(240,242,245,1) 0%, rgba(230,235,245,1) 100%);
}

.light-theme .dash-banner-bg {
  opacity: 0.55;
}

.light-theme .dash-banner-overlay {
  background: linear-gradient(180deg, rgba(240,242,245,0) 0%, rgba(240,242,245,0.7) 100%);
}

/* ===== Light theme — pilot profile card (other pilot) ===== */
.light-theme .pilot-profile-card {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.1);
  color: #333;
}

.light-theme .pilot-profile-card h2 {
  color: #222;
}

.light-theme .pilot-realname {
  color: #666;
}

.light-theme .pilot-location {
  color: #888;
}

.light-theme .pilot-member-since {
  color: #bbb;
}

.light-theme .pilot-glider-tag {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.1);
  color: #555;
}

/* ===== Light theme — kudos ===== */
.light-theme .kudos-badge {
  color: #888;
}

.light-theme .btn-kudos-big {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.1);
  color: #666;
}

.light-theme .btn-kudos-big.active {
  background: rgba(224,112,0,0.1);
  border-color: rgba(224,112,0,0.3);
  color: #e07000;
}

.light-theme .btn-comments-big {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.1);
  color: #666;
}

.light-theme .comments-section {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.06);
}

/* ===== ADMIN PANEL ===== */
.admin-panel {
  max-width: 1100px;
  margin: 0 auto;
}

.nav-admin {
  color: rgba(100, 180, 255, 0.8) !important;
}
.nav-admin:hover {
  color: #64b4ff !important;
}

.admin-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-search {
  flex: 1;
  min-width: 200px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 13px;
}

.admin-search:focus {
  border-color: #ff8800;
  outline: none;
}

.admin-select {
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 13px;
  appearance: auto;
}

.admin-select option {
  background: #1a1f30;
}

/* Table rows */
.admin-table-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 8px;
  margin-bottom: 4px;
}

.admin-user-row,
.admin-flight-row {
  display: grid;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
}

.admin-user-row {
  grid-template-columns: 36px 2fr 70px 60px 80px 60px 85px 85px 60px;
}

.admin-flight-row {
  grid-template-columns: 85px 1fr 1.2fr 1fr 55px 55px 65px 35px 40px;
}

.admin-user-row:hover,
.admin-flight-row:hover {
  background: rgba(255,255,255,0.02);
}

.admin-table-header:hover {
  background: none;
}

.admin-col-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-col-name strong {
  color: #fff;
  display: block;
  font-size: 13px;
}

.admin-col-name small {
  color: rgba(255,255,255,0.5);
  font-size: 11px;
}

.admin-col-stats {
  text-align: center;
  color: rgba(255,255,255,0.75);
}

.admin-col-date {
  color: rgba(255,255,255,0.55);
  font-size: 12px;
}

.admin-col-role {
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-col-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.admin-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.admin-avatar-sm {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

/* Role badges */
.admin-role-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.role-owner {
  background: rgba(255, 180, 0, 0.15);
  color: #ffb400;
  border: 1px solid rgba(255, 180, 0, 0.3);
}

.role-admin {
  background: rgba(100, 180, 255, 0.12);
  color: #64b4ff;
  border: 1px solid rgba(100, 180, 255, 0.25);
}

.role-user {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.1);
}

/* Admin buttons */
.admin-btn-sm {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.4);
  width: 26px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.admin-btn-sm:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.admin-btn-delete:hover {
  background: rgba(220, 50, 50, 0.15);
  border-color: rgba(220, 50, 50, 0.3);
  color: #dc3232;
}

/* User details expand */
.admin-user-details {
  padding: 16px 16px 16px 52px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.admin-detail-banner {
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
}

.admin-detail-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.admin-detail-section h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 8px;
}

.admin-detail-fields {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-field {
  display: flex;
  gap: 8px;
  font-size: 12px;
}

.admin-field-label {
  color: rgba(255,255,255,0.35);
  min-width: 65px;
}

.admin-field-value {
  color: rgba(255,255,255,0.8);
}

.admin-field-value em {
  color: rgba(255,255,255,0.2);
  font-style: normal;
}

.admin-detail-item {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  padding: 3px 0;
}

.admin-field-clearable {
  position: relative;
}

.admin-btn-clear {
  background: none;
  border: none;
  color: rgba(255,255,255,0.2);
  cursor: pointer;
  font-size: 13px;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
  opacity: 0;
}

.admin-field-clearable:hover .admin-btn-clear {
  opacity: 1;
}

.admin-btn-clear:hover {
  color: #dc3232;
}

.admin-detail-item code {
  background: rgba(255, 136, 0, 0.1);
  color: #ff8800;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}

.admin-detail-item small {
  color: rgba(255,255,255,0.35);
}

.admin-detail-empty {
  font-size: 12px;
  color: rgba(255,255,255,0.2);
}

/* Comment rows */
.admin-comment-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: start;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.admin-comment-row:hover {
  background: rgba(255,255,255,0.02);
}

.admin-comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  grid-column: 1;
}

.admin-comment-meta strong {
  color: #fff;
}

.admin-comment-context {
  color: rgba(255,255,255,0.3);
  font-size: 12px;
}

.admin-comment-time {
  color: rgba(255,255,255,0.35);
  font-size: 11px;
  white-space: nowrap;
  padding-top: 2px;
}

.admin-comment-text {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  padding-left: 30px;
  line-height: 1.5;
  grid-column: 1;
}

.admin-comment-row .admin-btn-delete {
  grid-row: 1;
  grid-column: 3;
}

/* Toggle admin button */
.admin-btn-toggle-admin {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.4);
  width: 20px;
  height: 20px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.admin-btn-toggle-admin:hover {
  background: rgba(100, 180, 255, 0.15);
  border-color: rgba(100, 180, 255, 0.3);
  color: #64b4ff;
}

/* Detail media (banner + avatar with delete) */
.admin-detail-media {
  position: relative;
  margin-bottom: 14px;
}

.admin-detail-banner {
  position: relative;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
}

.admin-detail-banner.no-banner {
  display: none;
}

.admin-detail-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-detail-banner .admin-btn-delete {
  position: absolute;
  top: 6px;
  right: 6px;
}

.admin-detail-avatar-block {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.admin-detail-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* Deletable list items */
.admin-detail-deletable {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-detail-deletable .admin-btn-sm {
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}

.admin-detail-deletable:hover .admin-btn-sm {
  opacity: 1;
}

/* Admin states */
.admin-loading,
.admin-empty,
.admin-error {
  text-align: center;
  padding: 24px;
  font-size: 13px;
}

.admin-loading { color: rgba(255,255,255,0.3); }
.admin-empty { color: rgba(255,255,255,0.25); }
.admin-error { color: #ff5555; }

/* Light theme — Admin */
.light-theme .admin-search {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.15);
  color: #222;
}

.light-theme .admin-select {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.15);
  color: #222;
}

.light-theme .admin-select option {
  background: #fff;
}

.light-theme .admin-table-header {
  color: #999;
  border-bottom-color: rgba(0,0,0,0.1);
}

.light-theme .admin-user-row,
.light-theme .admin-flight-row {
  border-bottom-color: rgba(0,0,0,0.06);
}

.light-theme .admin-user-row:hover,
.light-theme .admin-flight-row:hover {
  background: rgba(0,0,0,0.02);
}

.light-theme .admin-col-name strong { color: #222; }
.light-theme .admin-col-name small { color: #999; }
.light-theme .admin-col-stats { color: #666; }
.light-theme .admin-col-date { color: #999; }

.light-theme .role-owner {
  background: rgba(200, 140, 0, 0.1);
  color: #b07800;
  border-color: rgba(200, 140, 0, 0.25);
}

.light-theme .role-admin {
  background: rgba(50, 120, 200, 0.1);
  color: #3278c8;
  border-color: rgba(50, 120, 200, 0.2);
}

.light-theme .role-user {
  background: rgba(0,0,0,0.04);
  color: #888;
  border-color: rgba(0,0,0,0.1);
}

.light-theme .admin-btn-sm {
  border-color: rgba(0,0,0,0.1);
  color: #bbb;
}

.light-theme .admin-btn-sm:hover {
  background: rgba(0,0,0,0.04);
  color: #333;
}

.light-theme .admin-btn-delete:hover {
  background: rgba(220, 50, 50, 0.08);
  border-color: rgba(220, 50, 50, 0.25);
  color: #dc3232;
}

.light-theme .admin-user-details {
  background: rgba(0,0,0,0.02);
  border-bottom-color: rgba(0,0,0,0.06);
}

.light-theme .admin-detail-section h4 { color: #999; }
.light-theme .admin-field-label { color: #999; }
.light-theme .admin-field-value { color: #333; }
.light-theme .admin-field-value em { color: #ccc; }
.light-theme .admin-detail-item { color: #444; }
.light-theme .admin-detail-item code { color: #e07000; background: rgba(224,112,0,0.08); }
.light-theme .admin-detail-empty { color: #ccc; }
.light-theme .admin-btn-clear { color: rgba(0,0,0,0.15); }
.light-theme .admin-btn-clear:hover { color: #dc3232; }

.light-theme .admin-comment-row { border-bottom-color: rgba(0,0,0,0.06); }
.light-theme .admin-comment-row:hover { background: rgba(0,0,0,0.02); }
.light-theme .admin-comment-meta strong { color: #222; }
.light-theme .admin-comment-context { color: #999; }
.light-theme .admin-comment-time { color: #bbb; }
.light-theme .admin-comment-text { color: #444; }
.light-theme .admin-loading { color: #bbb; }
.light-theme .admin-empty { color: #ccc; }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .top-nav {
    padding: 0 24px;
  }
  .dashboard-container {
    padding-left: 48px;
    padding-right: 48px;
  }
}

@media (max-width: 900px) {
  .top-nav {
    padding: 0 12px;
  }
  .dashboard-container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .donate-options {
    grid-template-columns: 1fr;
  }
  .pf-banner {
    height: 130px;
    border-radius: 10px;
  }
  .pf-identity {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: -36px;
    padding: 0 16px;
  }
  .profile-avatar {
    width: 80px;
    height: 80px;
  }
  .pf-tabs {
    justify-content: center;
  }
  .pf-tab {
    padding: 10px 14px;
    font-size: 13px;
  }
  .profile-form-grid {
    grid-template-columns: 1fr;
  }
  .pf-section {
    padding: 18px 16px;
  }
}

/* Utility */
.hidden {
  display: none !important;
}
