/* ============================================================
   mobile.css — App-like responsive overrides for the React admin
   bundle, kiosk, and admin-tools pages. Loaded AFTER the main
   stylesheet so these rules win the cascade.
   ============================================================ */

/* ---------- Global app polish ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none; /* kill iOS pull-to-refresh */
  text-rendering: optimizeLegibility;
}

/* Attendance register date segregation */
.ams-date-group-row td{
  background:#eef6ff!important;
  border-top:1px solid #d8e7fb!important;
  border-bottom:1px solid #d8e7fb!important;
  padding:9px 12px!important;
}
.ams-date-group-chip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  color:#102033;
}
.ams-date-group-chip strong{
  font-size:.86rem;
}
.ams-date-group-chip span{
  color:#66758a;
  font-size:.76rem;
  font-weight:800;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(120,120,160,.35); border-radius: 4px; }
*::-webkit-scrollbar-track { background: transparent; }

/* Better focus outlines */
:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; border-radius: 4px; }

.hr-suite-link {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: #4f46e5;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(79,70,229,.28);
}

.hr-suite-link:active { transform: scale(.98); }

.hr-suite-nav-item {
  position: relative;
}

.hr-suite-nav-item:before {
  content: "";
  position: absolute;
  inset: 8px auto auto 12px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.14);
}

.hr-suite-panel {
  height: calc(100vh - 72px);
  height: calc(100dvh - 72px);
  padding: 18px 18px 22px;
  background:
    linear-gradient(180deg, rgba(248,250,252,.96), rgba(241,245,249,.98));
}

.hr-suite-frame-shell {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 16px 40px rgba(15,23,42,.10);
}

.hr-suite-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #f8fafc;
}

/* Larger tap-target for buttons everywhere */
.btn, button { min-height: 40px; touch-action: manipulation; }
.btn-sm { min-height: 32px; }

