@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700;800&display=swap');
:root {
  --red: #C8102E;
  --red-dark: #9B0C24;
  --red-soft: #FDECEF;
  --navy: #2A1E3D;
  --ink: #1B2333;
  --muted: #667085;
  --line: #e4e7ec;
  --bg: #F3F4F7;
  --card: #ffffff;
  --green: #12805c;
  --green-soft: #e3f4ec;
  --amber: #a15c00;
  --amber-soft: #fdf1dc;
  --blue: #1d5fa8;
  --blue-soft: #e5eefa;
  --gray-soft: #eef0f3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .06);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .10);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14.5px; line-height: 1.6;
}
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.en { direction: ltr; text-align: left; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  background: #fff; color: var(--ink); padding: 0 28px; height: 64px;
  display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--line);
}
.topbar .logo { display: flex; align-items: center; height: 44px; }
.topbar .logo img { height: 38px; }
.topbar .tb-sep { width: 1px; height: 28px; background: var(--line); }
.topbar .app-title { font-family: 'Poppins', 'Inter', sans-serif; font-weight: 700; font-size: 16px; color: var(--navy); white-space: nowrap; }
.topbar .app-title:hover { text-decoration: none; color: var(--red); }
.topbar .release { font-size: 11.5px; font-weight: 600; color: var(--red); background: var(--red-soft); border: 1px solid #f6c3cc; padding: 2px 10px; border-radius: 99px; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); background: #fff; }
.icon-btn:hover { border-color: var(--red); color: var(--red); text-decoration: none; }
.user-chip { position: relative; display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; background: #fff; box-shadow: var(--shadow); }
.user-chip:hover { border-color: #d0d5dd; }
.user-chip .uc-text { line-height: 1.2; max-width: 210px; }
.user-chip .uc-text b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .uc-text span { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .chev { color: var(--muted); transition: transform .15s; }
.user-chip.open .chev { transform: rotate(180deg); }
.user-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; }
.user-chip.open .user-menu { display: block; }
.user-menu .um-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; line-height: 1.3; }
.user-menu .um-head b { display: block; font-size: 13.5px; }
.user-menu .um-head span { font-size: 12px; color: var(--muted); }
.user-menu a, .user-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--ink); font: inherit; font-size: 13.5px; background: none; border: 0; cursor: pointer; }
.user-menu a:hover, .user-menu button:hover { background: var(--red-soft); color: var(--red); text-decoration: none; }

