/* =========================================================
   ORINS VIBES — HR Module Stylesheet
   Design system sama dengan portal utama
   ========================================================= */
:root {
  --navy-950: #0a1e38;
  --navy-900: #0f2a4a;
  --blue-800: #163f6e;
  --blue-700: #1b4f8c;
  --blue-600: #2765ab;
  --blue-500: #3d84c9;
  --blue-300: #8bb8e3;
  --orange-500: #f0592b;
  --gold-500: #ffc72c;
  --gray-50: #f6f8fb;
  --gray-100: #eef1f6;
  --gray-200: #e2e7ee;
  --gray-400: #a7b2c2;
  --gray-600: #5c6b80;
  --white: #ffffff;
  --font-display: "Outfit", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card:
    0 1px 2px rgba(15, 42, 74, 0.06), 0 8px 24px -12px rgba(15, 42, 74, 0.18);
  --shadow-card-hover:
    0 4px 10px rgba(15, 42, 74, 0.08), 0 20px 40px -16px rgba(27, 79, 140, 0.28);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --sidebar-w: 250px;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy-900);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
}
button {
  font-family: inherit;
  cursor: pointer;
}
input,
select,
textarea {
  font-family: inherit;
}

/* =========================================================
   LOGIN PAGE
   ========================================================= */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #ffffff 0%, #f3f7fc 55%, #eaf1fa 100%);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: "";
  position: absolute;
  top: -20vmax;
  right: -15vmax;
  width: 50vmax;
  height: 50vmax;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 35%,
    rgba(61, 132, 201, 0.18),
    transparent 65%
  );
}
.login-wrap::after {
  content: "";
  position: absolute;
  bottom: -25vmax;
  left: -20vmax;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  background: radial-gradient(
    circle at 40% 40%,
    rgba(240, 89, 43, 0.1),
    transparent 65%
  );
}
.login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 44px 36px 36px;
  border: 1px solid var(--gray-200);
}
.login-card__logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin: 0 auto 18px;
}
.login-card__brand {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  margin: 0 0 4px;
  color: var(--navy-900);
}
.login-card__sub {
  text-align: center;
  font-size: 13px;
  color: var(--gray-600);
  margin: 0 0 28px;
}
.form-field {
  margin-bottom: 16px;
}
.form-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.form-field input,
.form-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--navy-900);
  background: var(--white);
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.form-field input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(61, 132, 201, 0.12);
}
.btn-primary {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, var(--blue-600), var(--navy-900));
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition:
    transform 0.15s var(--ease),
    box-shadow 0.2s var(--ease);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -10px rgba(15, 42, 74, 0.5);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.alert-error {
  background: #fdecea;
  color: #a5241b;
  border: 1px solid #f5c6c2;
}
.alert-success {
  background: #e7f3ec;
  color: #1d6b3a;
  border: 1px solid #b7dfc9;
}
.login-card__footer {
  text-align: center;
  margin-top: 24px;
  font-size: 11.5px;
  color: var(--gray-400);
}

/* =========================================================
   APP SHELL
   ========================================================= */
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy-900);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  transition: transform 0.28s var(--ease);
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar__brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.sidebar__brand-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.02em;
}
.sidebar__brand-sub {
  display: block;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 1px;
}
.sidebar__nav {
  flex: 1;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar__item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease);
}
.sidebar__item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
}
.sidebar__item.is-active {
  background: linear-gradient(
    90deg,
    rgba(61, 132, 201, 0.28),
    rgba(61, 132, 201, 0.05)
  );
  color: var(--white);
  font-weight: 600;
}
.sidebar__icon {
  width: 20px;
  height: 20px;
  flex: none;
}
.sidebar__icon svg {
  width: 100%;
  height: 100%;
}
.sidebar__footer {
  padding: 14px 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar__back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.6);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}
.sidebar__back:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
}
.sidebar__back svg {
  width: 16px;
  height: 16px;
}

.main-area {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar-app {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 26px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar-app__menu {
  display: none;
  background: none;
  border: none;
  color: var(--navy-900);
}
.topbar-app__menu svg {
  width: 24px;
  height: 24px;
}
.topbar-app__title {
  flex: 1;
  min-width: 0;
}
.topbar-app__title h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  margin: 0;
  color: var(--navy-900);
}
.topbar-app__title p {
  font-size: 12.5px;
  color: var(--gray-600);
  margin: 2px 0 0;
}
.topbar-app__user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 5px;
  border-radius: 40px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}
.user-chip__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--blue-600), var(--navy-900));
  color: var(--white);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-chip__info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.user-chip__name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy-900);
}
.user-chip__role {
  font-size: 10.5px;
  color: var(--gray-600);
}
.btn-ghost {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  transition: all 0.2s var(--ease);
}
.btn-ghost:hover {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
}
.btn-ghost svg {
  width: 18px;
  height: 18px;
}

