/* Flight Planner — stile AediNex: semplice, lineare, professionale.
   Palette dal marchio AediNex: blu notte #2F3E51, verde #8BCA49, blu #3292D6. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); }

:root {
  /* marchio */
  --ax-navy: #2F3E51;
  --ax-green: #8BCA49;
  --ax-green-dark: #4E8A1E;
  --ax-green-soft: #EEF7E4;
  --ax-blue: #3292D6;
  --ax-blue-dark: #1F6FB2;
  --ax-blue-soft: #E8F2FB;

  /* superfici e testo */
  --ax-bg: #F5F7FA;
  --ax-surface: #FFFFFF;
  --ax-surface-2: #F8FAFC;
  --ax-border: #E2E8F0;
  --ax-border-strong: #CBD5E1;
  --ax-text: #1E293B;
  --ax-text-2: #64748B;

  /* stati */
  --ax-ok: var(--ax-green-dark);
  --ax-ok-soft: var(--ax-green-soft);
  --ax-warn: #92400E;
  --ax-warn-soft: #FEF3C7;
  --ax-danger: #B91C1C;
  --ax-danger-soft: #FEE2E2;

  --ax-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ax-radius: 8px;
  --ax-radius-sm: 6px;
  --ax-container: 1120px;
  --ax-topbar-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ax-bg: #111827;
    --ax-surface: #1A2332;
    --ax-surface-2: #202B3C;
    --ax-border: #2C3A4F;
    --ax-border-strong: #3E4F68;
    --ax-text: #E5EAF0;
    --ax-text-2: #9AA8BA;
    --ax-blue-dark: #5AAAE6;
    --ax-blue-soft: #1B3550;
    --ax-green-dark: #9BD461;
    --ax-green-soft: #22351A;
    --ax-warn: #F6C35B;
    --ax-warn-soft: #3A2E12;
    --ax-danger: #F68A8A;
    --ax-danger-soft: #3B1C1C;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--ax-font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ax-text);
  background: var(--ax-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ax-blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--ax-blue); outline-offset: 2px; }
h1, h2, h3 { color: var(--ax-text); line-height: 1.25; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ax-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ax-container { width: 100%; max-width: var(--ax-container); margin: 0 auto; padding: 0 24px; }

/* --- barra superiore ---------------------------------------------------- */
.ax-topbar { background: var(--ax-navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.ax-topbar .ax-container { display: flex; align-items: center; gap: 32px; min-height: var(--ax-topbar-h); }
.ax-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.ax-brand:hover { text-decoration: none; }
.ax-brand-mark { width: 28px; height: 28px; flex: none; }

.ax-nav { display: flex; align-items: stretch; gap: 4px; align-self: stretch; }
.ax-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: #D5DEE8;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  border-top: 3px solid transparent;
}
.ax-nav a:hover { color: #fff; text-decoration: none; }
.ax-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--ax-green); }

.ax-user { margin-left: auto; position: relative; }
.ax-user summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: var(--ax-radius-sm);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.ax-user summary::-webkit-details-marker { display: none; }
.ax-user-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: var(--ax-surface);
  color: var(--ax-text);
  border: 1px solid var(--ax-border);
  border-radius: var(--ax-radius);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  padding: 6px 0;
}
.ax-user-panel a, .ax-user-panel button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 14px;
  background: none;
  border: 0;
  color: var(--ax-text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.ax-user-panel a:hover, .ax-user-panel button:hover { background: var(--ax-surface-2); text-decoration: none; }
.ax-user-panel hr { border: 0; border-top: 1px solid var(--ax-border); margin: 6px 0; }
.ax-user-panel form { margin: 0; }
.ax-only-mobile { display: none !important; }

/* --- pagina ------------------------------------------------------------- */
.ax-main { padding-top: 32px; padding-bottom: 56px; }
.ax-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.ax-page-header h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.ax-page-header p { margin: 6px 0 0; color: var(--ax-text-2); max-width: 680px; }
.ax-breadcrumb { font-size: 13px; color: var(--ax-text-2); margin-bottom: 6px; }
.ax-section-title { margin: 32px 0 12px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ax-text-2); }
.ax-section-title:first-child { margin-top: 0; }
.ax-muted { color: var(--ax-text-2); font-size: 13px; }
.ax-footer { border-top: 1px solid var(--ax-border); padding-top: 20px; padding-bottom: 32px; color: var(--ax-text-2); font-size: 13px; }

