:root {
  --ink: #12212b;
  --muted: #64727d;
  --line: #dbe3e8;
  --panel: #fff;
  --canvas: #f3f6f7;
  --navy: #0b2536;
  --teal: #0b766e;
  --teal-dark: #075a55;
  --red: #b42318;
  --amber: #a15c00;
  --green: #16734b;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--teal-dark); }
.topbar { background: var(--navy); color: #fff; padding: 0 24px; min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 4px solid #24a79d; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 10px; background: #1b8d85; font-weight: 800; letter-spacing: .04em; }
.brand strong { display: block; font-size: 1.05rem; }
.brand span { display: block; color: #b9d0dc; font-size: .77rem; letter-spacing: .04em; text-transform: uppercase; }
.user-menu { display: flex; align-items: center; gap: 14px; font-size: .86rem; }
.user-menu .role { color: #b9d0dc; }
.link-button { appearance: none; border: 1px solid #587181; background: transparent; color: #fff; border-radius: 7px; padding: 7px 10px; cursor: pointer; }
.container { width: min(1500px, calc(100% - 36px)); margin: 28px auto 60px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; }
.eyebrow { color: var(--teal-dark); font-size: .75rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
h1 { font-size: clamp(1.65rem, 3vw, 2.3rem); margin: 3px 0 4px; line-height: 1.16; }
h2 { font-size: 1.08rem; margin: 0; }
h3 { font-size: .98rem; margin: 0 0 12px; }
.muted { color: var(--muted); }
.flash { padding: 12px 15px; margin-bottom: 18px; border-radius: 8px; border: 1px solid; font-weight: 650; }
.flash.success { color: #105c3c; background: #e8f6ef; border-color: #aad8c2; }
.flash.error { color: #8b1e17; background: #fdecea; border-color: #f0b9b3; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(145px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 17px; box-shadow: 0 2px 7px rgba(17,35,47,.04); }
.stat .label { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 1.75rem; font-weight: 800; line-height: 1.2; margin-top: 5px; }
.stat.danger { border-top: 4px solid var(--red); }
.stat.warning { border-top: 4px solid #d98512; }
.stat.good { border-top: 4px solid var(--green); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 20px; overflow: hidden; box-shadow: 0 2px 8px rgba(17,35,47,.04); }
.panel-head { padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.panel-body { padding: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { color: var(--muted); font-size: .73rem; text-align: left; text-transform: uppercase; letter-spacing: .05em; background: #f8fafb; }
th, td { padding: 11px 13px; border-bottom: 1px solid #e8edef; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; font-size: .73rem; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; white-space: nowrap; }
.badge.overdue { color: #8d1b13; background: #fee9e7; }
.badge.due_soon { color: #814a00; background: #fff1d6; }
.badge.current { color: #0d6440; background: #e6f5ed; }
.badge.unscheduled { color: #57636d; background: #edf1f3; }
.badge.grounded { color: #fff; background: var(--red); }
.fleet { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 14px; }
.aircraft-card { color: inherit; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; transition: transform .15s ease, border-color .15s ease; }
.aircraft-card:hover { transform: translateY(-2px); border-color: #86aaa7; }
.aircraft-title { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.tail { font-size: 1.25rem; font-weight: 850; }
.aircraft-meta { color: var(--muted); font-size: .88rem; min-height: 42px; }
.meter-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.meter-row span { color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.meter-row strong { display: block; color: var(--ink); font-size: .94rem; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .wide { grid-column: 1 / -1; }
label { display: block; margin-bottom: 5px; color: #34434d; font-size: .78rem; font-weight: 750; }
input, select, textarea { width: 100%; border: 1px solid #c9d4da; border-radius: 7px; padding: 9px 10px; background: #fff; color: var(--ink); font: inherit; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(27,141,133,.15); border-color: var(--teal); }
.check { display: flex; gap: 8px; align-items: center; margin-top: 26px; }
.check input { width: auto; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 7px; appearance: none; border: 0; border-radius: 7px; padding: 9px 13px; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-dark); }
.btn.secondary { background: #e7edef; color: #263a46; }
.form-actions { margin-top: 14px; display: flex; justify-content: flex-end; }
details.action { border-top: 1px solid var(--line); }
details.action > summary { padding: 13px 18px; cursor: pointer; font-weight: 750; color: var(--teal-dark); }
details.action[open] > summary { background: #f4f9f8; }
details.action .details-body { padding: 4px 18px 18px; }
.due-basis { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .82rem; }
.due-basis li { margin: 2px 0; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.2fr .8fr; }
.login-visual { padding: 8vw; color: #fff; background: linear-gradient(145deg, #082333, #0c514f); display: flex; flex-direction: column; justify-content: space-between; }
.login-visual h1 { max-width: 700px; font-size: clamp(2.2rem, 5vw, 4.6rem); }
.login-visual p { max-width: 600px; color: #c8dddf; font-size: 1.05rem; }
.login-panel { display: grid; place-items: center; padding: 36px; background: #fff; }
.login-card { width: min(390px, 100%); }
.login-card h2 { font-size: 1.6rem; margin-bottom: 8px; }
.login-card .field { margin-top: 16px; }
.login-card .btn { width: 100%; margin-top: 20px; padding: 11px; }
.legal-note { margin-top: 22px; color: var(--muted); font-size: .78rem; }
@media (max-width: 1050px) { .stats { grid-template-columns: repeat(3, 1fr); } .fleet { grid-template-columns: repeat(2, 1fr); } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .topbar { padding: 12px 16px; align-items: flex-start; } .user-menu { align-items: flex-end; flex-direction: column; gap: 5px; } .container { width: min(100% - 22px, 1500px); margin-top: 18px; } .stats { grid-template-columns: repeat(2, 1fr); } .fleet, .form-grid { grid-template-columns: 1fr; } .login-shell { grid-template-columns: 1fr; } .login-visual { min-height: 34vh; padding: 40px 26px; } .page-head { align-items: flex-start; flex-direction: column; } }