.page-content {
  flex: 1;
  padding: 26px;
  max-width: 1400px;
  width: 100%;
}

.app-footer {
  padding: 16px 26px;
  font-size: 11.5px;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-200);
  text-align: center;
}

/* =========================================================
   CARDS / GRID-STAS
   ========================================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px 18px 16px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}
.stat-card__accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--blue-600), var(--blue-800));
}
.stat-card--wfh .stat-card__accent {
  background: linear-gradient(180deg, var(--blue-500), var(--blue-700));
}
.stat-card--pd .stat-card__accent {
  background: linear-gradient(180deg, var(--gold-500), var(--orange-500));
}
.stat-card--cuti .stat-card__accent {
  background: linear-gradient(180deg, var(--orange-500), #d94420);
}
.stat-card--sakit .stat-card__accent {
  background: linear-gradient(180deg, var(--gray-400), var(--gray-600));
}
.stat-card--absent .stat-card__accent {
  background: linear-gradient(180deg, #a5241b, #7a1810);
}
.stat-card__label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}
.stat-card__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  color: var(--navy-900);
  margin: 0 0 4px;
}
.stat-card__sub {
  font-size: 11.5px;
  color: var(--gray-400);
  margin: 0;
}

/* =========================================================
   TOOLBAR / FILTER
   ========================================================= */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: var(--white);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
}
.toolbar__group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.toolbar__spacer {
  flex: 1;
}
.toolbar select,
.toolbar input {
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  background: var(--white);
  color: var(--navy-900);
  min-width: 130px;
}
.toolbar select:focus,
.toolbar input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(61, 132, 201, 0.12);
}
.btn {
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn svg {
  width: 15px;
  height: 15px;
}
.btn--primary {
  background: var(--blue-700);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--blue-800);
}
.btn--ghost {
  background: var(--white);
  color: var(--navy-900);
  border-color: var(--gray-200);
}
.btn--ghost:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

/* Autocomplete search */
.search-wrap {
  position: relative;
  min-width: 280px;
}
.search-wrap__input {
  width: 100%;
}
.search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card-hover);
  max-height: 320px;
  overflow-y: auto;
  display: none;
}
.search-suggest.is-open {
  display: block;
}
.search-suggest__item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
}
.search-suggest__item:last-child {
  border-bottom: none;
}
.search-suggest__item:hover {
  background: var(--gray-50);
}
.search-suggest__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-900);
}
.search-suggest__nik {
  font-size: 11px;
  color: var(--gray-600);
  margin-left: auto;
}
.search-suggest__empty {
  padding: 14px;
  font-size: 12.5px;
  color: var(--gray-400);
  text-align: center;
}

/* =========================================================
   TABLES
   ========================================================= */
.table-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 20px;
}
.table-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}
.table-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--navy-900);
  margin: 0;
}
.table-card__count {
  font-size: 11.5px;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 600;
}
.table-card__actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.table-scroll {
  overflow-x: auto;
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data-table thead th {
  background: var(--gray-50);
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
table.data-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--navy-900);
  vertical-align: middle;
}
table.data-table tbody tr:last-child td {
  border-bottom: none;
}
table.data-table tbody tr:hover {
  background: var(--gray-50);
}
.table-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--gray-400);
  font-size: 13px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge--dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 920px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .main-area {
    margin-left: 0;
  }
  .topbar-app__menu {
    display: flex;
  }
}
@media (max-width: 520px) {
  .page-content {
    padding: 16px;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat-card {
    padding: 14px;
  }
  .stat-card__value {
    font-size: 24px;
  }
  .user-chip__info {
    display: none;
  }
  .toolbar {
    padding: 12px;
  }
  .toolbar select,
  .toolbar input {
    min-width: 100px;
    font-size: 12px;
  }
}

/* =========================================================
   Dashboard extras
   ========================================================= */
.stat-card--hk .stat-card__accent {
  background: linear-gradient(180deg, #2765ab, #163f6e);
}
.stat-card--wfh .stat-card__accent {
  background: linear-gradient(180deg, #3d84c9, #1b4f8c);
}
.stat-card--pd .stat-card__accent {
  background: linear-gradient(180deg, #ffc72c, #f0592b);
}
.stat-card--cuti .stat-card__accent {
  background: linear-gradient(180deg, #f0592b, #d94420);
}
.stat-card--sakit .stat-card__accent {
  background: linear-gradient(180deg, #a7b2c2, #5c6b80);
}
.stat-card--absent .stat-card__accent {
  background: linear-gradient(180deg, #a5241b, #7a1810);
}

.stat-card__value {
  transition: opacity 0.15s var(--ease);
}

/* Toolbar autosubmit supression */
.toolbar select[data-autosubmit="0"] {
  cursor: pointer;
}