.ax-card { background: var(--ax-surface); border: 1px solid var(--ax-border); border-radius: var(--ax-radius); padding: 20px; }
.ax-card + .ax-card { margin-top: 16px; }
.ax-grid > .ax-card + .ax-card { margin-top: 0; }
.ax-card h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.ax-card p { margin: 0 0 10px; }
.ax-card p:last-child { margin-bottom: 0; }
.ax-card-accent { border-left: 3px solid var(--ax-green); }

.ax-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ax-split { display: grid; gap: 24px; grid-template-columns: 360px minmax(0, 1fr); align-items: start; }
.ax-split-wide { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.ax-sticky { position: sticky; top: calc(var(--ax-topbar-h) + 16px); }

/* Card di funzione (home). */
.ax-feature { display: flex; flex-direction: column; gap: 10px; color: var(--ax-text); transition: border-color .15s, box-shadow .15s; }
.ax-feature:hover { text-decoration: none; border-color: var(--ax-blue); box-shadow: 0 2px 8px rgba(50, 146, 214, .12); }
.ax-feature h2 { margin: 0; font-size: 16px; }
.ax-feature p { margin: 0; color: var(--ax-text-2); font-size: 14px; }
.ax-feature .ax-more { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--ax-blue-dark); }
.ax-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--ax-radius-sm); background: var(--ax-blue-soft); color: var(--ax-blue-dark); }
.ax-icon.green { background: var(--ax-green-soft); color: var(--ax-green-dark); }

/* Barra di stato. */
.ax-statusbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 12px 16px; margin-bottom: 24px; background: var(--ax-surface); border: 1px solid var(--ax-border); border-radius: var(--ax-radius); font-size: 14px; }
.ax-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--ax-green); vertical-align: middle; }
.ax-dot.off { background: var(--ax-danger); }

/* Elenchi. */
.ax-list { margin: 0; padding: 0; list-style: none; background: var(--ax-surface); border: 1px solid var(--ax-border); border-radius: var(--ax-radius); overflow: hidden; }
.ax-list > li + li { border-top: 1px solid var(--ax-border); }
.ax-list-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--ax-text); }
a.ax-list-item:hover { background: var(--ax-surface-2); text-decoration: none; }
.ax-list-body { flex: 1; min-width: 0; }
.ax-list-title { display: block; font-weight: 600; }
.ax-list-sub { display: block; font-size: 13px; color: var(--ax-text-2); overflow-wrap: anywhere; }
.ax-list-after { font-size: 13px; color: var(--ax-text-2); text-align: right; }
.ax-chevron { color: var(--ax-text-2); width: 16px; height: 16px; }

/* --- moduli ------------------------------------------------------------- */
.ax-form { display: grid; gap: 14px; }
.ax-field { display: grid; gap: 5px; }
.ax-field label { font-size: 13px; font-weight: 600; color: var(--ax-text); }
.ax-field input, .ax-field select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font: inherit;
  color: var(--ax-text);
  background: var(--ax-surface);
  border: 1px solid var(--ax-border-strong);
  border-radius: var(--ax-radius-sm);
}
.ax-field input:focus, .ax-field select:focus { outline: 0; border-color: var(--ax-blue); box-shadow: 0 0 0 3px rgba(50, 146, 214, .2); }
.ax-field input::placeholder { color: #94A3B8; }
.ax-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ax-row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.ax-fieldset { border: 0; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--ax-border); display: grid; gap: 10px; }
.ax-fieldset legend { float: left; width: 100%; padding: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--ax-text-2); }

