@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk/SpaceGrotesk-Regular.woff2") format("woff2"),
    url("fonts/SpaceGrotesk/SpaceGrotesk-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk/SpaceGrotesk-Medium.woff2") format("woff2"),
    url("fonts/SpaceGrotesk/SpaceGrotesk-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk/SpaceGrotesk-SemiBold.woff2") format("woff2"),
    url("fonts/SpaceGrotesk/SpaceGrotesk-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk/SpaceGrotesk-Bold.woff2") format("woff2"),
    url("fonts/SpaceGrotesk/SpaceGrotesk-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #10131a;
  --ink-soft: #2c3240;
  --slate: #545e70;
  --mist: #e6e6ea;
  --surface: #ffffff;
  --surface-alt: #f5f1f0;
  --accent: #c62828;
  --accent-deep: #8e1e1e;
  --teal: #ff8f00;
  --amber: #f4b740;
  --green: #2e7d32;
  --shadow: 0 18px 44px rgba(14, 16, 22, 0.08);
  --shadow-soft: 0 4px 14px rgba(255, 255, 255, 0.72);
  --radius: 18px;
  --font-display: "Space Grotesk", "Satoshi", "Avenir Next", sans-serif;
  --font-body: "Space Grotesk", "IBM Plex Sans", "Manrope", "Segoe UI", sans-serif;
  --page-padding: clamp(16px, 4vw, 48px);
}

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

body {
  font-family: var(--font-body);
  background: radial-gradient(circle at top left, #fff0ea 0%, #f7f5f2 40%, #ffffff 100%);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 3px solid rgba(198, 40, 40, 0.22);
  outline-offset: 2px;
}

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

main {
  padding: 0 var(--page-padding) 80px;
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 6vw, 72px);
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(198, 40, 40, 0.12) 1px, transparent 1px),
    linear-gradient(180deg, rgba(198, 40, 40, 0.12) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(circle at 20% 10%, rgba(0, 0, 0, 0.9), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

header,
main,
footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--page-padding);
  gap: 24px;
  flex-wrap: nowrap;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(16, 19, 26, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  height: 48px;
  width: 48px;
  background: linear-gradient(135deg, #a61d1d, #ff7b00 58%, #ffb347);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: var(--font-display);
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(198, 40, 40, 0.28);
}

.brand-title {
  font-size: 20px;
  font-family: var(--font-display);
  font-weight: 700;
}

.brand-subtitle {
  color: var(--slate);
  font-size: 14px;
}

.top-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.desktop-nav-shell {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
}

.top-nav-desktop {
  flex: 1 1 auto;
}

.top-actions-desktop {
  flex: 0 0 auto;
}

.menu-panel {
  display: none;
}

.menu-panel-head {
  display: none;
}

.menu-profile-copy {
  display: none;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--mist);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  width: 52px;
  height: 52px;
  padding: 0;
  cursor: pointer;
  justify-content: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(12, 14, 20, 0.08);
}

.menu-toggle-lines {
  display: grid;
  gap: 5px;
}

.menu-toggle-lines span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #1e2b3d;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.nav-item {
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(16, 19, 26, 0.14);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

.top-actions {
  display: flex;
  gap: 12px;
  flex: 0 0 auto;
}

.profile-toggle {
  border: 1px solid var(--mist);
  background: linear-gradient(180deg, #fff, #f2f3f5);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  min-width: 44px;
  text-align: center;
  cursor: pointer;
}

button {
  font-family: var(--font-body);
}

.primary,
.ghost {
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.primary {
  border: none;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(198, 40, 40, 0.35);
}

.primary:hover {
  background: var(--accent-deep);
}

.primary:disabled,
.ghost:disabled {
  cursor: wait;
  opacity: 0.68;
}

.ghost {
  border: 1px solid var(--mist);
  background: var(--surface);
  color: var(--ink);
}

.ghost:hover {
  border-color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  padding-top: 16px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 12px;
  color: var(--slate);
  margin-bottom: 12px;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.1;
  margin-bottom: 18px;
}

.hero-copy {
  font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 24px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.hero-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-display);
}

.stat-label {
  font-size: 13px;
  color: var(--slate);
}

.card {
  background: var(--surface);
  border: 1px solid rgba(16, 19, 26, 0.05);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 24px);
  box-shadow: var(--shadow-soft), var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card.large {
  min-height: 320px;
}

.card.stack {
  margin-top: 20px;
}

.card-header,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card-footer {
  margin-top: auto;
}

.card-title {
  font-weight: 700;
  font-size: 18px;
}

.card-subtitle {
  color: var(--slate);
  font-size: 14px;
}

.card-body {
  color: var(--ink-soft);
  line-height: 1.5;
}

.card-footnote {
  color: var(--slate);
  font-size: 13px;
}

.notice-card {
  border: 1px solid var(--mist);
}

.notice-success {
  background: linear-gradient(180deg, rgba(46, 125, 50, 0.08), rgba(255, 255, 255, 0.98));
}

.notice-error {
  background: linear-gradient(180deg, rgba(198, 40, 40, 0.08), rgba(255, 255, 255, 0.98));
}

.login-section {
  min-height: calc(100vh - 220px);
  justify-content: center;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(340px, 0.78fr);
  gap: 24px;
  align-items: center;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.login-hero-card,
.login-card {
  min-height: 440px;
}

.login-hero-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: stretch;
  gap: 26px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid rgba(16, 19, 26, 0.05);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(255, 143, 0, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 244, 241, 0.94));
  box-shadow: var(--shadow-soft), var(--shadow);
}

.login-drone-stage {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 143, 0, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 244, 241, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.login-drone-stage .footer-drone-visual {
  left: 50%;
  top: 108px;
  transform: translateX(-50%) scale(1.85);
  animation: login-drone-hover 1.55s ease-in-out infinite alternate;
}

.login-card {
  justify-content: center;
  gap: 20px;
  padding: clamp(22px, 4vw, 34px);
}

.login-ms-button,
.login-form .ghost {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--slate);
  font-size: 13px;
  font-weight: 700;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--mist);
}

