/* ═══════════════════════════════════════════════════════════════
   AquitAir — Crew Center Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* --- Reset des styles par défaut des navigateurs --- */

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

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

:root {
  /* ── AquitAir brand palette ───────────────────────────────────── */
  --aq-navy:       #0e1c2f;   /* deepest navy background            */
  --aq-navy-2:     #122338;   /* card/panel background              */
  --aq-navy-3:     #1a3050;   /* elevated surface / hover           */
  --aq-red:        #7A1E2C;   /* primary brand red                  */
  --aq-red-dark:   #8b1020;   /* darker red for gradients           */
  --aq-red-light:  #8f3341;   /* lighter red for hover states       */
  --aq-gold:       #d4a44c;   /* subtle gold accent (stripe)        */

  /* ── Semantic aliases ─────────────────────────────────────────── */
  --bg:        var(--aq-navy);
  --bg2:       var(--aq-navy-2);
  --bg3:       var(--aq-navy-3);
  --border:    rgba(255,255,255,0.09);
  --accent:    var(--aq-red);
  --accent2:   var(--aq-red-light);
  --danger:    #ef4444;
  --success:   #22c55e;
  --warning:   #f59e0b;
  --text:      #edf2f7;
  --text-muted:#8fa3b8;
  --radius:    10px;
  --sidebar-w: 240px;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ─── UTILS ──────────────────────────────────────────────────── */
.hidden       { display: none !important; }
.active       { display: flex !important; justify-content: center;}
.text-center  { text-align: center; }

/* ─── PAGE ───────────────────────────────────────────────────── */
.page { width: 100%; min-height: 100vh; }

/* ═══════════════════════════════════════════════════ LOGIN ═════ */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, rgba(139,16,32,0.32) 0%, transparent 70%), var(--bg);
}

.login-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

.login-logo img {
  height: 56px;
  object-fit: contain;
}

.login-logo h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.login-logo p {
  font-size: .85rem;
  color: var(--text-muted);
  text-align: center;
}

/* Form */
#form-login {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group i {
  position: absolute;
  left: .85rem;
  color: var(--text-muted);
  font-size: .85rem;
  pointer-events: none;
}

.input-group input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: .65rem .75rem .65rem 2.25rem;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
}

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

.error-msg {
  font-size: .82rem;
  color: var(--danger);
  background: #ef444415;
  border: 1px solid #ef444430;
  border-radius: var(--radius);
  padding: .5rem .75rem;
}

.forgot-link {
  font-size: .82rem;
  color: var(--text-muted);
  text-align: center;
  text-decoration: none;
  transition: color .2s;
  /* Button reset — used as <button> in the crew center */
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  padding: 0;
}

.forgot-link:hover { color: var(--accent2); }

/* ── Password-reset success message ────────────────────────────────────── */
.cc-success-msg {
  font-size: .82rem;
  color: var(--success);
  background: #22c55e15;
  border: 1px solid #22c55e30;
  border-radius: var(--radius);
  padding: .5rem .75rem;
}

/* ── Password strength bar ─────────────────────────────────────────────── */
.cc-strength-bar-wrap {
  height: 4px;
  background: var(--bg3);
  border-radius: 2px;
  overflow: hidden;
  margin-top: -4px;   /* tucks just below the input */
}

.cc-strength-bar {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width .3s, background .3s;
}

.cc-strength-bar.weak   { width: 33%; background: var(--danger); }
.cc-strength-bar.medium { width: 66%; background: var(--warning); }
.cc-strength-bar.strong { width: 100%; background: var(--success); }

/* ═══════════════════════════════════════════════ DASHBOARD ═════ */
#page-dashboard {
  display: flex;
  flex-direction: row;
}

/* ─── SIDEBAR ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
}

.sidebar-logo {
  display: flex;
  justify-content: center;
  padding: 0 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo img {
  height: 40px;
  object-fit: contain;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1rem .75rem;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .9rem;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s, color .18s;
  text-align: left;
  width: 100%;
}

.nav-item:hover {
  background: var(--bg3);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent);
  color: #fff;
  display: flex !important;
}

/* Sidebar footer */
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem .75rem .75rem;
  border-top: 1px solid var(--border);
  flex-direction: column;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}

#sidebar-name {
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-badge {
  font-size: .72rem;
  color: var(--text-muted);
}

