/* SkyKeeper CAMO — shared stylesheet
 * v0.1 (first release)
 */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: 'Segoe UI', Tahoma, sans-serif; background: #eef1f5; color: #1f2937; }
a { color: #1a56db; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

/* ---------- TOP BAR ---------- */
.top {
  height: 52px; background: linear-gradient(90deg,#0b2545 0%, #13315c 100%);
  color: #fff; display:flex; align-items:center; padding: 0 18px; gap: 22px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15); position: sticky; top: 0; z-index: 30;
}
.top .brand { display:flex; align-items:center; gap:10px; font-weight:700; letter-spacing:0.3px; }
.top .brand .logo {
  width:30px; height:30px; background:#ffb703; border-radius:6px;
  display:grid; place-items:center; color:#0b2545; font-weight:800; font-size:14px;
}
.top .brand a { color: #fff; }
.top .brand a:hover { text-decoration: none; }
.top .brand span.sub { font-weight: 400; opacity:0.7; font-size:12px; margin-left:4px; }
.top .org { font-size: 13px; opacity: 0.9; border-left: 1px solid rgba(255,255,255,0.2); padding-left: 16px; }
.top .spacer { flex:1; }
.top .search {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.1); border-radius: 4px;
  padding: 6px 10px; color:#fff; width: 280px; font-size: 13px;
}
.top .search::placeholder { color: rgba(255,255,255,0.6); }
.top .user { display:flex; align-items:center; gap:10px; font-size:13px; }
.top .avatar { width:32px; height:32px; border-radius:50%; background:#ffb703; color:#0b2545; display:grid; place-items:center; font-weight:700; font-size:12px; }
.top .bell { font-size: 16px; opacity: 0.9; position: relative; cursor: pointer; }
.top .bell .dot { position:absolute; top:-4px; right:-4px; background:#ef4444; color:#fff; font-size:9px; width:14px; height:14px; border-radius:50%; display:grid; place-items:center; font-weight:700; }

/* ---------- LAYOUT ---------- */
.body { display:grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 52px); }

.side { background: #fff; border-right: 1px solid #e2e8f0; padding: 14px 0; position: sticky; top: 52px; height: calc(100vh - 52px); overflow-y:auto; }
.side h4 { font-size: 10px; text-transform: uppercase; color:#64748b; padding: 10px 18px 6px; letter-spacing: 0.6px; }
.side ul { list-style:none; }
.side li {
  padding: 0; font-size: 13.5px;
}
.side li a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px; color: #334155;
  border-left: 3px solid transparent; cursor: pointer;
}
.side li a:hover { background: #f1f5f9; text-decoration: none; }
.side li.active a { background:#e0ecff; border-left-color:#1a56db; color:#0b2545; font-weight:600; }
.side li .i { width: 18px; display: inline-block; text-align: center; opacity: 0.8; }
.side .foot { margin-top: 20px; padding: 14px 18px; border-top: 1px solid #e2e8f0; font-size: 11px; color: #94a3b8; }

.main { overflow-y:auto; padding: 22px 30px 48px; }
.crumbs { font-size: 12px; color:#64748b; margin-bottom: 8px; }
.crumbs a { color:#64748b; }
.crumbs a:hover { color:#1a56db; }
.title { font-size: 24px; font-weight: 700; color:#0b2545; margin-bottom: 6px; display: flex; align-items: center; gap: 12px; }
.subtitle { font-size: 13.5px; color:#64748b; margin-bottom: 22px; }

/* ---------- PILLS ---------- */
.pill { display:inline-block; padding: 2px 10px; font-size: 11px; border-radius: 999px; font-weight: 600; vertical-align: middle; }
.pill.ok { background:#dcfce7; color:#166534; }
.pill.warn { background:#fef3c7; color:#92400e; }
.pill.danger { background:#fee2e2; color:#991b1b; }
.pill.info { background:#dbeafe; color:#1e40af; }
.pill.neutral { background:#e2e8f0; color:#334155; }

/* ---------- KPI CARDS ---------- */
.kpis { display:grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi { background:#fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 16px 18px; position: relative; }
.kpi h3 { font-size: 12px; color:#64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px; }
.kpi .val { font-size: 30px; font-weight: 300; color: #0b2545; }
.kpi .val.warn { color:#d97706; }
.kpi .val.danger { color:#dc2626; }
.kpi .val.ok { color: #16a34a; }
.kpi .sub { font-size: 12px; color:#64748b; margin-top: 4px; }
.kpi .ico { position:absolute; top: 16px; right: 16px; font-size: 20px; opacity: 0.4; }

/* ---------- CARDS ---------- */
.row { display:grid; gap: 16px; margin-bottom: 22px; }
.row.two { grid-template-columns: 1.6fr 1fr; }
.row.two-eq { grid-template-columns: 1fr 1fr; }
.row.three { grid-template-columns: 1fr 1fr 1fr; }
.row.four { grid-template-columns: repeat(4, 1fr); }
.card { background:#fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 18px; }
.card.flush { padding: 0; }
.card h2 { font-size: 14px; font-weight: 700; color:#0b2545; margin-bottom: 14px; display:flex; align-items:center; justify-content:space-between; }
.card h2 .link { font-size: 12px; font-weight: 500; }

/* ---------- TABLES ---------- */
table { width:100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 600; color:#475569; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px;
     padding: 9px 12px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; color:#1f2937; vertical-align: top; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f8fafc; }
td .mono, .mono { font-family: 'Consolas', 'Courier New', monospace; font-size: 12px; color:#475569; }

/* ---------- BUTTONS ---------- */
.btn { background:#fff; color:#0b2545; border: 1px solid #cbd5e1; padding: 7px 14px; border-radius: 4px; font-size: 13px; font-weight: 500; transition: background .1s; text-decoration: none; display: inline-block; }
.btn:hover { background:#f1f5f9; text-decoration: none; }
.btn.primary { background:#1a56db; color:#fff; border-color:#1a56db; }
.btn.primary:hover { background:#1e4bb8; }
.btn.warn { background:#f59e0b; color:#fff; border-color:#f59e0b; }
.btn.danger { background:#ef4444; color:#fff; border-color:#ef4444; }
.btn.sm { padding: 4px 10px; font-size: 12px; }

.toolbar { display:flex; gap: 10px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.toolbar .spc { flex: 1; }
.toolbar input.f, .toolbar select.f {
  padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 13px; width: 220px; background: #fff;
}

/* ---------- AIRCRAFT HEADER ---------- */
.acheader {
  background: linear-gradient(90deg, #e0ecff 0%, #f5faff 100%);
  border: 1px solid #cde0fa; border-radius: 8px; padding: 20px 24px; margin-bottom: 20px;
  display:flex; gap: 26px; align-items: flex-start;
}
.acheader .img {
  width: 160px; height: 96px; background: #0b2545; border-radius: 6px;
  display:grid; place-items:center; color:#ffb703; font-weight: 800; font-size: 28px; letter-spacing: 1px;
  box-shadow: 0 2px 5px rgba(11,37,69,0.2); flex-shrink: 0;
}
.acheader .info { flex: 1; }
.acheader .reg { font-size: 26px; font-weight: 700; color:#0b2545; letter-spacing: 2px; }
.acheader .model { font-size: 14px; color:#475569; margin-top: 2px; }
.acheader .meta { display:grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 14px; font-size: 13px; }
.acheader .meta .lbl { color:#64748b; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; }
.acheader .meta .vl { font-weight: 600; color:#0b2545; margin-top: 2px; }

/* ---------- TABS ---------- */
.tabs { display:flex; gap: 2px; border-bottom: 1px solid #e2e8f0; margin-bottom: 20px; }
.tab { padding: 10px 16px; font-size: 13px; color:#64748b; border-bottom: 2px solid transparent; cursor: pointer; font-weight: 500; }
.tab:hover { color:#1a56db; }
.tab.active { color:#0b2545; border-bottom-color:#1a56db; font-weight: 600; }
.tabpane { display: none; }
.tabpane.active { display: block; }

/* ---------- BARS ---------- */
.bar { position: relative; height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden; width: 120px; display:inline-block; vertical-align: middle; }
.bar > span { position:absolute; top:0; left:0; bottom:0; background:#22c55e; }
.bar > span.warn { background:#f59e0b; }
.bar > span.danger { background:#ef4444; }

/* ---------- TIMELINE ---------- */
.tl { position: relative; padding-left: 22px; }
.tl::before { content:""; position:absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background:#cbd5e1; }
.tl .ev { position: relative; margin-bottom: 14px; }
.tl .ev::before { content:""; position:absolute; left: -19px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background:#1a56db; border: 2px solid #fff; box-shadow: 0 0 0 1px #1a56db; }
.tl .ev .d { font-size: 11px; color:#64748b; }
.tl .ev .t { font-size: 13px; color:#0b2545; font-weight: 600; }
.tl .ev .desc { font-size: 12px; color:#475569; }

/* ---------- WORK ORDER ---------- */
.wo-head { display:grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.wo-head .lbl { font-size: 11px; color:#64748b; text-transform: uppercase; }
.wo-head .vl { font-size: 14px; font-weight: 600; color:#0b2545; margin-top: 2px; }

.chk { display:flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 6px; margin-bottom: 8px; font-size: 13px; cursor: pointer; transition: background .1s; }
.chk:hover { background: #f8fafc; }
.chk .box {
  width: 18px; height: 18px; border: 2px solid #94a3b8; border-radius: 3px; flex-shrink:0; display:grid; place-items:center; color:#fff; font-weight: 700; font-size: 12px; background: #fff;
}
.chk.done .box { background:#22c55e; border-color:#22c55e; }
.chk.done .t { text-decoration: line-through; color: #94a3b8; }
.chk .t { flex: 1; }
.chk .ref { font-family: 'Consolas', monospace; font-size: 11px; color: #1a56db; }
.chk .who { font-size: 11px; color: #64748b; min-width: 130px; text-align: right; }

/* ---------- BANNERS ---------- */
.banner { padding: 12px 18px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; display:flex; align-items: center; gap: 12px; }
.banner.danger { background:#fef2f2; border: 1px solid #fecaca; color:#991b1b; }
.banner.warn { background:#fffbeb; border: 1px solid #fde68a; color:#92400e; }
.banner.ok { background:#f0fdf4; border: 1px solid #bbf7d0; color:#166534; }
.banner.info { background:#eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.banner .big { font-size: 18px; }

/* ---------- STAT LIST ---------- */
.statlist div { display:flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed #e2e8f0; }
.statlist div:last-child { border-bottom: none; }
.statlist div b { color: #0b2545; }

/* ---------- MODAL ---------- */
.modal-bg { display:none; position:fixed; inset:0; background: rgba(11,37,69,0.45); z-index: 40; align-items:center; justify-content:center; }
.modal-bg.show { display:flex; }
.modal { background:#fff; border-radius:8px; width: 560px; max-width: 92vw; max-height: 90vh; overflow-y: auto; padding: 22px 24px; box-shadow: 0 12px 40px rgba(0,0,0,0.25); }
.modal h2 { font-size: 16px; color:#0b2545; margin-bottom: 10px; }
.modal .close { float: right; font-size: 22px; cursor:pointer; color:#64748b; line-height: 1; }
.modal label { display:block; font-size: 11px; color:#64748b; text-transform: uppercase; margin-top: 10px; margin-bottom: 3px; letter-spacing: 0.3px; }
.modal input, .modal textarea, .modal select { width: 100%; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 13px; font-family: inherit; }
.modal .actions { display:flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------- LIST GROUP ---------- */
.lst { font-size:13px; line-height: 2; list-style: none; }
.lst li { display: flex; gap: 8px; align-items: baseline; }
.lst li:before { content: "▸"; color: #1a56db; font-size: 11px; }

/* ---------- HELPERS ---------- */
.hint { font-size: 12px; color:#64748b; margin-top: 8px; }
.divider { height: 1px; background: #e2e8f0; margin: 14px 0; }
.flex { display: flex; gap: 12px; align-items: center; }
.flex .spc { flex: 1; }

/* ---------- NOTIFICATION DROPDOWN ---------- */
.notif {
  display: none; position: absolute; right: 60px; top: 48px; width: 380px; background: #fff;
  border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); z-index: 35;
}
.notif.show { display: block; }
.notif h3 { padding: 12px 16px; font-size: 13px; color: #0b2545; border-bottom: 1px solid #e2e8f0; }
.notif .item { padding: 10px 16px; border-bottom: 1px solid #f1f5f9; font-size: 12px; color: #334155; }
.notif .item:last-child { border-bottom: none; }
.notif .item b { color: #0b2545; display: block; font-size: 13px; margin-bottom: 2px; }
.notif .item .d { color: #94a3b8; font-size: 11px; margin-top: 4px; }
