/* Fortune Publishing Group • Book Engineering Workbook
   Lightweight, clean UI for fast deployment.
*/

:root{
  --bg:#0b1020;
  --panel:#0f1730;
  --panel2:#111b38;
  --text:#eef2ff;
  --muted:#a9b3d6;
  --line:rgba(255,255,255,.08);
  --accent:#5aa7ff;
  --accent2:#7bd7ff;
  --danger:#ff6b6b;
  --good:#38d996;
  --shadow: 0 12px 40px rgba(0,0,0,.25);
  --radius:16px;
  --radius2:22px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background: radial-gradient(1200px 700px at 18% 10%, rgba(90,167,255,.18), transparent 60%),
              radial-gradient(900px 600px at 70% 22%, rgba(123,215,255,.10), transparent 60%),
              var(--bg);
  color:var(--text);
  font-family:var(--sans);
}

.app-shell{min-height:100%; display:flex; flex-direction:column}
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  background:rgba(15,23,48,.65);
  backdrop-filter: blur(10px);
}
.brand{display:flex; align-items:center; gap:12px}
.brand__mark{
  width:44px; height:44px; border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  font-weight:800; letter-spacing:.8px;
  background:linear-gradient(135deg, rgba(90,167,255,.95), rgba(123,215,255,.85));
  color:#061023;
  box-shadow: var(--shadow);
}
.brand__title{font-weight:800; font-size:14px}
.brand__subtitle{font-size:12px; color:var(--muted); margin-top:2px}

.topbar__actions{display:flex; gap:10px; align-items:center}

.main{display:flex; gap:14px; padding:14px; flex:1; min-height:0}
.sidebar{
  width:320px; min-width:280px;
  background:rgba(15,23,48,.70);
  border:1px solid var(--line);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding:14px;
  display:flex; flex-direction:column; gap:14px;
  overflow:auto;
}
.sidebar__section{padding:10px; border:1px solid var(--line); border-radius:16px; background:rgba(17,27,56,.55)}
.sidebar__label{font-size:12px; color:var(--muted); margin-bottom:8px; letter-spacing:.4px; text-transform:uppercase}
.sidebar__hint{font-size:12px; color:var(--muted); line-height:1.45}
.sidebar__section--muted{background:transparent; border:none; padding:0}

.content{
  flex:1;
  background:rgba(15,23,48,.70);
  border:1px solid var(--line);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding:18px;
  overflow:auto;
  min-height:0;
}

.nav{display:flex; flex-direction:column; gap:6px}
.nav__item{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid transparent;
  color:var(--text);
  cursor:pointer;
  background:rgba(255,255,255,.03);
}
.nav__item:hover{border-color:rgba(90,167,255,.35); background:rgba(90,167,255,.08)}
.nav__item--active{border-color:rgba(90,167,255,.65); background:rgba(90,167,255,.14)}
.nav__meta{font-size:12px; color:var(--muted)}

h1{margin:0 0 6px 0; font-size:18px}
h2{margin:18px 0 10px 0; font-size:14px; color:var(--muted); letter-spacing:.2px}
.p{color:var(--muted); margin:8px 0 0 0; line-height:1.55; font-size:13px}

.btn{
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
}
.btn:hover{border-color:rgba(90,167,255,.35); background:rgba(90,167,255,.08)}
.btn--primary{background:rgba(90,167,255,.18); border-color:rgba(90,167,255,.5)}
.btn--block{width:100%}
.btn--icon{padding:8px 10px; width:42px; height:42px; border-radius:12px}

.select, .input, .textarea{
  width:100%;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--text);
  padding:10px 12px;
  outline:none;
}
.textarea{min-height:110px; resize:vertical}
.input--sm{padding:8px 10px; border-radius:10px; font-size:13px}
.small{font-size:12px; color:var(--muted)}
.select {
  color: var(--text);
  background: rgba(255,255,255,.03);
}

.select option {
  color: #111827 !important;
  background: #ffffff !important;
}

.select:focus,
.select:hover {
  color: var(--text);
}
.grid{display:grid; gap:10px}
.grid--2{grid-template-columns:1fr 1fr}
.grid--3{grid-template-columns:1fr 1fr 1fr}

.card{
  border:1px solid var(--line);
  border-radius:18px;
  padding:12px;
  background:rgba(17,27,56,.55);
}
.card__title{font-weight:800; font-size:13px}
.card__sub{color:var(--muted); font-size:12px; margin-top:4px; line-height:1.45}

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(255,255,255,.02);
}
.table th, .table td{
  padding:10px 10px;
  border-bottom:1px solid var(--line);
  font-size:13px;
  vertical-align:top;
}
.table th{
  text-align:left;
  color:var(--muted);
  background:rgba(255,255,255,.03);
  font-size:12px;
  letter-spacing:.4px;
  text-transform:uppercase;
}
.table tr:last-child td{border-bottom:none}
.badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  font-size:12px;
  color:var(--muted);
}
.badge--good{border-color:rgba(56,217,150,.35); color:#bff6de; background:rgba(56,217,150,.10)}
.badge--warn{border-color:rgba(255,214,102,.35); color:#ffe7b8; background:rgba(255,214,102,.12)}
.badge--bad{border-color:rgba(255,107,107,.35); color:#ffd0d0; background:rgba(255,107,107,.12)}

.help{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px; height:22px;
  border-radius:999px;
  border:1px solid rgba(90,167,255,.45);
  color:rgba(123,215,255,.95);
  font-weight:800;
  cursor:help;
  margin-left:6px;
  user-select:none;
}
hr{border:none; border-top:1px solid var(--line); margin:14px 0}

.modal-backdrop{
  position:fixed; inset:0;
  display:flex; align-items:center; justify-content:center;
  padding:18px;
  background:rgba(0,0,0,.55);
}
.hidden{display:none}
.modal{
  width:min(860px, 96vw);
  background:rgba(15,23,48,.95);
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal__header{display:flex; align-items:center; justify-content:space-between; padding:14px 14px; border-bottom:1px solid var(--line)}
.modal__title{font-weight:900}
.modal__body{padding:14px}
.modal__footer{padding:14px; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:10px}
.code{
  font-family:var(--mono);
  background:rgba(0,0,0,.25);
  border:1px solid var(--line);
  padding:10px 12px;
  border-radius:14px;
  overflow:auto;
  font-size:12px;
}
