/* ================================================================
   HR-CONNECT-PRO V2 — MODERN ELEGANT THEME
   Author: Antigravity (AI)
   Description: Full UI overhaul — dark sidebar, glassmorphism header,
                vibrant accent palette, smooth micro-animations.
   ================================================================ */

/* ---------------------------------------------------------------
   0. GOOGLE FONTS IMPORT
--------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ---------------------------------------------------------------
   1. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
--------------------------------------------------------------- */
:root {
  /* Brand palette */
  --clr-primary: #6366f1;
  /* indigo-500  */
  --clr-primary-dark: #4f46e5;
  /* indigo-600  */
  --clr-primary-light: #818cf8;
  /* indigo-400  */
  --clr-primary-glow: rgba(99, 102, 241, .18);

  --clr-accent: #06b6d4;
  /* cyan-500    */
  --clr-success: #10b981;
  /* emerald-500 */
  --clr-warning: #f59e0b;
  /* amber-500   */
  --clr-danger: #ef4444;
  /* red-500     */
  --clr-info: #3b82f6;
  /* blue-500    */

  /* Sidebar */
  --sidebar-bg: #0f172a;
  /* slate-900   */
  --sidebar-bg2: #1e293b;
  /* slate-800   */
  --sidebar-text: #94a3b8;
  /* slate-400   */
  --sidebar-text-hover: #f1f5f9;
  /* slate-100   */
  --sidebar-active-bg: rgba(99, 102, 241, .15);
  --sidebar-active-txt: #f1f5f9;
  /*  #818cf8; */
  --sidebar-width: 280px;

  /* Header */
  --header-bg: rgba(255, 255, 255, .85);
  --header-border: rgba(99, 102, 241, .08);
  --header-shadow: 0 1px 24px rgba(15, 23, 42, .08);
  --header-height: 64px;

  /* Body */
  --body-bg: #f0f2f8;
  --body-text: #334155;
  /* slate-700   */

  /* Cards */
  --card-bg: #ffffff;
  --card-radius: 16px;
  --card-shadow: 0 2px 20px rgba(15, 23, 42, .06);
  --card-shadow-hover: 0 8px 40px rgba(99, 102, 241, .14);
  --card-border: 1px solid rgba(226, 232, 240, .8);

  /* Inputs */
  --input-bg: #f8fafc;
  --input-border: #e2e8f0;
  --input-focus-border: #6366f1;
  --input-focus-shadow: 0 0 0 3px rgba(99, 102, 241, .15);

  /* Typography */
  --font-sans: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --grad-sidebar: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  --grad-card-accent: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
}

/* ---------------------------------------------------------------
   2. BASE RESET & TYPOGRAPHY
--------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--body-bg);
  color: var(--body-text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

a {
  color: var(--clr-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--clr-primary-dark);
}

/* ---------------------------------------------------------------
   3. SCROLLBAR
--------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ---------------------------------------------------------------
   4. HEADER
--------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--header-border);
  box-shadow: var(--header-shadow);
  z-index: 997;
  display: flex;
  align-items: center;
  padding: 0 24px 0 0;
  transition: all var(--transition-base);
}

/* Logo area */
.header .d-flex.align-items-center.justify-content-between {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  padding: 0 20px;
  background: var(--grad-sidebar);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.header .logo img {
  max-height: 36px;
  background: rgba(255, 255, 255, .92);
  border-radius: 8px;
  padding: 3px 6px;
  object-fit: contain;
}

.header .logo span {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.3px;
}

/* Toggle button */
.header .toggle-sidebar-btn {
  font-size: 22px;
  cursor: pointer;
  color: #94a3b8;
  transition: color var(--transition-fast), transform var(--transition-fast);
  line-height: 1;
  padding: 4px;
  border-radius: 8px;
}

.header .toggle-sidebar-btn:hover {
  color: #f1f5f9;
  transform: scale(1.1);
}

/* Search bar */
.header .search-bar {
  flex: 1;
  max-width: 420px;
  margin-left: 24px;
}

.header .search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.header .search-form input {
  width: 100%;
  background: #f1f5f9;
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 9px 40px 9px 16px;
  font-size: 13.5px;
  color: var(--body-text);
  transition: all var(--transition-base);
  font-family: var(--font-sans);
}

.header .search-form input::placeholder {
  color: #94a3b8;
}

.header .search-form input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--clr-primary);
  box-shadow: var(--input-focus-shadow);
}

