:root {
  --bg: #0b1512;
  --bg-elevated: #12211c;
  --bg-card: #162923;
  --bg-card-hover: #1c342c;
  --border: rgba(110, 231, 183, 0.14);
  --border-strong: rgba(110, 231, 183, 0.28);
  --text: #ecfdf5;
  --text-muted: #9cb8ad;
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-soft: rgba(16, 185, 129, 0.15);
  --warn: #f59e0b;
  --warn-bg: rgba(245, 158, 11, 0.14);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --info: #38bdf8;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: radial-gradient(circle at 20% 0%, #153128 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

/* =========================================================
   LOGIN NÉZET (Fő képernyő nem bejelentkezett látogatónak)
   ========================================================= */
.login-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(11, 21, 18, 0.55) 0%, rgba(11, 21, 18, 0.94) 100%),
    radial-gradient(ellipse at top, #1f4f3f 0%, #0b1512 70%);
}

.login-card {
  width: 100%;
  max-width: 460px;
  background: rgba(22, 41, 35, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 38px 32px;
  text-align: center;
  box-shadow: var(--shadow);
}

.login-logo {
  width: 68px;
  height: 68px;
  margin-bottom: 14px;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 1.9rem;
  letter-spacing: -0.02em;
}

.login-subtitle {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.login-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.pill.ok {
  background: var(--accent-soft);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.35);
}

.pill.warn {
  background: var(--warn-bg);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.4);
}

.pill.danger {
  background: var(--danger-bg);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.45);
}

.google-btn-wrap {
  display: flex;
  justify-content: center;
  min-height: 46px;
  margin-bottom: 14px;
}

.login-error {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fecaca;
  font-size: 0.88rem;
  text-align: left;
}

/* =========================================================
   FELSŐ SÁV & LAYOUT
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 24px;
  background: rgba(14, 27, 23, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.mobile-nav {
  display: none;
  align-items: center;
  gap: 8px;
}

.btn-drawer-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 5px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-drawer-trigger:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.mobile-nav-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.drawer-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3.5px;
  width: 16px;
  height: 14px;
}

.drawer-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: background 0.15s ease;
}

/* =========================================================
   MOBIL BEÚSZÓ FIÓK (SLIDE-IN DRAWER)
   ========================================================= */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  opacity: 1;
  transition: opacity 0.25s ease;
}

.drawer-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
  display: none !important;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 86%;
  max-width: 320px;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-strong);
  z-index: 1100;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 18px;
  box-sizing: border-box;
}

.mobile-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.drawer-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.drawer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}

.drawer-user-meta {
  min-width: 0;
}

.drawer-user-name {
  font-weight: 700;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.drawer-user-email {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  line-height: 1;
}

.drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.drawer-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
}

.drawer-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.drawer-menu-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.drawer-item-primary {
  background: var(--accent-soft);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.drawer-item-primary:hover {
  background: rgba(16, 185, 129, 0.25);
}

.drawer-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.drawer-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.drawer-subbadge {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
}

.drawer-foot {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.btn-block {
  width: 100%;
  display: flex;
  justify-content: center;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.84rem;
}

.user-chip img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

/* =========================================================
   GOMBOK & ŰRLAPOK
   ========================================================= */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  transition: all 0.15s ease;
  text-decoration: none;
}

button:hover,
.btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #042f2e;
}

.btn-primary:hover {
  background: #34d399;
  border-color: #34d399;
}

.btn-danger {
  background: var(--danger-bg);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.8rem;
}

input[type='text'],
input[type='email'],
input[type='url'],
input[type='date'],
input[type='time'],
input[type='number'],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: #0d1915;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}

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

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
  margin: 8px 0;
}

/* =========================================================
   DASHBOARD KÁRTYÁK
   ========================================================= */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #6ee7b7;
}

.trips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
}

.trip-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.trip-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.trip-card h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.trip-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.empty-state {
  text-align: center;
  padding: 56px 24px;
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
}

/* =========================================================
   TÚRA RÉSZLETEZŐ: TÉRKÉP, MAGASSÁGI PROFIL & NAPI KÁRTYÁK
   ========================================================= */
