:root {
  --bg: #07111f;
  --bg-deep: #050c16;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.18);
  --text: #e7eef9;
  --muted: #9cb2d1;
  --accent: #5cc6ff;
  --accent-2: #7df9c9;
  --warning: #ffb661;
  --danger: #ff6b6b;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --radius-lg: 24px;
  --blur: 18px;
  --font-heading: "Sora", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  height: 100vh;
  overflow-x: hidden;
  overscroll-behavior: none;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(92, 198, 255, 0.25), transparent 60%),
    radial-gradient(1000px 500px at 90% 0%, rgba(125, 249, 201, 0.18), transparent 55%),
    linear-gradient(135deg, var(--bg), var(--bg-deep));
  color: var(--text);
  font-family: var(--font-body);
}

body {
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

main {
  flex: 1;
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 32px 0 80px;
}

header {
  width: 100%;
}

.navbar {
  width: min(1200px, 92vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  letter-spacing: 1px;
}

.nav-brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(92, 198, 255, 0.6), rgba(125, 249, 201, 0.4));
  color: #04101f;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  border-color: rgba(92, 198, 255, 0.4);
  background: rgba(92, 198, 255, 0.12);
}

.nav-cta {
  display: flex;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #5cc6ff;
  border: 1px solid rgba(92, 198, 255, 0.5);
  color: #03101d;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button.secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.button.secondary#deleteAccountBtn {
  border-color: #ef4444;
  color: #ef4444;
}

.button.secondary#deleteAccountBtn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #dc2626;
  color: #dc2626;
}

.button.secondary#unsubscribeBtn {
  border-color: #ef4444;
  color: #ef4444;
}

.button.secondary#unsubscribeBtn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #dc2626;
  color: #dc2626;
}

.button.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.button-danger {
  background: #dc3545;
  color: white;
  border: 1px solid #dc3545;
}

.button-danger:hover {
  background: #c82333;
  border-color: #c82333;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.glass {
  background: linear-gradient(135deg, rgba(10, 23, 44, 0.94), rgba(12, 27, 52, 0.88), rgba(39, 93, 179, 0.16));
  border: 1px solid rgba(92, 198, 255, 0.28);
  backdrop-filter: blur(var(--blur));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.scrollable-content {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 12px;
}

.saved-aircraft-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.saved-aircraft-list .card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
}

.saved-aircraft-list .card img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.saved-aircraft-list .card > div {
  flex: 1;
  min-width: 0;
}

.saved-aircraft-list .card h4 {
  margin: 4px 0 0 0;
  font-size: 0.95rem;
}

.saved-aircraft-list .card .badge {
  font-size: 0.7rem;
}

.saved-aircraft-list .card .button {
  flex-shrink: 0;
  white-space: nowrap;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(92, 198, 255, 0.8);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(92, 198, 255, 1);
}

.scrollable-content::-webkit-scrollbar {
  width: 8px;
}

.scrollable-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.scrollable-content::-webkit-scrollbar-thumb {
  background: rgba(92, 198, 255, 0.8);
  border-radius: 4px;
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
  background: rgba(92, 198, 255, 1);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 0 0 12px;
}

.section-sub {
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 720px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  align-items: center;
}