.header .search-form button {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #94a3b8;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
}

.header .search-form button:hover {
  color: var(--clr-primary);
}

.header .search-form button i {
  font-size: 16px;
}

/* Header nav */
.header-nav {
  margin-left: auto;
}

.header-nav>ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}

.header-nav .nav-icon {
  font-size: 20px;
  color: #64748b;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: all var(--transition-fast);
  position: relative;
}

.header-nav .nav-icon:hover {
  color: var(--clr-primary);
  background: var(--clr-primary-glow);
}

.header-nav .badge-number {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--clr-danger);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* Profile nav */
.header-nav .nav-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 12px;
  transition: background var(--transition-fast);
  color: #0f172a;
}

.header-nav .nav-profile:hover {
  background: #f1f5f9;
}

.header-nav .nav-profile img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--clr-primary-light);
}

.header-nav .nav-profile span {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
}

/* ---------------------------------------------------------------
   5. DROPDOWN MENUS
--------------------------------------------------------------- */
.dropdown-menu {
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, .12);
  padding: 8px;
  background: #fff;
  animation: dropdownFade 0.18s ease;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-menu .dropdown-header {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
}

.dropdown-menu .dropdown-item {
  font-size: 13.5px;
  padding: 9px 14px;
  border-radius: 8px;
  color: #334155;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition-fast);
}

.dropdown-menu .dropdown-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: #94a3b8;
  transition: color var(--transition-fast);
}

.dropdown-menu .dropdown-item:hover {
  background: var(--clr-primary-glow);
  color: var(--clr-primary);
}

.dropdown-menu .dropdown-item:hover i {
  color: var(--clr-primary);
}

.dropdown-menu .dropdown-divider {
  border-color: #f1f5f9;
  margin: 6px 0;
}

/* Notification dropdown */
.header-nav .notifications {
  min-width: 320px;
  max-height: 400px;
  overflow-y: auto;
}

.header-nav .notifications .notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  transition: background var(--transition-fast);
}

.header-nav .notifications .notification-item:hover {
  background: #f8fafc;
}

.header-nav .notifications .notification-item i {
  font-size: 20px;
  margin: 0;
  flex-shrink: 0;
}

.header-nav .notifications .notification-item h4 {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 2px;
  color: #0f172a;
}

.header-nav .notifications .notification-item p {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

/* ---------------------------------------------------------------
   6. SIDEBAR
--------------------------------------------------------------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--grad-sidebar);
  z-index: 996;
  padding: calc(var(--header-height) + 20px) 16px 20px;
  overflow-y: auto;
  overflow-x: visible;
  /* never clip sidebar content */
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
  box-shadow: 4px 0 24px rgba(15, 23, 42, .15);
  /* use transform for slide — unaffected by parent overflow:hidden */
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(.4, 0, .2, 1),
    box-shadow 0.3s ease;
}

.sidebar::-webkit-scrollbar {
  width: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 99px;
}

/* ── Mobile sidebar: simple left-based slide ── */
@media (max-width: 1199px) {

  .sidebar {
    top: 0 !important;
    left: -280px !important;
    width: 280px !important;
    min-width: 280px !important;
    height: 100vh !important;
    padding-top: 64px !important;
    z-index: 996 !important;
    transition: left 0.3s ease !important;
    box-shadow: none !important;
    transform: none !important;
    /* disable any transform */
  }

  /* Slide in fully when toggled */
  .toggle-sidebar .sidebar {
    left: 0 !important;
    box-shadow: 4px 0 24px rgba(15, 23, 42, .3) !important;
  }

  /* Dim overlay — z-index below sidebar so sidebar is fully visible */
  .toggle-sidebar::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    z-index: 994;
    pointer-events: none;
  }
}

/* ── Desktop sidebar ── */
@media (min-width: 1200px) {

  #main,
  #footer {
    margin-left: var(--sidebar-width) !important;
    transition: margin-left 0.3s ease;
  }

  .toggle-sidebar #main,
  .toggle-sidebar #footer {
    margin-left: 0 !important;
  }

  .toggle-sidebar .sidebar {
    left: calc(-1 * var(--sidebar-width)) !important;
    transform: none !important;
  }
}