.trip-header-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
}

.trip-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.trip-title-row h1 {
  margin: 4px 0 6px;
  font-size: 1.6rem;
}

.ai-briefing-banner {
  margin-top: 14px;
  padding: 13px 16px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.14), rgba(56, 189, 248, 0.09));
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}

.map-profile-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

@media (max-width: 960px) {
  .map-profile-grid {
    grid-template-columns: 1fr;
  }
}

.card-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

#route-map {
  width: 100%;
  height: 390px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.profile-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 10px 0 14px;
}

.stat-tile {
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}

.stat-tile .val {
  font-size: 1.05rem;
  font-weight: 700;
  color: #6ee7b7;
}

.stat-tile .lbl {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.elevation-svg-wrap {
  width: 100%;
  height: 195px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 8px;
  border: 1px solid var(--border);
}

.day-selector-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.day-tab {
  white-space: nowrap;
  padding: 9px 14px;
  border-radius: 10px;
}

.day-tab.active {
  background: var(--accent);
  color: #042f2e;
  border-color: var(--accent);
}

.upload-dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: 10px;
  padding: 14px 16px;
  background: rgba(16, 185, 129, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

/* =========================================================
   MODELL-ÖSSZEHASONLÍTÓ KÁRTYÁK ÉS ELTÉRÉS JELZŐK
   ========================================================= */
.discrepancy-alert {
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  background: var(--warn-bg);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fde68a;
  margin-bottom: 14px;
  font-size: 0.88rem;
}

.discrepancy-alert.high {
  background: var(--danger-bg);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fecaca;
}

.checkpoint-card {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 14px;
  margin-bottom: 12px;
}

.checkpoint-card.has-diff {
  border-color: rgba(245, 158, 11, 0.55);
}

.checkpoint-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.model-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.model-table th,
.model-table td {
  padding: 7px 9px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.model-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.77rem;
  text-transform: uppercase;
}

/* =========================================================
   HEGYIMENTŐ & SEGÉLYHÍVÓ KÁRTYA
   ========================================================= */
.emergency-box {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.13), rgba(22, 41, 35, 0.95));
  border: 1px solid rgba(239, 68, 68, 0.38);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 18px;
}

.emergency-phones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.phone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fee2e2;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.92rem;
}

/* =========================================================
   MODÁLIS ABLAKOK & TÁBLÁZATOK (Profil + Admin)
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-panel {
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-head h2 {
  margin: 0;
  font-size: 1.28rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.data-table th,
.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 11px 16px;
  border-radius: 10px;
  background: #132a22;
  border: 1px solid var(--accent);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 0.88rem;
}

.toast.error {
  border-color: var(--danger);
  background: #2b1416;
  color: #fecaca;
}

/* =========================================================
   TÚRA MŰVELETEK & MOBIL 'TOVÁBBI MŰVELETEK' DROPDOWN
   ========================================================= */