.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13.5px; background: var(--red-soft); color: var(--red); letter-spacing: .3px; }
.avatar.solid { width: 32px; height: 32px; font-size: 12.5px; background: var(--red); color: #fff; }

/* ---------- hero band ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 46px 46px,
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 46px 46px,
    radial-gradient(90% 160% at 100% 100%, #2B2347 0%, rgba(43,35,71,0) 60%),
    linear-gradient(120deg, #C8102E 0%, #B00E29 45%, #8A0F2C 100%);
  padding: 30px 0 34px;
  box-shadow: 0 16px 28px -14px rgba(16, 24, 40, .22);
}
.hero-in { max-width: 1240px; margin: 0 auto; padding: 0 18px; position: relative; z-index: 1; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.hero-main { min-width: 0; flex: 1; }
.hero .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; opacity: .85; display: flex; align-items: center; gap: 10px; }
.hero .eyebrow::after { content: ''; width: 34px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.55); }
.hero h1, .hero .page-head h1 { font-family: 'Poppins', 'Inter', sans-serif; font-size: 30px; font-weight: 800; line-height: 1.2; margin: 8px 0 2px; color: #fff; }
.hero .page-head { margin: 0; align-items: flex-start; }
.hero .page-head .muted, .hero .muted, .hero .head-mini { color: rgba(255,255,255,.85) !important; font-size: 13px; }
.hero .page-head .btn.secondary { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.hero .page-head .btn.secondary:hover { background: rgba(255,255,255,.22); }
.hero .page-head .btn:not(.secondary) { background: #fff; color: var(--red); }
.hero .page-head .btn:not(.secondary):hover { background: #ffecef; }
.hero .page-head .pill { background: rgba(255,255,255,.95); }
.hero .crumbs { margin: 0 0 10px; font-size: 12.5px; }
.hero .crumbs:empty { display: none; }
.tile p .pill { margin: 2px 2px 0 0; }
.hero .crumbs a { color: rgba(255,255,255,.85); }
.hero .crumbs b { color: #fff; }
.hero .crumbs .sep { color: rgba(255,255,255,.5); }
.hero-side { display: flex; }
.hero-side:empty { display: none; }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.hstat { min-width: 112px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08); border-radius: 12px; padding: 10px 14px; backdrop-filter: blur(2px); }
.hstat b { display: block; font-family: 'Poppins', 'Inter', sans-serif; font-size: 21px; font-weight: 700; line-height: 1.2; }
.hstat span { display: block; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; opacity: .85; }
.hero-tabs:empty { display: none; }
.hero-tabs { margin-top: 20px; }
.segmented { display: inline-flex; gap: 4px; padding: 4px; border-radius: 99px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); }
.seg { padding: 7px 18px; border-radius: 99px; color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }
.seg:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.seg.on { background: #fff; color: var(--red); box-shadow: 0 2px 6px rgba(0,0,0,.15); }
/* light version (inside white panels) */
.segmented.light { border-color: var(--line); background: #f3f4f7; }
.segmented.light .seg { color: var(--muted); cursor: pointer; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; }
.segmented.light .seg.on { background: #fff; color: var(--red); box-shadow: var(--shadow); }

.page { max-width: 1240px; margin: 24px auto 0; padding: 0 18px 60px; position: relative; z-index: 2; }
h1 { font-family: 'Poppins', 'Inter', sans-serif; font-size: 24px; margin: 0 0 4px; }
h2 { font-family: 'Poppins', 'Inter', sans-serif; font-size: 18px; font-weight: 700; margin: 0 0 12px; color: var(--navy); }
h3 { font-size: 16px; margin: 0 0 8px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.kicker { font-size: 10.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--red); display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-title h2 { margin: 0; }
.section-tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--red); background: var(--red-soft); padding: 2px 10px; border-radius: 99px; }

/* ---------- forms ---------- */
label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 4px; font-weight: 600; }
input[type=text], input[type=password], input[type=number], input[type=search], textarea, select {
  width: 100%; font: inherit; font-size: 15px; padding: 8px 11px; border: 1px solid #cfd4dc; border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(192,0,0,.25); border-color: var(--red); }
input:disabled, textarea:disabled, select:disabled { background: #f6f7f9; color: #3b4350; }
textarea { resize: vertical; min-height: 64px; }
.field { margin-bottom: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 15px; font-weight: 600;
  padding: 8px 16px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; background: var(--red); color: #fff; white-space: nowrap;
}
.btn:hover { background: var(--red-dark); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--ink); border-color: #cfd4dc; }
.btn.secondary:hover { background: #f3f4f6; }
.btn.green { background: var(--green); }
.btn.green:hover { background: #0b6448; }
.btn.ghost { background: transparent; color: var(--red); border-color: transparent; padding: 6px 10px; }
.btn.ghost:hover { background: var(--red-soft); }
.btn.sm { font-size: 13px; padding: 5px 11px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 10px; border-radius: 99px; white-space: nowrap; border: 1px solid transparent; }
.pill.gray { background: #F1F3F6; color: #475467; border-color: #E2E6EC; }
.pill.blue { background: var(--blue-soft); color: var(--blue); border-color: #cddcf1; }
.pill.amber { background: var(--amber-soft); color: var(--amber); border-color: #f3dcb0; }
.pill.green { background: var(--green-soft); color: var(--green); border-color: #bfe5d3; }
.pill.red { background: var(--red-soft); color: var(--red); border-color: #f6c3cc; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th { background: #f8f9fb; color: #475467; font-weight: 600; font-size: 12.5px; text-align: start; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.grid tr:hover td { background: #fcfcfd; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

/* ---------- alerts / toast ---------- */
.alert { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.alert.info { background: var(--blue-soft); color: #173e6b; }
.alert.warn { background: var(--amber-soft); color: #6b3d00; }
.alert.error { background: var(--red-soft); color: #7a0000; }
.alert.ok { background: var(--green-soft); color: #0b5139; }
.alert ul { margin: 6px 0 0; padding-inline-start: 20px; }
#toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #1d232b; color: #fff; padding: 10px 18px;
  border-radius: 10px; font-size: 14px; z-index: 100; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 90vw;
}
#toast.show { opacity: 1; }
#toast.error { background: #a00000; }

/* ---------- dashboard ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.tile { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.tile:hover { border-color: #f1b4bf; text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tile .ico { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--red-soft); color: var(--red); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.tile h3 { margin: 2px 0 4px; font-size: 15px; font-weight: 600; }
.tile p { margin: 0; color: var(--muted); font-size: 13px; }
.section-label { font-size: 10.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--red); margin: 26px 0 10px; }

/* ---------- people cards (review queue) ---------- */
.queue-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.queue-head h2 { margin: 0; }
.progress { min-width: 200px; flex: 0 1 260px; }
.progress .pl { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.progress .bar { height: 6px; border-radius: 6px; background: #E9ECF1; overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: var(--red); border-radius: 6px; min-width: 6px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 16px; }
.pcell { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pcard { position: relative; display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; color: var(--ink); min-height: 92px; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.pcard:hover { border-color: #f1b4bf; transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.pcard .pc-body { min-width: 0; flex: 1; }
.pcard .pc-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .pc-title { font-size: 11.5px; color: #5b6b86; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .pc-meta .pill { white-space: normal; max-width: 100%; }
.pcard .pc-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.pcard .pc-score { font-size: 11.5px; color: var(--muted); }
.pcard .pc-score b { color: var(--ink); }
.pcard.turn { background: linear-gradient(135deg, #C8102E, #A50D26); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(200,16,46,.25); }
.pcard.turn .pc-title, .pcard.turn .pc-score, .pcard.turn .pc-score b { color: rgba(255,255,255,.88); }
.pcard.turn .avatar { background: rgba(255,255,255,.18); color: #fff; }
.pcard.turn .pill { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.4); }
.pc-links { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-link { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--red); background: #fff; border: 1px solid #f1c5cd; border-radius: 8px; padding: 2px 9px; cursor: pointer; font-family: inherit; }
.chip-link:hover { background: var(--red-soft); text-decoration: none; }
.chip-link.solid { background: var(--red); color: #fff; border-color: var(--red); }
.chip-link.solid:hover { background: var(--red-dark); }

/* ---------- appraisal ---------- */
.emp-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 18px; }
.emp-head .k { font-size: 12.5px; color: var(--muted); }
.emp-head .v { font-weight: 700; }
.stepper { display: flex; gap: 0; margin: 16px 0 4px; overflow-x: auto; }
.step { flex: 1; min-width: 120px; text-align: center; position: relative; padding-top: 30px; font-size: 13px; color: var(--muted); }
.step::before { content: ''; position: absolute; top: 11px; right: 50%; left: -50%; height: 3px; background: var(--line); z-index: 0; }
.step:first-child::before { display: none; }
.step .dot { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 25px; height: 25px; border-radius: 50%; background: #fff; border: 3px solid var(--line); z-index: 1; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.step.done { color: var(--green); }
.step.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.step.done::before, .step.current::before { background: var(--green); }
.step.current { color: var(--red); font-weight: 700; }
.step.current .dot { border-color: var(--red); color: var(--red); }
.step .when { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }

.scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.score { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fcfcfd; }
.score .k { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.score .v { font-size: 24px; font-weight: 800; direction: ltr; unicode-bidi: isolate; display: block; text-align: start; }
.score .s { font-size: 12.5px; color: var(--muted); }
.score.main { background: var(--red); color: #fff; border-color: var(--red); }
.score.main .k, .score.main .s { color: rgba(255,255,255,.85); }
.score-basis { font-size: 13px; color: var(--muted); margin-top: 8px; }

.goal { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; overflow: hidden; background: #fff; }
.goal-top { padding: 14px 16px; background: #fafbfc; border-bottom: 1px solid var(--line); }
.goal-top .gt { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.goal-title { font-weight: 800; font-size: 16px; direction: ltr; text-align: left; unicode-bidi: isolate; flex: 1; min-width: 240px; }
.goal-no { background: var(--red); color: #fff; border-radius: 8px; padding: 0 9px; font-weight: 800; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 8px; font-size: 13.5px; }
.facts span b { font-weight: 700; }
details.cascade { margin-top: 8px; font-size: 13px; }
details.cascade summary { cursor: pointer; color: var(--muted); }
details.cascade dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 6px 0 0; direction: ltr; text-align: left; }
details.cascade dt { color: var(--muted); }
details.cascade dd { margin: 0; }
.goal-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.gcol { padding: 14px 16px; border-inline-start: 1px solid var(--line); }
.gcol:first-child { border-inline-start: 0; }
.gcol h4 { margin: 0 0 10px; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.gcol .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ach { font-size: 13px; color: var(--muted); }
.ach b { color: var(--ink); direction: ltr; unicode-bidi: isolate; }
.gcol.locked { background: #fbfbfc; }
.readval { font-weight: 700; padding: 6px 0; }
.readval.empty { color: #98a2b3; font-weight: 400; }
.comment-read { white-space: pre-wrap; font-size: 14px; background: #f6f7f9; border-radius: 8px; padding: 6px 10px; min-height: 34px; }

.files { list-style: none; margin: 8px 0 0; padding: 0; }
.files li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; font-size: 13.5px; background: #fff; }
.files li a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files li .sz { color: var(--muted); font-size: 12px; direction: ltr; }
.files li button { border: 0; background: none; color: var(--red); cursor: pointer; font-size: 16px; padding: 0 4px; }
.upload-zone { border: 2px dashed #cfd4dc; border-radius: 10px; padding: 10px; text-align: center; font-size: 13.5px; color: var(--muted); cursor: pointer; margin-top: 6px; }
.upload-zone:hover, .upload-zone.drag { border-color: var(--red); color: var(--red); background: var(--red-soft); }

.comp { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.comp-head { padding: 12px 16px; background: #fafbfc; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.comp-head .name { font-weight: 800; direction: ltr; unicode-bidi: isolate; }
.comp ol { margin: 0; padding: 10px 34px 10px 16px; direction: ltr; text-align: left; font-size: 13.5px; color: #344054; padding-left: 34px; }
.rating-input { display: flex; gap: 8px; align-items: center; }
.rating-input input { width: 90px; text-align: center; font-weight: 700; }
.rate-label { font-size: 12.5px; }

.dev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.counter { font-size: 12px; color: var(--muted); text-align: end; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.timeline li:last-child { border-bottom: 0; }

.action-bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 12px 18px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; box-shadow: 0 -4px 12px rgba(0,0,0,.05); z-index: 10; }

/* ---------- team ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; margin-bottom: 10px; }
.crumbs .sep { color: #98a2b3; }
.stat-row { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-size: 13px; color: var(--muted); }
.stat b { display: block; font-size: 20px; color: var(--ink); }
.person { display: flex; flex-direction: column; }
.person b { font-weight: 700; }
.person span { font-size: 12.5px; color: var(--muted); }
.sub-team { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; padding: 4px 10px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-size: 13px; white-space: nowrap; }
.sub-team:hover { text-decoration: none; background: #d6e4f7; }
tr.is-manager td { background: #fbfcff; }

/* ---------- 9 box ---------- */
.nine-wrap { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: 1fr 44px; gap: 6px; direction: ltr; }
.y-axis { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-weight: 700; color: var(--muted); font-size: 13px; display: flex; align-items: center; justify-content: center; }
.x-axis { grid-column: 2; text-align: center; font-weight: 700; color: var(--muted); font-size: 13px; }
.x-axis .lv { display: grid; grid-template-columns: repeat(3, 1fr); font-weight: 600; font-size: 12px; }
.nine { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, minmax(150px, auto)); gap: 6px; }
.box { border-radius: 10px; padding: 10px 12px; cursor: pointer; border: 2px solid transparent; display: flex; flex-direction: column; gap: 4px; direction: rtl; min-width: 0; }
.box:hover, .box.sel { border-color: var(--ink); }
.box .bn { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.box .bn b { font-size: 14px; }
.box .bn .en-name { direction: ltr; font-size: 11.5px; opacity: .8; }
.box .cnt { font-size: 28px; font-weight: 800; line-height: 1.1; direction: ltr; text-align: right; }
.box .cnt small { font-size: 13px; font-weight: 600; opacity: .75; }
.box .names { font-size: 12px; line-height: 1.5; overflow: hidden; }
.b-hi { background: #dff3e9; color: #0b5139; }
.b-mid { background: #fff4d6; color: #6b4a00; }
.b-lo { background: #fde4e4; color: #7a0000; }
.b-core { background: #e8eef8; color: #173e6b; }

/* ---------- login ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-side { color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 46px 46px,
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 46px 46px,
    radial-gradient(120% 120% at 100% 100%, #2A1E3D 0%, rgba(42,30,61,0) 60%),
    linear-gradient(140deg, #B80F2A 0%, #A30E27 45%, #7E0F2C 100%); }
.login-side h1 { font-family: 'Poppins', 'Inter', sans-serif; }
.login-side .logo { background: #fff; border-radius: 10px; padding: 8px 12px; display: inline-flex; align-self: flex-start; }
.login-side .logo img { height: 46px; }
.login-side h1 { font-size: 34px; line-height: 1.3; margin: 0 0 10px; }
.login-side p { opacity: .9; max-width: 460px; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 30px; }
.login-form form { width: 100%; max-width: 360px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: 99px; box-shadow: var(--shadow); margin-bottom: 16px; overflow-x: auto; width: fit-content; max-width: 100%; }
.tab { padding: 7px 16px; cursor: pointer; border: 0; border-radius: 99px; color: var(--muted); white-space: nowrap; background: none; font: inherit; font-size: 13.5px; font-weight: 600; }
.tab:hover { color: var(--red); }
.tab.active { color: #fff; background: var(--red); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.filters > div { min-width: 160px; flex: 1; }

@media (max-width: 820px) {
  .login-page { grid-template-columns: 1fr; }
  .login-side { padding: 28px; }
  .topbar { padding: 0 12px; gap: 10px; }
  .topbar .app-title, .topbar .release, .topbar .tb-sep, .user-chip .uc-text { display: none; }
  .user-chip { padding: 4px; }
  .hero h1, .hero .page-head h1 { font-size: 23px; }
  .hero-side { width: 100%; }
  .dev-grid { grid-template-columns: 1fr; }
  .gcol { border-inline-start: 0; border-top: 1px solid var(--line); }
  .nine { grid-template-rows: repeat(3, minmax(110px, auto)); }
  .box .names { display: none; }
}
@media print {
  .topbar, .action-bar, .no-print, .hero-tabs { display: none !important; }
  .hero { background: #fff !important; color: var(--ink); padding: 0 0 10px; }
  .hero h1, .hero .page-head h1, .hero .muted { color: var(--ink) !important; }
  .page { margin-top: 0; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