.login-error {
  padding: 12px 14px;
  border-radius: 12px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 8px;
}

.section-actions {
  display: flex;
  gap: 12px;
}

.grid-3,
.grid-4,
.grid-2 {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

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

.readiness-tools-grid {
  align-items: start;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.readiness-tools-grid > .card {
  min-height: 0;
  padding: 18px 20px;
  gap: 10px;
}

.list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.list li {
  background: var(--surface-alt);
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.flight-log-item-main {
  display: grid;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.flight-log-item-title {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  word-break: break-word;
}

.flight-log-item-side {
  display: grid;
  gap: 10px;
  justify-items: end;
  flex: 0 0 auto;
}

.flight-log-item-date {
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
}

.pill {
  background: var(--mist);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.pill.amber {
  background: rgba(244, 183, 64, 0.2);
  color: #9f6b00;
}

.pill.green {
  background: rgba(53, 181, 106, 0.2);
  color: #1f7b44;
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--mist);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-soft);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--mist);
  color: var(--ink);
}

.status.green {
  background: rgba(46, 125, 50, 0.15);
  color: #1f5a2b;
}

.status.amber {
  background: rgba(255, 143, 0, 0.18);
  color: #9a5a00;
}

.status.red {
  background: rgba(198, 40, 40, 0.15);
  color: #7f1c1c;
}

.status.neutral {
  background: rgba(84, 94, 112, 0.12);
  color: #3c4250;
}

.readiness-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(200, 60, 60, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 247, 246, 0.96));
}

.readiness-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #c62828;
}

.readiness-card-green {
  border-color: rgba(35, 160, 85, 0.18);
  background:
    radial-gradient(circle at top right, rgba(35, 160, 85, 0.12), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 251, 248, 0.96));
}

.readiness-card-green::before {
  background: #23a055;
}

.readiness-card-amber {
  border-color: rgba(216, 140, 0, 0.2);
  background:
    radial-gradient(circle at top right, rgba(216, 140, 0, 0.13), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(252, 249, 244, 0.96));
}

.readiness-card-amber::before {
  background: #d88c00;
}

.readiness-card-red {
  border-color: rgba(204, 42, 42, 0.18);
  background:
    radial-gradient(circle at top right, rgba(204, 42, 42, 0.11), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(252, 246, 246, 0.96));
}

.readiness-card-red::before {
  background: #cc2a2a;
}

.readiness-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.phase-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.phase-pill.green {
  background: rgba(35, 160, 85, 0.12);
  color: #1f7a43;
}

.phase-pill.amber {
  background: rgba(216, 140, 0, 0.15);
  color: #a05d00;
}

.phase-pill.red {
  background: rgba(204, 42, 42, 0.12);
  color: #a52626;
}

.readiness-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #f1e8e6;
  overflow: hidden;
  margin-bottom: 14px;
}

.readiness-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.readiness-bar.red span {
  background: #c6403a;
}

.readiness-bar.amber span {
  background: #d08a1d;
}

.readiness-bar.green span {
  background: #2d9a55;
}

.readiness-body {
  display: grid;
  gap: 8px;
}

.readiness-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.readiness-label {
  font-weight: 700;
  color: #262a33;
}

.readiness-value {
  text-align: right;
  color: #4b5563;
}

.readiness-meta {
  color: #8b95a3;
  font-size: 12px;
  margin-left: 6px;
}

.readiness-actions {
  margin-top: 12px;
}