/* Sidebar nav */
.sidebar-nav {
  list-style: none;
  padding: 1rem 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav li {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav .nav-heading {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #475569;
  padding: 16px 12px 6px;
  margin: 0;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--sidebar-text);
  background: transparent;
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.sidebar-nav .nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--clr-primary-light);
  border-radius: 0 3px 3px 0;
  transition: height var(--transition-base);
}

.sidebar-nav .nav-link i {
  font-size: 17px;
  color: #475569;
  flex-shrink: 0;
  transition: color var(--transition-fast);
  width: 20px;
  text-align: center;
}

.sidebar-nav .nav-link span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav .nav-link .bi-chevron-down {
  font-size: 12px;
  margin-right: 0;
  transition: transform var(--transition-base);
  color: #475569;
  width: auto;
}

.sidebar-nav .nav-link:not(.collapsed) .bi-chevron-down {
  transform: rotate(180deg);
}

/* Hover state */
.sidebar-nav .nav-link:hover {
  color: var(--sidebar-text-hover);
  background: rgba(255, 255, 255, .05);
}

.sidebar-nav .nav-link:hover i {
  color: var(--clr-primary-light);
}

.sidebar-nav .nav-link:hover::before {
  height: 60%;
}

/* Active state */
.sidebar-nav .nav-link:not(.collapsed) {
  color: var(--sidebar-active-txt);
  background: var(--sidebar-active-bg);
}

.sidebar-nav .nav-link:not(.collapsed) i {
  color: var(--clr-primary-light);
}

.sidebar-nav .nav-link:not(.collapsed)::before {
  height: 60%;
}

/* Sub-menu — let Bootstrap .collapse control display */
.sidebar-nav .nav-content {
  list-style: none;
  padding: 4px 0 4px 44px;
  margin: 0;
  gap: 1px;
}

/* Only apply flex layout when Bootstrap opens it (.show) */
.sidebar-nav .nav-content.show {
  display: flex;
  flex-direction: column;
}

.sidebar-nav .nav-content a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #c2d7f5;
  /*  #64748b; */
  text-decoration: none;
  transition: all var(--transition-fast);
}

.sidebar-nav .nav-content a i {
  font-size: 5px;
  border-radius: 50%;
  background: #475569;
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  transition: background var(--transition-fast);
}

.sidebar-nav .nav-content a:hover,
.sidebar-nav .nav-content a.active {
  color: var(--clr-primary-light);
  background: rgba(99, 102, 241, .08);
}

.sidebar-nav .nav-content a:hover i,
.sidebar-nav .nav-content a.active i {
  background: var(--clr-primary-light);
}

/* ---------------------------------------------------------------
   7. MAIN CONTENT AREA
--------------------------------------------------------------- */
#main {
  margin-top: var(--header-height);
  padding: 28px 28px;
  min-height: calc(100vh - var(--header-height));
  transition: margin-left var(--transition-base);
}

@media (max-width: 1199px) {
  #main {
    padding: 20px 16px;
  }
}

/* ---------------------------------------------------------------
   8. PAGE TITLE & BREADCRUMB
--------------------------------------------------------------- */
.pagetitle {
  margin-bottom: 24px;
}

.pagetitle h1 {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.breadcrumb {
  font-size: 12.5px;
  font-family: var(--font-sans);
  font-weight: 500;
  margin: 0;
  padding: 0;
  background: none;
}

.breadcrumb-item+.breadcrumb-item::before {
  color: #cbd5e1;
}

.breadcrumb-item a {
  color: #94a3b8;
  transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
  color: var(--clr-primary);
}

.breadcrumb-item.active {
  color: var(--clr-primary);
  font-weight: 600;
}

/* ---------------------------------------------------------------
   9. CARDS
--------------------------------------------------------------- */
.card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.card-header,
.card-footer {
  background: transparent;
  border-color: #f1f5f9;
  padding: 16px 20px;
}

.card-body {
  padding: 20px 24px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
  margin-top: 0;
  font-family: var(--font-heading);
  letter-spacing: -0.2px;
}

.card-title span {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
}

/* Dashboard info cards */
.info-card {
  position: relative;
  overflow: hidden;
}

.info-card::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.06;
  transition: all var(--transition-slow);
}