.btn-download-tracker {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .5rem .75rem;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, opacity .2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-download-tracker:hover {
  opacity: .85;
}

.btn-download-tracker i {
  flex-shrink: 0;
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: .4rem;
  border-radius: 6px;
  transition: color .2s, background .2s;
  flex-shrink: 0;
}

.btn-logout:hover {
  color: var(--danger);
  background: #ef444418;
}

/* ─── MAIN WRAPPER ───────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── TOPBAR ─────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 58px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar h2 {
  font-size: 1rem;
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.clock {
  font-size: .82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .4rem;
}

.topbar-user {
  font-size: .85rem;
  font-weight: 600;
  color: #f0c8cc;
}

/* ─── MAIN CONTENT ───────────────────────────────────────────── */
.main-content {
  padding: 1.5rem;
  flex: 1;
}

.section {
  flex-direction: column;
  gap: 1.25rem;
}

/* ─── CARDS ──────────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.card-header {
  padding: .9rem 1.25rem;
  font-size: .88rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
}

.card-header i { color: var(--accent2); }

/* ─── WELCOME CARD ───────────────────────────────────────────── */
.welcome-card {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
}

.welcome-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .3rem;
}

.welcome-text p {
  font-size: .85rem;
  color: var(--text-muted);
}

.welcome-logo {
  color: var(--accent);
  opacity: .4;
}

.discord-card-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.discord-card-copy {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  max-width: 720px;
}

.discord-card-copy h3 {
  font-size: 1rem;
  font-weight: 700;
}

.discord-card-copy p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.discord-status-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: .35rem .7rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.discord-status-pill.linked {
  color: #86efac;
  background: rgba(34, 197, 94, .14);
  border-color: rgba(34, 197, 94, .28);
}

.discord-status-pill.unlinked {
  color: #fcd34d;
  background: rgba(245, 158, 11, .14);
  border-color: rgba(245, 158, 11, .28);
}

.discord-meta {
  min-height: 1rem;
  font-size: .8rem;
  color: var(--accent2);
}

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

/* ─── STATS GRID ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: .75rem;
  color: var(--text-muted);
}

/* ─── TABLE ──────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
}

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

.data-table th {
  padding: .65rem 1rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

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

.data-table tbody tr:hover {
  background: var(--bg3);
}

/* ─── PAGINATION ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 1rem 1.25rem;
  flex-wrap: wrap;
}

.active-page {
  background: var(--aq-red) !important;
  color: #fff !important;
  border-color: var(--aq-red) !important;
}

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: .6rem 1.25rem;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
}

.btn-primary:hover  { background: var(--accent2); }
.btn-primary:active { transform: scale(.97); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .6rem 1.25rem;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.btn-secondary:hover {
  background: var(--bg3);
  border-color: var(--accent);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: .6rem 1.25rem;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}

.btn-danger:hover { opacity: .85; }

.btn-sm {
  padding: .35rem .85rem;
  font-size: .8rem;
}

/* ─── BADGE ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .3rem .65rem;
  font-size: .8rem;
  color: var(--text-muted);
}

.badge strong { color: var(--text); }

.badge-staff {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.35);
  border-radius: 6px;
  padding: .25rem .6rem;
  font-size: .78rem;
  color: #818cf8;
  font-weight: 600;
}

/* ─── MY FLIGHT / BOOKING ────────────────────────────────────── */
.booking-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.booking-route {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.route-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
}

.route-info span {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent2);
  line-height: 1;
}

.route-info small {
  font-size: .75rem;
  color: var(--text-muted);
}

.booking-route > i { color: var(--text-muted); font-size: .9rem; }

.booking-details {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1rem;
}

.booking-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  padding-top: .5rem;
  margin: 1rem;
}

.route-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .65rem 1rem;
  font-size: .83rem;
  line-height: 1.6;
  word-break: break-all;
}

.no-booking {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

.no-booking i { font-size: 2rem; opacity: .4; }

/* ─── BOOKING CARDS ───────────────────────────────────────────── */
.booking-card {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--bg);
}

.booking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.booking-header h4 {
  margin: 0;
  color: var(--accent);
}

.booking-details p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.booking-actions {
  margin-top: 0.5rem;
}

.posreps {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.posrep-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.posrep-list li {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--bg3);
  font-size: 0.85rem;
}

.posrep-list li:last-child {
  border-bottom: none;
}