.hero-card {
  padding: 28px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  margin: 0 0 12px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.kpi {
  padding: 18px;
}

.kpi strong {
  font-size: 1.6rem;
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.card {
  padding: 18px;
  display: grid;
  gap: 12px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(92, 198, 255, 0.6);
}

.card img {
  border-radius: 12px;
  height: 150px;
  object-fit: cover;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(92, 198, 255, 0.15);
  color: var(--accent);
  font-size: 0.75rem;
}

.input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(92, 198, 255, 0.26);
  background: linear-gradient(135deg, rgba(10, 23, 44, 0.88), rgba(15, 32, 60, 0.85));
  color: var(--text);
  font-family: var(--font-body);
}

input::placeholder, textarea::placeholder {
  color: rgba(156, 178, 209, 0.6);
}

.form-row {
  display: grid;
  gap: 16px;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.notice {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.notice.success {
  background: rgba(125, 249, 201, 0.15);
  color: var(--accent-2);
}

.notice.error {
  background: rgba(255, 107, 107, 0.16);
  color: var(--danger);
}

.notice.info {
  background: rgba(92, 198, 255, 0.15);
  color: var(--accent);
}

.loader {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.loader span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1s infinite ease-in-out;
}

.loader span:nth-child(2) {
  animation-delay: 0.2s;
}

.loader span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes pulse {
  0%, 100% { opacity: 0.2; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1); }
}

.footer {
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 30px 0 40px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
}

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

.table th, .table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: rgba(92, 198, 255, 0.8);
}

@media (max-width: 900px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links {
    width: 100%;
  }
}

/* —— Home dashboard (SkyMaster-style shell) —— */
body.fd-app {
  display: flex;
  min-height: 100vh;
  margin: 0;
  background: #0b111a;
  color: #f1f5f9;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  flex-direction: row;
  align-items: stretch;
}

body.fd-app .section-title {
  color: #f8fafc;
}

body.fd-app .section-sub {
  color: #94a3b8;
}

body.fd-app .home-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 90;
}

body.fd-app.sidebar-open .home-sidebar-overlay {
  display: block;
}

.home-sidebar {
  position: fixed;
  left: 0;
  width: 268px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  transition: width 0.22s ease, transform 0.22s ease;
  overflow: hidden;
  overflow-y: auto;
  background: #0a1120;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
}

@media (min-width: 901px) {
  body.fd-app.sidebar-collapsed .home-sidebar {
    width: 76px;
  }

  body.fd-app.sidebar-collapsed .home-column {
    margin-left: 76px;
  }

  body.fd-app.sidebar-collapsed .home-sidebar-inner {
    padding-left: 12px;
    padding-right: 12px;
  }

  body.fd-app.sidebar-collapsed .home-sidebar-brand {
    justify-content: center;
    margin-bottom: 20px;
  }

  body.fd-app.sidebar-collapsed .home-sidebar-brand-text {
    display: none;
  }

  body.fd-app.sidebar-collapsed .home-nav-label {
    display: none;
  }

  body.fd-app.sidebar-collapsed .home-sidebar-nav a {
    justify-content: center;
    gap: 0;
    padding-left: 10px;
    padding-right: 10px;
  }

  body.fd-app.sidebar-collapsed .home-nav-pill-dot {
    display: none;
  }

  body.fd-app.sidebar-collapsed .home-sidebar-user {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 12px 8px;
  }

  body.fd-app.sidebar-collapsed .home-sidebar-user > div {
    display: none;
  }

  body.fd-app.sidebar-collapsed .home-sidebar-auth {
    display: none;
  }
}

.home-sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100vh;
  padding: 24px 18px 20px;
}

.home-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  margin-bottom: 28px;
}

.home-sidebar-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #3b82f6;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.home-sidebar-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-fullscreen-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  background: rgba(3, 12, 24, 0.92);
  padding: 24px;
}

.logo-fullscreen-modal.active {
  display: grid;
}

.logo-fullscreen-content {
  position: relative;
  width: min(92vw, 780px);
  max-height: 90vh;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(7, 14, 28, 0.96), rgba(22, 45, 88, 0.94));
  border: 1px solid rgba(92, 198, 255, 0.28);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);
}

.logo-fullscreen-content img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 20px;
}

.logo-fullscreen-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.2s ease;
}

.logo-fullscreen-close:hover {
  transform: scale(1.05);
  background: rgba(92, 198, 255, 0.18);
}

.global-search-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  place-items: center;
  background: rgba(3, 12, 24, 0.98);
  padding: 24px;
  overflow-y: auto;
  pointer-events: none;
}

.global-search-modal.active {
  display: grid;
  pointer-events: auto;
}

.global-search-content {
  position: relative;
  width: min(92vw, 620px);
  max-height: 85vh;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(7, 14, 28, 0.96), rgba(22, 45, 88, 0.94));
  border: 1px solid rgba(92, 198, 255, 0.28);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);
  overflow-y: auto;
  pointer-events: auto;
}

.global-search-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.2s ease;
}

.global-search-close:hover {
  transform: scale(1.05);
  background: rgba(92, 198, 255, 0.18);
}