.info-card:hover::after {
  transform: scale(1.4);
  opacity: 0.1;
}

.info-card.sales-card::after {
  background: var(--clr-primary);
}

.info-card.revenue-card::after {
  background: var(--clr-success);
}

.info-card.customers-card::after {
  background: var(--clr-warning);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon i {
  font-size: 24px;
}

.sales-card .card-icon {
  background: rgba(99, 102, 241, .12);
  color: var(--clr-primary);
}

.revenue-card .card-icon {
  background: rgba(16, 185, 129, .12);
  color: var(--clr-success);
}

.customers-card .card-icon {
  background: rgba(245, 158, 11, .12);
  color: var(--clr-warning);
}

.info-card .card-body h6 {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 2px;
  font-family: var(--font-heading);
}

/* ---------------------------------------------------------------
   10. FORM ELEMENTS
--------------------------------------------------------------- */
.form-control,
.form-select {
  font-family: var(--font-sans);
  font-size: 13.5px;
  /* background: var(--input-bg); */
  border: 1.5px solid var(--input-border);
  border-radius: 10px;
  padding: 9px 14px;
  color: var(--body-text);
  transition: all var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
  /* background: #fff; */
  border-color: var(--input-focus-border);
  box-shadow: var(--input-focus-shadow);
  outline: none;
  color: #0f172a;
}

.form-control::placeholder {
  color: #94a3b8;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.form-check-label {
  font-size: 13.5px;
  color: #64748b;
  font-weight: 500;
}

.form-check-input {
  width: 16px;
  height: 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.form-check-input:checked {
  background-color: var(--clr-primary);
  border-color: var(--clr-primary);
}

.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .2);
  border-color: var(--clr-primary);
}

.input-group-text {
  background: #f1f5f9;
  border: 1.5px solid var(--input-border);
  border-radius: 10px 0 0 10px;
  color: #64748b;
  font-size: 14px;
}

.input-group .form-control {
  border-left: none;
  border-radius: 0 10px 10px 0;
}

.invalid-feedback {
  font-size: 12px;
}

/* ---------------------------------------------------------------
   11. BUTTONS
--------------------------------------------------------------- */
.btn {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 10px;
  padding: 9px 20px;
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, .35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  box-shadow: 0 6px 20px rgba(99, 102, 241, .45);
  color: #fff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
  box-shadow: none;
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: #334155;
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, .3);
}

.btn-success:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, .4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, .3);
}

.btn-danger:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, .4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, .3);
}

.btn-warning:hover {
  box-shadow: 0 6px 20px rgba(245, 158, 11, .4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, .3);
}

.btn-info:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, .4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-outline-primary {
  background: transparent;
  border: 1.5px solid var(--clr-primary);
  color: var(--clr-primary);
}

.btn-outline-primary:hover {
  background: var(--clr-primary-glow);
  color: var(--clr-primary-dark);
}

.btn-sm {
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 8px;
}

.btn-lg {
  font-size: 15px;
  padding: 12px 28px;
  border-radius: 12px;
}

/* Custom action buttons */
.action-btn {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.action-btn:hover {
  transform: scale(1.1);
}

/* Custom brand buttons */
.btn-alpha {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, .3);
}

.btn-alpha:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, .4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-gamma {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, .3);
}

.btn-gamma:hover {
  box-shadow: 0 6px 20px rgba(245, 158, 11, .4);
  transform: translateY(-1px);
  color: #fff;
}

/* ---------------------------------------------------------------
   12. TABLES
--------------------------------------------------------------- */
.table {
  font-size: 13.5px;
  color: var(--body-text);
}

.table thead th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 16px;
  white-space: nowrap;
}

.table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #334155;
}

.table tbody tr {
  transition: background var(--transition-fast);
}

.table tbody tr:hover {
  background: #f8fafc;
}

.table-striped>tbody>tr:nth-of-type(odd)>* {
  background: rgba(248, 250, 252, .7);
}

/* ---------------------------------------------------------------
   13. BADGES
--------------------------------------------------------------- */
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.bg-primary {
  background: var(--clr-primary) !important;
}

.bg-success {
  background: var(--clr-success) !important;
}

.bg-warning {
  background: var(--clr-warning) !important;
}