/* ─── PIREP FORM ─────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding: 1.25rem 1.25rem 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.form-group.full { grid-column: 1 / -1; }

.form-group label {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: .6rem .75rem;
  font-size: .88rem;
  outline: none;
  transition: border-color .2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--accent); }

.form-group textarea { resize: vertical; }

/* ─── SEARCH FORM ───────────────────────────────────────────── */
.search-form {
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.form-actions {
  display: flex;
  gap: .75rem;
  padding: 0 1.25rem 1.25rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* ─── PIREP STATUS ───────────────────────────────────────────── */
#pirep-status {
  margin: .75rem 1.25rem 0;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .85rem;
}

.pirep-status.success,
#pirep-status.success {
  background: #22c55e18;
  border: 1px solid #22c55e40;
  color: var(--success);
  display: block !important;
}

.pirep-status.error,
#pirep-status.error {
  background: #ef444418;
  border: 1px solid #ef444440;
  color: var(--danger);
  display: block !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EVENTS
   ═══════════════════════════════════════════════════════════════════════════ */

.event-card {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.event-card:last-child { border-bottom: none; }

.event-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .5rem;
}

.event-title {
  font-size: .95rem;
  font-weight: 600;
}

.event-date {
  font-size: .8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .35rem;
}

.event-desc {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: .5rem;
}

.event-meta {
  font-size: .78rem;
  color: var(--text-muted);
}

.event-link {
  font-size: .82rem;
  color: var(--accent2);
  text-decoration: none;
  transition: color .2s;
}

.event-link:hover { color: var(--accent); }

.events-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: .75rem;
}

.event-card {
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1.25rem 1.5rem;
  margin: .75rem 1.25rem;
  background: var(--bg-card);
  transition: border-color .2s, box-shadow .2s;
}

.event-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.event-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
}

.event-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.event-date-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent2);
  background: rgba(var(--accent2-rgb, 99,102,241), .1);
  padding: .25rem .6rem;
  border-radius: 999px;
}

.event-author {
  font-size: .8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .35rem;
}

.event-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 .5rem;
}

.event-card-desc {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 .75rem;
  white-space: pre-wrap;
}

.event-card-footer {
  font-size: .75rem;
  color: var(--text-muted);
  opacity: .7;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.event-published {
  display: flex;
  align-items: center;
  gap: .35rem;
}

/* Edit icon button */
.btn-icon {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: .5rem;
  padding: .35rem .5rem;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
  font-size: .85rem;
  flex-shrink: 0;
}

.btn-icon:hover {
  color: var(--accent2);
  border-color: var(--accent2);
  background: rgba(var(--accent2-rgb, 99,102,241), .08);
}

.event-delete-btn:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(239, 68, 68, .08);
}

/* ─── LOADER INLINE ──────────────────────────────────────────── */
.loader-inline {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
}

/* ─── MODAL ──────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: #00000088;
  z-index: 500;
  display: flex;          /* ← AJOUTEZ ça */
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

.hidden { display: none !important; }


.modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#modal-message {
  font-size: .95rem;
  text-align: center;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
}

/* ─── TOAST ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  pointer-events: none;
}

.toast {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  font-size: .85rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s;
  min-width: 240px;
  max-width: 340px;
  pointer-events: auto;
}

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

.toast-success { border-left: 3px solid var(--success); }
.toast-success i { color: var(--success); }

.toast-error { border-left: 3px solid var(--danger); }
.toast-error i { color: var(--danger); }

.toast-warning { border-left: 3px solid var(--warning); }
.toast-warning i { color: var(--warning); }

.toast-info { border-left: 3px solid var(--accent2); }
.toast-info i { color: var(--accent2); }

/* ─── SEARCH RESULTS ─────────────────────────────────────────── */
#search-results { display: flex; flex-direction: column; gap: 1rem; }

/* ─── BOOKING OPTIONS ─────────────────────────────────────────── */
.booking-options {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.big-button {
  flex: 1;
  padding: 2rem 1rem;
  font-size: 1.2rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s;
}

.big-button:hover {
  background: var(--accent2);
}

.airports-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem;
}

