:root {
  --ihr-primary: #1e3a8a;
  --ihr-accent: #e11d48;
  --ihr-blue: #2563eb;
  --ihr-cyan: #06b6d4;
  --ihr-violet: #7c3aed;
  --ihr-emerald: #059669;
  --ihr-amber: #f59e0b;
  --ihr-rose: #f43f5e;
  --ihr-ink: #0f172a;
  --ihr-muted: #64748b;
  --ihr-bg: #eef2ff;
  --sidebar-w: 280px;
  --shadow: 0 12px 40px rgba(30, 58, 138, .12);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1200px 600px at -10% -20%, rgba(37,99,235,.18), transparent 50%),
    radial-gradient(900px 500px at 110% 0%, rgba(225,29,72,.12), transparent 45%),
    radial-gradient(800px 400px at 50% 120%, rgba(6,182,212,.12), transparent 40%),
    var(--ihr-bg);
  color: var(--ihr-ink);
  min-height: 100vh;
  overflow-x: hidden;
}

@keyframes floaty { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes pulseGlow { 0%,100%{box-shadow:0 0 0 0 rgba(37,99,235,.35)} 50%{box-shadow:0 0 0 12px rgba(37,99,235,0)} }
@keyframes slideInLeft { from{opacity:0;transform:translateX(-24px)} to{opacity:1;transform:none} }
@keyframes fadeUp { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:none} }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
@keyframes spinGrad { to{transform:rotate(360deg)} }
@keyframes countPop { from{transform:scale(.85);opacity:.2} to{transform:scale(1);opacity:1} }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0b1b4a 0%, #132c6e 45%, #1e3a8a 100%);
  color: #fff;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1050;
  overflow-y: auto;
  padding-bottom: 2rem;
  box-shadow: 8px 0 30px rgba(15,23,42,.25);
  transition: transform .28s ease;
  animation: slideInLeft .45s ease;
}
.sidebar.collapsed { transform: translateX(calc(var(--sidebar-w) * -1)); }