.bg-danger {
  background: var(--clr-danger) !important;
}

.bg-info {
  background: var(--clr-info) !important;
}

/* ---------------------------------------------------------------
   14. ALERTS
--------------------------------------------------------------- */
.alert {
  border: none;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: rgba(16, 185, 129, .1);
  color: #065f46;
  border-left: 4px solid var(--clr-success);
}

.alert-danger {
  background: rgba(239, 68, 68, .1);
  color: #991b1b;
  border-left: 4px solid var(--clr-danger);
}

.alert-warning {
  background: rgba(245, 158, 11, .1);
  color: #92400e;
  border-left: 4px solid var(--clr-warning);
}

.alert-info {
  background: rgba(59, 130, 246, .1);
  color: #1e40af;
  border-left: 4px solid var(--clr-info);
}

/* ---------------------------------------------------------------
   15. MODALS
--------------------------------------------------------------- */
.modal-content {
  border: none;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, .2);
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: none;
  padding: 20px 24px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #f1f5f9 !important;
}

.modal-header .btn-close {
  filter: invert(1);
  opacity: 0.7;
}

.modal-header .btn-close:hover {
  opacity: 1;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid #f1f5f9;
  padding: 16px 24px;
  gap: 8px;
}

/* ---------------------------------------------------------------
   16. TABS
--------------------------------------------------------------- */
.nav-tabs-bordered {
  border-bottom: 2px solid #e2e8f0;
  gap: 4px;
}

.nav-tabs-bordered .nav-link {
  border: none;
  border-radius: 8px 8px 0 0;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
}

.nav-tabs-bordered .nav-link:hover {
  color: var(--clr-primary);
  background: #f8fafc;
}

.nav-tabs-bordered .nav-link.active {
  color: var(--clr-primary);
  background: transparent;
  border-bottom: 2px solid var(--clr-primary);
}

/* ---------------------------------------------------------------
   17. FOOTER
--------------------------------------------------------------- */
.footer {
  background: #fff;
  border-top: 1px solid #f1f5f9;
  padding: 16px 28px;
  font-size: 12.5px;
  color: #94a3b8;
  transition: margin-left var(--transition-base);
}

.footer .copyright {
  font-weight: 500;
}

.footer .credits a {
  color: var(--clr-primary);
  font-weight: 600;
}

/* ---------------------------------------------------------------
   18. BACK TO TOP
--------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, .4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 9999;
}

.back-to-top i {
  font-size: 22px;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, .5);
  color: #fff;
}

/* ---------------------------------------------------------------
   19. LOADER
--------------------------------------------------------------- */
.lds-dual-ring {
  display: inline-block;
  width: 64px;
  height: 64px;
}

.lds-dual-ring:after {
  content: " ";
  display: block;
  width: 48px;
  height: 48px;
  margin: 8px auto;
  border-radius: 50%;
  border: 5px solid transparent;
  border-top-color: var(--clr-primary);
  border-bottom-color: var(--clr-primary-light);
  animation: lds-dual-ring 0.9s linear infinite;
}

@keyframes lds-dual-ring {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .4);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lds-dual-ring.hidden {
  display: none;
}

/* ---------------------------------------------------------------
   20. ACCORDION
--------------------------------------------------------------- */
.accordion-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px !important;
  margin-bottom: 8px;
  overflow: hidden;
}

.accordion-button {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  border-radius: 12px !important;
  padding: 14px 18px;
}

.accordion-button:not(.collapsed) {
  color: var(--clr-primary);
  background: var(--clr-primary-glow);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: none;
}

.accordion-body {
  font-size: 13.5px;
  color: #64748b;
  padding: 14px 18px;
}

/* ---------------------------------------------------------------
   21. DASHBOARD SPECIFIC
--------------------------------------------------------------- */
.dashboard .filter {
  position: absolute;
  right: 8px;
  top: 12px;
  overflow: visible;
  /* never clip the dropdown */
  z-index: 10;
  /* above the card's ::after pseudo-element */
}

.dashboard .filter .icon {
  color: #cbd5e1;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all var(--transition-fast);
  display: inline-block;
  /* ensure the icon is clickable */
}

.dashboard .filter .icon:hover {
  color: var(--clr-primary);
  background: var(--clr-primary-glow);
}