.trip-owner-actions-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.desktop-trip-extra {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-trip-more {
  display: none;
  position: relative;
}

.dropdown-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 600;
  min-width: 240px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
  box-sizing: border-box;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-item.text-danger {
  color: #fca5a5;
}

.dropdown-item.text-danger:hover {
  background: var(--danger-bg);
}

.dropdown-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* =========================================================
   IDŐJÁRÁS NÉZETVÁLTÓ (KÁRTYÁK / FÜLEK / TÁBLÁZAT)
   ========================================================= */
.weather-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

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

.weather-view-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.segmented-control {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.segmented-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.segmented-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.segmented-btn.active {
  background: var(--accent);
  color: #042f2e;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

/* 1. NÉZET: MODELL KÁRTYÁK (CARDS) */
.model-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.model-card-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  transition: border-color 0.15s ease;
}

.model-card-item:hover {
  border-color: var(--border-strong);
}

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

.model-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.model-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.model-metric-tile {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.model-metric-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.model-metric-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.model-hazards-row {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* 2. NÉZET: FÜLÖS MEGJELENÍTÉS (TABS) */
.model-tabs-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.model-tab-btn {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.model-tab-btn.active {
  background: var(--accent-soft);
  color: #6ee7b7;
  border-color: var(--accent);
}

.model-tab-pane {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

/* 3. NÉZET: RAGADÓS (STICKY) ELSŐ OSZLOP A TÁBLÁZATBAN */
.table-sticky-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.model-table th:first-child,
.model-table td:first-child {
  position: sticky;
  left: 0;
  background: #152620;
  z-index: 2;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.3);
}

.model-table th:first-child {
  background: #11201b;
}

/* =========================================================
   RESPONSIVE MEDIA QUERIES (MOBIL & TABLET FINOMHANGOLÁS)
   ========================================================= */
@media (max-width: 820px) {
  .desktop-nav {
    display: none !important;
  }

  .mobile-nav {
    display: flex !important;
  }

  .desktop-trip-extra {
    display: none !important;
  }

  .mobile-trip-more {
    display: inline-block !important;
  }

  .topbar {
    padding: 10px 14px;
  }

  .container {
    padding: 14px 12px 64px;
  }

  .section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .filter-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .profile-stats-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .day-selector-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }

  .trip-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .trip-header-panel {
    padding: 14px;
  }

  .modal-backdrop {
    padding: 8px;
    align-items: flex-end;
  }

  .modal-panel {
    max-height: 94vh;
    padding: 18px 14px;
    border-radius: 18px 18px 0 0;
    width: 100%;
  }

  #admin-add-user-form {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
   LEBEGŐ VISSZAGOMB MOBILRA (BAL ALUL)
   ========================================================= */
.floating-back-btn {
  position: fixed;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  left: calc(18px + env(safe-area-inset-left, 0px));
  z-index: 990;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9999px;
  background: rgba(18, 24, 38, 0.9);
  border: 1px solid rgba(110, 231, 183, 0.35);
  color: #f1f5f9;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease, background 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.floating-back-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.floating-back-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: #6ee7b7;
  color: #ffffff;
}

.floating-back-btn:active {
  transform: scale(0.95);
}

.floating-back-btn svg {
  flex-shrink: 0;
  color: #6ee7b7;
  transition: transform 0.15s ease;
}

.floating-back-btn:hover svg {
  transform: translateY(-2px);
}

/* Csak mobilos nézetben (<= 820px) jelenik meg */
@media (min-width: 821px) {
  .floating-back-btn {
    display: none !important;
  }
}

/* =========================================================
   DISCORD INTEGRÁCIÓ ÉS TÚRA RÉSZTVEVŐK (TAGOK) STÍLUSOK
   ========================================================= */

.btn-discord {
  background: #5865F2 !important;
  color: #ffffff !important;
  border-color: #5865F2 !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.btn-discord:hover {
  background: #4752c4 !important;
  border-color: #4752c4 !important;
  color: #ffffff !important;
}

.trip-discord-card {
  margin-top: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.16), rgba(88, 101, 242, 0.05));
  border: 1px solid rgba(88, 101, 242, 0.4);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.discord-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.discord-icon-bubble {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #5865F2;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.35);
}

.discord-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
}

.discord-card-title strong {
  color: #a5b4fc;
}

.discord-card-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.discord-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Résztvevők rács és kártyák */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}

.member-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease;
}

.member-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.member-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.member-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-hover);
  color: #6ee7b7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

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

.member-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-email {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.badge-owner {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-editor {
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(2, 132, 199, 0.35);
}

.badge-viewer {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* =========================================================
   MODELL ÉS AI INFORMÁCIÓS MODAL & IDŐTÁV JELZÉSEK
   ========================================================= */

.modal-lg {
  max-width: 960px;
}

.models-info-content {
  max-height: 88vh;
  padding: 24px 28px;
}

/* SÁRGA FELKIÁLTÓJELES BIZTONSÁGI CALLOUT */
.safety-callout {
  display: flex;
  gap: 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(217, 119, 6, 0.08) 100%);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-left: 5px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 24px;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.08);
}

.safety-callout-icon {
  font-size: 2.2rem;
  line-height: 1;
  color: #fbbf24;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
}

.safety-callout-body {
  flex: 1;
  min-width: 0;
}

.safety-callout-title {
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 8px;
}

.safety-callout-text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #fef3c7;
  margin: 0 0 10px 0;
}

