/* ============================================================
   PILOTAGENDA — globals.css
   Base reset, CSS variables, typography, shared utilities
   ============================================================ */

/* ── Google Fonts ── */
@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600&family=Barlow+Condensed:wght@400;600;700&display=swap");

/* ── Design Tokens ── */
:root {
  /* Colors */
  --black: #000000;
  --black-soft: #0a0a0a;
  --black-card: #111111;
  --black-border: #1e1e1e;
  --black-hover: #1a1a1a;
  --yellow: #fee500;
  --yellow-dim: #d4c000;
  --white: #ffffff;
  --white-muted: #9a9a9a;
  --white-dim: #4a4a4a;
  --red: #ff3b30;
  --green: #30d158;

  /* Typography */
  --font-display: "Bebas Neue", sans-serif;
  --font-sub: "Barlow Condensed", sans-serif;
  --font-body: "DM Sans", sans-serif;

  /* Spacing */
  --nav-height: 64px;
  --radius: 6px;
  --radius-lg: 12px;

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.25s;
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--black);
  color: var(--white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}
button {
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
  background: none;
}
input,
select,
textarea {
  font-family: var(--font-body);
}
ul,
ol {
  list-style: none;
}
img {
  display: block;
  max-width: 100%;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--black-soft);
}
::-webkit-scrollbar-thumb {
  background: var(--black-border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--white-dim);
}

/* ── Utility Classes ── */
.text-yellow {
  color: var(--yellow);
}
.text-muted {
  color: var(--white-muted);
}
.text-small {
  font-size: 12px;
}
.text-center {
  text-align: center;
}

.flex {
  display: flex;
}
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gap-8 {
  gap: 8px;
}
.gap-12 {
  gap: 12px;
}
.gap-16 {
  gap: 16px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-sub);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--yellow);
  color: var(--black);
}
.btn-primary:hover {
  background: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(254, 229, 0, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--white-muted);
  border: 1px solid var(--black-border);
}
.btn-ghost:hover {
  border-color: var(--white-dim);
  color: var(--white);
}

.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(255, 59, 48, 0.3);
}
.btn-danger:hover {
  background: rgba(255, 59, 48, 0.1);
  border-color: var(--red);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 12px;
}
.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}

/* ── Cards ── */
.card {
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-sub);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge-yellow {
  background: rgba(254, 229, 0, 0.12);
  color: var(--yellow);
}
.badge-green {
  background: rgba(48, 209, 88, 0.12);
  color: var(--green);
}
.badge-red {
  background: rgba(255, 59, 48, 0.12);
  color: var(--red);
}
.badge-gray {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white-muted);
}

/* ── Page Header ── */
.page-header {
  margin-bottom: 32px;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: 40px;
  letter-spacing: 0.04em;
  line-height: 1;
}
.page-header p {
  margin-top: 6px;
  color: var(--white-muted);
  font-size: 14px;
}

/* ── Modal Overlay ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform var(--dur) var(--ease);
}
.modal-overlay.active .modal {
  transform: translateY(0);
}
.modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h2 {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.04em;
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white-muted);
  background: var(--black-border);
  font-size: 16px;
  transition: all var(--dur) var(--ease);
}
.modal-close:hover {
  background: var(--black-hover);
  color: var(--white);
}
.modal-body {
  padding: 24px;
}
.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ── Form ── */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-sub);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white-muted);
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  background: var(--black-soft);
  border: 1px solid var(--black-border);
  border-radius: var(--radius);
  color: var(--white);
  padding: 11px 14px;
  font-size: 14px;
  transition: border-color var(--dur) var(--ease);
  appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--yellow);
}
.form-control::placeholder {
  color: var(--white-dim);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Toast Notification ── */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-left: 3px solid var(--yellow);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 14px;
  z-index: 9999;
  transform: translateX(120%);
  transition: transform 0.4s var(--ease);
  max-width: 320px;
}
.toast.show {
  transform: translateX(0);
}
.toast.toast-error {
  border-left-color: var(--red);
}
.toast.toast-success {
  border-left-color: var(--green);
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--black-border);
  margin: 24px 0;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--white-muted);
}
.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}
.empty-state h3 {
  font-family: var(--font-sub);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 8px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .page-header h1 {
    font-size: 32px;
  }
}
