/* AUMORRIX AGI TECH · HRMS Portal design system (loaded last).
   Premium dark navy with restrained gold. Only looks: no data, rule or permission changes. */
:root,
:root[data-theme='dark'],
:root:not([data-theme='light']) {
  --ink: #0b1728;
  --ink2: #142238;
  --ink3: #192a40;
  --gold: #d8ae55;
  --gold2: #f0d28b;
  --gold3: #b98d36;
  --bg: #07111f;
  --card: #142238;
  --card2: #192a40;
  --line: #2a3b52;
  --text: #f5f7fa;
  --muted: #aab7c8;
  --label: #c9d3e0;
  --ok: #22c58b;
  --okbg: rgba(34, 197, 139, 0.14);
  --bad: #e45d5d;
  --badbg: rgba(228, 93, 93, 0.14);
  --warn: #e8ad45;
  --warnbg: rgba(232, 173, 69, 0.14);
  --blue: #6c9fd6;
  --bluebg: rgba(71, 126, 184, 0.18);
  --violet: #a99be8;
  --violetbg: rgba(169, 155, 232, 0.14);
  --chip: #1d2f48;
  --panel2: #192a40;
  --ax-gold: #d8ae55;
  --ax-gold2: #f0d28b;
  --ax-blue: #477eb8;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 24px -14px rgba(0, 0, 0, 0.7);
  --shadow-hi: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 36px -16px rgba(0, 0, 0, 0.8);
  --display: 'Plus Jakarta Sans', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
html,
body {
  background: var(--bg);
  color: var(--text);
}

/* ---------- buttons, inputs, tags ---------- */
.btn-primary,
.btn-primary:hover,
.btn-gold,
.btn-gold:hover {
  background: linear-gradient(180deg, #e2bb66, var(--gold)) !important;
  color: #1a1305 !important;
  border-color: transparent !important;
  box-shadow: 0 6px 16px -8px rgba(216, 174, 85, 0.55) !important;
  filter: none;
}
.btn-primary:hover,
.btn-gold:hover {
  background: var(--gold2) !important;
}
.btn-ghost,
.btn-ghost:hover {
  background: var(--card2);
  color: var(--text);
  border: 1px solid var(--line);
  filter: none;
}
.btn-ghost:hover {
  border-color: rgba(216, 174, 85, 0.5);
}
.inp,
select.inp,
textarea.inp {
  background: #0f1b2d;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.inp::placeholder {
  color: #7f8ea3;
}
.inp:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(216, 174, 85, 0.18);
  outline: none;
}
select.inp option {
  background: #0f1b2d;
  color: var(--text);
}
input[type='date'].inp,
input[type='month'].inp,
input[type='time'].inp {
  color-scheme: dark;
}
input[type='checkbox'],
input[type='radio'] {
  accent-color: var(--gold);
}
.tag {
  background: var(--chip);
  color: var(--label);
}
.tag.ok {
  background: var(--okbg);
  color: var(--ok);
}
.tag.bad {
  background: var(--badbg);
  color: var(--bad);
}
.tag.gold,
.tag.warn {
  background: var(--warnbg);
  color: var(--warn);
}
.tag.blue {
  background: var(--bluebg);
  color: var(--blue);
}

/* ---------- side menu ---------- */
#app {
  grid-template-columns: 252px 1fr;
}
.side {
  background: #0b1728;
  border-right: 1px solid var(--line);
  color: #c9d3e0;
  padding: 18px 12px 14px;
  gap: 2px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #2a3b52 transparent;
}
.side .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px 16px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.ax-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
  flex: none;
}
.side .brand .wm,
#login .brand .wm {
  font-family: var(--body);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f5f7fa;
  white-space: nowrap;
}
.side .brand .wm em,
#login .brand .wm em {
  font-style: normal;
  color: var(--gold);
  -webkit-text-fill-color: currentColor;
  background: none;
}
.side .brand small,
#login .brand small {
  color: var(--gold2) !important;
  letter-spacing: 0.16em !important;
  font-size: 10.5px !important;
  font-weight: 700;
}
.side-x {
  display: none;
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}
.nav {
  color: #c9d3e0;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 10px;
}
.nav svg {
  color: #8fa0b8;
}
.nav:hover {
  background: rgba(255, 255, 255, 0.05);
}
.nav.on,
.nav.on:hover {
  background: linear-gradient(90deg, rgba(216, 174, 85, 0.2), rgba(216, 174, 85, 0.04));
  color: #fff;
  box-shadow: inset 3px 0 0 var(--gold);
}
.nav.on svg {
  color: var(--gold);
}
.nav .cnt {
  background: var(--bad);
  font-weight: 700;
}
.side-by {
  margin-top: auto;
  padding: 14px 10px 2px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: #8fa0b8;
  line-height: 1.5;
}
.side-by b {
  color: #f5f7fa;
}
.side-by span {
  display: block;
  font-size: 11px;
  color: #7f8ea3;
  margin-top: 2px;
}
.side-dim {
  display: none;
}