.profile-card {
  display: grid;
  gap: 10px;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.profile-meta {
  color: var(--slate);
  font-size: 13px;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(198, 40, 40, 0.08);
  color: var(--ink);
  font-weight: 600;
  width: 100%;
}

.profile-chip span {
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-chip strong {
  font-size: 15px;
  line-height: 1.2;
}

.policy-content {
  line-height: 1.6;
  white-space: normal;
}

.uav-card,
.dipul-card,
.weather-card,
.location-card,
.tool-card {
  display: grid;
  gap: 10px;
}

.tool-card {
  position: relative;
  overflow: hidden;
  align-content: start;
  grid-template-rows: none;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: rgba(84, 94, 112, 0.18);
}

.uav-card {
  background:
    radial-gradient(circle at top right, rgba(84, 94, 112, 0.1), transparent 42%),
    rgba(255, 255, 255, 0.98);
}

.uav-card::before {
  background: #545e70;
}

.weather-card {
  background:
    radial-gradient(circle at top right, rgba(54, 136, 190, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 250, 252, 0.96));
}

.weather-card::before {
  background: #2f80b7;
}

.location-card::before {
  background: var(--accent);
}

.uav-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.uav-hint {
  color: var(--slate);
}

.weather-card {
  align-content: start;
}

.weather-value {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.2vw, 40px);
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
}

.weather-meta {
  color: var(--slate);
  font-size: 12px;
  line-height: 1.35;
}

.weather-details {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.weather-details span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(84, 94, 112, 0.1);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.weather-forecast {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 2px;
}

.weather-forecast span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(16, 19, 26, 0.06);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.25;
}

.weather-forecast strong {
  color: var(--ink);
  font-weight: 800;
}

.location-card {
  background:
    radial-gradient(circle at top right, rgba(255, 143, 0, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 244, 241, 0.96));
}

.location-shared-coords {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.location-shared-address {
  color: var(--slate);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dipul-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
}

.dipul-hint {
  color: var(--slate);
}

.dipul-frame-shell {
  border: 1px solid var(--mist);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  height: clamp(560px, 68vh, 860px);
  min-height: 560px;
}

.dipul-frame-shell iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.dipul-card {
  width: 100%;
}

.ghost.is-disabled,
.uav-actions .is-disabled,
.uav-actions a[aria-disabled='true'],
a[aria-disabled='true'].is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

.flight-capture-card.is-locked {
  background:
    radial-gradient(circle at top right, rgba(255, 224, 214, 0.75), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 243, 241, 0.96));
}

.flight-lock-panel {
  display: grid;
  gap: 18px;
}

.flight-lock-hero {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 118px;
  padding: 22px 24px 18px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(237, 199, 187, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.flight-lock-title {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.1;
  margin-bottom: 6px;
}

.flight-lock-copy {
  color: var(--ink-soft);
  font-size: 14px;
}

.flight-lock-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  justify-self: center;
  align-self: center;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 240, 236, 0.9));
  border: 1px solid rgba(237, 199, 187, 0.7);
  box-shadow: 0 16px 36px rgba(214, 163, 144, 0.12);
  font-size: 34px;
  line-height: 1;
}

.flight-lock-steps {
  display: grid;
  gap: 10px;
}

.flight-lock-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(16, 19, 26, 0.04);
  color: var(--ink);
}

.flight-lock-step-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #d83b36;
  box-shadow: 0 0 0 8px rgba(216, 59, 54, 0.1);
  flex: 0 0 auto;
}

.flight-lock-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@keyframes lockPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-1px) scale(1.006);
    opacity: 0.985;
  }
}

.profile-panel {
  position: fixed;
  right: 24px;
  top: 90px;
  width: min(760px, calc(100vw - 48px));
  max-height: calc(100vh - 120px);
  background: #fff;
  border: 1px solid var(--mist);
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(22, 28, 40, 0.18);
  padding: 18px;
  display: none;
  overflow: auto;
  overscroll-behavior: contain;
  z-index: 200;
}

.profile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 14, 20, 0.25);
  backdrop-filter: blur(2px);
  display: none;
  z-index: 150;
}

.profile-backdrop.open {
  display: block;
}

.profile-panel.open {
  display: block;
}

.profile-panel .profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.profile-close-button {
  width: auto;
  min-width: 0;
  min-height: 40px;
  padding: 8px 14px;
  flex: 0 0 auto;
  border-radius: 999px;
  line-height: 1.1;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.profile-identity > div {
  min-width: 0;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #a61d1d, #ff7b00 58%, #ffb347);
  color: #fff;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  flex: 0 0 auto;
}

.profile-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
  gap: 12px;
  margin-top: 16px;
}

.profile-resource {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(16, 19, 26, 0.08);
  border-radius: 12px;
  background: #f8f9fb;
  min-width: 0;
}

.profile-resource a {
  color: var(--accent-deep);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.profile-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 16px;
  margin-top: 16px;
}

.profile-column,
.profile-section {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.profile-section {
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(16, 19, 26, 0.08);
  border-radius: 14px;
  background: #fff;
}

.profile-upload-form {
  gap: 12px;
}

.profile-preview {
  border: 1px solid var(--mist);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  height: min(320px, 38vh);
}

.profile-preview img,
.profile-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.profile-empty {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 18px;
  color: var(--slate);
  text-align: center;
}

.profile-empty a {
  color: var(--accent-deep);
  font-weight: 700;
}

.profile-list li {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px;
}

.profile-list-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.profile-list-title {
  font-weight: 600;
  color: var(--ink);
}

.profile-list-meta {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink-soft);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-list-foot {
  display: flex;
  justify-content: flex-start;
}

.chart.mini {
  height: 120px;
}

.chart.mini .chart-bar {
  border-radius: 6px;
  background: rgba(198, 40, 40, 0.45);
}

.chart-labels {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--slate);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.stat-row .stat {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(16, 19, 26, 0.05);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(18, 21, 29, 0.06);
}

.stat-row .stat-value {
  font-size: 20px;
  font-weight: 700;
}

.stat-row .stat-label {
  font-size: 12px;
  color: var(--slate);
}

.chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  align-items: end;
  height: 160px;
  margin-top: 12px;
}

