/*
 * LSV Aircraft Maintenance – Design System v2.1
 * Local fonts/assets only. No external CDN or tracking.
 * Presentation only: no maintenance data or business logic is modified here.
 */
:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color-scheme: light;
  --navy: #111b40;
  --navy-deep: #0b1230;
  --navy-light: #1d2a54;
  --primary: #2f5bba;
  --primary-dark: #254997;
  --primary-soft: #eaf0fc;
  --page: #f4f6fa;
  --surface: #ffffff;
  --ink: #16213a;
  --muted: #65748d;
  --line: #e0e6f0;
  --line-soft: #ebeff5;
  --success: #17754f;
  --warning: #996214;
  --danger: #ba344a;
  --shadow: 0 4px 20px rgba(14, 28, 61, .035), 0 1px 3px rgba(14, 28, 61, .025);
  font-size: 14px;
  line-height: 1.55;
  background: var(--page);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--page); }
button, input, select, textarea { font: inherit; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary); }
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #91b8f4; outline-offset: 2px; }
[hidden], tr[hidden] { display: none !important; }
.icon { width: 19px; height: 19px; display: inline-block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

/* Application shell */
.layout { display: grid; grid-template-columns: 266px minmax(0,1fr); min-height: 100vh; }
.layout > main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-right: 1px solid rgba(255,255,255,.06);
  color: #eff3ff;
  position: sticky; top: 0; height: 100vh; z-index: 30;
  display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: thin;
  padding: 24px 14px 16px;
}
.sidebar-head { margin: 0 4px 27px; display: flex; align-items: center; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: #fff; }
.brand:hover { color: white; text-decoration: none; }
.brand-logo { width: 58px; height: 58px; flex: 0 0 58px; border-radius: 12px; overflow: hidden; background: #fff; padding: 4px; display: grid; place-items: center; box-shadow: 0 5px 14px #0002; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-text { min-width: 0; display: grid; gap: 0; line-height: 1.18; }
.brand-text b { font-size: 16px; font-weight: 760; letter-spacing: -.02em; line-height: 1.18; }
.brand-text small { font-size: 10px; color: #a9b8d8; margin-top: 5px; }
.brand-kicker { color: #9fb4e1; font-size: 8.5px; font-weight: 750; letter-spacing: .105em; margin-bottom: 3px; }
.nav-section-label { margin: 21px 13px 7px; color: #8397c2; font-size: 9.5px; font-weight: 800; letter-spacing: .15em; }
.side-navigation { display: flex; flex-direction: column; gap: 3px; }
.side-navigation a { position: relative; display: flex; gap: 12px; align-items: center; min-height: 42px; padding: 10px 13px; border-radius: 10px; color: #becae4; font-size: 13px; font-weight: 590; transition: background .16s, color .16s; }
.side-navigation a .icon { color: #90a4d2; width: 18px; height: 18px; }
.side-navigation a:hover, .side-navigation a:focus-visible { color: white; background: rgba(255,255,255,.075); text-decoration: none; }
.side-navigation a.active:not(.report-link) { color: white; background: rgba(87,130,227,.22); font-weight: 720; }
.side-navigation a.active:not(.report-link)::before { content: ''; position: absolute; width: 3px; top: 10px; bottom: 10px; left: 0; border-radius: 0 3px 3px 0; background: #85b4ff; }
.side-navigation a.active .icon { color: #e4efff; }
.side-navigation a.report-link { background: #345ec1; color: #fff; font-weight: 760; margin: 6px 0 2px; box-shadow: 0 4px 13px #0002; }
.side-navigation a.report-link .icon { color: white; }
.side-navigation a.report-link:hover, .side-navigation a.report-link.active { background: #4571d3; }
.sidebar-bottom { margin-top: auto; padding-top: 20px; }
.sidebar-account { display: flex; align-items: center; gap: 10px; color: white; border-top: 1px solid #ffffff1c; padding: 16px 8px 10px; border-radius: 8px; }
.sidebar-account:hover { color: white; }
.sidebar-account .icon { margin-left: auto; color: #9fb4db; width: 16px; height: 16px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #405991; font-size: 15px; font-weight: 750; }
.account-name { display: grid; line-height: 1.2; gap: 4px; font-size: 12px; min-width: 0; }
.account-name small { color: #a5b6d7; font-size: 10px; text-transform: capitalize; }
.logout-form { padding: 0 6px; }
.logout-form button { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: none; border-radius: 8px; color: #b5c6e7; background: transparent; font-size: 12px; box-shadow: none; width: 100%; text-align: left; }
.logout-form button:hover { color: #fff; background: #ffffff14; }
.logout-form .icon { width: 16px; height: 16px; }
.nav-close, .nav-toggle { display: none; }
.top { background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 97px; padding: 20px clamp(20px, 3.2vw, 42px); }
.top-start, .top-end { display: flex; align-items: center; gap: 16px; }
.top-end { justify-content: flex-end; flex-wrap: wrap; }
.tag { font-size: 10px; letter-spacing: .12em; font-weight: 800; color: #5b6d8c; text-transform: uppercase; }
.tag-divider { color: #b1bfdb; padding: 0 5px; }
.top h1 { color: #111b39; font-size: clamp(22px,2.1vw,28px); font-weight: 780; letter-spacing: -.035em; line-height: 1.16; margin: 5px 0 0; }
.system-pill { display: inline-flex; align-items: center; gap: 7px; color: #31507f; font-weight: 750; font-size: 11px; background: #eaf0fa; border: 1px solid #e0e9f6; padding: 6px 11px; border-radius: 30px; }
.system-dot { width: 7px; height: 7px; border-radius: 50%; background: #4381ce; }
.topinfo { color: #8390a4; font-size: 11px; white-space: nowrap; }
.content { width: 100%; max-width: 1560px; padding: 26px clamp(18px,3.2vw,42px) 42px; margin: 0 auto; flex: 1; display: grid; align-content: start; gap: 22px; }
footer { padding: 16px clamp(18px,3.2vw,42px); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 10.5px; color: #8590a1; }

/* Typography and surfaces */
h2, h3 { font-weight: 760; letter-spacing: -.024em; color: #172445; }
h2 { font-size: 17px; margin: 0 0 16px; }
h3 { font-size: 14px; margin: 0 0 9px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.block { display: block; margin-top: 5px; }
.mini { font-size: 10px; font-weight: 750; color: #7887a0; letter-spacing: .08em; text-transform: uppercase; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); min-width: 0; }
.card.narrow, .narrow { max-width: 560px; }
.sectionhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.sectionhead h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; }
.stat { display: flex; flex-direction: column; justify-content: space-between; gap: 11px; background: white; border: 1px solid var(--line); border-radius: 15px; padding: 19px 21px; min-height: 112px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.stat::before { content: ''; position: absolute; inset: 0 auto 0 0; background: #5978bc; opacity: .72; width: 3px; }
.stat strong { display: block; font-size: 31px; font-weight: 790; line-height: 1.1; letter-spacing: -.045em; color: #1a2850; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: #6b7890; font-weight: 650; }
.stat.danger::before { background: #e56a76; }
.stat.danger strong { color: var(--danger); }
.stat.warning::before { background: #e6a64f; }
.stat.warning strong { color: var(--warning); }
.actionbar { background: linear-gradient(110deg,#e8effd 0%,#f5f8ff 100%); border: 1px solid #dce6f7; border-radius: 15px; padding: 19px 23px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.actionbar strong { font-size: 15px; font-weight: 790; color: #203763; }
.actionbar p { margin: 4px 0 0; font-size: 12px; }
.twocol { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.breadcrumbs { color: #728099; font-size: 12px; }
.breadcrumbs a { font-weight: 670; }

/* Tables and filters */
.tablewrap { overflow-x: auto; scrollbar-width: thin; border-radius: 10px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: 12.5px; }
th, td { padding: 13px 13px; vertical-align: middle; border-bottom: 1px solid var(--line-soft); }
th { background: #f5f7fb; color: #586984; text-transform: none; font-weight: 750; white-space: nowrap; font-size: 11.5px; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: #f8faff; }
tbody tr:last-child td { border-bottom: 0; }
td a { font-weight: 690; }
.badge { display: inline-flex; align-items: center; gap: 5px; background: #edf1f6; color: #59687d; font-weight: 750; font-size: 10.5px; letter-spacing: .005em; padding: 5px 9px; border-radius: 20px; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .65; }
.badge.overdue { color: #b23249; background: #feecef; }
.badge.soon { color: #935b11; background: #fff3dc; }
.badge.ok { color: #16744e; background: #e0f6eb; }
.badge.unknown { color: #637286; background: #edf1f6; }
.list-filters, .filterbar { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding: 15px; border: 1px solid #e7ecf4; background: #f8faff; border-radius: 11px; margin-bottom: 12px; }
.list-filters label, .filterbar label { min-width: 146px; flex: 1 1 155px; font-size: 11.5px; }
.list-filters input, .list-filters select { padding: 9px 11px; font-size: 12px; }
.list-filters button { min-height: 40px; }
.filter-summary { color: #78849a; font-size: 11px; padding-bottom: 8px; }

/* Form and action controls */
label { display: grid; gap: 6px; color: #43536f; font-size: 12px; font-weight: 680; }
input, select, textarea { background: #fff; color: var(--ink); border: 1px solid #ced7e6; border-radius: 9px; width: 100%; min-width: 0; min-height: 42px; padding: 10px 12px; transition: border .14s,box-shadow .14s; }
input::placeholder, textarea::placeholder { color: #9aa8bd; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #6d98e2; box-shadow: 0 0 0 3px #82b2fc32; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--primary); }
input[type=file] { padding: 7px 9px; }
textarea { min-height: 102px; line-height: 1.5; resize: vertical; }
button, .button { min-height: 38px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; border-radius: 9px; border: 1px solid #d3dcec; padding: 9px 14px; background: #fff; color: #2a4c91; font-size: 12px; font-weight: 730; cursor: pointer; line-height: 1.3; transition: background .14s,border-color .14s, transform .14s; box-shadow: none; }
button:hover, .button:hover { background: #f0f5ff; border-color: #b7c9e9; text-decoration: none; }
button:active, .button:active { transform: translateY(1px); }
button.primary, .primary { color: white; background: var(--primary); border-color: var(--primary); }
button.primary:hover, .primary:hover { color: white; background: var(--primary-dark); border-color: var(--primary-dark); }
.linkbutton { background: transparent; border: 0; padding: 5px 7px; min-height: 0; border-radius: 6px; color: var(--primary-dark); box-shadow: none; }
.linkbutton:hover { background: #eef3fe; }
.danger-action { color: var(--danger) !important; background: #fff8f9 !important; border-color: #f1d8de !important; }
.formgrid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.stack { display: grid; gap: 14px; }
.wide, .formgrid .wide { grid-column: 1 / -1; }
.inlineform { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.inlineform input[type=file] { max-width: 440px; }
details { background: #f9faff; border: 1px solid #e7ecf5; border-radius: 11px; margin-top: 16px; padding: 14px 16px; }
details[open] { background: #fbfcff; }
summary { color: #2b4f97; font-weight: 740; cursor: pointer; padding: 2px 0; }
details form { margin-top: 17px; }

/* Cards, files, steps and lists */
.cards { display: grid; grid-template-columns: repeat(auto-fill,minmax(235px,1fr)); gap: 15px; }
.tile { display: block; color: #1e2b4f; background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 20px; box-shadow: var(--shadow); transition: border-color .15s,box-shadow .15s; }
.tile:hover { border-color: #a9c2f0; box-shadow: 0 8px 25px #11244d0d; text-decoration: none; }
.tile p { font-size: 12px; color: #6b7890; }
.tile small { color: #78889f; }
.item { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.item:last-child { border-bottom: 0; }
.item small { display: block; color: #73839a; margin-top: 5px; }
.readtext { white-space: pre-wrap; line-height: 1.7; color: #374763; }
.step { display: flex; gap: 15px; padding: 17px 0; border-bottom: 1px solid var(--line-soft); }
.step:last-child { border-bottom: 0; }
.stepnum { width: 33px; height: 33px; flex: 0 0 33px; display: grid; place-items: center; background: #eaf0fb; color: #2d5bb0; border: 1px solid #d7e4fa; border-radius: 10px; font-weight: 800; }
.stepbody { min-width: 0; flex: 1; }
.stepbody h3 { display: flex; gap: 10px; align-items: center; }
.gallery { display: flex; flex-wrap: wrap; gap: 15px; }
.photo { display: grid; gap: 8px; width: 178px; font-size: 11px; color: #52647c; overflow-wrap: anywhere; }
.photo img, .pdf { height: 126px; width: 178px; border: 1px solid #e2e7f0; border-radius: 9px; object-fit: cover; background: #f0f4fa; }
.pdf { display: grid; place-items: center; color: #b34150; font-weight: 800; }
.filelist { display: flex; gap: 9px; flex-wrap: wrap; }
.filelist a { display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 9px; background: #f1f5fd; border: 1px solid #e1e9f7; font-size: 12px; font-weight: 650; }
.alert { color: #992d42; background: #fff0f2; border: 1px solid #fad5dc; padding: 11px 13px; border-radius: 9px; }
.detail-meta { border-top: 1px solid var(--line-soft); padding: 12px 0; color: #738199; font-size: 12px; }

/* Responsive and accessible */
@media(max-width:1150px) {
  .layout { grid-template-columns: 238px minmax(0,1fr); }
  .content { padding: 22px; }
  .stats { gap: 11px; }
  .stat { padding: 17px; }
  .topinfo { display: none; }
}
@media(max-width:960px) {
  .layout { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: fixed; width: min(290px,86vw); left: 0; top: 0; bottom: 0; height: 100dvh; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 5px 0 20px #09102524; }
  .nav-open .sidebar { transform: translateX(0); }
  .nav-scrim:not([hidden]) { display: block; position: fixed; z-index: 20; inset: 0; background: #07112788; }
  .nav-toggle, .nav-close { display: inline-flex; align-items: center; justify-content: center; width: 39px; height: 39px; padding: 8px; }
  .nav-close { margin-left: auto; background: #ffffff17; color: white; border: 0; }
  .top { min-height: 85px; padding: 16px 20px; }
  .content { padding: 22px 20px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:700px) {
  .top-end { display: none; }
  .top { min-height: 76px; }
  .top h1 { font-size: 22px; }
  .tag { font-size: 9px; }
  .content { padding: 16px 13px 28px; gap: 15px; }
  .card { padding: 17px 15px; border-radius: 12px; }
  .twocol { grid-template-columns: 1fr; gap: 15px; }
  .formgrid { grid-template-columns: 1fr; }
  .sectionhead { align-items: flex-start; flex-wrap: wrap; }
  .sectionhead .button { width: 100%; }
  .actionbar { padding: 16px; }
  .stat { min-height: 98px; padding: 15px; }
  .stat strong { font-size: 27px; }
  .list-filters label { min-width: 100%; }
  .list-filters button { width: 100%; }
  td,th { padding: 11px 10px; }
  footer { padding: 14px 17px; }
}
@media(prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
/* Dashboard-specific hierarchy without changing filters or calculations. */
.dashboard-intro { min-height: 112px; }
.dashboard-intro .mini { display: block; margin-bottom: 5px; }
.dashboard-intro strong { display: block; font-size: 16px; }
.dashboard-intro .button { white-space: nowrap; }
.dashboard-stats .stat-icon { position: absolute; right: 20px; top: 19px; width: 21px; height: 21px; padding: 2px; color: #7690c4; }
.dashboard-stats .danger .stat-icon { color: #d07888; }
.dashboard-stats .warning .stat-icon { color: #d09e54; }
.dashboard-stats .stat strong { padding-top: 8px; }
.card .sectionhead .mini { display: block; margin-bottom: 4px; }
@media(max-width:700px) { .dashboard-intro { align-items: flex-start; flex-direction: column; } .dashboard-intro .button { width: 100%; } }