/* ---------- top bar ---------- */
.mainwrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 28px;
  background: rgba(7, 17, 31, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.tb-menu {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}
.tb-menu svg {
  width: 20px;
  height: 20px;
}
.tb-search {
  flex: 1 1 auto;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0f1b2d;
}
.tb-search:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(216, 174, 85, 0.15);
}
.tb-search svg {
  width: 17px;
  height: 17px;
  color: #8fa0b8;
  flex: none;
}
.tb-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
}
.tb-search input::placeholder {
  color: #7f8ea3;
}
.tb-search kbd {
  font-family: var(--body);
  font-size: 11px;
  color: #aab7c8;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  background: var(--card);
  white-space: nowrap;
}
.tb-acts {
  margin-left: auto;
  display: flex;
  gap: 4px;
  align-items: center;
}
.tb-ic {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 0;
  background: none;
  color: #c9d3e0;
  display: grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
}
.tb-ic:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold2);
}
.tb-ic svg {
  width: 21px;
  height: 21px;
}
.tb-cnt {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--bad);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}
.tb-menuwrap,
.tb-me {
  position: relative;
}
.tb-prof {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 10px;
  text-align: left;
}
.tb-prof:hover {
  background: rgba(255, 255, 255, 0.05);
}
.tb-av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(180deg, #e2bb66, var(--gold));
  color: #1a1305;
  font-weight: 800;
  font-size: 13.5px;
  display: grid;
  place-items: center;
  flex: none;
}
.tb-who {
  display: flex;
  flex-direction: column;
  max-width: 180px;
  line-height: 1.25;
}
.tb-who b {
  font-size: 14px;
  color: #f5f7fa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tb-who span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tb-car {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.tb-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-hi);
  padding: 6px;
  z-index: 60;
}
.tb-pi {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.tb-pi:hover {
  background: var(--card2);
}
.tb-pi.bad {
  color: var(--bad);
}

/* ---------- page layout ---------- */
.main {
  padding: 22px 28px 56px;
}
.top h1 {
  font-family: var(--body);
  font-size: 25px;
  font-weight: 800;
  color: #f5f7fa;
  letter-spacing: -0.2px;
}
.top h1::after {
  display: none;
}
.top p {
  color: var(--muted);
  font-size: 14px;
}
.panel,
.glass {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: none;
}
.panel h3,
.panel h4 {
  color: #f5f7fa;
}
.tilt,
.tilt:hover {
  transform: none !important;
}
.note,
p.note {
  background: var(--card2);
  color: var(--muted);
  border-color: var(--line);
}

/* tabs / segmented buttons used across pages */
.seg,
.tabs {
  background: var(--card);
  border: 1px solid var(--line);
}
.seg-b,
.tab,
.tabs button {
  color: var(--muted);
}
.seg-b.on,
.tab.on,
.tabs button.on {
  background: linear-gradient(180deg, #e2bb66, var(--gold)) !important;
  color: #1a1305 !important;
  box-shadow: none !important;
}

/* KPI cards */
.kpis {
  gap: 12px;
}
.kpi,
.kpi.hero,
.kpi.dark {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  color: var(--text);
  transform: none !important;
}
.kpi::before {
  background: linear-gradient(90deg, var(--a, var(--gold)), transparent) !important;
  height: 2px !important;
  opacity: 0.8;
}
.kpi::after {
  display: none !important;
}
.kpi.hero {
  background: linear-gradient(160deg, rgba(216, 174, 85, 0.16), var(--card) 70%);
  border-color: rgba(216, 174, 85, 0.45);
}
.kpi .kl,
.kpi.hero .kl {
  color: var(--muted);
}
.kpi .kv,
.kpi.hero .kv {
  color: #f5f7fa;
  font-family: var(--body);
  font-weight: 800;
}
.kpi.hero .kv {
  color: var(--gold2);
}
.kpi .ks,
.kpi.hero .ks {
  color: var(--muted);
}
.kpi .ico {
  background: rgba(216, 174, 85, 0.14) !important;
  color: var(--gold) !important;
  box-shadow: none !important;
}

/* tables */
.tw {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
table {
  color: var(--text);
}
th {
  background: var(--card2);
  color: var(--gold2);
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.04em;
}
td {
  border-bottom-color: var(--line);
  color: var(--text);
}
.tw tbody tr:hover td {
  background: rgba(216, 174, 85, 0.05);
}
/* paper documents keep black text on white */
#ltrPrev,
#ltrPrev td,
#ltrPrev th,
.pslip td,
.pslip th,
.slip td,
.slip th {
  color: #0a0a0a;
}

/* ---------- dashboard ---------- */
.dhero .dh-left {
  background: radial-gradient(520px 220px at 100% 0%, rgba(216, 174, 85, 0.18), transparent 65%),
    linear-gradient(160deg, #1a2c47, #101d31) !important;
  border: 1px solid rgba(216, 174, 85, 0.35);
  box-shadow: var(--shadow-hi);
  color: #f5f7fa;
}
.dhero .orbs {
  display: none;
}
.dh-welcome {
  display: block;
  color: var(--gold);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 6px;
}
.dhero h1 {
  font-family: var(--body);
  color: #f5f7fa;
}
.dhero .ph-k {
  color: var(--muted);
}
.dh-chips span {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--label);
}
.dh-chips span b {
  color: var(--gold2);
}
.dh-chips .hot {
  border-color: rgba(216, 174, 85, 0.6);
}
.dhero .dh-right,
.dhero > div:last-child {
  background: linear-gradient(160deg, #15253d, #0f1b2d) !important;
  border: 1px solid var(--line);
  color: #f5f7fa;
}
.bars3d .col {
  background: linear-gradient(180deg, var(--gold2), var(--gold3)) !important;
  box-shadow: none !important;
}

/* ---------- login ---------- */
#login .brandside {
  background: radial-gradient(700px 420px at 15% 0%, rgba(216, 174, 85, 0.16), transparent 60%),
    linear-gradient(160deg, #142238 0%, #0b1728 60%, #07111f 100%) !important;
}
#login .brand .ax-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
}
#login .formside {
  background: var(--bg);
}
#login .lcard {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
}
#login .lcard h2 {
  color: #f5f7fa;
}