/* Honour iOS safe-area-insets at the page edges */
@supports (padding: env(safe-area-inset-bottom)) {
  .topbar { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
  .page-body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}

/* ---------- Tablet (≤900px): tighten everything ---------- */
@media (max-width: 900px) {
  body { font-size: 14px; }
  .page-body { padding: 16px; }
  .card { padding: 16px; border-radius: 12px; }
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
  .stat-card { padding: 12px 14px; }
  .stat-card .value { font-size: 1.4rem; }
  .modal { max-width: 92vw; max-height: 88vh; border-radius: 14px; }
  .form-row { grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* ============================================================
   Phone (≤640px) — turn the app into something that *feels* native
   ============================================================ */
@media (max-width: 640px) {

  /* ---------- Layout: convert sidebar into bottom-nav ---------- */
  .app-shell { flex-direction: column; min-height: 100vh; min-height: 100dvh; }

  .main-content {
    order: 1;
    min-height: 0;
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); /* room for bottom nav */
  }

  .sidebar {
    order: 2;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: stretch;
    background: #1e1b4b;
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 -2px 12px rgba(0,0,0,.25);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 50;
    overflow: hidden;
  }
  .sidebar-logo { display: none !important; }
  .sidebar-footer { display: none !important; }
  .sidebar-nav {
    display: flex;
    flex-direction: row;
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    scrollbar-width: none;
  }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .nav-item {
    flex: 1 0 auto;
    min-width: 72px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 6px 10px;
    font-size: .68rem;
    line-height: 1.1;
    border-left: none;
    border-top: 3px solid transparent;
    text-align: center;
    white-space: nowrap;
  }
  .nav-item.active {
    border-left: none;
    border-top-color: #a5b4fc;
    background: rgba(165,180,252,.12);
  }
  /* If the React bundle uses an icon + label, scale icons up */
  .nav-item svg, .nav-item .icon { font-size: 1.1rem; width: 20px; height: 20px; }

  /* ---------- Topbar: shrink, sticky, with safe-area ---------- */
  .topbar {
    height: 52px;
    padding: 0 14px;
    position: sticky;
    top: 0;
    z-index: 20;
    padding-top: env(safe-area-inset-top, 0px);
    height: calc(52px + env(safe-area-inset-top, 0px));
  }
  .topbar h1 { font-size: .95rem; }

  /* ---------- Page body ---------- */
  .page-body {
    padding: 12px 12px 80px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }

  /* ---------- Cards ---------- */
  .card { padding: 14px; border-radius: 12px; }
  .card-title { font-size: .78rem; }

  /* ---------- Stats: 2-up grid feels native ---------- */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
  .stat-card { padding: 12px; border-radius: 12px; }
  .stat-card .label { font-size: .68rem; }
  .stat-card .value { font-size: 1.25rem; }

  /* ---------- Forms ---------- */
  .form-row { grid-template-columns: 1fr; gap: 12px; }
  .form-group { margin-bottom: 12px; }
  input, select, textarea {
    font-size: 16px !important; /* prevent iOS zoom on focus */
    padding: 11px 12px;
    border-radius: 10px;
  }
  label { font-size: .8rem; }

  /* ---------- Buttons: chunkier, full-width on phone forms ---------- */
  .btn {
    padding: 11px 16px;
    font-size: .92rem;
    border-radius: 10px;
    min-height: 44px;
  }
  .btn-sm { min-height: 36px; padding: 7px 12px; }
  .modal-footer .btn,
  .login-card .btn { width: 100%; justify-content: center; }
  .modal-footer { flex-direction: column-reverse; gap: 8px; padding: 14px 16px; }

  /* ---------- Tables → "card list" on phones ----------
     Works for any plain <table>. Each row becomes a card,
     each cell shows its column header via data-label.
     Backwards compatible: rows without data-label still render
     as horizontally scrollable rows because of .table-wrap{overflow-x:auto}. */
  .table-wrap { -webkit-overflow-scrolling: touch; border-radius: 10px; }
  .table-wrap table { font-size: .85rem; min-width: 520px; }
  .table-wrap table th, .table-wrap table td { padding: 9px 10px; }

  /* If a developer marks a table responsive-stack, render as cards */
  table.responsive-stack { min-width: 0; display: block; }
  table.responsive-stack thead { display: none; }
  table.responsive-stack tbody, table.responsive-stack tr, table.responsive-stack td {
    display: block; width: 100%;
  }
  table.responsive-stack tr {
    background: var(--card, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 8px 12px;
  }
  table.responsive-stack td {
    border: none;
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: .85rem;
  }
  table.responsive-stack td:before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted, #6b7280);
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .7rem;
    align-self: center;
  }

  /* ---------- Modals → bottom-sheets on phones ---------- */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    max-width: 100%;
    width: 100%;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
    animation: ams-sheet-up .22s ease-out;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .modal-header { padding: 16px 18px; }
  .modal-body   { padding: 14px 18px; }
  /* drag handle */
  .modal:before {
    content: "";
    display: block;
    width: 40px; height: 4px;
    background: rgba(0,0,0,.18);
    border-radius: 99px;
    margin: 8px auto 0;
  }
  @keyframes ams-sheet-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }

  /* ---------- Login page ---------- */
  .login-page { padding: 16px; }
  .login-card { padding: 26px 22px; border-radius: 18px; }
  .login-card h1 { font-size: 1.25rem; }

  /* ---------- Badges a touch larger to read ---------- */
  .badge { padding: 3px 9px; font-size: .72rem; }

  /* ---------- Hide horizontal-only spacer columns on phone ---------- */
  .hide-on-mobile { display: none !important; }
}

/* ---------- Very small phones (≤380px) ---------- */
@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr; }
  .nav-item { font-size: .62rem; min-width: 60px; padding: 8px 4px 10px; }
  .topbar h1 { font-size: .88rem; }
}