.chart-bar {
  background: linear-gradient(180deg, var(--accent), #ff8f00);
  border-radius: 12px;
  height: var(--h);
  animation: rise 1s ease;
}

@keyframes rise {
  from {
    height: 0;
  }
  to {
    height: var(--h);
  }
}

.table-card {
  background: var(--surface);
  border: 1px solid rgba(16, 19, 26, 0.05);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 24px);
  box-shadow: var(--shadow-soft), var(--shadow);
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search,
.input,
.select {
  border: 1px solid var(--mist);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 220px;
  font-size: 14px;
  background: #fff;
}

th,
td {
  text-align: left;
  padding: 10px 6px;
  font-size: 14px;
  border-bottom: 1px solid var(--mist);
}

tr:last-child td {
  border-bottom: none;
}

.progress {
  background: var(--mist);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--accent), #ffa66d);
  height: 100%;
}

.timeline {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 14px;
}

.metric {
  font-family: var(--font-display);
  font-size: 32px;
}

.flight-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.metric-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(16, 19, 26, 0.05);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 28px rgba(18, 21, 29, 0.06);
}

.metric-label {
  font-size: 13px;
  color: var(--slate);
}

.metric-value {
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.1;
  margin: 10px 0 6px;
}

.metric-note {
  color: var(--ink-soft);
  font-size: 13px;
}

.flight-meta-grid {
  align-items: start;
}

.type-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.type-option {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(16, 19, 26, 0.09);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 241, 240, 0.92));
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.type-option:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(14, 16, 22, 0.08);
}

.type-option.is-active {
  border-color: rgba(198, 40, 40, 0.35);
  background: linear-gradient(135deg, rgba(198, 40, 40, 0.1), rgba(255, 143, 0, 0.1) 78%, rgba(255, 255, 255, 0.96));
  box-shadow: 0 18px 34px rgba(198, 40, 40, 0.12);
}

.type-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.type-option-title {
  font-weight: 700;
  color: var(--ink);
}

.type-option-copy {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
}

.pipeline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: center;
}

.form-grid {
  display: grid;
  gap: 12px;
  width: 100%;
}

.form-grid > * {
  width: 100%;
  max-width: 100%;
}

.flight-entry-card {
  gap: 18px;
}

.flight-type-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.flight-type-guide-card {
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(16, 19, 26, 0.08);
}

.flight-type-guide-card.mission {
  background: linear-gradient(135deg, rgba(198, 40, 40, 0.09), rgba(255, 255, 255, 0.92));
}

.flight-type-guide-card.training {
  background: linear-gradient(135deg, rgba(255, 143, 0, 0.12), rgba(255, 255, 255, 0.94));
}

.guide-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.guide-copy {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.45;
}

.analytics-card {
  gap: 22px;
}

.analytics-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.analytics-kicker,
.analytics-chart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(198, 40, 40, 0.08);
  color: #8e1e1e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: stretch;
}

.analytics-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.analytics-stat,
.analytics-chart-card {
  border: 1px solid rgba(16, 19, 26, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 32px rgba(14, 16, 22, 0.06);
}

.analytics-stat {
  display: grid;
  gap: 8px;
  padding: 18px;
  align-content: center;
}

.analytics-stat.primary {
  background:
    radial-gradient(circle at top right, rgba(255, 143, 0, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(198, 40, 40, 0.09), rgba(255, 255, 255, 0.96));
  border-color: rgba(198, 40, 40, 0.14);
}

.analytics-stat-label,
.analytics-stat-note {
  color: var(--slate);
  font-weight: 700;
}

.analytics-stat-label {
  font-size: 13px;
}

.analytics-stat-note {
  font-size: 12px;
  line-height: 1.35;
}

.analytics-stat-value {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.analytics-chart-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  min-width: 0;
}

.analytics-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.analytics-chart-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.analytics-chart-shell {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.analytics-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 240px;
  overflow: visible;
}

.analytics-grid-line {
  stroke: rgba(84, 94, 112, 0.16);
  stroke-width: 1;
}

.analytics-grid-label,
.analytics-bottom-label {
  fill: var(--slate);
  font-family: var(--font-body);
  font-size: 12px;
}

.analytics-bottom-label {
  text-anchor: middle;
  font-weight: 700;
}

.analytics-area {
  fill: url(#pilot-area);
}

.analytics-bar {
  fill: rgba(198, 40, 40, 0.18);
}

.analytics-line {
  fill: none;
  stroke: url(#pilot-line);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.analytics-dot {
  fill: #fff;
  stroke: #d65656;
  stroke-width: 4;
}

.analytics-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}

.analytics-legend-item {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8f9fb;
  border: 1px solid rgba(16, 19, 26, 0.06);
}

.analytics-legend-month {
  color: var(--slate);
  font-size: 12px;
}

.analytics-empty {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 240px;
  text-align: center;
  color: var(--slate);
}

.analytics-empty-title {
  color: var(--ink);
  font-weight: 800;
}

.form-section-title {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-top: 4px;
}

.flight-form-grid {
  display: grid;
  gap: 12px;
}

.flight-form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
  margin-bottom: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.field-hint {
  font-size: 12px;
  color: var(--slate);
}

.flight-form-feedback {
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(198, 40, 40, 0.12);
  background: linear-gradient(180deg, rgba(198, 40, 40, 0.08), rgba(255, 255, 255, 0.98));
  color: var(--accent);
  font-size: 14px;
  line-height: 1.45;
}

.textarea {
  min-height: 110px;
  resize: vertical;
}

.flight-form-actions,
.table-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-form {
  margin-top: 10px;
}

.compact-button {
  padding: 8px 12px;
  font-size: 13px;
}

.filter-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(16, 19, 26, 0.08);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.filter-pill:hover,
.filter-pill.active {
  border-color: rgba(198, 40, 40, 0.25);
  background: rgba(198, 40, 40, 0.08);
  color: var(--ink);
}

.uav-card,
.notice-card,
.metric-card,
.table-card,
.stat-row .stat {
  position: relative;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

.map-embed {
  border: 1px solid var(--mist);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  height: 220px;
}

.map-embed,
.leaflet-container {
  z-index: 1;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 14, 20, 0.55);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-width: min(1100px, 96vw);
  width: 100%;
  max-height: 85vh;
  overflow: auto;
}

#modal-map {
  height: 220px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--mist);
}

.modal-body {
  display: grid;
  gap: 18px;
  padding: 18px 22px 24px;
}

.flight-preview-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.flight-preview-actions > * {
  display: inline-flex;
  align-items: center;
  flex: 0 0 320px;
  min-height: 56px;
  width: 320px;
  padding-top: 0;
  padding-bottom: 0;
  justify-content: center;
  text-align: center;
  line-height: 1;
}

.flight-preview-shell {
  position: relative;
  overflow: hidden;
  min-height: min(72vh, 900px);
}

.flight-preview-frame {
  width: 100%;
  min-height: min(72vh, 900px);
  border: 0;
  border-radius: 18px;
  background: transparent;
}

.flight-preview-loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 245, 243, 0.96));
  border: 1px solid rgba(16, 19, 26, 0.06);
}