/* ---------- phone and tablet ---------- */
@media (max-width: 960px) {
  #app {
    grid-template-columns: 1fr;
  }
  .side {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 264px;
    height: 100vh;
    z-index: 80;
    transform: translateX(-102%);
    transition: transform 0.2s ease;
  }
  body.side-open .side {
    transform: none;
    box-shadow: var(--shadow-hi);
  }
  body.side-open .side-dim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 70;
  }
  .side-x,
  .tb-menu {
    display: inline-flex;
  }
  .topbar {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .tb-search {
    order: 5;
    flex-basis: 100%;
    max-width: none;
  }
  .tb-search kbd,
  .tb-who,
  .tb-car {
    display: none;
  }
  .main {
    padding: 14px 12px 40px;
  }
  .tw {
    overflow-x: auto;
  }
}

/* ---------- every page: old purple/green blocks become navy & gold ---------- */
.kpis:has(> .kpi:nth-child(6)) {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 1250px) {
  .kpis:has(> .kpi:nth-child(6)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .kpis:has(> .kpi:nth-child(6)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.checkcard,
.perfhero,
.profhero,
.bdhero,
.todayband,
.bal.tot,
.ringc.total,
.wnoimg,
.bdcard {
  background: radial-gradient(520px 220px at 100% 0%, rgba(216, 174, 85, 0.14), transparent 65%),
    linear-gradient(160deg, #1a2c47, #101d31) !important;
  border: 1px solid rgba(216, 174, 85, 0.3) !important;
  color: #f5f7fa;
  box-shadow: var(--shadow-hi);
}
.checkcard b,
.perfhero b,
.bal.tot b {
  color: var(--gold2);
}
.pod .av,
.av2,
.av.big,
.av2.big2 {
  background: linear-gradient(145deg, #2c4a72, #1a2c47) !important;
  color: var(--gold2) !important;
  border-color: rgba(216, 174, 85, 0.4) !important;
}
.bal b,
.rk.gold,
.layout-ink {
  color: var(--gold2);
}
.toast {
  background: #1a2c47;
  color: #f5f7fa;
  border: 1px solid rgba(216, 174, 85, 0.35);
}
.ac-HD {
  background: rgba(232, 173, 69, 0.16);
}
#login {
  background: radial-gradient(900px 600px at 15% 10%, rgba(216, 174, 85, 0.12) 0%, transparent 60%), #07111f !important;
}
#login .formside {
  background: transparent !important;
}
#login .lcard {
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
}
#login .greet {
  color: var(--gold2);
  background: rgba(216, 174, 85, 0.16) !important;
  border-color: rgba(216, 174, 85, 0.4) !important;
}
#login .hero h1 {
  background: linear-gradient(90deg, #f5f7fa 40%, var(--gold2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
#login .pb i {
  color: #0b1728;
}
/* documents that are printed stay white paper (salary slip, payslip, letter preview) */
.slip,
.pslip {
  color: #0a0a0a;
}