/* Ensure dropdown-menu from .filter is visible above everything */
.dashboard .filter .dropdown-menu {
  z-index: 1050;
  display: none;
}

.dashboard .filter .dropdown-menu.show {
  display: block;
}

/* Activity log */
.dashboard .activity .activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.dashboard .activity .activity-item:last-child {
  border-bottom: none;
}

.dashboard .activity .activite-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  min-width: 80px;
  padding-top: 2px;
}

.dashboard .activity .activity-badge {
  font-size: 8px;
  margin-top: 4px;
  flex-shrink: 0;
}

.dashboard .activity .activity-content {
  font-size: 12.5px;
  color: #475569;
  flex: 1;
}

.dashboard .activity .activity-content a {
  font-weight: 600;
  color: #0f172a;
}

/* Stats box */
.stats-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.stats-box p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

/* Punch widget */
.punch-det {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
}

.punch-hours {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 5px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, .1);
}

/* ---------------------------------------------------------------
   22. PROFILE PAGE
--------------------------------------------------------------- */
.profile .profile-card {
  border-radius: var(--card-radius);
  overflow: hidden;
}

.profile .profile-overview .row {
  border-bottom: 1px solid #f1f5f9;
  padding: 10px 0;
}

.profile .profile-overview .label {
  font-weight: 600;
  font-size: 13px;
  color: #64748b;
}

.profile .profile-overview .data {
  font-size: 13.5px;
  color: #0f172a;
}

/* ---------------------------------------------------------------
   23. DOCUMENT CARDS
--------------------------------------------------------------- */
.document {
  float: left;
  width: calc(33% - 20px);
  max-width: 180px;
  margin: 0 10px 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--card-shadow);
}

.document:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.document .document-body {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
}

.document .document-body i {
  font-size: 42px;
  color: #94a3b8;
}

.document .document-footer {
  padding: 10px 12px;
  border-top: 1px solid #f1f5f9;
}

.document .document-footer .document-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.document .document-footer .document-description {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------------------------------------------------------
   24. MISCELLANEOUS UTILITIES
--------------------------------------------------------------- */
.text-primary {
  color: var(--clr-primary) !important;
}

.text-success {
  color: var(--clr-success) !important;
}

.text-warning {
  color: var(--clr-warning) !important;
}

.text-danger {
  color: var(--clr-danger) !important;
}

.text-info {
  color: var(--clr-info) !important;
}

.text-muted {
  color: #94a3b8 !important;
}

.bg-primary-light {
  background: rgba(99, 102, 241, .1) !important;
}

.bg-success-light {
  background: rgba(16, 185, 129, .1) !important;
}

.bg-warning-light {
  background: rgba(245, 158, 11, .1) !important;
}

.bg-danger-light {
  background: rgba(239, 68, 68, .1) !important;
}

.bg-info-light {
  background: rgba(59, 130, 246, .1) !important;
}

.avatar {
  background: var(--grad-primary);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.swal2-container {
  z-index: 10001 !important;
}

.modal-title {
  color: #f1f5f9 !important;
}

/* Blink animation */
@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.blink {
  animation: blink 0.8s infinite;
}

/* ---------------------------------------------------------------
   25. RESPONSIVE ADJUSTMENTS
--------------------------------------------------------------- */
@media (max-width: 768px) {
  .card-body {
    padding: 16px;
  }

  #main {
    padding: 16px 12px;
  }

  .pagetitle h1 {
    font-size: 18px;
  }

  .header .d-flex.align-items-center.justify-content-between {
    min-width: auto;
    width: auto;
    padding: 0 12px;
  }
}

/* ---------------------------------------------------------------
   26. CALENDAR EVENTS
--------------------------------------------------------------- */
.impo-bk {
  background: #ef4444;
}

.cful-bk {
  background: #10b981;
}

.prim-bk {
  background: var(--clr-primary);
}

.info-bk {
  background: var(--clr-accent);
}

.gen-bk {
  background: #94a3b8;
}

/* ---------------------------------------------------------------
   27. SMOOTH PAGE TRANSITIONS
--------------------------------------------------------------- */
#main {
  animation: pageIn 0.3s ease;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card stagger animation */
.card {
  animation: cardIn 0.4s ease both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}