.sidebar .brand {
  padding: 1.1rem 1.2rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(90deg, rgba(225,29,72,.18), transparent);
}
.sidebar .brand-logo {
  display: flex; align-items: center; gap: .75rem; text-decoration: none; color: #fff;
}
.sidebar .brand-logo img { height: 42px; width: auto; background:#fff; border-radius:10px; padding:4px 6px; }
.sidebar .brand-logo .title { font-weight: 800; font-size: 1.45rem; letter-spacing: -.4px; line-height:1; }
.sidebar .brand-logo .title span { color: #fda4af; }
.sidebar .brand-logo .sub { font-size: .72rem; opacity: .75; margin-top: .2rem; }

.sidebar .nav-section {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.42); padding: 1rem 1.2rem .35rem;
}
.sidebar .nav-link {
  color: rgba(255,255,255,.82);
  padding: .58rem 1.15rem;
  display: flex; align-items: center; gap: .7rem;
  font-size: .9rem; border-left: 3px solid transparent;
  transition: .18s ease; text-decoration: none;
}
.sidebar .nav-link i {
  width: 28px; height: 28px; border-radius: 8px;
  display:grid; place-items:center; background: rgba(255,255,255,.08); font-size:.95rem;
}
.sidebar .nav-link:hover, .sidebar .nav-link.active {
  color: #fff; background: linear-gradient(90deg, rgba(225,29,72,.28), rgba(255,255,255,.04));
  border-left-color: #fb7185;
}
.sidebar .nav-link.active i { background: linear-gradient(135deg,#e11d48,#fb7185); }

.sidebar-overlay {
  display:none; position:fixed; inset:0; background:rgba(15,23,42,.45); z-index:1040;
}
.sidebar-overlay.show { display:block; }

.main-wrap {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin-left .28s ease;
}
.main-wrap.expanded { margin-left: 0; }

.topbar {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148,163,184,.25);
  padding: .85rem 1.35rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  position: sticky; top: 0; z-index: 1020;
  animation: fadeUp .4s ease;
}
.topbar .menu-btn {
  border: 0; background: linear-gradient(135deg,#2563eb,#7c3aed); color:#fff;
  width: 42px; height: 42px; border-radius: 12px; display:grid; place-items:center;
}
.content { padding: 1.35rem 1.5rem 2.5rem; }

.page-title {
  font-weight: 800; font-size: clamp(1.35rem, 2vw, 1.8rem);
  background: linear-gradient(90deg, #1e3a8a, #e11d48 60%, #06b6d4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: .2rem; animation: fadeUp .45s ease;
}
.page-sub { color: var(--ihr-muted); font-size: .92rem; margin-bottom: 1.2rem; }

.stat-card {
  position: relative; overflow: hidden;
  background: #fff; border-radius: var(--radius); padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.7);
  height: 100%; transition: transform .2s ease, box-shadow .2s ease;
  animation: fadeUp .5s ease both;
}
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(30,58,138,.18); }
.stat-card::after {
  content:""; position:absolute; right:-20px; top:-20px; width:90px; height:90px; border-radius:50%;
  background: radial-gradient(circle, rgba(255,255,255,.35), transparent 70%);
}
.stat-card .icon {
  width: 46px; height: 46px; border-radius: 14px; display:grid; place-items:center;
  color:#fff; font-size:1.15rem; animation: floaty 3.5s ease-in-out infinite;
}
.stat-card .value { font-size: 1.8rem; font-weight: 800; line-height:1.1; animation: countPop .5s ease; }
.stat-card .label { color: var(--ihr-muted); font-size: .82rem; font-weight: 600; }
.stat-card.tone-blue { background: linear-gradient(145deg,#eff6ff,#fff); }
.stat-card.tone-rose { background: linear-gradient(145deg,#fff1f2,#fff); }
.stat-card.tone-emerald { background: linear-gradient(145deg,#ecfdf5,#fff); }
.stat-card.tone-amber { background: linear-gradient(145deg,#fffbeb,#fff); }
.stat-card.tone-violet { background: linear-gradient(145deg,#f5f3ff,#fff); }
.stat-card.tone-cyan { background: linear-gradient(145deg,#ecfeff,#fff); }

.card-gt, .card-ihr {
  background: rgba(255,255,255,.92); border: 1px solid rgba(226,232,240,.9);
  border-radius: var(--radius); box-shadow: var(--shadow);
  animation: fadeUp .55s ease both;
}
.card-gt .card-header, .card-ihr .card-header {
  background: transparent; border-bottom: 1px solid #eef2ff;
  font-weight: 700; color: var(--ihr-primary); padding: 1rem 1.25rem;
}

.btn-gt, .btn-ihr {
  background: linear-gradient(135deg, #1e3a8a, #2563eb 55%, #e11d48);
  border: 0; color: #fff; border-radius: 12px; font-weight: 700;
  box-shadow: 0 8px 20px rgba(37,99,235,.28);
}
.btn-gt:hover, .btn-ihr:hover { filter: brightness(1.05); color:#fff; transform: translateY(-1px); }
.btn-outline-gt, .btn-outline-ihr {
  border: 1.5px solid #2563eb; color: #1e3a8a; border-radius: 12px; font-weight: 700; background:#fff;
}
.btn-outline-gt:hover, .btn-outline-ihr:hover { background: #1e3a8a; color:#fff; }

.badge-status { border-radius: 999px; padding: .35em .75em; font-weight: 700; font-size: .75rem; }
.module-pill {
  display:inline-flex; align-items:center; gap:.4rem; padding:.35rem .75rem; border-radius:999px;
  font-size:.78rem; font-weight:700;
  background: linear-gradient(90deg,#dbeafe,#ffe4e6); color:#1e3a8a;
}
.table-gt thead th, .table-ihr thead th {
  background: linear-gradient(90deg,#eff6ff,#fff1f2); color:#1e3a8a;
  font-size:.76rem; text-transform:uppercase; letter-spacing:.04em; border-bottom:0; white-space:nowrap;
}
.avatar-sm {
  width:38px; height:38px; border-radius:50%;
  background: linear-gradient(135deg,#2563eb,#e11d48); color:#fff;
  display:grid; place-items:center; font-weight:800; font-size:.85rem;
}
.progress-gt, .progress-ihr { height:10px; border-radius:999px; background:#e2e8f0; overflow:hidden; }
.progress-gt .bar, .progress-ihr .bar {
  height:100%; border-radius:999px;
  background: linear-gradient(90deg,#2563eb,#7c3aed,#e11d48,#06b6d4);
  background-size: 200% 100%; animation: shimmer 2.8s linear infinite;
}

.hero-banner {
  border-radius: 22px; padding: 1.5rem 1.6rem; color:#fff; position:relative; overflow:hidden;
  background: linear-gradient(120deg, #0b1b4a 0%, #2563eb 45%, #e11d48 100%);
  box-shadow: var(--shadow); margin-bottom: 1.25rem; animation: fadeUp .4s ease;
}
.hero-banner::before {
  content:""; position:absolute; width:220px; height:220px; border-radius:50%;
  background: rgba(255,255,255,.08); right:-40px; top:-60px; animation: floaty 5s ease-in-out infinite;
}
.ai-chip {
  display:inline-flex; align-items:center; gap:.4rem; padding:.35rem .7rem; border-radius:999px;
  background: rgba(255,255,255,.16); font-size:.78rem; font-weight:700;
}
.score-ring {
  width: 86px; height: 86px; border-radius: 50%;
  background: conic-gradient(#22c55e var(--p), rgba(255,255,255,.2) 0);
  display:grid; place-items:center; animation: pulseGlow 2.4s infinite;
}
.score-ring span {
  width:66px; height:66px; border-radius:50%; background:#0b1b4a; color:#fff;
  display:grid; place-items:center; font-weight:800;
}

/* Auth / Login */
.auth-wrap {
  min-height: 100vh; display:grid; grid-template-columns: 1.05fr .95fr;
  background: #0b1b4a;
}
.auth-hero {
  position:relative; overflow:hidden; color:#fff; padding: 2.5rem 3rem;
  display:flex; flex-direction:column; justify-content:center;
  background:
    radial-gradient(circle at 20% 20%, rgba(37,99,235,.55), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(225,29,72,.45), transparent 40%),
    linear-gradient(160deg, #071433, #1e3a8a 55%, #9f1239);
}
.auth-hero .orb {
  position:absolute; border-radius:50%; filter:blur(2px); opacity:.45; animation: floaty 6s ease-in-out infinite;
}
.auth-form-wrap {
  background: linear-gradient(180deg, #f8fafc, #eef2ff);
  display:grid; place-items:center; padding: 2rem 1.25rem;
}
.auth-card {
  width:100%; max-width: 520px; background:#fff; border-radius: 24px;
  box-shadow: 0 25px 60px rgba(15,23,42,.18); padding: 1.75rem;
  animation: fadeUp .45s ease;
}
.cred-grid { display:grid; gap:.55rem; }
.cred-item {
  border:1px solid #e2e8f0; border-radius:12px; padding:.65rem .8rem;
  background: linear-gradient(90deg,#f8fafc,#fff); cursor:pointer; transition:.15s;
}
.cred-item:hover { border-color:#2563eb; transform: translateX(3px); background:#eff6ff; }
.cred-item .role {
  font-size:.68rem; font-weight:800; text-transform:uppercase; letter-spacing:.06em;
  color:#e11d48;
}

/* Marketing website */
.site-nav {
  background: rgba(255,255,255,.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0; position: sticky; top:0; z-index:100;
}
.landing-hero {
  color:#fff; padding: 4.5rem 0 3.5rem; position:relative; overflow:hidden;
  background: linear-gradient(125deg, #071433 0%, #1e3a8a 40%, #e11d48 100%);
}
.landing-hero .glow {
  position:absolute; width:320px; height:320px; border-radius:50%;
  background: rgba(6,182,212,.25); filter: blur(20px); right:8%; top:10%;
  animation: floaty 7s ease-in-out infinite;
}
.feature-card, .mod {
  border:0; border-radius: 20px; box-shadow: var(--shadow); transition:.25s; height:100%;
}
.feature-card:hover, .mod:hover { transform: translateY(-6px) scale(1.01); }
.module-grid .mod { padding:1.25rem; color:#fff; min-height:170px; }
.mod.recruit { background: linear-gradient(135deg,#2563eb,#1d4ed8); }
.mod.onboard { background: linear-gradient(135deg,#059669,#047857); }
.mod.corehr { background: linear-gradient(135deg,#f59e0b,#d97706); }
.mod.leave { background: linear-gradient(135deg,#7c3aed,#5b21b6); }
.mod.payroll { background: linear-gradient(135deg,#06b6d4,#0e7490); }
.mod.expense { background: linear-gradient(135deg,#f97316,#c2410c); }
.mod.perf { background: linear-gradient(135deg,#64748b,#334155); }
.mod.exit { background: linear-gradient(135deg,#f43f5e,#be123c); }
.mod.ai { background: linear-gradient(135deg,#8b5cf6,#db2777); }

.how-step {
  border-radius: 18px; background:#fff; box-shadow: var(--shadow); padding:1.25rem;
  border-top: 4px solid #2563eb; height:100%; animation: fadeUp .5s ease both;
}
.how-step .num {
  width:36px; height:36px; border-radius:10px; display:grid; place-items:center;
  color:#fff; font-weight:800; background: linear-gradient(135deg,#1e3a8a,#e11d48);
}

.payslip-box { max-width:820px; margin:0 auto; background:#fff; border-radius:20px; box-shadow:var(--shadow); overflow:hidden; }
.payslip-box .head { background: linear-gradient(90deg,#1e3a8a,#e11d48); color:#fff; padding:1.5rem; }

.loader-dot {
  width:10px; height:10px; border-radius:50%; background:#e11d48; display:inline-block;
  animation: pulseGlow 1.2s infinite;
}

/* Floating shortlinks + Bella chatbot */
.ihr-float-stack {
  position: fixed; right: 18px; bottom: 18px; z-index: 1080;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
.ihr-float-btn {
  border: 0; display: inline-flex; align-items: center; gap: .55rem;
  padding: .7rem 1rem; border-radius: 999px; color: #fff;
  font-weight: 800; font-size: .88rem; text-decoration: none;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .28); cursor: pointer;
  transition: transform .15s ease;
}
.ihr-float-btn:hover { transform: translateY(-2px) scale(1.03); color: #fff; }
.ihr-float-btn i { font-size: 1.15rem; }
.ihr-float-btn.mail { background: linear-gradient(135deg, #0284c7, #06b6d4); }
.ihr-float-btn.chat { background: linear-gradient(135deg, #7c3aed, #db2777); }
.ihr-float-btn.bot {
  background: linear-gradient(135deg, #1e3a8a, #e11d48);
  animation: pulseGlow 2.2s infinite;
}
.bella-panel {
  position: fixed; right: 18px; bottom: 190px;
  width: min(380px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 220px));
  background: #fff; border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
  z-index: 1090; display: none; flex-direction: column;
  overflow: hidden; border: 1px solid #e2e8f0;
}
.bella-panel.open { display: flex; animation: fadeUp .25s ease; }
.bella-head {
  background: linear-gradient(120deg, #1e3a8a, #7c3aed 55%, #e11d48);
  color: #fff; padding: .9rem 1rem;
  display: flex; justify-content: space-between; align-items: center;
}
.bella-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.2); display: grid; place-items: center;
}
.bella-body {
  flex: 1; overflow-y: auto; padding: 1rem;
  background: linear-gradient(180deg, #f8fafc, #eef2ff);
}
.bella-msg {
  max-width: 90%; padding: .7rem .9rem; border-radius: 14px;
  margin-bottom: .65rem; font-size: .9rem; line-height: 1.4; white-space: pre-wrap;
}
.bella-msg.bot {
  background: #fff; border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px; color: #0f172a;
}
.bella-msg.user {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff; margin-left: auto; border-bottom-right-radius: 4px;
}
.bella-msg.typing { opacity: .7; font-style: italic; }
.bella-suggestions {
  display: flex; flex-wrap: wrap; gap: .4rem;
  padding: .5rem .75rem; border-top: 1px solid #e2e8f0; background: #fff;
}
.bella-suggestions button {
  border: 1px solid #c7d2fe; background: #eef2ff; color: #1e3a8a;
  border-radius: 999px; font-size: .72rem; font-weight: 700; padding: .25rem .65rem;
}
.bella-form {
  display: flex; gap: .5rem; padding: .75rem;
  border-top: 1px solid #e2e8f0; background: #fff;
}
.bella-form .form-control, .bella-form .btn { border-radius: 12px; }
.bella-form .btn { min-width: 48px; }

.howto-strip { border-radius: 16px; padding: 1rem 1.15rem; color: #fff; }
.howto-start { background: linear-gradient(90deg, #1e3a8a, #2563eb); }
.howto-end { background: linear-gradient(90deg, #9f1239, #e11d48); }
.staff-photo {
  width: 84px; height: 84px; border-radius: 22px; object-fit: cover;
  box-shadow: 0 8px 20px rgba(30,58,138,.18);
}
.chat-shell { min-height: 70vh; }
.chat-thread-list { max-height: 55vh; overflow-y: auto; }
.chat-thread-item {
  display: flex; gap: .75rem; align-items: center;
  padding: .85rem 1rem; text-decoration: none; color: inherit;
  border-bottom: 1px solid #eef2ff;
}
.chat-thread-item:hover, .chat-thread-item.active { background: #eef2ff; }
.chat-messages {
  padding: 1rem; overflow-y: auto; min-height: 420px; max-height: 55vh;
  background: linear-gradient(180deg,#f8fafc,#eef2ff);
}
.chat-bubble {
  max-width: 75%; padding: .7rem .9rem; border-radius: 14px;
  margin-bottom: .65rem; background: #fff; border: 1px solid #e2e8f0;
}
.chat-bubble.mine {
  margin-left: auto;
  background: linear-gradient(135deg,#1e3a8a,#2563eb); color: #fff; border: 0;
}
.chat-bubble.theirs { margin-right: auto; }
.tiny { font-size: .7rem; }

@media (max-width: 991px) {
  .sidebar { transform: translateX(calc(var(--sidebar-w) * -1)); }
  .sidebar.show { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { display:none; }
  .ihr-float-label { display: none; }
  .ihr-float-btn { width: 52px; height: 52px; padding: 0; justify-content: center; border-radius: 50%; }
  .bella-panel { bottom: 160px; right: 12px; }
}
