:root {
  --bg: #0d0a10;
  --bg-soft: #1a121f;
  --card: rgba(27, 18, 31, 0.84);
  --line: rgba(255, 160, 220, 0.26);
  --text: #ffeef8;
  --muted: #d7b8cb;
  --accent: #ff5fb2;
  --accent-2: #ff9fd6;
  --danger: #ff6ea6;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.56);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Nunito", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 18% 10%, #4b1737 0%, transparent 42%),
    radial-gradient(circle at 82% 0%, #5b214a 0%, transparent 30%),
    linear-gradient(160deg, var(--bg) 0%, #130f16 42%, #1a111f 100%);
}

.backdrop {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 160, 220, 0.12) 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.4rem;
  backdrop-filter: blur(6px);
  background: rgba(17, 10, 20, 0.8);
  border-bottom: 1px solid var(--line);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.auth-status {
  color: var(--muted);
  font-size: 0.82rem;
  font-family: "Quicksand", sans-serif;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 0.8rem;
  font-family: "Quicksand", sans-serif;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 0.2rem;
  font-size: clamp(1.3rem, 3vw, 2.1rem);
}

.layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.panel-header p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.stacked-form {
  margin-top: 1rem;
  display: grid;
  gap: 0.65rem;
}

label {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

input,
select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
}

input:focus,
select:focus {
  outline: 2px solid rgba(72, 214, 177, 0.35);
  border-color: var(--accent);
}

.form-actions {
  display: flex;
  gap: 0.5rem;
}

.btn {
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff5fb2, #ff85ca);
  color: #2b1020;
  padding: 0.52rem 0.8rem;
  font-family: "Quicksand", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.07);
}

.btn.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.list {
  margin-top: 1rem;
  display: grid;
  gap: 0.6rem;
  max-height: 38vh;
  overflow: auto;
}

.item {
  border: 1px solid rgba(255, 160, 220, 0.25);
  border-radius: 12px;
  padding: 0.72rem;
  background: rgba(255, 255, 255, 0.035);
  display: grid;
  gap: 0.4rem;
}

.item.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 95, 178, 0.3);
}

.item-line {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
}

.item-main {
  font-weight: 700;
}

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

.item-actions {
  display: flex;
  gap: 0.35rem;
}

.btn.small {
  padding: 0.35rem 0.55rem;
  font-size: 0.72rem;
}

.btn-danger {
  background: linear-gradient(135deg, #ff8d78, var(--danger));
  color: #330707;
}

.selection {
  margin-top: 0.7rem;
  color: var(--accent-2);
  font-family: "Quicksand", sans-serif;
  font-size: 0.86rem;
}

.icao-panel {
  margin-top: 1rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.8rem;
}

.notification-panel {
  margin-top: 1rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.8rem;
}

.notification-help {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.notification-list {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.45rem;
  max-height: 34vh;
  overflow: auto;
}

.notification-item {
  border: 1px solid rgba(168, 191, 216, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.5rem 0.6rem;
  display: grid;
  gap: 0.35rem;
}

.notification-meta {
  color: var(--muted);
  font-size: 0.76rem;
  font-family: "Space Mono", monospace;
}

.notification-message {
  white-space: pre-wrap;
  font-size: 0.86rem;
  line-height: 1.35;
}

.notification-photo {
  color: var(--accent-2);
  text-decoration: none;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.notification-photo:hover {
  text-decoration: underline;
}

.notification-empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 0.6rem;
  font-size: 0.84rem;
}

.inline-form {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.45rem;
}

.tags {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  border: 1px solid rgba(255, 160, 220, 0.45);
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  font-family: "Quicksand", sans-serif;
  font-size: 0.78rem;
  color: #ffd7ef;
  background: rgba(255, 95, 178, 0.12);
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.tag-active {
  border-color: rgba(255, 133, 202, 0.6);
  color: #ffe3f4;
  background: rgba(255, 133, 202, 0.2);
}

.tag-inactive {
  border-color: rgba(200, 128, 170, 0.45);
  color: #efc3df;
  background: rgba(200, 128, 170, 0.12);
}

.tag-status {
  padding: 0.04rem 0.35rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tag button {
  border: none;
  background: transparent;
  color: #ffd7ef;
  cursor: pointer;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  opacity: 0;
  transform: translateY(8px);
  background: rgba(24, 12, 26, 0.95);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-family: "Quicksand", sans-serif;
  font-size: 0.78rem;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  background: rgba(11, 6, 14, 0.78);
  backdrop-filter: blur(4px);
}

.login-overlay.visible {
  display: grid;
}

.login-card {
  width: min(420px, 92vw);
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(22, 14, 28, 0.95);
  box-shadow: var(--shadow);
  padding: 1rem;
  display: grid;
  gap: 0.7rem;
}

.login-card p {
  color: var(--muted);
}

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

  .list {
    max-height: none;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