.ax-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--ax-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.ax-btn:hover { text-decoration: none; }
.ax-btn-primary { background: #1F6FB2; color: #fff; }
.ax-btn-primary:hover { background: #185A91; }
.ax-btn-secondary { background: var(--ax-surface); color: var(--ax-text); border-color: var(--ax-border-strong); }
.ax-btn-secondary:hover { background: var(--ax-surface-2); }
.ax-btn-block { width: 100%; }

/* --- messaggi ----------------------------------------------------------- */
.ax-alert { padding: 12px 14px; border-radius: var(--ax-radius-sm); margin-bottom: 16px; font-size: 14px; }
.ax-alert.ok { background: var(--ax-ok-soft); color: var(--ax-ok); }
.ax-alert.warn { background: var(--ax-warn-soft); color: var(--ax-warn); }
.ax-alert.danger { background: var(--ax-danger-soft); color: var(--ax-danger); }
.ax-alert strong { display: block; margin-bottom: 2px; }

.ax-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.ax-badge.ok { background: var(--ax-ok-soft); color: var(--ax-ok); }
.ax-badge.warn { background: var(--ax-warn-soft); color: var(--ax-warn); }
.ax-badge.danger { background: var(--ax-danger-soft); color: var(--ax-danger); }
.ax-badge.info { background: var(--ax-blue-soft); color: var(--ax-blue-dark); }

/* --- tabelle ------------------------------------------------------------ */
.ax-table-wrap { overflow-x: auto; background: var(--ax-surface); border: 1px solid var(--ax-border); border-radius: var(--ax-radius); }
.ax-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ax-table th, .ax-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--ax-border); vertical-align: top; }
.ax-table th { background: var(--ax-surface-2); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ax-text-2); }
.ax-table tr:last-child td { border-bottom: 0; }
.ax-table .num { text-align: right; white-space: nowrap; }
.ax-kpi { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }

/* --- passi delle guide -------------------------------------------------- */
.ax-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.ax-steps > li { position: relative; padding: 0 0 22px 44px; }
.ax-steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ax-navy);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ax-steps > li::after { content: ""; position: absolute; left: 13px; top: 32px; bottom: 4px; width: 2px; background: var(--ax-border); }
.ax-steps > li:last-child::after { display: none; }
.ax-steps h3 { margin: 3px 0 4px; font-size: 15px; font-weight: 600; }
.ax-steps p { margin: 4px 0 0; font-size: 14px; }
.ax-steps .warn { color: var(--ax-warn); }

.ax-checklist { margin: 0; padding: 0; list-style: none; }
.ax-checklist li { display: flex; gap: 10px; padding: 6px 0; font-size: 14px; }
.ax-checklist .icon { color: var(--ax-green-dark); width: 18px; height: 18px; margin-top: 2px; }

.ax-stack > * + * { margin-top: 16px; }
form.inline { display: inline; margin: 0; }

/* --- responsive --------------------------------------------------------- */
@media (max-width: 960px) {
  .ax-split, .ax-split-wide { grid-template-columns: 1fr; }
  .ax-sticky { position: static; }
}
@media (max-width: 760px) {
  .ax-container { padding: 0 16px; }
  .ax-nav { display: none; }
  .ax-only-mobile { display: flex !important; }
  .ax-main { padding-top: 20px; }
  .ax-page-header { flex-direction: column; align-items: flex-start; }
  .ax-row-2, .ax-row-3 { grid-template-columns: 1fr; }
}
.ax-auth { max-width: 400px; margin: 24px auto; }
.ax-spaced { margin-top: 16px; }
.ax-checklist .ax-warn-icon { color: var(--ax-warn); }
.ax-checklist .ax-link-icon { color: var(--ax-blue-dark); }
.ax-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ax-kpis .ax-kpi { font-size: 20px; }
