:root {
  --navy: #16324f;
  --blue: #1f4e79;
  --blue-2: #2a6cad;
  --accent: #0e9f8a;
  --bg: #eef2f7;
  --card: #ffffff;
  --text: #1c2733;
  --muted: #64748b;
  --line: #dbe4ee;
  --critical: #d62728;
  --high: #e8791a;
  --moderate: #d9a812;
  --low: #7fb3d9;
  --met: #2ca02c;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(22, 50, 79, .08), 0 6px 24px rgba(22, 50, 79, .07);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
}
a { color: var(--blue-2); text-decoration: none; }

/* ---------------- landing ---------------- */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 40px 20px;
  background: linear-gradient(160deg, #10273f 0%, #1f4e79 55%, #2a6cad 100%);
}
.hero .brand { color: #9fc3e4; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; font-weight: 600; }
.hero h1 { color: #fff; font-size: clamp(30px, 5vw, 46px); margin: 10px 0 6px; text-align: center; }
.hero p.sub { color: #c7d9ea; font-size: 16px; max-width: 620px; text-align: center; }
.portal-cards { display: flex; gap: 22px; margin-top: 38px; flex-wrap: wrap; justify-content: center; }
.portal-card {
  width: 300px; background: rgba(255,255,255,.97); border-radius: 18px; padding: 28px 26px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25); transition: transform .15s ease, box-shadow .15s ease;
}
.portal-card:hover { transform: translateY(-4px); box-shadow: 0 18px 48px rgba(0,0,0,.32); }
.portal-card .icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; font-size: 22px; color: #fff; margin-bottom: 14px;
}
.portal-card h2 { font-size: 20px; margin-bottom: 6px; }
.portal-card p { color: var(--muted); font-size: 14px; }
.portal-card .go { display: inline-block; margin-top: 16px; font-weight: 600; color: var(--blue-2); }
.hero .foot { color: #7ea3c4; font-size: 12.5px; margin-top: 46px; text-align: center; }

/* ---------------- app shell ---------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; background: var(--navy); color: #cfe0ef; padding: 22px 16px;
  display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar .logo { color: #fff; font-weight: 700; font-size: 17px; margin-bottom: 2px; }
.sidebar .tag { font-size: 11.5px; color: #8fb0cc; margin-bottom: 26px; }
.sidebar nav a {
  display: block; color: #cfe0ef; padding: 10px 12px; border-radius: 9px;
  font-size: 14.5px; margin-bottom: 3px; cursor: pointer;
}
.sidebar nav a:hover { background: rgba(255,255,255,.08); }
.sidebar nav a.active { background: var(--blue-2); color: #fff; font-weight: 600; }
.sidebar .back { margin-top: auto; font-size: 13px; color: #8fb0cc; }
.main { flex: 1; padding: 28px 34px 60px; max-width: 1180px; }
.pagehead h1 { font-size: 24px; }
.pagehead .sub { color: var(--muted); font-size: 14px; margin: 2px 0 22px; }

.panel { display: none; }
.panel.active { display: block; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 22px; }
.card h3 { font-size: 15.5px; margin-bottom: 14px; color: var(--navy); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; }
.kpi .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.kpi .value { font-size: 30px; font-weight: 700; color: var(--navy); margin-top: 2px; }
.kpi .value small { font-size: 15px; color: var(--muted); font-weight: 500; }

.btn {
  background: var(--blue); color: #fff; border: none; border-radius: 9px; padding: 10px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--blue-2); }
.btn.ghost { background: #e7eef6; color: var(--blue); }

textarea, select, input[type=text] {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px;
  font: inherit; font-size: 14px; background: #fff; color: var(--text);
}
textarea:focus, select:focus, input:focus { outline: 2px solid var(--blue-2); outline-offset: -1px; }

table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th { text-align: left; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; padding: 8px 10px; border-bottom: 2px solid var(--line); }
table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.data tr:last-child td { border-bottom: none; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; color: #fff; }
.badge.Critical { background: var(--critical); }
.badge.High { background: var(--high); }
.badge.Moderate { background: var(--moderate); }
.badge.Low { background: var(--low); }
.badge.Met { background: var(--met); }
.badge.imp { background: #e7eef6; color: var(--blue); }

.barrow { display: grid; grid-template-columns: 170px 1fr 44px; align-items: center; gap: 10px; margin: 7px 0; font-size: 13.5px; }
.barrow .name { text-align: right; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barrow .track { background: #e7eef6; border-radius: 6px; height: 16px; position: relative; overflow: hidden; }
.barrow .fill { height: 100%; border-radius: 6px; }
.barrow .num { font-weight: 700; color: var(--navy); font-size: 13px; }

.duo { display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: center; margin: 6px 0; font-size: 13px; }
.duo .name { text-align: right; }
.duo .pair { position: relative; height: 26px; }
.duo .req, .duo .you { position: absolute; left: 0; border-radius: 5px; }
.duo .req { top: 2px; height: 10px; background: #cdd9e6; width: calc(var(--v) * 20%); }
.duo .you { top: 14px; height: 10px; background: var(--blue-2); width: calc(var(--v) * 20%); }
.legend { font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 5px 0 14px; }

.ringwrap { display: flex; align-items: center; gap: 24px; }
.ring { width: 130px; height: 130px; }
.ring .bg { stroke: #e7eef6; }
.ring .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring text { font-size: 24px; font-weight: 700; fill: var(--navy); }

.chatlog { border: 1px solid var(--line); border-radius: 10px; padding: 14px; min-height: 160px; max-height: 340px; overflow-y: auto; background: #fbfdff; margin-bottom: 12px; }
.chatlog .q { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.chatlog .a { white-space: pre-wrap; font-size: 14px; margin-bottom: 14px; }
.chatrow { display: flex; gap: 10px; }
.chatrow input { flex: 1; }
.sugg { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sugg button { background: #e7eef6; border: none; color: var(--blue); border-radius: 16px; padding: 5px 13px; font-size: 12.5px; cursor: pointer; }
.sugg button:hover { background: #d5e3f0; }

.notice { background: #fdf6e7; border-left: 4px solid var(--moderate); border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #6b5714; margin-bottom: 16px; }
.plan { white-space: pre-wrap; font-size: 14px; background: #f2f8f6; border: 1px solid #cfe7e0; border-radius: 10px; padding: 16px 18px; }

/* ---------------- employee page ---------------- */
.empwrap { max-width: 980px; margin: 0 auto; padding: 26px 20px 60px; }
.emptop { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.emptop .brand { font-weight: 700; color: var(--navy); font-size: 17px; }
.emptop a { font-size: 13px; }
.hello { background: linear-gradient(135deg, #16324f, #2a6cad); color: #fff; border-radius: var(--radius); padding: 24px 26px; margin-bottom: 22px; }
.hello h1 { font-size: 22px; margin-bottom: 4px; }
.hello p { color: #c7d9ea; font-size: 14px; }
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; align-items: center; gap: 8px; padding: 12px; }
  .sidebar nav { display: flex; gap: 4px; flex-wrap: wrap; }
  .sidebar .tag, .sidebar .back { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}

.addgrid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.addgrid label,.skillrow{font-size:13.5px;color:var(--muted)}
.addgrid input{display:block;width:100%;margin-top:4px}
.skillgroup{margin-top:10px}
.skillgroup h4{margin:6px 0;font-size:13px;text-transform:uppercase;letter-spacing:.04em}
.skillgroup{display:grid;grid-template-columns:repeat(3,1fr);gap:6px 18px}
.skillgroup h4{grid-column:1/-1}
.skillrow{display:flex;justify-content:space-between;align-items:center;gap:8px}
.skillrow select{width:64px}
@media(max-width:700px){.addgrid{grid-template-columns:1fr}.skillgroup{grid-template-columns:1fr}}