.airport-btn {
  padding: 0.5rem 1rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.airport-btn:hover {
  background: var(--accent);
  color: white;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    width: 60px;
  }

  .sidebar-logo img,
  .sidebar-user-info,
  .nav-item span { display: none; }

  .nav-item { justify-content: center; padding: .65rem; }
  .sidebar-footer { flex-direction: column; gap: .5rem; }

  .main-wrapper { margin-left: 60px; }

  .stats-grid { grid-template-columns: 1fr 1fr; }

  .welcome-logo { display: none; }
  .discord-card-body { align-items: flex-start; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .main-content { padding: 1rem; }
  .topbar { padding: 0 1rem; }
}

/* ─── STAFF NAV ITEM ─────────────────────────────────────────── */
.nav-item.staff-only {
  color: var(--warning);
  display : flex;
}

.nav-item.staff-only:hover {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  display : flex;
}

.nav-item.staff-only.active {
  background: var(--warning);
  color: #000;
  display : flex;
}

/* ─── STAFF TABS ─────────────────────────────────────────────── */
.staff-tabs {
  display: flex;
  gap: .5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .5rem;
}

.staff-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .6rem 1rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, color .18s;
  position: relative;
}

.staff-tab:hover {
  background: var(--bg3);
  color: var(--text);
}

.staff-tab.active {
  background: var(--warning);
  color: #000;
}

.tab-badge {
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  padding: .1rem .45rem;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
}

/* ─── STAFF TAB CONTENT ──────────────────────────────────────── */
.staff-tab-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.staff-tab-content.hidden { display: none; }
.staff-tab-content.active { display: flex; }

/* ─── STAFF TOOLBAR ──────────────────────────────────────────── */
.staff-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.staff-toolbar-left {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex: 1;
  min-width: 0;
}

.staff-search-input {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: .55rem .9rem;
  font-size: .88rem;
  outline: none;
  width: 100%;
  max-width: 320px;
  transition: border-color .2s;
}

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