.flight-preview-loader.is-hidden {
  display: none;
}

.flight-preview-loader-card {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  width: min(100%, 320px);
}

.flight-preview-loader-drone {
  width: 100%;
  height: 84px;
  opacity: 0.92;
}

.flight-preview-loader .footer-drone-visual {
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  animation: flight-loader-hover 1.15s ease-in-out infinite alternate;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.modal-close {
  border: 1px solid var(--mist);
  border-radius: 999px;
  padding: 6px 12px;
  background: #fff;
  cursor: pointer;
}

.address-line {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
  background: var(--surface-alt);
  border-radius: 10px;
  padding: 8px 10px;
}

.map-embed img {
  display: block;
  width: 100%;
  height: auto;
}

.map-disabled {
  pointer-events: none;
  opacity: 0.2;
  filter: grayscale(1);
}

.footer {
  padding: 24px var(--page-padding) 40px;
  color: var(--slate);
}

.footer a {
  color: var(--ink);
  text-decoration: none;
}

.footer-drone-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.footer-drone-meta {
  display: grid;
  gap: 8px;
}

.footer-brand {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.footer-drone-scene {
  position: relative;
  width: 100%;
  height: 92px;
  overflow: hidden;
}

.footer-drone-visual {
  position: absolute;
  top: 8px;
  left: -110px;
  width: 88px;
  height: 96px;
  z-index: 2;
  animation: footer-drone-pass 14s linear infinite;
}

.footer-drone-head {
  position: relative;
  width: 22px;
  height: 16.5px;
  margin: 2.75px auto 0;
  border-radius: 4.4px 4.4px 0 0;
  background: #bde9ee;
  box-shadow: inset 5.5px 0 #b0dbe2;
}

.footer-drone-head::before {
  content: "";
  position: absolute;
  top: -2.75px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 8.25px;
  height: 2.75px;
  border-radius: 5.5px 5.5px 0 0;
  background: #d0f1f6;
}

.footer-drone-body {
  position: relative;
  width: 33px;
  height: 22px;
  border-radius: 4.4px;
  background: #d0f1f6;
  box-shadow: inset 11px 0 #bde9ee;
}

.footer-drone-eye {
  position: absolute;
  top: 3.85px;
  right: 4.4px;
  width: 13.2px;
  height: 13.2px;
  border-radius: 50%;
  background: #1c273c;
  box-shadow:
    inset 1.65px 0 #516e74,
    inset 4.4px -1.1px #243a4b,
    inset 0.55px 0 0 3.85px #2b4553;
}

.footer-drone-eye::before {
  content: "";
  position: absolute;
  left: 3.85px;
  bottom: 3.85px;
  width: 1.65px;
  height: 1.65px;
  border-radius: 50%;
  background: #fff;
}

.footer-drone-blade {
  position: absolute;
}

.footer-drone-blade::before,
.footer-drone-blade::after,
.footer-drone-foot::before,
.footer-drone-foot::after {
  content: "";
  display: block;
}

.footer-drone-blade-part {
  position: absolute;
  top: 2.2px;
  left: -10.45px;
  width: 27.5px;
  height: 3.3px;
  border-radius: 3.3px;
  background: #d0f1f6;
  animation: footer-drone-rotate 0.1s linear infinite alternate;
}

.footer-drone-blade-one {
  left: -14.85px;
  bottom: 1.65px;
  z-index: 1;
}

.footer-drone-blade-one::before,
.footer-drone-blade-one::after {
  background: #91d1dc;
}

.footer-drone-blade-one::before {
  width: 6.6px;
  height: 11px;
  border-radius: 6.6px 6.6px 0 0;
}

.footer-drone-blade-one::after {
  width: 24.75px;
  height: 6.6px;
  border-radius: 0 6.6px 6.6px 6.6px;
}

.footer-drone-blade-two {
  left: -34.1px;
  bottom: 2.75px;
  z-index: -1;
}

.footer-drone-blade-two::before,
.footer-drone-blade-two::after,
.footer-drone-blade-four::before,
.footer-drone-blade-four::after {
  background: #87bfc8;
}

.footer-drone-blade-two::before,
.footer-drone-blade-four::before {
  width: 5.5px;
  height: 11px;
  border-radius: 6.6px 6.6px 0 0;
}

.footer-drone-blade-two::after,
.footer-drone-blade-four::after {
  width: 41.25px;
  height: 5.5px;
  border-radius: 0 6.6px 6.6px 6.6px;
}

.footer-drone-blade-three {
  right: -14.85px;
  bottom: 1.65px;
  transform: scaleX(-1);
  z-index: -2;
}

.footer-drone-blade-three::before,
.footer-drone-blade-three::after {
  background: #6aa7b0;
}

.footer-drone-blade-three::before {
  width: 6.6px;
  height: 11px;
  border-radius: 6.6px 6.6px 0 0;
}

.footer-drone-blade-three::after {
  width: 24.75px;
  height: 6.6px;
  border-radius: 0 6.6px 6.6px 6.6px;
}

.footer-drone-blade-four {
  right: -34.1px;
  bottom: 2.75px;
  transform: scaleX(-1);
  z-index: -1;
}

.footer-drone-foots {
  position: relative;
}

.footer-drone-foot {
  position: absolute;
  top: 0;
}

.footer-drone-foot-one {
  left: 50%;
  width: 49.5px;
  height: 3.3px;
  transform: translateX(-50%);
  border-radius: 3.3px 3.3px 0 0;
  background: #b0dbe2;
}

.footer-drone-foot-one::before,
.footer-drone-foot-one::after {
  position: absolute;
  top: 3.3px;
  width: 3.3px;
  height: 5.5px;
  border-radius: 0 0 3.3px 3.3px;
  background: #b0dbe2;
}

.footer-drone-foot-one::before {
  left: 0;
}

.footer-drone-foot-one::after {
  right: 0;
}

.footer-drone-foot-two,
.footer-drone-foot-three {
  width: 13.75px;
  height: 3.3px;
  border-radius: 3.3px 3.3px 3.3px 0;
}

.footer-drone-foot-two {
  left: 2.75px;
  background: #d0f1f6;
}

.footer-drone-foot-two::before,
.footer-drone-foot-three::before {
  position: absolute;
  top: 3.3px;
  width: 3.3px;
  height: 5.5px;
  border-radius: 0 0 3.3px 3.3px;
}

.footer-drone-foot-two::before {
  left: 0;
  background: #d0f1f6;
}

.footer-drone-foot-three {
  left: 11px;
  z-index: -1;
  background: #89bfc8;
}

.footer-drone-foot-three::before {
  right: 0;
  background: #89bfc8;
}

@keyframes footer-drone-pass {
  0% {
    transform: translateX(0) translateY(10px) rotate(-3deg);
  }
  25% {
    transform: translateX(32vw) translateY(-2px) rotate(1deg);
  }
  50% {
    transform: translateX(62vw) translateY(8px) rotate(-2deg);
  }
  75% {
    transform: translateX(92vw) translateY(-4px) rotate(2deg);
  }
  100% {
    transform: translateX(calc(100vw + 180px)) translateY(10px) rotate(-3deg);
  }
}

@keyframes flight-loader-hover {
  from {
    transform: translateX(-50%) translateY(0) rotate(-2deg);
  }
  to {
    transform: translateX(-50%) translateY(8px) rotate(2deg);
  }
}

@keyframes login-drone-hover {
  from {
    transform: translateX(-50%) translateY(-6px) scale(1.85) rotate(-2deg);
  }
  to {
    transform: translateX(-50%) translateY(8px) scale(1.85) rotate(2deg);
  }
}

@keyframes login-drone-hover-mobile {
  from {
    transform: translateX(-50%) translateY(-4px) scale(1.18) rotate(-2deg);
  }
  to {
    transform: translateX(-50%) translateY(7px) scale(1.18) rotate(2deg);
  }
}

@keyframes footer-drone-rotate {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
  }

  .desktop-nav-shell {
    width: 100%;
    justify-content: space-between;
  }

  .top-nav-desktop {
    justify-content: flex-start;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero-right {
    order: 2;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  main {
    gap: 28px;
    padding-bottom: 48px;
  }

  .topbar {
    position: relative;
    z-index: auto;
    align-items: flex-start;
    padding-top: 18px;
    padding-bottom: 18px;
    padding-right: 88px;
  }

  .brand-title {
    font-size: 18px;
  }

  .brand-subtitle,
  .card-subtitle,
  .hero-copy,
  .card-body,
  .address-line,
  .readiness-value,
  .readiness-label {
    font-size: 15px;
    line-height: 1.45;
  }

  .card-title,
  .stat-row .stat-value,
  .stat-value {
    font-size: 19px;
    line-height: 1.2;
  }

  .card {
    gap: 14px;
    padding: 16px;
    border-radius: 20px;
  }

  .section {
    gap: 18px;
  }

  .section-header {
    gap: 10px;
  }

  .section-header h2 {
    margin-bottom: 4px;
  }

  .section-header p {
    font-size: 15px;
    line-height: 1.45;
    color: var(--ink-soft);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    gap: 14px;
  }

  .readiness-tools-grid {
    grid-template-columns: 1fr;
  }

  .readiness-tools-grid > .card {
    padding: 16px;
  }

  .weather-forecast {
    grid-template-columns: 1fr;
  }

  .login-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .login-hero-card,
  .login-card {
    min-height: auto;
  }

  .login-hero-card {
    gap: 16px;
  }

  .login-drone-stage {
    min-height: 170px;
  }

  .login-drone-stage .footer-drone-visual {
    left: 50%;
    top: 72px;
    transform: translateX(-50%) scale(1.18);
    animation-name: login-drone-hover-mobile;
  }

  .analytics-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .analytics-metrics {
    grid-template-columns: 1fr;
  }

  .analytics-chart-card,
  .analytics-stat {
    padding: 16px;
  }

  .readiness-body {
    gap: 12px;
  }

  .readiness-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .readiness-actions,
  .uav-actions,
  .flight-form-actions,
  .table-actions {
    gap: 8px;
  }

  .uav-actions .ghost,
  .flight-form-actions .ghost,
  .flight-form-actions .primary {
    width: 100%;
    justify-content: center;
  }

  .dipul-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .dipul-frame-shell {
    height: min(72vh, 640px);
    min-height: 520px;
  }

  .map-embed {
    height: 180px;
  }

  .flight-capture-card,
  #flight-log {
    scroll-margin-top: 92px;
  }

  .stat-label,
  .card-footnote,
  .eyebrow {
    font-size: 12px;
  }

  .primary,
  .ghost,
  .input,
  .select,
  .textarea {
    font-size: 15px;
  }

  .menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(12, 14, 20, 0.24);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    position: absolute;
    right: 24px;
    top: 24px;
    z-index: 1005;
  }

  body.menu-open .menu-toggle {
    background: #1e2b3d;
    border-color: rgba(30, 43, 61, 0.14);
  }

  body.menu-open .menu-toggle-lines span {
    background: #ffffff;
  }

  body.menu-open .menu-toggle-lines span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.menu-open .menu-toggle-lines span:nth-child(2) {
    opacity: 0;
  }

  body.menu-open .menu-toggle-lines span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .menu-panel {
    display: flex;
    position: fixed;
    left: 12px;
    right: 12px;
    top: 88px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid rgba(16, 19, 26, 0.08);
    border-radius: 24px;
    box-shadow: 0 24px 54px rgba(12, 14, 20, 0.16);
    z-index: 1004;
    isolation: isolate;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }

  .desktop-nav-shell {
    display: none;
  }

  .menu-panel-head,
  .menu-panel .nav-item,
  .menu-panel .profile-toggle,
  .menu-panel .ghost {
    position: relative;
    z-index: 1;
    opacity: 1;
  }

  .menu-panel-head {
    display: grid;
    gap: 4px;
  }

  .menu-panel-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--slate);
  }

  .menu-panel-title {
    font-family: var(--font-display);
    font-size: 20px;
    line-height: 1.05;
    color: var(--ink);
  }

  .top-nav {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .section-actions {
    width: 100%;
  }

  .top-actions,
  .menu-account {
    justify-content: flex-start;
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(16, 19, 26, 0.08);
  }

  .menu-panel .nav-item,
  .menu-panel .ghost,
  .menu-panel .profile-toggle {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }

  .menu-panel .nav-item {
    display: grid;
    align-content: end;
    min-height: 72px;
    padding: 14px;
    border: 1px solid rgba(16, 19, 26, 0.06);
    border-radius: 18px;
    background:
      radial-gradient(circle at top right, rgba(255, 224, 214, 0.55), transparent 38%),
      linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }

  .menu-panel .nav-item.active {
    border-color: rgba(30, 43, 61, 0.14);
    background:
      radial-gradient(circle at top right, rgba(255, 224, 214, 0.72), transparent 38%),
      linear-gradient(180deg, #ffffff 0%, #f3f6fa 100%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.85),
      0 12px 24px rgba(12, 14, 20, 0.08);
  }

  .menu-panel .profile-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    min-height: 62px;
    padding: 10px 12px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f3f6fa 100%);
    border: 1px solid rgba(16, 19, 26, 0.08);
  }

  .menu-panel .ghost {
    display: flex;
    align-items: center;
    min-height: 50px;
    border-radius: 16px;
    padding: 0 16px;
  }

  .menu-profile-initials {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #a61d1d, #ff7b00 58%, #ffb347);
    color: #fff;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
  }

  .menu-profile-copy {
    display: grid;
    gap: 2px;
  }

  .menu-profile-copy strong {
    color: var(--ink);
    font-size: 15px;
    line-height: 1.15;
  }

  .menu-profile-copy span {
    color: var(--slate);
    font-size: 12px;
    line-height: 1.25;
  }

  .menu-logout {
    font-size: 15px;
    font-weight: 700;
  }

  .profile-backdrop {
    backdrop-filter: blur(8px);
  }

  .profile-panel {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 12px;
    width: auto;
    max-width: none;
    max-height: min(88vh, 820px);
    border-radius: 22px;
    padding: 16px;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  .profile-panel .profile-head {
    align-items: flex-start;
  }

  .profile-identity {
    align-items: flex-start;
  }

  .profile-avatar {
    display: grid;
  }

  .profile-summary-grid,
  .profile-content-grid {
    grid-template-columns: 1fr;
  }

  .profile-preview {
    height: 240px;
  }

  .profile-upload-form .primary {
    width: 100%;
  }

  .profile-panel .profile-close-button {
    width: auto;
    min-width: 0;
    min-height: 38px;
    padding: 8px 12px;
  }

  body.menu-open .menu-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  body.menu-open .menu-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.menu-open .topbar {
    z-index: auto;
    isolation: auto;
  }

  .table-card {
    overflow-x: auto;
  }

  table {
    min-width: 560px;
  }

  .hero-stats {
    gap: 12px;
  }

  .flight-lock-hero {
    grid-template-columns: 1fr;
  }

  .flight-type-guide,
  .flight-form-grid.two,
  .type-selector {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-header,
  .modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .modal-body {
    gap: 14px;
    padding-bottom: 18px;
  }

  .flight-preview-actions {
    gap: 8px;
  }

  .flight-preview-actions > * {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    min-height: 52px;
  }

  .footer {
    padding-bottom: 28px;
  }

  .footer-drone-visual {
    top: 4px;
  }
}

@media (max-width: 600px) {
  h1 {
    font-size: clamp(28px, 9vw, 40px);
  }

  .hero-copy {
    font-size: 16px;
  }

  .card-header,
  .card-footer,
  .readiness-header,
  .profile-list-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .flight-lock-actions {
    width: 100%;
    flex-direction: column;
  }

  .section-header {
    align-items: flex-start;
  }

  .analytics-head,
  .analytics-chart-head {
    align-items: flex-start;
  }

  .analytics-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-actions,
  .uav-actions {
    width: 100%;
  }

  .stat-row {
    grid-template-columns: 1fr;
  }

  .chart-labels {
    grid-template-columns: repeat(3, 1fr);
  }

  .list li {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
  }

  .flight-log-item-side {
    width: 100%;
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-items: start;
  }

  .flight-log-item-side .ghost {
    min-width: 112px;
    min-height: 44px;
    padding-left: 14px;
    padding-right: 14px;
    justify-content: center;
  }

}

@media (max-width: 480px) {
  .brand {
    gap: 10px;
  }

  .brand-mark {
    height: 40px;
    width: 40px;
    border-radius: 10px;
  }

  .brand-title {
    font-size: 17px;
  }

  .hero-actions,
  .section-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary,
  .ghost {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  table {
    min-width: 520px;
  }

  .filter-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .menu-panel {
    left: 8px;
    right: 8px;
    top: 84px;
    padding: 14px;
  }

  .top-nav {
    grid-template-columns: 1fr;
  }

  .menu-panel-title {
    font-size: 18px;
  }

  .menu-panel .nav-item {
    min-height: 64px;
    font-size: 16px;
  }

  .profile-panel {
    left: 8px;
    right: 8px;
    bottom: 8px;
    max-height: 82vh;
    border-radius: 20px;
    padding: 12px;
  }

  .login-ms-button,
  .login-form .ghost {
    width: 100%;
    justify-content: center;
  }

  .profile-panel .profile-close-button {
    width: auto;
    min-width: 0;
    max-width: 128px;
    padding: 8px 12px;
    justify-content: center;
  }

  .brand-title {
    font-size: 17px;
  }

  .brand-subtitle,
  .card-subtitle,
  .hero-copy,
  .card-body,
  .address-line,
  .readiness-value,
  .readiness-label,
  .primary,
  .ghost,
  .input,
  .select,
  .textarea {
    font-size: 14px;
  }

  .card-title,
  .stat-row .stat-value,
  .stat-value {
    font-size: 18px;
  }

}

@media (max-width: 640px) {
  .table-card {
    overflow: visible;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  table {
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 14px;
  }

  tr {
    border: 1px solid rgba(16, 19, 26, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 34px rgba(14, 16, 22, 0.08);
    padding: 10px 14px;
  }

  td {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(230, 230, 234, 0.8);
  }

  td:last-child {
    border-bottom: none;
  }

  td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 700;
    color: var(--slate);
    flex: 0 0 96px;
  }

  .table-actions {
    justify-content: flex-end;
  }
}