.global-search-input-wrapper {
  margin-bottom: 20px;
}

.global-search-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  color: #f1f5f9;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(92, 198, 255, 0.3);
  border-radius: 12px;
  outline: none;
  font-family: inherit;
}

.global-search-input:focus {
  border-color: rgba(92, 198, 255, 0.6);
  background: rgba(15, 23, 42, 0.95);
}

.global-search-input::placeholder {
  color: #64748b;
}

.global-search-results {
  display: grid;
  gap: 24px;
}

.search-section {
  display: grid;
  gap: 12px;
}

.search-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0;
}

.search-list {
  display: grid;
  gap: 8px;
}

.search-item {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(92, 198, 255, 0.08);
  border: 1px solid rgba(92, 198, 255, 0.2);
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

.search-item:hover {
  background: rgba(92, 198, 255, 0.15);
  border-color: rgba(92, 198, 255, 0.35);
  transform: translateX(4px);
}

.search-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-item-content strong {
  font-weight: 600;
  color: var(--text);
}

.search-item-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.home-sidebar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-sidebar-brand-text strong {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.home-sidebar-brand-text span {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 400;
}

.home-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.home-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
}

.home-sidebar-nav a:hover {
  color: #e2e8f0;
  background: rgba(59, 130, 246, 0.12);
}

.home-sidebar-nav a.active {
  background: #3b82f6;
  color: #fff;
}

.home-nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-nav-icon svg {
  width: 20px;
  height: 20px;
}

.home-nav-pill-dot {
  margin-left: auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
}

.home-sidebar-nav a.active .home-nav-pill-dot {
  opacity: 1;
}

.home-sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: #111a2e;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.home-sidebar-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(92, 198, 255, 0.8);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-sidebar-user strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}

.home-sidebar-user span {
  font-size: 0.75rem;
  color: #94a3b8;
}

.home-sidebar-auth {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-sidebar-auth .button {
  padding: 8px 12px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.kb-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 12px;
}

.kb-tabs-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.kb-tabs-trigger {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.kb-tabs-trigger[data-state="active"] {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(59, 130, 246, 0.2));
  border-color: rgba(56, 189, 248, 0.48);
  color: #ffffff;
}

.kb-tabs-trigger[data-state="inactive"] {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.kb-tabs-trigger:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.32);
}

.kb-tabs-content {
  display: grid;
}

.kb-tabs-panel {
  display: grid;
  gap: 20px;
}

.kb-tabs-panel[hidden] {
  display: none;
}

.settings-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(15, 20, 25, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-card:has(#deleteAccountBtn) {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.settings-card h3 {
  margin: 0;
}

.settings-card label {
  font-weight: 600;
  color: #cbd5e1;
}

.settings-card .input {
  width: 100%;
}

.home-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #0f1419;
  margin-left: 268px;
  overflow-y: auto;
}

.home-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #0f1419;
}

.home-topbar form[role="search"] {
  margin-left: auto;
  flex-shrink: 0;
  max-width: 280px;
  width: 100%;
}

.home-topbar form[role="search"] .home-search-wrap {
  margin-left: 0;
  max-width: none;
}

.home-menu-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

body.fd-app .home-menu-toggle {
  display: inline-flex;
}

.home-menu-toggle__icon {
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

body.fd-app .home-menu-toggle__icon--menu {
  display: flex;
}

@media (max-width: 900px) {
  body.fd-app.sidebar-open .home-menu-toggle__icon--menu {
    display: none;
  }

  body.fd-app.sidebar-open .home-menu-toggle__icon--close {
    display: flex;
  }
}

@media (min-width: 901px) {
  body.fd-app:not(.sidebar-collapsed) .home-menu-toggle__icon--menu {
    display: none;
  }

  body.fd-app:not(.sidebar-collapsed) .home-menu-toggle__icon--close {
    display: flex;
  }
}

.home-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.home-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 10px 18px;
  border-radius: 999px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  max-width: 280px;
  width: 100%;
}

.home-search-icon {
  color: #64748b;
  display: flex;
  flex-shrink: 0;
}

.home-search {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #f1f5f9;
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}

.home-search::placeholder {
  color: #64748b;
}

