:root {
  --sidebar-bg: #0B1C2D;
  /* Deep Dark Blue from image */
  --sidebar-text: #94A3B8;
  --sidebar-text-active: #FFFFFF;
  --sidebar-active-bg: #008B9B;
  /* Teal highlight */
  --header-height: 60px;
  --primary-teal: #008B9B;
  --primary-teal-dark: #006D7A;
  --primary-teal-light: #E6F4F6;
  --dark-navy: #0B1C2D;
  --slate-50: #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-600: #475569;
  --slate-900: #0F172A;

  /* Shared UI Variables from Employee Details */
  --primary-color: #008B9B;
  /* Unified with site teal */
  --primary-hover: #006D7A;
  --secondary-color: #6c757d;
  --text-dark: #1a1a1a;
  --text-muted: #64748B;
  /* Unified with slate-400/600 */
  --bg-light: var(--slate-50);
  --border-color: var(--slate-100);
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --transition: all 0.2s ease-in-out;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
  overflow-x: hidden;
  background-color: #F8FAFC;
}

/* Navbar Styles */
.navbar {
  height: var(--header-height);
  background-color: white;
}

.search-bar-container {
  max-width: 600px;
  width: 100%;
}

.search-input {
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  padding-left: 2.5rem;
  /* Space for icon */
  width: 100%;
}

.search-icon-wrapper {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: #0B1C2D;
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-subtitle {
  font-size: 0.6rem;
  color: #008B9B;
  letter-spacing: 1px;
  margin-top: 2px;
}


/* Sidebar Layout Styles */
/* Sidebar styling for Desktop (lg and up) */
@media (min-width: 992px) {
  .sidebar {
    background-color: var(--sidebar-bg);
    width: 260px;
    min-width: 260px;
    height: calc(100vh - var(--header-height));
    position: sticky;
    top: var(--header-height);
    overflow-y: auto;
    transition: margin-left 0.25s ease-out;
    padding: 1rem 0.75rem;
  }

  #wrapper.toggled .sidebar {
    margin-left: -260px;
  }
}

.sidebar .nav-link {
  color: var(--sidebar-text);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  font-weight: 500;
}

.sidebar .nav-link:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.05);
}

.sidebar .nav-link.active {
  background-color: var(--sidebar-active-bg);
  color: white;
}

.sidebar .nav-link i {
  font-size: 1.1rem;
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
}

.sidebar-badge {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 12px;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  margin-left: auto;
}

.sidebar-footer {
  padding: 1rem;
  color: #64748B;
  font-size: 0.75rem;
  margin-top: auto;
}

/* User Profile in Header */
.user-profile-header {
  text-align: right;
  line-height: 1.2;
  margin-right: 0.75rem;
}

.user-name-text {
  font-weight: 600;
  font-size: 0.9rem;
  color: #0F172A;
  display: block;
}

.user-role-text {
  font-size: 0.75rem;
  color: #64748B;
  display: block;
}

.notification-btn {
  position: relative;
  padding: 0.5rem;
  color: #64748B;
  margin-right: 1rem;
}

.notification-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  background-color: #EF4444;
  border-radius: 50%;
}

@media (max-width: 991.98px) {
  .sidebar {
    /* Reset for offcanvas */
    height: 100vh;
    top: 0;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: none;
}

.text-sm {
  font-size: 0.875rem;
  line-height: calc(1.25 / .875);
}

:focus-visible {
  outline: none;
}

.bg-teal {
  background-color: #0099a8;
}

.btn-teal {
  background-color: #0099a8;
}

.btn-teal:hover,
.btn-teal:focus,
.btn-teal:active {
  background-color: #00909f;
}

.btn-outline-teal {
  background-color: white;
  border: 1px solid #0099a8;
}

.btn-teal:hover,
.btn-teal:focus,
.btn-teal:active {
  background-color: #00909f;
}

.page-header {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.5rem !important;
  background-color: white;
  position: sticky;
  top: var(--header-height);
  z-index: 1001;
}

.text-teal {
  color: teal;
}

.page-content {
  padding: 0.5rem 1.5rem 0.5rem 1.5rem !important;
  overflow-x: hidden;
}

/* Prevent flex container from growing indefinitely due to children (grid) */
#wrapper>.flex-grow-1 {
  min-width: 0;
}