.safety-callout-points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.safety-point {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.82rem;
  color: #fef9c3;
  background: rgba(0, 0, 0, 0.25);
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.safety-bullet {
  color: #fbbf24;
  font-weight: 700;
}

/* MODAL FEJLÉC ÉS GYORSNAVIGÁCIÓ */
.info-nav-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.info-nav-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.info-nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: var(--border-strong);
}

.info-nav-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #6ee7b7;
}

.info-section {
  margin-bottom: 32px;
  scroll-margin-top: 20px;
}

.info-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  margin: 0 0 8px 0;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.info-section-lead {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ÖSSZEHASONLÍTÓ TÁBLÁZAT */
.info-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  margin-bottom: 18px;
}

.info-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.info-compare-table th {
  background: #10241e;
  padding: 10px 12px;
  font-weight: 700;
  color: #6ee7b7;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}

.info-compare-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: top;
}

.info-compare-table tr:last-child td {
  border-bottom: none;
}

.info-compare-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* RÉSZLETES MODELL KÁRTYÁK */
.models-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.model-detail-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.model-detail-card:hover {
  border-color: var(--border-strong);
}

.model-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.model-detail-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px 0;
}

.model-detail-provider {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.model-detail-meta-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 10px;
  font-size: 0.82rem;
}

.model-detail-meta-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.model-detail-meta-item strong {
  color: var(--text-muted);
  font-weight: 600;
}

.model-detail-meta-item span {
  color: var(--text);
  text-align: right;
}

.model-detail-box {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  padding: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #d1fae5;
}

.model-detail-box strong {
  color: #6ee7b7;
  display: block;
  margin-bottom: 4px;
}

/* AI TRANSZPARENCIA SZEKCIÓ */
.ai-info-section {
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 14px;
  padding: 20px;
}

.ai-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.ai-feature-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 6px;
  width: fit-content;
}

.ai-feature-card h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

.ai-feature-card p {
  margin: 0;
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.48;
}

.ai-data-list {
  margin: 6px 0 0 0;
  padding-left: 18px;
  font-size: 0.8rem;
  color: #cbd5e1;
}

.ai-data-list li {
  margin-bottom: 3px;
}

.ai-privacy-note {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ELTÉRÉS-DETEKTOR */
.discrepancy-info-box {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 12px;
  padding: 16px;
}

.discrepancy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.discrepancy-item {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.discrepancy-item-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 4px;
}

.discrepancy-item-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ELŐREJELZÉSI NÉZETEK: IDŐTÁV CÍMKÉK ÉS GOMBOK */
.model-timeframe-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.model-timeframe-tag strong {
  color: #6ee7b7;
  font-weight: 600;
}

.tab-timeframe-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #9cb8ad;
  margin-left: 4px;
}

.model-tab-btn.active .tab-timeframe-tag {
  background: rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}

.model-horizon-bar-wrap {
  margin-top: 4px;
  margin-bottom: 8px;
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.model-horizon-strength {
  color: #a7f3d0;
  opacity: 0.9;
}

.model-horizon-table-hint {
  font-size: 0.72rem;
  color: #6ee7b7;
  opacity: 0.85;
}

.btn-model-info-link {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-model-info-link:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
}

.login-models-info-btn {
  margin-left: 8px;
  background: none;
  border: none;
  color: #38bdf8;
  cursor: pointer;
  font-size: 0.82rem;
  text-decoration: underline;
  padding: 0;
}

.login-models-info-btn:hover {
  color: #7dd3fc;
}

@media (max-width: 600px) {
  .safety-callout {
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }
  .safety-callout-icon {
    font-size: 1.6rem;
  }
  .models-info-content {
    padding: 16px;
  }
  .models-info-grid {
    grid-template-columns: 1fr;
  }
  .ai-cards-grid {
    grid-template-columns: 1fr;
  }
}