.home-main,
main.fd-main {
  flex: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px 28px 48px;
}

.home-hero {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  background: #111a2e
    url("Hero Image.jpg") center / cover no-repeat;
  margin-bottom: 28px;
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(10, 17, 32, 0.92) 0%, rgba(10, 17, 32, 0.55) 45%, rgba(59, 130, 246, 0.25) 100%);
}

.home-hero-content {
  position: relative;
  z-index: 1;
  padding: 36px 40px;
  max-width: 560px;
}

.home-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.home-hero-content > p {
  margin: 0 0 24px;
  font-size: 1rem;
  line-height: 1.55;
  color: #e2e8f0;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.home-btn:hover {
  transform: translateY(-1px);
}

.home-btn-primary {
  background: #3b82f6;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.home-btn-primary:hover {
  background: #2563eb;
}

.home-btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.home-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 36px;
}

.home-stat-card {
  background: linear-gradient(135deg, rgba(13, 26, 47, 0.95), rgba(18, 35, 68, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-stat-icon svg {
  width: 22px;
  height: 22px;
}

.home-stat-card strong {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.home-stat-card > span:last-child {
  font-size: 0.8rem;
  color: #94a3b8;
}

.home-section {
  margin-bottom: 40px;
}

.home-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.home-section-head h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.home-section-head p {
  margin: 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

.home-link-arrow {
  color: #3b82f6;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.home-link-arrow::after {
  content: ">";
  font-weight: 700;
  opacity: 0.9;
}

.home-link-arrow:hover {
  color: #60a5fa;
}

.home-program-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.home-program-card {
  background: linear-gradient(135deg, rgba(13, 26, 47, 0.95), rgba(18, 35, 68, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.home-program-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateY(-2px);
}

.home-program-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3b82f6;
}

.home-program-card h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.home-program-meta {
  margin: 0;
  flex: 1;
  font-size: 0.875rem;
  color: #94a3b8;
}

.home-aircraft-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.home-aircraft-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  aspect-ratio: 16 / 10;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-aircraft-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.home-aircraft-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.home-carousel-track-wrap {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(13, 26, 47, 0.95), rgba(18, 35, 68, 0.92));
  width: min(1200px, 100%);
}

.home-carousel-track {
  display: flex;
  gap: 16px;
  padding: 18px;
  transition: transform 0.3s ease;
}

.home-carousel-card {
  min-width: 360px;
  max-width: 360px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(13, 26, 47, 0.95), rgba(18, 35, 68, 0.92));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.home-carousel-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.home-carousel-copy {
  padding: 16px;
}

.home-carousel-copy strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 700;
}

.home-carousel-copy p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

.home-carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.home-carousel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.home-carousel-dots {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.home-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.home-carousel-dot.active {
  background: #3b82f6;
  transform: scale(1.1);
  border-color: transparent;
}

.home-newsletter {
  background: linear-gradient(135deg, rgba(13, 26, 47, 0.95), rgba(18, 35, 68, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 28px;
  max-width: 560px;
  margin: 0 auto;
}

.home-newsletter h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.home-newsletter > p {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: #94a3b8;
}

.home-newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-input {
  flex: 1;
  min-width: 200px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(13, 26, 47, 0.95), rgba(18, 35, 68, 0.92));
  color: #f1f5f9;
  font: inherit;
  font-size: 0.9rem;
}

.home-input::placeholder {
  color: #64748b;
}

.home-help-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(13, 26, 47, 0.95), rgba(18, 35, 68, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: background 0.15s ease, color 0.15s ease;
}

.home-help-fab:hover {
  background: #3b82f6;
  color: #fff;
}

body.fd-app #footer {
  flex-shrink: 0;
}

body.fd-app .footer {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 20px 28px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(135deg, rgba(13, 26, 47, 0.95), rgba(18, 35, 68, 0.92));
  color: #64748b;
  font-size: 0.85rem;
}

@media (max-width: 1100px) {
  .home-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .home-program-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .home-sidebar {
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: none;
  }

  .home-column {
    margin-left: 0;
  }

  body.fd-app.sidebar-open .home-sidebar {
    transform: translateX(0);
    box-shadow: 16px 0 48px rgba(0, 0, 0, 0.5);
  }

  .home-search-wrap {
    max-width: none;
    flex: 1;
  }

  .home-hero-content {
    padding: 28px 22px;
  }

  .home-main,
  main.fd-main {
    padding: 18px 18px 40px;
  }

  .home-aircraft-grid {
    grid-template-columns: 1fr;
  }
}

/* Chat Modal */
.chat-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 10000;
}

.chat-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.chat-modal-content {
  position: relative;
  background: linear-gradient(135deg, rgba(10, 23, 44, 0.95), rgba(26, 32, 44, 0.95));
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.chat-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.chat-modal-close {
  background: none;
  border: none;
  color: #e2e8f0;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-messages {
  flex: 1;
  padding: 16px 20px;
  overflow-y: auto;
  max-height: 300px;
}

.chat-message {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #08131f;
  color: #e7eef9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  flex-shrink: 0;
  overflow: hidden;
  padding: 4px;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.chat-message.user .chat-avatar {
  background: #e2e8f0;
  color: #0a172c;
}

.chat-text {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  border-radius: 12px;
  line-height: 1.4;
  flex: 1;
}

.chat-message.user .chat-text {
  background: #5cc6ff;
  color: #0a172c;
}

.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input-area input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: 0.9rem;
}

.chat-input-area input:focus {
  outline: none;
  border-color: #5cc6ff;
}

.chat-input-area button {
  padding: 12px 20px;
  background: #5cc6ff;
  color: #0a172c;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.chat-input-area button:hover {
  background: #4ba8e6;
}

/* Chat FAB */
.home-chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5cc6ff, #3b82f6);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  z-index: 1000;
}

.home-chat-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.5);
}

body.chat-modal-open .home-chat-fab {
  display: none;
}

/* Community Posts Styles */
.post-maker {
  background: var(--glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.post-maker-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.post-maker-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(92, 198, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  color: var(--bg-deep);
  flex-shrink: 0;
}

.post-maker-content {
  flex: 1;
}

.post-input {
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
}

.post-input:focus {
  border-color: var(--accent);
}

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

.post-maker-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.posts-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post {
  background: var(--glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

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

.post-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(92, 198, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--bg-deep);
  flex-shrink: 0;
}

.post-info {
  flex: 1;
}

.post-username {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.post-time {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.post-content {
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.post-action-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.post-action-button:hover {
  background: var(--glass);
  color: var(--accent);
}

.post-action-button svg {
  width: 18px;
  height: 18px;
}

/* WingIt page layout polish */
body.fd-app.wingit-page .home-main {
  padding: 0;
}

body.fd-app.wingit-page .wingit-section {
  min-height: calc(100vh - 160px);
  margin: 0;
  padding: clamp(16px, 3vw, 32px);
  align-items: center;
  justify-content: center;
}

body.fd-app.wingit-page .wingit-card {
  width: min(92vw, 640px);
  padding: clamp(20px, 2.5vw, 34px);
  margin: 0 auto;
}

body.fd-app.wingit-page .wingit-card-menu {
  width: min(92vw, 980px);
}

body.fd-app.wingit-page .wingit-card-host {
  width: min(92vw, 760px);
}

body.fd-app.wingit-page .wingit-card-create {
  width: min(92vw, 900px);
}

body.fd-app.wingit-page .wingit-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: min(100%, 460px);
  margin: 0 auto;
}

body.fd-app.wingit-page .wingit-main-btn {
  width: 100%;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  min-height: 64px;
}

body.fd-app.wingit-page .wingit-next-btn {
  margin-top: 1rem;
  padding: 0.75rem 1.25rem;
  background: #ff9800;
  color: #fff;
  border: 1px solid rgba(255, 152, 0, 0.45);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

body.fd-app.wingit-page .wingit-next-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
}

body.fd-app.wingit-page .wingit-next-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media (max-width: 768px) {
  body.fd-app.wingit-page .wingit-section {
    min-height: calc(100vh - 130px);
  }
}

.reply-count {
  font-size: 13px;
  color: var(--muted);
}

.newsletter-carousel-wrap {
  margin-top: 24px;
  padding: 22px;
}

.newsletter-carousel-title {
  margin: 0 0 14px;
  text-align: center;
}

.logo-carousel {
  position: relative;
  display: flex;
  overflow: hidden;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(92, 198, 255, 0.28);
  background: linear-gradient(135deg, rgba(10, 23, 44, 0.94), rgba(12, 27, 52, 0.9), rgba(39, 93, 179, 0.14));
}

.logo-carousel::before,
.logo-carousel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
  z-index: 2;
  pointer-events: none;
}

.logo-carousel::before {
  left: 0;
  background: linear-gradient(to right, rgba(10, 23, 44, 0.95), rgba(10, 23, 44, 0));
}

.logo-carousel::after {
  right: 0;
  background: linear-gradient(to left, rgba(10, 23, 44, 0.95), rgba(10, 23, 44, 0));
}

.logo-carousel-track {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  min-width: max-content;
  animation: fdLogoScroll 24s linear infinite;
}

.logo-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 220px;
  min-height: 180px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(135deg, rgba(11, 29, 56, 0.95), rgba(15, 35, 66, 0.9));
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.logo-chip-title {
  font-size: 1rem;
  text-align: center;
  line-height: 1.2;
}

.logo-chip-media {
  width: 100%;
  height: 110px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(7, 19, 38, 0.7);
}

@keyframes fdLogoScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - 14px));
  }
}

@media (max-width: 680px) {
  .logo-carousel {
    padding: 12px 10px;
  }

  .logo-chip {
    min-width: 185px;
    min-height: 160px;
    padding: 9px 12px;
    font-size: 0.88rem;
  }

  .logo-chip-media {
    height: 90px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-carousel-track {
    animation: none;
  }
}

/* Collapsible Accordion - Shad-cn Style */
.collapsible-accordion {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--glass);
  transition: border-color 0.2s ease;
}

.collapsible-accordion:hover {
  border-color: var(--accent);
}

.collapsible-trigger {
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: background-color 0.2s ease;
  text-align: left;
}

.collapsible-trigger:hover {
  background: rgba(255, 255, 255, 0.05);
}

.collapsible-trigger:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.collapsible-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chevron-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
  color: var(--muted);
}

.collapsible-trigger:hover .chevron-icon {
  color: var(--text);
}

.collapsible-panel {
  padding: 0 16px 16px 16px;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reply-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.reply-input-wrapper {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.reply-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(92, 198, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  color: var(--bg-deep);
  flex-shrink: 0;
}

.reply-input {
  flex: 1;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
}

.reply-input:focus {
  border-color: var(--accent);
}

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

.replies-container {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reply {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: var(--glass);
  border-radius: 12px;
}

.reply-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(92, 198, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 11px;
  color: var(--bg-deep);
  flex-shrink: 0;
}

.reply-content {
  flex: 1;
}

.reply-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.reply-username {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.reply-time {
  font-size: 11px;
  color: var(--muted);
}

.reply-text {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state p {
  font-size: 16px;
  margin: 0;
}

/* Avatar utility */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(92, 198, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  color: var(--bg-deep);
  flex-shrink: 0;
}

/* Flight Academy (Cockpit) */ 
.fd-academy-menu {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.fd-academy-menu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

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

.fd-academy-menu-tip {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}

.fd-phases-container {
  display: grid;
  gap: 24px;
}

.fd-phase-section {
  display: grid;
  gap: 16px;
}

.fd-phase-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.fd-phase-color {
  font-size: 1.5rem;
}

.fd-phase-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent-blue);
}

.fd-lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.fd-lesson-card {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  display: grid;
  gap: 12px;
}

.fd-lesson-card:hover {
  transform: translateY(-2px);
  border-color: rgba(92, 198, 255, 0.45);
  background: rgba(92, 198, 255, 0.10);
}

.fd-lesson-card.completed {
  border-color: rgba(76, 175, 80, 0.4);
  background: rgba(76, 175, 80, 0.08);
}

.fd-lesson-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.fd-lesson-card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.fd-lesson-card-difficulty {
  font-size: 1.2rem;
}

.fd-lesson-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.fd-lesson-card-time {
  display: flex;
  align-items: center;
  gap: 4px;
}

.fd-lesson-card-status {
  font-weight: 500;
}

.fd-lesson-card.completed .fd-lesson-card-status {
  color: #4CAF50;
}

.fd-lesson-card-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.fd-lesson-card-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #5cc6ff, #3b82f6);
  width: 0%;
  transition: width 0.3s ease;
}

.fd-lesson-card-progress-bar.complete {
  width: 100%;
  background: linear-gradient(90deg, #4CAF50, #66BB6A);
}

.fd-lesson-card-start {
  margin-top: 4px;
  width: 100%;
  justify-self: start;
}

.fd-aircraft-choice {
  display: grid;
  gap: 12px;
}

.fd-aircraft-radio {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.fd-aircraft-radio:hover {
  transform: translateY(-2px);
  border-color: rgba(92, 198, 255, 0.45);
  background: rgba(92, 198, 255, 0.10);
}

.fd-aircraft-radio input {
  margin-top: 4px;
}

.fd-aircraft-sub {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.fd-trainer-stage {
  display: grid;
  gap: 16px;
}

.fd-stepper {
  display: grid;
  gap: 16px;
}

.fd-stepper-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.fd-stepper-head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.fd-stepper-meta {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.fd-stepper-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(92, 198, 255, 0.12);
  border: 1px solid rgba(92, 198, 255, 0.28);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
}

.fd-stepper-body {
  color: var(--text);
  line-height: 1.7;
}

.fd-stepper-body ul {
  margin: 0;
  padding-left: 18px;
}

.fd-stepper-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.fd-quiz-options {
  display: grid;
  gap: 10px;
}

.fd-quiz-option {
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.fd-quiz-option:hover {
  transform: translateY(-2px);
  border-color: rgba(92, 198, 255, 0.45);
  background: rgba(92, 198, 255, 0.10);
}

.fd-quiz-option.selected {
  border-color: rgba(125, 249, 201, 0.45);
  background: rgba(125, 249, 201, 0.10);
}

.fd-quiz-option.correct {
  border-color: rgba(76, 175, 80, 0.6);
  background: rgba(76, 175, 80, 0.15);
  color: #4CAF50;
}

.fd-quiz-option.incorrect {
  border-color: rgba(244, 67, 54, 0.6);
  background: rgba(244, 67, 54, 0.15);
  color: #F44336;
  text-decoration: line-through;
  opacity: 0.7;
}

.fd-quiz-option[disabled] {
  cursor: default;
  transform: none !important;
}

.fd-quiz-option[disabled]:hover {
  transform: none;
}

.fd-reveal-card:hover {
  transform: translateY(-1px);
  border-color: rgba(92, 198, 255, 0.3) !important;
}

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

.fd-trainer-aircraft { 
  padding: 18px; 
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

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

.fd-trainer-aircraft-actions select {
  width: min(320px, 70vw);
}

.fd-trainer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: start;
}

.fd-trainer-grid.single {
  grid-template-columns: 1fr;
}

.fd-trainer-panel {
  padding: 20px;
}

.fd-trainer-cockpit {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
}

.fd-trainer-cockpit img {
  width: 100%;
  height: auto;
  display: block;
}

.fd-trainer-hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fd-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(92, 198, 255, 0.65);
  background: rgba(92, 198, 255, 0.16);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(92, 198, 255, 0.35);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.15s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.fd-hotspot:hover {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 8px rgba(92, 198, 255, 0.18);
}

.fd-hotspot.active {
  border-color: rgba(125, 249, 201, 0.8);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 10px rgba(125, 249, 201, 0.14);
}

.fd-hotspot.completed {
  border-color: rgba(125, 249, 201, 0.7);
  background: rgba(125, 249, 201, 0.18);
}

.fd-trainer-lesson {
  display: grid;
  gap: 16px;
}

.fd-trainer-lesson-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.fd-trainer-lesson-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.fd-trainer-lesson-body h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.fd-trainer-lesson-body ul {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.7;
}

.fd-trainer-lesson-body p {
  margin: 0 0 16px;
  color: var(--text);
  line-height: 1.7;
}

@media (max-width: 980px) {
  .fd-trainer-grid {
    grid-template-columns: 1fr;
  }
}