/* For Chrome, Safari, and Opera */
.hidden-scroll::-webkit-scrollbar {
  display: none;
}

/* For Firefox */
.hidden-scroll {
  scrollbar-width: none;
  /* Hides scrollbar */
}

/* For IE and Edge */
.hidden-scroll {
  -ms-overflow-style: none;
  /* Hides scrollbar */
}

/* Ensure scrolling is enabled */
.hidden-scroll {
  overflow: auto;
}

/* Custom Teal Nav Pills */
.nav-pills-teal .nav-link.active,
.nav-pills-teal .show>.nav-link {
  background-color: #0099a8;
  color: white;
}

.nav-pills-teal .nav-link {
  color: #495057;
  /* Standard Bootstrap text color or use #0099a8 for colored text */
}

.nav-pills-teal .nav-link:hover {
  color: #020202;
  background-color: #d0d0d0;
}

.nav-pills-teal .nav-link.active:hover {
  background-color: #0099a8;
  color: white;
}

/* =============================================================
   Shared Form Styles (used across create/edit pages)
   ============================================================= */

/* Breadcrumb nav */
.breadcrumb-nav {
  font-size: 0.9rem;
  color: #64748B;
}

.breadcrumb-nav a {
  color: #64748B;
  text-decoration: none;
}

.breadcrumb-nav .active {
  font-weight: 600;
  color: #0F172A;
}

/* Generic form card */
.form-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  padding: 1.5rem;
}

.form-card-title {
  font-weight: 600;
  color: #334155;
  font-size: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #F1F5F9;
}

/* Custom label styles */
.form-label-custom {
  font-size: 0.85rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.4rem;
}

.form-label-custom span {
  color: #EF4444;
}

/* Custom input/select styles */
.form-control-custom,
.form-select-custom {
  font-size: 0.9rem;
  padding: 0.6rem 0.85rem;
  border-color: #CBD5E1;
  border-radius: 6px;
  color: #1E293B;
}

.form-control-custom:focus,
.form-select-custom:focus {
  border-color: #008B9B;
  box-shadow: 0 0 0 2px rgba(0, 139, 155, 0.1);
}

.form-control-custom::placeholder {
  color: #94A3B8;
}

/*
  Status Badge
*/
.status-badge-pills {
  /* Pill shape */
  display: inline-block;
  line-height: 1.1;
  border-radius: 100px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  border: 1px solid;
}

.status-badge-green {
  color: #15803d !important;
  background-color: #dcfce7 !important;
  border-color: #86efac !important;
}

.status-badge-blue {
  color: #1e40af !important;
  background-color: #dbeafe !important;
  border-color: #93c5fd !important;
}

.status-badge-orange {
  color: #92400e !important;
  background-color: #fef3c7 !important;
  border-color: #fde68a !important;
}

/* App-wide toast notifications (paired with Scripts/src/modules/common/toast.ts) */
#app-toast-container {
    position: fixed;
    top: 76px;
    right: 16px;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.app-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 320px;
    max-width: 480px;
    padding: 12px 14px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(15, 32, 39, 0.15);
    border-left: 4px solid #16707d;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-size: 0.9rem;
    color: #1c1f23;
}

.app-toast.show { opacity: 1; transform: translateX(0); }
.app-toast.hide { opacity: 0; transform: translateX(20px); }

.app-toast-success { border-left-color: #2e9c4d; }
.app-toast-error { border-left-color: #d9534f; }
.app-toast-warning { border-left-color: #f0a500; }
.app-toast-info { border-left-color: #0d6efd; }

.app-toast-icon { font-size: 1.15rem; line-height: 1.2; padding-top: 1px; }
.app-toast-success .app-toast-icon { color: #2e9c4d; }
.app-toast-error .app-toast-icon { color: #d9534f; }
.app-toast-warning .app-toast-icon { color: #f0a500; }
.app-toast-info .app-toast-icon { color: #0d6efd; }

.app-toast-body { flex: 1; word-break: break-word; line-height: 1.4; }

.app-toast-close {
    background: transparent;
    border: 0;
    color: #6c757d;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
}
.app-toast-close:hover { color: #1c1f23; }

.status-badge-purple {
  color: #8200db !important;
  background-color: #f3e8ff !important;
  border-color: #cbacec !important;
}