/* ---------- Tablet landscape: keep sidebar but slim it ---------- */
@media (min-width: 641px) and (max-width: 900px) {
  .sidebar { width: 72px; }
  .sidebar-logo { padding: 16px 8px; font-size: 0; text-align: center; }
  .sidebar-logo:before { content: "AMS"; font-size: .85rem; color: #fff; }
  .sidebar-logo span { display: none; }
  .nav-item {
    flex-direction: column;
    gap: 2px;
    padding: 10px 4px;
    font-size: .65rem;
    text-align: center;
    border-left-width: 0;
    border-bottom: 3px solid transparent;
  }
  .nav-item.active { border-left-color: transparent; background: rgba(165,180,252,.18); }
}

/* ============================================================
   Dark-mode awareness (kiosk / system preference)
   ============================================================ */
@media (prefers-color-scheme: dark) {
  /* The main React shell uses a fixed light theme, leave it alone.
     But improve mobile-only translucent overlays. */
  @media (max-width: 640px) {
    .modal-overlay { background: rgba(0,0,0,.65); }
  }
}

/* ============================================================
   Utility helpers exposed for future templates
   ============================================================ */
.app-only-mobile { display: none; }
@media (max-width: 640px) { .app-only-mobile { display: initial; } .app-only-desktop { display: none; } }

/* Make any element a tappable card on mobile */
@media (max-width: 640px) {
  .tap-card {
    -webkit-tap-highlight-color: transparent;
    transition: transform .12s ease;
  }
  .tap-card:active { transform: scale(.98); }
}

/* Smooth scrolling within scrollable regions */
.page-body, .table-wrap, .sidebar-nav { scroll-behavior: smooth; }

/* ============================================================
   2026 mobile app polish pass
   These overrides sit last on purpose: the React build uses many
   inline flex layouts, so selected mobile rules use !important to
   make the admin feel like a native app on phones.
   ============================================================ */

html, body, #root { min-height: 100%; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(79,70,229,.06), transparent 34vw),
    var(--bg, #f8fafc);
}

input, select, textarea, button {
  font-family: inherit;
}

.app-shell {
  width: 100%;
  max-width: 100vw;
}

.main-content {
  min-width: 0;
}

.page-body > div {
  max-width: 100%;
}

.card, .stat-card, .login-card, .modal {
  background-clip: padding-box;
}

.btn:active,
.nav-item:active,
.stat-card:active {
  transform: scale(.985);
}

@media (max-width: 900px) {
  .table-wrap {
    margin-left: -4px;
    margin-right: -4px;
    padding: 0 4px 8px;
  }

  .table-wrap table {
    min-width: 760px;
  }

  .table-wrap th:first-child,
  .table-wrap td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--card, #fff);
    box-shadow: 1px 0 0 var(--border, #e5e7eb);
  }

  .table-wrap thead th:first-child {
    background: var(--bg, #f8fafc);
    z-index: 2;
  }
}

@media (max-width: 640px) {
  .hr-suite-link {
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    min-height: 40px;
    padding: 0 13px;
    font-size: .82rem;
    box-shadow: 0 8px 20px rgba(79,70,229,.26);
  }

  .hr-suite-panel {
    height: calc(100dvh - 52px - 74px - env(safe-area-inset-bottom, 0px));
    padding: 10px;
  }

  .hr-suite-frame-shell {
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15,23,42,.10);
  }

  .hr-suite-nav-item:before {
    display: none;
  }

  body {
    font-size: 14px;
    background:
      linear-gradient(180deg, rgba(79,70,229,.05), transparent 180px),
      var(--bg, #f8fafc);
  }

  .app-shell {
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .main-content {
    width: 100%;
    overflow: visible;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .topbar {
    backdrop-filter: saturate(140%) blur(12px);
    background: rgba(255,255,255,.94);
    box-shadow: 0 1px 0 rgba(15,23,42,.06);
  }

  .topbar > div:last-child {
    font-size: .7rem !important;
    white-space: nowrap;
  }

  .page-body {
    width: 100%;
    max-width: 100vw;
  }

  /* Stack top toolbars in pages such as Attendance, Payroll, Advances. */
  .page-body > div > div:first-child[style*="display"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .page-body > div > div:first-child[style*="display"] > div {
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
    justify-content: stretch !important;
  }

  .page-body > div > div:first-child[style*="display"] h2 {
    width: 100%;
    font-size: .95rem !important;
  }

  .page-body > div > div:first-child[style*="display"] .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .page-body > div > div:first-child[style*="display"] input,
  .page-body > div > div:first-child[style*="display"] select {
    min-width: 0 !important;
  }

  /* Month filter generated by the compiled admin bundle. */
  .page-body > div > div:first-child[style*="display"] [style*="box-shadow"] {
    width: 100% !important;
    align-items: stretch !important;
  }

  .page-body > div > div:first-child[style*="display"] [style*="box-shadow"] > * {
    flex: 1 1 auto;
  }

  .page-body > div > div:first-child[style*="display"] [style*="box-shadow"] button,
  .page-body > div > div:first-child[style*="display"] [style*="box-shadow"] select,
  .page-body > div > div:first-child[style*="display"] [style*="box-shadow"] input {
    min-height: 42px;
  }

  /* Keep six tabs visible like a real mobile tab bar. */
  .sidebar {
    height: calc(66px + env(safe-area-inset-bottom, 0px));
    border-radius: 18px 18px 0 0;
  }

  .sidebar-nav {
    overflow: hidden;
  }

  .nav-item {
    min-width: 0;
    flex: 1 1 0;
    padding: 7px 2px 9px;
    font-size: .58rem;
    letter-spacing: 0;
    color: rgba(199,210,254,.82);
  }

  .nav-item > span:first-child {
    font-size: 1.15rem;
    line-height: 1;
  }

  .nav-item.active {
    color: #fff;
  }

  .nav-item.active:after {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #c7d2fe;
    margin-top: 1px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card {
    min-width: 0;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
  }

  .stat-card .label,
  .stat-card .value {
    overflow-wrap: anywhere;
  }

  .card {
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
  }

  .table-wrap {
    margin-left: -12px;
    margin-right: -12px;
    padding: 0 12px 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
  }

  .table-wrap:after {
    content: "";
    display: block;
    width: 1px;
    height: 1px;
  }

  .table-wrap table {
    min-width: 820px;
    border-spacing: 0;
  }

  .table-wrap th,
  .table-wrap td {
    white-space: nowrap;
    vertical-align: top;
  }

  .table-wrap td {
    background: var(--card, #fff);
  }

  .table-wrap tbody tr {
    scroll-snap-align: start;
  }

  .modal-overlay {
    z-index: 200;
  }

  .modal {
    box-shadow: 0 -16px 48px rgba(15,23,42,.22);
  }

  .modal-body {
    max-height: calc(92dvh - 120px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .login-page {
    min-height: 100dvh;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .login-card {
    width: min(100%, 390px);
  }
}

@media (max-width: 430px) {
  .page-body {
    padding-left: 10px;
    padding-right: 10px;
  }

  .stats-grid {
    gap: 7px;
  }

  .stat-card {
    padding: 10px;
  }

  .stat-card .value {
    font-size: 1.08rem !important;
  }

  .card {
    border-radius: 11px;
  }

  .nav-item {
    font-size: .54rem;
  }
}

@media (max-width: 340px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .nav-item {
    font-size: 0;
  }

  .nav-item > span:first-child {
    font-size: 1.2rem;
  }
}

/* ============================================================
   Blue app UI redesign — modern, light, easy mobile admin
   ============================================================ */
:root {
  --primary: #1f7af7;
  --primary-light: #eaf3ff;
  --primary-dark: #135ec5;
  --success: #10a66b;
  --danger: #e23b45;
  --warning: #f59e0b;
  --text: #102033;
  --text-muted: #66758a;
  --border: #dfe7f2;
  --bg: #f5f8fd;
  --card: #ffffff;
  --radius: 8px;
  --shadow: 0 10px 28px rgba(34, 99, 180, .08);
  --shadow-md: 0 18px 46px rgba(34, 99, 180, .14);
}

body {
  color: var(--text);
  background:
    linear-gradient(180deg, #f7fbff 0%, #eef5ff 42%, #f8fbff 100%) !important;
}

.app-shell {
  background: transparent;
}

.sidebar {
  background: rgba(255, 255, 255, .92) !important;
  color: #5f7088 !important;
  border-right: 1px solid rgba(158, 179, 209, .32);
  box-shadow: 12px 0 36px rgba(38, 92, 170, .07);
  backdrop-filter: blur(18px);
}

.sidebar-logo {
  color: #0f2b4d !important;
  border-bottom-color: rgba(158, 179, 209, .28) !important;
  font-weight: 850 !important;
}

.sidebar-logo span {
  color: #6c7d94 !important;
}

.nav-item {
  color: #6d7d92 !important;
  border-left-color: transparent !important;
  margin: 2px 10px;
  border-radius: 8px;
  font-weight: 760;
}

.nav-item:hover {
  color: #165fbf !important;
  background: #edf5ff !important;
}

.nav-item.active {
  color: #0b64d8 !important;
  background: #e8f2ff !important;
  border-left-color: transparent !important;
  box-shadow: inset 0 0 0 1px rgba(31, 122, 247, .12);
}

.nav-item > span:first-child {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f2f7ff;
  color: #1f7af7;
}

.nav-item.active > span:first-child {
  background: #1f7af7;
  color: #fff;
  box-shadow: 0 8px 20px rgba(31, 122, 247, .22);
}

.sidebar-footer {
  border-top-color: rgba(158, 179, 209, .28) !important;
  color: #6c7d94 !important;
}

.topbar {
  height: 64px;
  background: rgba(255, 255, 255, .86) !important;
  border-bottom: 1px solid rgba(158, 179, 209, .28) !important;
  box-shadow: 0 8px 28px rgba(38, 92, 170, .055);
  backdrop-filter: blur(18px);
}

.topbar h1 {
  color: #102033;
  font-weight: 850 !important;
}

.page-body {
  background: transparent;
}

.card,
.stat-card,
.login-card,
.modal {
  border-radius: 8px !important;
  border-color: rgba(177, 194, 219, .62) !important;
  box-shadow: var(--shadow) !important;
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  padding: 18px !important;
}

.stat-card:before {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #edf5ff;
}

.stat-card.accent {
  background: #1f7af7 !important;
  border-color: #1f7af7 !important;
  box-shadow: 0 18px 42px rgba(31, 122, 247, .22) !important;
}

.stat-card.accent:before {
  background: rgba(255, 255, 255, .2);
}

.stat-card .label {
  color: #728198 !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.stat-card .value {
  color: #102033 !important;
  font-weight: 900 !important;
}

.stat-card.accent .label,
.stat-card.accent .value {
  color: #fff !important;
}

.card-title {
  color: #66758a !important;
  letter-spacing: 0 !important;
}

.btn {
  border-radius: 999px !important;
  font-weight: 800 !important;
}

.btn-primary {
  background: #1f7af7 !important;
  border-color: #1f7af7 !important;
  box-shadow: 0 10px 24px rgba(31, 122, 247, .18);
}

.btn-primary:hover {
  background: #135ec5 !important;
}

.btn-outline {
  background: #fff !important;
  border-color: #dce7f5 !important;
  color: #23344b !important;
}

input,
select,
textarea {
  border-radius: 999px !important;
  border-color: #dce7f5 !important;
  background: #fff !important;
  color: #102033 !important;
}

textarea {
  border-radius: 8px !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #1f7af7 !important;
  box-shadow: 0 0 0 4px rgba(31, 122, 247, .12) !important;
}

table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

thead tr {
  background: #f2f7ff !important;
}

th {
  color: #6c7d94 !important;
  letter-spacing: 0 !important;
  font-weight: 850 !important;
}

td {
  color: #23344b;
}

tr:hover td {
  background: #f7fbff !important;
}

.badge {
  border-radius: 999px !important;
  font-weight: 800 !important;
}

.badge-green {
  background: #e6f8ef !important;
  color: #0b7a4a !important;
}

.badge-red {
  background: #ffecef !important;
  color: #b8202b !important;
}

.badge-yellow {
  background: #fff6df !important;
  color: #a76500 !important;
}

.badge-blue {
  background: #eaf3ff !important;
  color: #135ec5 !important;
}

.badge-gray {
  background: #eef2f7 !important;
  color: #536174 !important;
}

.modal-overlay {
  background: rgba(15, 32, 51, .42) !important;
  backdrop-filter: blur(6px);
}

.login-page {
  background:
    linear-gradient(180deg, #eaf3ff 0%, #f7fbff 44%, #ffffff 100%) !important;
}

.login-card {
  border: 1px solid rgba(177, 194, 219, .62);
}

.login-card h1 {
  color: #102033;
}

.hr-suite-panel {
  background: #f8fbff !important;
}

.hr-suite-frame-shell {
  border-radius: 8px !important;
  border-color: rgba(177, 194, 219, .62) !important;
  box-shadow: var(--shadow-md) !important;
}

@media (max-width: 900px) {
  .sidebar {
    border-right: none;
  }
}

@media (max-width: 640px) {
  body {
    background:
      linear-gradient(180deg, #eaf3ff 0%, #f7fbff 170px, #f8fbff 100%) !important;
  }

  .topbar {
    height: calc(58px + env(safe-area-inset-top, 0px)) !important;
    background: rgba(255, 255, 255, .92) !important;
  }

  .page-body {
    padding: 14px 12px 92px !important;
  }

  .stats-grid {
    gap: 10px !important;
  }

  .stat-card {
    min-height: 104px;
    padding: 14px !important;
  }

  .stat-card:before {
    width: 30px;
    height: 30px;
  }

  .card {
    padding: 14px !important;
  }

  .sidebar {
    height: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    background: rgba(255, 255, 255, .94) !important;
    border-top: 1px solid rgba(158, 179, 209, .34) !important;
    border-radius: 0 !important;
    box-shadow: 0 -14px 34px rgba(38, 92, 170, .12) !important;
    backdrop-filter: blur(18px);
  }

  .sidebar-nav {
    padding: 6px 6px 8px !important;
    gap: 4px;
  }

  .nav-item {
    color: #7b899d !important;
    margin: 0;
    border-radius: 8px;
    padding: 6px 2px 8px !important;
    font-weight: 800;
  }

  .nav-item.active {
    background: #eaf3ff !important;
    color: #1f7af7 !important;
  }

  .nav-item.active:after {
    display: none;
  }

  .nav-item > span:first-child {
    width: 28px;
    height: 28px;
    font-size: 1rem !important;
    background: transparent;
    box-shadow: none;
  }

  .nav-item.active > span:first-child {
    background: #1f7af7;
    color: #fff;
  }

  .table-wrap {
    border-radius: 8px !important;
  }

  .modal {
    border-radius: 18px 18px 0 0 !important;
  }
}
