/* Adapted from the Omniflow-CRM design system.
   Preserve HRIS routes, ONNI branding and Bootstrap behavior. */
/* Standalone login follows the same visual language without requiring the admin shell. */
.auth-shell {
  --auth-brand: #265dfe;
  --auth-brand-rgb: 38, 93, 254;
  min-height: 100vh;
  margin: 0;
  color: #0f172a;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(var(--auth-brand-rgb), .1), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(124, 58, 237, .08), transparent 60%),
    #f5f7fb;
  -webkit-font-smoothing: antialiased;
}
.auth-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, .12);
}
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
  text-align: center;
}
.auth-brand img { width: 64px; height: 64px; margin-bottom: 1rem; object-fit: contain; }
.auth-title { margin: 0; font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; }
.auth-subtitle { margin: .35rem 0 0; color: #64748b; font-size: .875rem; }
.auth-card .form-label { color: #334155; font-weight: 600; }
.auth-card .form-control { border-color: #d4dae3; }
.auth-card .form-control:focus {
  border-color: var(--auth-brand);
  box-shadow: 0 0 0 3px rgba(var(--auth-brand-rgb), .18);
}
.auth-card .btn-primary { background: var(--auth-brand); border-color: var(--auth-brand); }
.auth-card .btn-primary:hover { background: #1a43bd; border-color: #1a43bd; }
.auth-card .input-group > .btn { padding-inline: .9rem; }
.auth-card .alert { margin-bottom: 1rem; }

.hris-theme {
  --of-brand: #265dfe;
  --of-brand-rgb: 38, 93, 254;
  --of-brand-700: #1a43bd;
  --of-brand-50: #eef3ff;
  --of-bg: #f5f7fb;
  --of-surface: #fff;
  --of-surface-2: #f8fafc;
  --of-line: #e5e9f0;
  --of-line-strong: #d4dae3;
  --of-text: #0f172a;
  --of-text-2: #475569;
  --of-text-3: #64748b;
  --of-radius: 10px;
  --of-sidebar-w: 248px;
  --of-topnav-h: 60px;
  --of-ring: 0 0 0 3px rgba(var(--of-brand-rgb), .18);
  --bs-primary: var(--of-brand);
  --bs-primary-rgb: var(--of-brand-rgb);
  --bs-border-color: var(--of-line);
  background: var(--of-bg);
  color: var(--of-text);
  -webkit-font-smoothing: antialiased;
}
.hris-theme #layoutSidenav_content { background: var(--of-bg); }
.hris-theme .attendance-issue-dialog { max-width: 440px; }
.hris-theme #attendanceIssueHeader { padding-block: .85rem; }
.hris-theme #attendanceIssueHeader .modal-title { font-size: 1rem; }
.hris-theme #attendanceIssueIcon {
  width: 1.1rem;
  height: 1.1rem;
  max-width: 1.1rem;
  max-height: 1.1rem;
  vertical-align: -.15em;
}
.hris-theme #attendanceIssueModal .modal-body { padding: 1rem; }
.hris-theme #attendanceIssueModal .modal-footer { padding: .75rem 1rem; }
.hris-theme #layoutSidenav_content > main { padding-bottom: 2rem; }
.hris-theme #layoutSidenav_content > main > .container-fluid { padding-inline: 1.75rem !important; }
.hris-theme main .container-fluid > h1.mt-4 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: .35rem;
}
.hris-theme .breadcrumb { font-size: .8rem; }
.hris-theme .breadcrumb a, .hris-theme .text-muted { color: var(--of-text-3) !important; }
.hris-theme .sb-topnav { height: var(--of-topnav-h); background: var(--of-surface) !important; border-bottom: 1px solid var(--of-line); padding-block: 0; }
.hris-theme .sb-topnav .navbar-brand {
  background: #0f172a;
  width: var(--of-sidebar-w);
  flex: 0 0 var(--of-sidebar-w);
  height: 100%;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding-left: 1.25rem !important;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  border-right: 1px solid #0f172a;
}
.hris-theme .navbar-brand img { object-fit: contain; flex-shrink: 0; border-radius: 6px; background: #fff; padding: 3px; }
.hris-theme .sb-topnav #sidebarToggle { width: 36px; height: 36px; flex-shrink: 0; margin-left: .75rem; padding: 0; }
.hris-theme .sb-topnav #sidebarToggle:hover { background: var(--of-surface-2); }
.hris-theme .topnav-avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--of-brand-50); color: var(--of-brand); font-size: .8rem; font-weight: 700; text-transform: uppercase; }
.hris-theme .topnav-user-name { max-width: 180px; font-size: .85rem; font-weight: 600; }
.hris-theme #layoutSidenav #layoutSidenav_nav { flex-basis: var(--of-sidebar-w); width: var(--of-sidebar-w); transform: translateX(calc(-1 * var(--of-sidebar-w))); }
.hris-theme #layoutSidenav #layoutSidenav_nav .sb-sidenav { padding-top: var(--of-topnav-h); }
.hris-theme #layoutSidenav #layoutSidenav_content { padding-left: var(--of-sidebar-w); margin-left: calc(-1 * var(--of-sidebar-w)); top: var(--of-topnav-h); min-height: calc(100vh - var(--of-topnav-h)); }
.hris-theme.sb-sidenav-toggled #layoutSidenav #layoutSidenav_nav { transform: translateX(0); }
@media (min-width: 992px) {
  .hris-theme #layoutSidenav #layoutSidenav_nav { transform: translateX(0); }
  .hris-theme #layoutSidenav #layoutSidenav_content { margin-left: 0; }
  .hris-theme.sb-sidenav-toggled #layoutSidenav #layoutSidenav_nav { transform: translateX(calc(-1 * var(--of-sidebar-w))); }
  .hris-theme.sb-sidenav-toggled #layoutSidenav #layoutSidenav_content { margin-left: calc(-1 * var(--of-sidebar-w)); }
}
.hris-theme .sb-topnav .navbar-brand:hover,
.hris-theme .sb-topnav .navbar-brand:focus { color: #e2e8f0; }
.hris-theme .network-status-indicator .status-light {
  border: 1px solid transparent;
  padding: 5px 10px;
  font-weight: 600;
  white-space: nowrap;
}
.hris-theme .network-status-indicator { margin-left: auto; margin-right: .75rem; }
.hris-theme .network-status-indicator + .navbar-nav { margin-left: 0 !important; }
.hris-theme .network-status-indicator .status-light.online { background: #e8f7ee; border-color: #c4ebd3; color: #15803d; }
.hris-theme .network-status-indicator .status-light.offline { background: #fdecec; border-color: #f7c9c9; color: #b91c1c; }
.hris-theme .network-status-indicator .status-light.checking { background: #fef4e2; border-color: #f8dfb2; color: #92400e; }
.hris-theme .network-status-indicator .status-light .status-label { color: inherit; text-shadow: none; }
.hris-theme .network-status-indicator .status-light .light-dot {
  width: 7px;
  height: 7px;
  background: currentColor;
  color: inherit;
  box-shadow: none;
  animation: none;
}
.hris-theme .sb-topnav #sidebarToggle,
.hris-theme .sb-topnav .nav-link { color: var(--of-text-2); }
.hris-theme .sb-sidenav-dark { background: #0f172a; color: #94a3b8; }
.hris-theme .sb-sidenav-menu { padding: .25rem .75rem 1rem; scrollbar-width: thin; scrollbar-color: #475569 transparent; }
.hris-theme .sb-sidenav .sb-sidenav-menu .nav .nav-link {
  position: relative;
  border-radius: 8px;
  padding: .5rem .75rem;
  margin: 1px 0;
  font-weight: 500;
  font-size: .85rem;
  color: #94a3b8;
}
.hris-theme .sb-sidenav .sb-sidenav-menu .nav .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.hris-theme .sb-sidenav .sb-sidenav-menu .nav .nav-link.active { background: rgba(38,93,254,.16) !important; color: #fff !important; border-left: 0 !important; margin-left: 0 !important; box-shadow: none !important; }
.hris-theme .sb-sidenav .sb-nav-link-icon { width: 20px; flex-shrink: 0; text-align: center; margin-right: .65rem; }
.hris-theme .sb-sidenav .nav-link.active .sb-nav-link-icon { color: #7fa0ff; }
.hris-theme .sb-sidenav .sb-sidenav-menu .nav .sb-sidenav-menu-nested { margin: 2px 0 4px 1.35rem; padding-left: .75rem; border-left: 1px solid rgba(255,255,255,.08); }
.hris-theme .sb-sidenav .sb-sidenav-menu .nav .sb-sidenav-menu-nested .nav-link { padding: .4rem .65rem; font-size: .82rem; }
.hris-theme .sb-sidenav .sb-sidenav-menu .nav .sb-sidenav-menu-nested .nav-link.active { background: transparent !important; font-weight: 600; }
.hris-theme .sb-sidenav .sb-sidenav-menu .nav .sb-sidenav-menu-heading { color: #94a3b8; font-size: .68rem; letter-spacing: .07em; }
.hris-theme .sb-sidenav-dark .sb-sidenav-footer { background: rgba(255,255,255,.03); border-top: 1px solid #334155; }
.hris-theme .card {
  --bs-card-border-color: var(--of-line);
  --bs-card-border-radius: 14px;
  --bs-card-inner-border-radius: 13px;
  border-radius: 14px;
  border-color: var(--of-line);
  box-shadow: 0 1px 3px rgba(15,23,42,.06);
}
.hris-theme .card-header { padding: .9rem 1.15rem; border-bottom-color: var(--of-line); }
.hris-theme .card-header:not([class*="bg-"]) { background: var(--of-surface); }
.hris-theme .card-header h5, .hris-theme .card-header h6 { font-size: .92rem; font-weight: 650; }
.hris-theme .card-footer { background: var(--of-surface-2); border-top-color: var(--of-line); }
.hris-theme .btn { border-radius: 6px; font-size: .85rem; font-weight: 550; padding: .45rem .9rem; }
.hris-theme .btn-sm { font-size: .78rem; padding: .3rem .65rem; }
.hris-theme .btn-lg { font-size: 1rem; padding: .65rem 1.25rem; }
.hris-theme .btn-primary {
  --bs-btn-bg: var(--of-brand);
  --bs-btn-border-color: var(--of-brand);
  --bs-btn-hover-bg: #1e4fe0;
  --bs-btn-hover-border-color: #1e4fe0;
  --bs-btn-active-bg: var(--of-brand-700);
  --bs-btn-active-border-color: var(--of-brand-700);
  --bs-btn-disabled-bg: var(--of-brand);
  --bs-btn-disabled-border-color: var(--of-brand);
}
.hris-theme .btn-outline-primary {
  --bs-btn-color: var(--of-brand);
  --bs-btn-border-color: var(--of-line-strong);
  --bs-btn-hover-color: var(--of-brand-700);
  --bs-btn-hover-bg: var(--of-brand-50);
  --bs-btn-hover-border-color: #b8c9fd;
}
.hris-theme .btn-outline-secondary { --bs-btn-color: var(--of-text-2); --bs-btn-border-color: var(--of-line-strong); }
.hris-theme .form-control, .hris-theme .form-select {
  border-color: var(--of-line-strong);
  border-radius: 6px;
  font-size: .875rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.hris-theme .form-control:focus, .hris-theme .form-select:focus, .hris-theme .form-check-input:focus { border-color: var(--of-brand); box-shadow: var(--of-ring); }
.hris-theme .form-control.is-invalid, .hris-theme .form-select.is-invalid { border-color: #dc3545; }
.hris-theme .form-control.is-valid, .hris-theme .form-select.is-valid { border-color: #198754; }
.hris-theme .form-label { font-weight: 550; color: var(--of-text-2); }
.hris-theme .form-check-input:checked { background-color: var(--of-brand); border-color: var(--of-brand); }
.hris-theme .table { --bs-table-border-color: var(--of-line); --bs-table-striped-bg: var(--of-surface-2); --bs-table-hover-bg: #eef3ff; font-size: .85rem; }
.hris-theme .table > :not(caption) > * > * { padding: .7rem 1rem; }
.hris-theme .table-sm > :not(caption) > * > * { padding: .4rem .65rem; }
.hris-theme .table thead:not(.table-dark) th { background-color: var(--of-surface-2); color: var(--of-text-2); font-size: .75rem; font-weight: 650; }
.hris-theme .badge { border-radius: 999px; font-weight: 600; padding: .4em .65em; }
.hris-theme .badge.bg-primary { background: #eef3ff !important; color: #1a43bd !important; }
.hris-theme .badge.bg-success { background: #e8f7ee !important; color: #15803d !important; }
.hris-theme .badge.bg-warning { background: #fef4e2 !important; color: #92400e !important; }
.hris-theme .badge.bg-danger { background: #fdecec !important; color: #b91c1c !important; }
.hris-theme .badge.bg-info { background: #e3f5f9 !important; color: #0e7490 !important; }
.hris-theme .badge.bg-secondary { background: #eef1f5 !important; color: #475569 !important; }
.hris-theme .dropdown-menu { border-color: var(--of-line); border-radius: 10px; box-shadow: 0 8px 24px -6px rgba(15,23,42,.12); }
.hris-theme .dropdown-item { font-size: .85rem; }
.hris-theme .modal-content { border-radius: 14px; border-color: var(--of-line); box-shadow: 0 20px 48px -12px rgba(15,23,42,.22); }
.hris-theme .modal-footer { background: var(--of-surface-2); }
.hris-theme .alert { border-radius: 10px; }
.hris-theme .nav-tabs .nav-link { font-size: .85rem; }
.hris-theme .nav-tabs .nav-link.active { color: var(--of-brand); font-weight: 600; }
.hris-theme .dataTables_wrapper input, .hris-theme .datatable-input,
.hris-theme .dataTables_wrapper select, .hris-theme .datatable-selector { border: 1px solid var(--of-line-strong); border-radius: 6px; padding: .35rem .6rem; }
.hris-theme #layoutSidenav_content > footer { border-top: 1px solid var(--of-line); }
@media (max-width: 575.98px) {
  .hris-theme { --of-topnav-h: 56px; }
  .hris-theme .sb-topnav { padding-inline: .5rem; gap: .25rem; }
  .hris-theme .sb-topnav .navbar-brand {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    padding: 0 .25rem !important;
    background: transparent;
    border: 0;
    color: var(--of-text);
    font-size: .85rem;
    gap: .4rem;
  }
  .hris-theme .sb-topnav .navbar-brand:hover,
  .hris-theme .sb-topnav .navbar-brand:focus { color: var(--of-brand); }
  .hris-theme .navbar-brand img { width: 24px; height: 24px; padding: 0; }
  .hris-theme .sb-topnav #sidebarToggle { order: -1; margin: 0; width: 40px; height: 44px; }
  .hris-theme .network-status-indicator { flex: 0 0 auto; margin: 0; }
  .hris-theme .network-status-indicator .status-light { padding: 4px 6px; font-size: 10px; gap: 4px; }
  .hris-theme .sb-topnav .navbar-nav { flex: 0 0 auto; margin: 0 !important; }
  .hris-theme .sb-topnav #navbarDropdown { min-width: 44px; min-height: 44px; justify-content: center; padding: .25rem; }
  .hris-theme .sb-topnav .dropdown-menu { position: fixed; top: 56px; right: .5rem; left: auto; max-width: calc(100vw - 1rem); }
  .hris-theme #layoutSidenav_content > main > .container-fluid { padding-inline: 1rem !important; }
  .hris-theme main h1 { font-size: 1.35rem; line-height: 1.35; overflow-wrap: anywhere; }
  .hris-theme main .container-fluid > h1.mt-4 { font-size: 1.35rem; }
  .hris-theme .dashboard-home > .row:first-child { margin-top: 1.25rem !important; margin-bottom: 1rem !important; }
  .hris-theme .dashboard-home h4 { font-size: 1.05rem; }
  .hris-theme .dashboard-home .list-group-item.p-4,
  .hris-theme .dashboard-home .card-body.p-4 { padding: 1rem !important; }
  .hris-theme .dashboard-home .list-group-item h5 { font-size: .95rem; line-height: 1.4; }
  .hris-theme .table > :not(caption) > * > * { padding: .55rem .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hris-theme .btn, .hris-theme .nav-link { transition: none; }
}