.staff-label {
  font-size: .82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ─── FILTER PILLS ───────────────────────────────────────────── */
.filter-pills {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}

.pill {
  padding: .35rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}

.pill:hover {
  background: var(--bg3);
  color: var(--text);
}

.pill.active {
  background: var(--aq-red);
  border-color: var(--aq-red);
  color: #fff;
}

.pill[data-filter="pending"].active  { background: var(--warning); border-color: var(--warning); color: #000; }
.pill[data-filter="accepted"].active { background: var(--success); border-color: var(--success); color: #fff; }
.pill[data-filter="rejected"].active { background: var(--danger);  border-color: var(--danger);  color: #fff; }

/* ─── STATUS CHIPS ───────────────────────────────────────────── */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  border-radius: 999px;
  padding: .25rem .7rem;
  font-size: .77rem;
  font-weight: 600;
  white-space: nowrap;
}

.chip-pending  { background: rgba(245,158,11,.15); color: var(--warning); }
.chip-accepted { background: rgba(34,197,94,.15);  color: var(--success); }
.chip-rejected { background: rgba(239,68,68,.15);  color: var(--danger);  }
.chip-active   { background: rgba(192,22,43,.12); color: #e8344a; }
.chip-inactive { background: var(--bg3); color: var(--text-muted); }

/* ─── HEADER COUNT BADGE ─────────────────────────────────────── */
.header-count {
  margin-left: auto;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .75rem;
  color: var(--text-muted);
  padding: .15rem .6rem;
  font-weight: 600;
}

/* ─── ROUTE ACTION BUTTONS ───────────────────────────────────── */
.action-group {
  display: flex;
  gap: .4rem;
  align-items: center;
}

.btn-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  transition: background .18s, color .18s, border-color .18s;
  flex-shrink: 0;
}

.btn-icon:hover               { background: var(--bg3); color: var(--text); }
.btn-icon.edit:hover          { border-color: var(--accent); color: var(--accent); }
.btn-icon.danger:hover        { border-color: var(--danger); color: var(--danger); background: rgba(239,68,68,.08); }
.btn-icon.review:hover        { border-color: var(--warning); color: var(--warning); background: rgba(245,158,11,.08); }

/* ─── MODAL LARGE ────────────────────────────────────────────── */
.modal-lg {
  max-width: 680px;
  width: calc(100% - 2rem);
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;          /* sections inside handle their own padding */
  gap: 0;
}

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

.modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.modal-header h3 i { color: var(--accent2); }

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: .35rem;
  border-radius: 6px;
  font-size: .9rem;
  transition: color .2s, background .2s;
}

.modal-close:hover { color: var(--danger); background: rgba(239,68,68,.1); }

.modal-form-grid {
  padding: 1.25rem 1.5rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* ─── MODAL DIVIDER ──────────────────────────────────────────── */
.modal-divider {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  margin: .25rem 0;
}

.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.modal-divider span {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding: 0 .75rem;
}

/* ─── PIREP DETAIL GRID ──────────────────────────────────────── */
.pirep-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pirep-detail-item {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.pirep-detail-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}

.pirep-detail-value {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
}

.pirep-detail-value.highlight {
  color: var(--accent2);
  font-size: 1.05rem;
}

.pirep-detail-value.danger { color: var(--danger); }
.pirep-detail-value.success { color: var(--success); }

/* Remarks block in pirep detail */
.pirep-remarks-block {
  padding: .75rem 1.5rem;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}

.pirep-remarks-block p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── EMPTY STATE ────────────────────────────────────────────── */
.empty-state {
  padding: 3rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 2.5rem;
  opacity: .3;
}

.empty-state p { font-size: .9rem; }
/* ─── STAFF NOTIFICATIONS ────────────────────────────────────── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background .15s, opacity .25s, transform .25s;
}

.notif-item:last-child { border-bottom: none; }

.notif-item:hover { background: var(--bg3); }

.notif-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  margin-top: .1rem;
}

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

.notif-message {
  font-size: .88rem;
  color: var(--text);
  margin: 0 0 .25rem;
  line-height: 1.5;
}

.notif-date {
  font-size: .78rem;
  color: var(--text-muted);
}

.notif-date i { margin-right: .25rem; }
/* ═══════════════════════════════════════════════════════════════
   DASHBOARD & LOGBOOK
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --font-body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'Consolas', monospace;
  --accent-glow: rgba(192,22,43,0.18);
  --stat-gradient-1: linear-gradient(135deg, #1a3050 0%, #122338 100%);
  --stat-gradient-2: linear-gradient(135deg, #1a3050 0%, #122338 100%);
  --stat-gradient-3: linear-gradient(135deg, #1a3050 0%, #122338 100%);
  --stat-gradient-4: linear-gradient(135deg, #8b1020 0%, #5c0b16 100%);
}

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

/* ─── IMPROVED STAT CARDS ─── */
.stat-card {
  position: relative;
  overflow: hidden;
  transition: transform .18s, box-shadow .18s;
  padding: 1.25rem 1.4rem;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}

.stat-card:nth-child(1) { background: var(--stat-gradient-1); border-color: #1e3d5e; }
.stat-card:nth-child(2) { background: var(--stat-gradient-2); border-color: #1e3d5e; }
.stat-card:nth-child(3) { background: var(--stat-gradient-3); border-color: #1e3d5e; }
.stat-card:nth-child(4) { background: var(--stat-gradient-4); border-color: #c0162b; }

.stat-card:nth-child(1) .stat-icon { background: #1e3d5e; color: #4d7099; }
.stat-card:nth-child(2) .stat-icon { background: #1e3d5e; color: #4d7099; }
.stat-card:nth-child(3) .stat-icon { background: #1e3d5e; color: #4d7099; }
.stat-card:nth-child(4) .stat-icon { background: #8b1020; color: #d07080; }

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 1.05rem;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: -.02em;
}

/* ─── IMPROVED WELCOME CARD ─── */
.welcome-card {
  background: linear-gradient(135deg, #0e1c2f 0%, #0a0d13 60%, #0e1a2c 100%) !important;
  border-color: rgba(192,22,43,.18) !important;
  padding: 1.5rem 2rem !important;
  position: relative;
  overflow: hidden;
}

.welcome-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(192,22,43,.15) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-text h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

/* ─── CLICKABLE TABLE ROWS ─── */
.data-table-clickable tbody tr {
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}

.data-table-clickable tbody tr:hover {
  background: rgba(192,22,43,.07);
  box-shadow: inset 3px 0 0 var(--aq-red);
}

/* ─── LOGBOOK HINT BADGE ─── */
.logbook-hint {
  font-size: .74rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .35rem;
  opacity: .7;
}

/* ─── ROUTE CELL (DEP → ARR combined) ─── */
.route-cell {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
}

.route-cell .icao {
  font-weight: 700;
  color: var(--text);
  letter-spacing: .02em;
}

.route-cell .arrow {
  color: var(--text-muted);
  font-size: .7rem;
}

/* ─── STATUS CHIPS in table ─── */
.status-chip {
  font-size: .75rem;
  padding: .2rem .6rem;
}

/* ─── PIREP DETAIL MODAL ─── */
.modal-pirep-detail-box {
  max-width: 700px;
  width: calc(100% - 2rem);
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
}

.pirep-detail-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  background: linear-gradient(135deg, #0e1c2f 0%, #0a0d13 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.pirep-detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(192,22,43,.12) 0%, transparent 70%);
  pointer-events: none;
}

.pirep-hero-airport {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
}

.pirep-hero-icao {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text);
  letter-spacing: .04em;
  line-height: 1;
}

.pirep-hero-label {
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.pirep-hero-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  color: var(--accent2);
}

.pirep-hero-arrow i {
  font-size: 1.4rem;
}

.pirep-hero-duration {
  font-size: .78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.pirep-hero-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.pirep-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.pirep-detail-item {
  padding: .9rem 1.25rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pirep-detail-item:last-child { border-right: none; }

.pirep-remarks-block {
  padding: 1rem 1.5rem;
  min-height: 52px;
}

.pirep-remarks-block p {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-style: italic;
}

.pirep-remarks-block .no-remark {
  color: var(--text-muted);
  opacity: .5;
  font-style: normal;
  font-size: .83rem;
}

/* ─── CARD HEADER IMPROVEMENT ─── */
.card-header {
  letter-spacing: .01em;
}

/* ─── TABLE MONO IDs ─── */
.data-table td:first-child {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Posrep Charts Panel
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Charts section wrapper ─────────────────────────────────────────────── */
.pirep-detail-charts {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Section header ─────────────────────────────────────────────────────── */
.charts-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.charts-header i {
  color: var(--accent2);
  font-size: 1rem;
}

/* ── Body: grid of chart cards ──────────────────────────────────────────── */
.charts-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
}

/* ── Individual chart card ──────────────────────────────────────────────── */
.chart-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem .875rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  overflow: hidden;
  transition: border-color .2s;
}

.chart-card:hover {
  border-color: var(--accent);
}

/* Position track spans full width */
.chart-card--wide {
  grid-column: 1 / -1;
}

/* ── Chart label inside the card ────────────────────────────────────────── */
.chart-title {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
}

.chart-title i {
  color: var(--accent2);
}

/* ── Responsive SVG image ───────────────────────────────────────────────── */
.chart-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  /* Slightly dim until loaded to avoid flash of broken image */
  background: var(--bg3);
  min-height: 100px;
}

/* ── Loading / empty states ─────────────────────────────────────────────── */
.charts-loader {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  color: var(--text-muted);
  font-size: .9rem;
  padding: 2rem 0;
}

.charts-unavailable {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: .875rem;
  text-align: center;
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

/* ── Canvas wrapper: gives Chart.js a sized box ─────────────────────────── */
.chart-canvas-wrap {
  position: relative;
  height: 220px;
  width: 100%;
}

.chart-canvas-wrap--tall {
  height: 280px;
}

/* ── Reset zoom row ─────────────────────────────────────────────────────── */
.chart-reset-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .25rem 0 .1rem;
}

.chart-hint {
  font-size: .75rem;
  color: var(--text-muted);
  opacity: .7;
}

/* ── Responsive: stack on narrow modal ──────────────────────────────────── */
@media (max-width: 600px) {
  .charts-body {
    grid-template-columns: 1fr;
  }

  .chart-card--wide {
    grid-column: unset;
  }

  .chart-canvas-wrap {
    height: 180px;
  }

  .chart-canvas-wrap--tall {
    height: 220px;
  }


  .chart-reset-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─── NETWORK BANNERS (VATSIM / IVAO) ──────────────────────────── */
.vatsim-card .card-header {
  color: #60cdff;
  border-bottom-color: rgba(96, 205, 255, .18);
}
.vatsim-card .card-header i {
  color: #60cdff;
}
.ivao-card .card-header {
  color: #a78bfa;
  border-bottom-color: rgba(167, 139, 250, .18);
}
.ivao-card .card-header i {
  color: #a78bfa;
}

.btn-vatsim {
  background: #0ea5e9 !important;
  border-color: #0ea5e9 !important;
  color: #fff !important;
}
.btn-vatsim:hover {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
}
.btn-ivao {
  background: #7c3aed !important;
  border-color: #7c3aed !important;
  color: #fff !important;
}
.btn-ivao:hover {
  background: #6d28d9 !important;
  border-color: #6d28d9 !important;
}

/* ─── POSREP CHARTS INSIDE STAFF REVIEW MODAL ───────────────────────────── */
.pirep-review-charts-section {
  border-top: 1px solid var(--border);
}

.pirep-review-charts-body {
  padding: 1rem 1.25rem 1.25rem;
  background: #0a1520;
}

/* small modal variant */
.modal-sm {
  max-width: 420px;
  width: 100%;
}


/* ═══════════════════════════════════════════════════════════════════════════
   AQUITAIR FULL THEME OVERRIDES
   Completes the brand retheme: navy + crimson red palette
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Sidebar enhancements ────────────────────────────────────────────────── */
.sidebar {
  background: linear-gradient(180deg, #0b1929 0%, #0e1c2f 100%);
  border-right: 1px solid rgba(192,22,43,.15);
}

.sidebar-logo {
  border-bottom: 1px solid rgba(192,22,43,.15);
}

.nav-item.active {
  background: var(--aq-red) !important;
  box-shadow: 0 2px 12px rgba(192,22,43,.35);
}

.nav-item:hover {
  background: rgba(192,22,43,.1);
  color: #edf2f7;
}

.avatar {
  background: var(--aq-red);
}

.btn-download-tracker {
  background: rgba(192,22,43,.85);
  border: 1px solid rgba(192,22,43,.4);
}
.btn-download-tracker:hover {
  background: var(--aq-red);
  opacity: 1;
}

/* ── Topbar ──────────────────────────────────────────────────────────────── */
.topbar {
  background: linear-gradient(90deg, #0b1929 0%, #0e1c2f 100%);
  border-bottom: 1px solid rgba(192,22,43,.15);
}

/* AquitAir livery stripe — thin red line under topbar */
.topbar::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--aq-red), transparent);
  opacity: .5;
}
.topbar { position: sticky; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: #0f1e30;
  border-color: rgba(255,255,255,.07);
}

.card-header {
  background: rgba(0,0,0,.25);
  border-bottom-color: rgba(255,255,255,.07);
}

.card-header i {
  color: var(--aq-red-light);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--aq-red);
  border: none;
}
.btn-primary:hover { background: var(--aq-red-light); }

.btn-secondary:hover {
  background: rgba(192,22,43,.08);
  border-color: rgba(192,22,43,.4);
}

/* ── Login page ──────────────────────────────────────────────────────────── */
.login-wrapper {
  background: radial-gradient(ellipse at 50% 0%, rgba(139,16,32,.28) 0%, transparent 65%),
              radial-gradient(ellipse at 80% 100%, rgba(14,28,47,.8) 0%, transparent 60%),
              var(--bg);
}

.login-card {
  background: #0f1e30;
  border-color: rgba(192,22,43,.2);
  box-shadow: 0 24px 64px rgba(0,0,0,.5), 0 0 0 1px rgba(192,22,43,.1);
}

.input-group input:focus { border-color: var(--aq-red); }

/* ── Form inputs ─────────────────────────────────────────────────────────── */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--aq-red);
  box-shadow: 0 0 0 3px rgba(192,22,43,.12);
}

.staff-search-input:focus { border-color: var(--aq-red); }

/* ── Staff tabs — keep warning yellow for staff identity ─────────────────── */
.staff-tab.active {
  background: #b8860b;
  color: #fff;
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge-staff {
  background: rgba(192,22,43,.12);
  border-color: rgba(192,22,43,.35);
  color: #f87171;
}

/* ── Route cell ICAO codes ───────────────────────────────────────────────── */
.route-cell .icao {
  color: #f0c8cc;
}

/* ── Pill active (default) ───────────────────────────────────────────────── */
.pill.active {
  background: var(--aq-red);
  border-color: var(--aq-red);
}

/* ── Logbook / dashboard table clickable rows ────────────────────────────── */
.data-table-clickable tbody tr:hover {
  background: rgba(192,22,43,.06);
  box-shadow: inset 3px 0 0 var(--aq-red);
}

/* ── Discord / network card headers keep their own accent colors ─────────── */
/* (VATSIM stays cyan, IVAO stays purple — intentional differentiation)       */

/* ── Accent glow animation (e.g. used in welcome card) ──────────────────── */
.welcome-card::before {
  background: radial-gradient(circle, rgba(192,22,43,.12) 0%, transparent 70%);
}

/* ── Pirep hero arrows ───────────────────────────────────────────────────── */
.pirep-hero-arrow {
  color: #f87171;
}

/* ── Mon vol section — sync the accent references ───────────────────────── */
#trouver-route-section .card {
  border-color: rgba(192,22,43,.15);
  background: #0f1e30;
}

#trouver-route-section .card-header {
  background: linear-gradient(90deg, rgba(192,22,43,.07) 0%, transparent 100%);
  border-bottom-color: rgba(192,22,43,.12);
  color: #f0c8cc;
}

#trouver-route-section .card-header i { color: var(--aq-red-light); }

#trouver-route-section .form-group input {
  background: #09141f;
  border-color: rgba(192,22,43,.2);
}

#trouver-route-section .form-group input:focus {
  border-color: var(--aq-red);
  box-shadow: 0 0 0 3px rgba(192,22,43,.14);
}

#trouver-route-section .route-cell .icao { color: #f0c8cc; }

/* Big mode-choice buttons */
#btn-trouver-route {
  background: linear-gradient(135deg, #0b1929 0%, #122338 100%);
  border-color: rgba(192,22,43,.22);
}
#btn-trouver-route i { color: #f87171; }
#btn-trouver-route:hover {
  border-color: rgba(192,22,43,.5);
  box-shadow: 0 0 32px rgba(192,22,43,.22), 0 12px 32px rgba(0,0,0,.4);
  background: linear-gradient(135deg, #112030 0%, #1a3050 100%);
}

#btn-vol-libre {
  background: linear-gradient(135deg, #16080d 0%, #1f0c12 100%);
  border-color: rgba(192,22,43,.3);
}
#btn-vol-libre i { color: #f87171; }
#btn-vol-libre:hover {
  border-color: rgba(192,22,43,.6);
  box-shadow: 0 0 32px rgba(192,22,43,.25), 0 12px 32px rgba(0,0,0,.4);
  background: linear-gradient(135deg, #1f0c14 0%, #2a1020 100%);
}

#mf-booking-card {
  background: linear-gradient(160deg, #0c1a2e 0%, #0b1422 55%, #101c30 100%);
  border-color: rgba(192,22,43,.22);
}

/* ── Thin gold livery stripe on sidebar footer ────────────────────────────── */
.sidebar-footer {
  border-top: 1px solid rgba(212,164,76,.15);
}

/* ── Toasts: accent references ────────────────────────────────────────────── */
.toast-info { border-left-color: var(--aq-red-light); }
.toast-info i { color: var(--aq-red-light); }

/* ── Active page pagination ────────────────────────────────────────────────── */
.active-page {
  background: var(--aq-red) !important;
  border-color: var(--aq-red) !important;
}

/* ─── LIVRÉES ─────────────────────────────────────────────────────────────── */

.livreries-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  width: 100%;
}

.livreries-sim-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.livreries-sim-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .02em;
}

.livreries-card-grid {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.livreries-card {
  background-color: #09141f;
  border: 1px solid var(--border);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 290px;
}

.livreries-card p {
  width: 100%;
  margin: 0;
  padding: 0.65rem 1rem;
  font-weight: 700;
  font-size: .9rem;
  border-bottom: 1px solid var(--border);
  color: #EDF2F7;
  letter-spacing: .03em;
  text-align: center; /* Aligné au centre comme sur la maquette */
}

.livreries-card img {
  max-width: calc(100% - 2rem);
  height: auto;
  border-radius: 10px;
  margin: 1rem;
}

.livreries-buttons {
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0 1rem;
}

.livreries-card a {
  text-decoration: none;
  color: var(--text);
  padding: 0.35rem 1.1rem;
  border-radius: 999px; /* Donne la forme de pilule ovale */
  font-size: .85rem;
  font-weight: 600;
  border: 1.5px solid rgba(255, 255, 255, 0.4); /* Bordure blanche semi-transparente */
  background: transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.livreries-card a:hover {
  background: rgba(239, 68, 68, 0.12); /* Conserve votre effet hover rouge */
  color: var(--text);
  border-color: rgba(239, 68, 68, 0.35);
}
