/* ============================================================
   CSS VARIABLES & THEME CONFIGURATION
   ============================================================ */
:root {
  /* Brand Colors */
  --bs-primary: #009d9b;
  --bs-primary-rgb: 0, 157, 155;
  --bs-primary-text-emphasis: #005452;
  --bs-primary-bg-subtle: #d1f3f2;
  --bs-primary-border-subtle: #8cdedc;

  /* Theme Colors */
  --primary-color: #009d9b;
  --primary-color-light: rgba(0, 157, 155, 0.1);
  --primary-color-dark: #007f7c;
  --primary-color-hover: #008583;
  --text-color: #444444;
  --bg-color: #f6f9ff;
  --card-bg: #ffffff;
  --card-border: #ebeef4;
  --header-bg: #ffffff;
  --sidebar-bg: #ffffff;
  --sidebar-link-active: #f6f9ff;
  --sidebar-link-hover: #f6f9ff;
  --sidebar-link-color: #009d9b;
  --input-border: rgba(1, 41, 112, 0.2);
  --input-focus-border: rgba(1, 41, 112, 0.3);
  --muted-text: #899bbd;
  --light-bg: #f6f9ff;

  /* Spacing System */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;

  /* Border Radius */
  --border-radius-sm: 0.25rem;
  --border-radius: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;

  /* Transitions */
  --transition-speed: 0.3s;
  --transition-fast: 0.15s;
  --transition-slow: 0.5s;

  /* Typography */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-xxl: 2rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0px 0 30px rgba(1, 41, 112, 0.1);
  --shadow-lg: 0 10px 30px rgba(1, 41, 112, 0.15);
  --shadow-xl: 0 20px 40px rgba(1, 41, 112, 0.2);

  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;

  /* Smooth Scrolling */
  scroll-behavior: smooth;
}

/* ============================================================
     DARK THEME VARIABLES
     ============================================================ */
body.dark {
  --primary-color: #009d9b;
  --primary-color-light: rgba(0, 157, 155, 0.15);
  --primary-color-dark: #007f7c;
  --primary-color-hover: #00b3b0;
  --text-color: #e0e0e0;
  --bg-color: #121212;
  --card-bg: #1e1e2d;
  --card-border: #2a2a3c;
  --header-bg: #1a1a2e;
  --sidebar-bg: #1e1e2d;
  --sidebar-link-active: #2a2a3c;
  --sidebar-link-hover: #2a2a3c;
  --sidebar-link-color: #e0e0e0;
  --input-border: #333345;
  --input-focus-border: #009d9b;
  --muted-text: #a0a0a0;
  --light-bg: #2a2a3c;

  /* Dark mode shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow: 0px 0 30px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* ============================================================
     BASE STYLES
     ============================================================ */
* {
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  transition: background-color var(--transition-speed), color var(--transition-speed);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

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

a:hover {
  color: var(--primary-color-hover);
  text-decoration: none;
}

/* ============================================================
     UTILITY CLASSES
     ============================================================ */
.disable-animations * {
  animation: none !important;
  transition: none !important;
}

/* Background Utilities */
.bg-primary-soft {
  background-color: var(--primary-color-light) !important;
  color: var(--primary-color) !important;
}

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

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

.border-primary {
  border-color: var(--primary-color) !important;
}

/* Light Backgrounds */
.bg-primary-light {
  background-color: #cfe2ff;
}

.bg-secondary-light {
  background-color: #e2e3e5;
}

.bg-success-light {
  background-color: #d1e7dd;
}

.bg-danger-light {
  background-color: #f8d7da;
}

.bg-warning-light {
  background-color: #fff3cd;
}

.bg-info-light {
  background-color: #cff4fc;
}

.bg-dark-light {
  background-color: #d3d3d4;
}

/* Dark mode soft backgrounds */
body.dark .bg-primary-soft {
  background-color: rgba(0, 157, 155, 0.15) !important;
}

body.dark .bg-success-soft {
  background-color: rgba(34, 197, 94, 0.15) !important;
}

body.dark .bg-warning-soft {
  background-color: rgba(234, 179, 8, 0.15) !important;
}

body.dark .bg-danger-soft {
  background-color: rgba(244, 63, 94, 0.15) !important;
}

body.dark .bg-info-soft {
  background-color: rgba(14, 165, 233, 0.15) !important;
}

/* ============================================================
     BUTTONS
     ============================================================ */
.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  transition: all var(--transition-speed);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-color-hover) !important;
  border-color: var(--primary-color-hover) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 157, 155, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-close:focus {
  outline: 0;
  box-shadow: none;
}

/* Floating Action Button */
.btn-floating {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-speed);
}

.btn-floating:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* ============================================================
     CARDS
     ============================================================ */
.card {
  margin-bottom: 30px;
  border: none;
  border-radius: var(--border-radius);
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
  transition: all var(--transition-speed);
}

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

.card-header,
.card-footer {
  border-color: var(--card-border);
  background-color: var(--card-bg);
  color: var(--muted-text);
  padding: 15px;
}

.card-header.bg-primary {
  color: white;
}

.card-title {
  padding: 20px 0 15px 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--primary-color);
  font-family: "Poppins", sans-serif;
  margin-bottom: var(--spacing-md);
}

.card-title span {
  color: var(--muted-text);
  font-size: 14px;
  font-weight: 400;
}

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

.card-img-overlay {
  background-color: rgba(255, 255, 255, 0.6);
}

body.dark .card {
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
}

body.dark .card-header,
body.dark .card-footer {
  background-color: var(--card-bg);
  border-color: var(--card-border);
}

/* ============================================================
     FORMS
     ============================================================ */
.form-control {
  border: 1px solid var(--input-border);
  transition: all var(--transition-speed);
  border-radius: var(--border-radius);
}

.form-control:focus,
.form-control:hover {
  outline: none;
  box-shadow: 0 0 10px 0 rgba(0, 157, 155, 0.15);
  border: 1px solid var(--input-focus-border);
}

body.dark .form-control {
  background-color: var(--card-bg);
  border-color: var(--input-border);
  color: var(--text-color);
}

body.dark .form-control:focus {
  background-color: var(--card-bg);
  border-color: var(--primary-color);
}

/* ============================================================
     TABLES
     ============================================================ */
.table {
  color: var(--text-color);
}

.table thead th {
  color: var(--text-color);
  border-bottom-color: var(--card-border);
  font-weight: 600;
}

.table-hover tbody tr:hover {
  background-color: var(--light-bg);
}

body.dark .table {
  color: var(--text-color);
}

body.dark .table thead {
  background: var(--card-border);
}

body.dark .table-hover tbody tr:hover {
  background-color: rgba(0, 157, 155, 0.1);
}

/* ============================================================
     DROPDOWNS
     ============================================================ */
.dropdown-menu {
  border-radius: var(--border-radius);
  padding: 10px 0;
  animation: dropdown-animate 0.2s ease-out;
  border: 0;
  box-shadow: var(--shadow-lg);
  background-color: var(--card-bg);
  border-color: var(--card-border);
}

.dropdown-menu .dropdown-header,
.dropdown-menu .dropdown-footer {
  text-align: center;
  font-size: 15px;
  padding: 10px 25px;
}

.dropdown-menu .dropdown-item {
  font-size: 14px;
  padding: 10px 15px;
  transition: var(--transition-speed);
  color: var(--text-color);
}

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

.dropdown-menu .dropdown-divider {
  border-color: var(--card-border);
  margin: 0;
}

@keyframes dropdown-animate {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

body.dark .dropdown-menu {
  background-color: var(--card-bg);
  border-color: var(--card-border);
}

body.dark .dropdown-item:hover {
  background-color: var(--card-border);
  color: var(--primary-color);
}

/* ============================================================
     HEADER
     ============================================================ */
.header {
  transition: all var(--transition-slow);
  z-index: var(--z-fixed);
  height: 60px;
  box-shadow: 0px 2px 20px rgba(1, 41, 112, 0.1);
  background-color: var(--header-bg);
  padding-left: 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.logo {
  line-height: 1;
}

@media (min-width: 1200px) {
  .logo {
    width: 280px;
  }
}

.logo img {
  max-height: 38px;
  margin-right: 6px;
}

.logo span {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-color);
  font-family: "Nunito", sans-serif;
}

.toggle-sidebar-btn {
  font-size: 32px;
  padding-left: 10px;
  cursor: pointer;
  color: var(--primary-color);
  transition: color var(--transition-speed);
}

.toggle-sidebar-btn:hover {
  color: var(--primary-color-hover);
}

/* Search Bar */
.header .search-bar {
  min-width: 360px;
  padding: 0 20px;
}

@media (max-width: 1199px) {
  .header .search-bar {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    background: var(--card-bg);
    z-index: 9999;
    transition: var(--transition-speed);
    visibility: hidden;
    opacity: 0;
  }

  .header .search-bar-show {
    top: 60px;
    visibility: visible;
    opacity: 1;
  }
}

.header .search-form input {
  border: 1px solid var(--input-border);
  font-size: 14px;
  color: var(--text-color);
  padding: 7px 38px 7px 8px;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-speed);
  width: 100%;
  background: var(--card-bg);
}

.header .search-form input:focus,
.header .search-form input:hover {
  outline: none;
  box-shadow: 0 0 10px 0 rgba(0, 157, 155, 0.15);
  border: 1px solid var(--input-focus-border);
}

body.dark .header {
  background-color: var(--header-bg);
  box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.4);
}

/* ============================================================
     HEADER NAV
     ============================================================ */
.header-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav .nav-icon {
  font-size: 22px;
  color: var(--primary-color);
  margin-right: 25px;
  position: relative;
  transition: color var(--transition-speed);
}

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

.header-nav .nav-profile {
  color: var(--primary-color);
}

.header-nav .nav-profile img {
  max-height: 36px;
  border-radius: 50%;
}

.header-nav .nav-profile span {
  font-size: 14px;
  font-weight: 600;
}

.header-nav .badge-number {
  position: absolute;
  inset: -2px -5px auto auto;
  font-weight: normal;
  font-size: 12px;
  padding: 3px 6px;
}

/* Notifications & Messages */
.header-nav .notifications,
.header-nav .messages {
  inset: 8px -15px auto auto !important;
}

.header-nav .notifications .notification-item,
.header-nav .messages .message-item {
  padding: 15px 10px;
  transition: var(--transition-speed);
}

.header-nav .notifications .notification-item:hover,
.header-nav .messages .message-item:hover {
  background-color: var(--light-bg);
}

body.dark .notification-item:hover,
body.dark .message-item:hover {
  background-color: var(--card-border);
}

/* ============================================================
     SIDEBAR
     ============================================================ */
.sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  width: 300px;
  z-index: calc(var(--z-fixed) - 1);
  transition: all var(--transition-speed);
  padding: 20px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #aab7cf transparent;
  box-shadow: 0px 0px 20px rgba(1, 41, 112, 0.1);
  background-color: var(--sidebar-bg);
}

@media (max-width: 1199px) {
  .sidebar {
    left: -300px;
  }
}

.sidebar::-webkit-scrollbar {
  width: 5px;
  height: 8px;
  background-color: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: #aab7cf;
  border-radius: 10px;
}

@media (min-width: 1200px) {

  #main,
  #footer {
    margin-left: 300px;
  }
}

@media (max-width: 1199px) {
  .toggle-sidebar .sidebar {
    left: 0;
  }
}

@media (min-width: 1200px) {

  .toggle-sidebar #main,
  .toggle-sidebar #footer {
    margin-left: 70px;
  }

  .toggle-sidebar .sidebar {
    left: 0;
    width: 70px;
    padding: 10px 5px;
    overflow-x: hidden;
  }

  /* Hide text labels, keep icons */
  .toggle-sidebar .sidebar .nav-link span,
  .toggle-sidebar .sidebar .nav-content a span,
  .toggle-sidebar .sidebar .nav-heading {
    display: none;
  }

  /* Hide chevron toggle arrows */
  .toggle-sidebar .sidebar .nav-link .bi-chevron-down,
  .toggle-sidebar .sidebar .nav-link .toggle-icon {
    display: none;
  }

  /* Hide sub-menus entirely */
  .toggle-sidebar .sidebar .nav-content {
    display: none !important;
  }

  /* Center icons in collapsed sidebar */
  .toggle-sidebar .sidebar .nav-link {
    justify-content: center;
    padding: 12px 8px;
    border-radius: 12px;
    margin-bottom: 4px;
    position: relative;
  }

  .toggle-sidebar .sidebar .nav-link i {
    margin-right: 0;
    font-size: 20px;
  }

  /* Tooltip on hover for collapsed sidebar items */
  .toggle-sidebar .sidebar .nav-link::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #1a2332;
    color: #f1f5f9;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.15s ease;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .toggle-sidebar .sidebar .nav-link:hover::after {
    opacity: 1;
    visibility: visible;
  }

  /* Light theme tooltip */
  body:not(.dark):not(.dark-theme) .toggle-sidebar .sidebar .nav-link::after {
    background: #1e293b;
    color: #f1f5f9;
  }
}

body.dark .sidebar {
  background-color: var(--sidebar-bg);
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.3);
}

/* ============================================================
     SIDEBAR NAVIGATION
     ============================================================ */
.sidebar-nav {
  padding: 0;
  margin: 0;
  list-style: none;
}

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

.sidebar-nav .nav-item {
  margin-bottom: 5px;
}

.sidebar-nav .nav-heading {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted-text);
  font-weight: 600;
  margin: 10px 0 5px 15px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--sidebar-link-color);
  transition: all var(--transition-speed);
  background: var(--sidebar-link-active);
  padding: 10px 15px;
  border-radius: var(--border-radius);
}

.sidebar-nav .nav-link i {
  font-size: 16px;
  margin-right: 10px;
  color: var(--primary-color);
}

.sidebar-nav .nav-link.collapsed {
  color: var(--sidebar-link-color);
  background: var(--sidebar-bg);
}

.sidebar-nav .nav-link.collapsed i {
  color: var(--muted-text);
}

.sidebar-nav .nav-link:hover {
  color: var(--primary-color);
  background: var(--sidebar-link-hover);
}

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

.sidebar-nav .nav-link .bi-chevron-down {
  margin-right: 0;
  transition: transform 0.2s ease-in-out;
  margin-left: auto;
}

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

.sidebar-nav .nav-content {
  padding: 5px 0 0 0;
  margin: 0;
  list-style: none;
}

.sidebar-nav .nav-content a {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--sidebar-link-color);
  padding: 10px 0 10px 40px;
  transition: var(--transition-speed);
}

.sidebar-nav .nav-content a i {
  font-size: 6px;
  margin-right: 8px;
  line-height: 0;
  border-radius: 50%;
}

.sidebar-nav .nav-content a:hover,
.sidebar-nav .nav-content a.active {
  color: var(--primary-color);
}

.sidebar-nav .nav-content a.active i {
  background-color: var(--primary-color);
}

body.dark .sidebar-nav .nav-link {
  color: var(--text-color);
  background: var(--card-border);
}

body.dark .sidebar-nav .nav-link.collapsed {
  background: var(--sidebar-bg);
  color: var(--muted-text);
}

body.dark .sidebar-nav .nav-link:hover {
  color: var(--primary-color);
  background: var(--card-border);
}

/* ============================================================
     MAIN CONTENT
     ============================================================ */
#main {
  margin-top: 60px;
  padding: 20px 30px;
  transition: all var(--transition-speed);
  min-height: calc(100vh - 60px);
}

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

/* Page Title */
.pagetitle {
  margin-bottom: 10px;
}

.pagetitle h1 {
  font-size: 24px;
  margin-bottom: 0;
  font-weight: 600;
  color: var(--primary-color);
}

/* ============================================================
     BREADCRUMBS
     ============================================================ */
.breadcrumb {
  font-size: 14px;
  font-family: "Nunito", sans-serif;
  color: var(--muted-text);
  font-weight: 600;
  background: transparent;
}

.breadcrumb a {
  color: var(--muted-text);
  transition: var(--transition-speed);
}

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

.breadcrumb .breadcrumb-item::before {
  color: var(--muted-text);
}

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

/* ============================================================
     TABS & ACCORDIONS
     ============================================================ */
.nav-tabs-bordered {
  border-bottom: 2px solid var(--card-border);
}

.nav-tabs-bordered .nav-link {
  margin-bottom: -2px;
  border: none;
  color: var(--text-color);
  transition: var(--transition-speed);
}

.nav-tabs-bordered .nav-link:hover,
.nav-tabs-bordered .nav-link:focus {
  color: var(--primary-color);
}

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

.accordion-item {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
}

.accordion-button {
  background: var(--card-bg);
  color: var(--text-color);
}

.accordion-button:focus {
  outline: 0;
  box-shadow: none;
  border-color: var(--card-border);
}

.accordion-button:not(.collapsed) {
  color: var(--primary-color);
  background-color: var(--light-bg);
}

/* ============================================================
     ALERTS
     ============================================================ */
.alert-heading {
  font-weight: 500;
  font-family: "Poppins", sans-serif;
  font-size: 20px;
}

/* ============================================================
     DASHBOARD
     ============================================================ */
.dashboard .filter {
  position: absolute;
  right: 0px;
  top: 15px;
}

.dashboard .filter .icon {
  color: var(--muted-text);
  padding-right: 20px;
  padding-bottom: 5px;
  transition: var(--transition-speed);
  font-size: 16px;
}

.dashboard .filter .icon:hover,
.dashboard .filter .icon:focus {
  color: var(--primary-color);
}

/* Info Cards */
.dashboard .info-card {
  padding-bottom: 10px;
}

.dashboard .info-card h6 {
  font-size: 28px;
  color: var(--primary-color);
  font-weight: 700;
  margin: 0;
  padding: 0;
}

.dashboard .card-icon {
  font-size: 32px;
  line-height: 0;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  flex-grow: 0;
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard .sales-card .card-icon,
.dashboard .revenue-card .card-icon,
.dashboard .customers-card .card-icon {
  color: var(--primary-color);
  background: var(--primary-color-light);
}

/* ============================================================
     PROFILE
     ============================================================ */
.profile .profile-card img {
  max-width: 120px;
  border-radius: 50%;
}

.profile .profile-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-color);
  margin: 10px 0 0 0;
}

.profile .profile-card .social-links a {
  font-size: 20px;
  display: inline-block;
  color: var(--primary-color);
  line-height: 0;
  margin-right: 10px;
  transition: var(--transition-speed);
}

.profile .profile-card .social-links a:hover {
  color: var(--primary-color-hover);
  transform: translateY(-3px);
}

.profile .profile-overview .label {
  font-weight: 600;
  color: var(--primary-color);
}

.profile .profile-edit label {
  font-weight: 600;
  color: var(--primary-color);
}

/* ============================================================
     FIXED ACTION BUTTON
     ============================================================ */
.fixed-action-btn {
  position: fixed;
  right: 23px;
  bottom: 23px;
  z-index: calc(var(--z-modal) - 2);
}

.quick-actions {
  position: absolute;
  bottom: 64px;
  right: 8px;
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
}

.quick-actions li {
  margin-bottom: 15px;
  position: relative;
}

.action-label {
  position: absolute;
  right: 45px;
  padding: 5px 10px;
  border-radius: var(--border-radius);
  font-size: 0.8rem;
  white-space: nowrap;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity var(--transition-speed), right var(--transition-speed);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  color: var(--text-color);
}

.quick-actions li:hover .action-label {
  opacity: 1;
  right: 55px;
}

#quickActionsBtn {
  width: 56px;
  height: 56px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  transition: all var(--transition-speed);
}

#quickActionsBtn:hover {
  background-color: var(--primary-color-hover);
  transform: scale(1.1);
}

/* ============================================================
     BACK TO TOP BUTTON
     ============================================================ */
.back-to-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: 15px;
  z-index: calc(var(--z-tooltip) - 1);
  background: var(--primary-color);
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius);
  transition: all 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top i {
  font-size: 24px;
  color: #fff;
  line-height: 0;
}

.back-to-top:hover {
  background: var(--primary-color-hover);
  transform: translateY(-3px);
}

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

/* ============================================================
     FOOTER
     ============================================================ */
.footer {
  padding: 20px 0;
  font-size: 14px;
  transition: all var(--transition-speed);
  border-top: 1px solid var(--card-border);
  background: var(--card-bg);
}

.footer .copyright {
  text-align: center;
  color: var(--text-color);
}

.footer .credits {
  padding-top: 5px;
  text-align: center;
  font-size: 13px;
  color: var(--muted-text);
}

body.dark .footer {
  border-top: 1px solid var(--card-border);
  background: var(--sidebar-bg);
}

/* ============================================================
     ERROR PAGES
     ============================================================ */
.error-404 {
  padding: 30px;
  text-align: center;
}

.error-404 h1 {
  font-size: 180px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0;
  line-height: 150px;
}

.error-404 h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 30px;
}

.error-404 .btn {
  background: var(--primary-color);
  color: #fff;
  padding: 8px 30px;
  transition: all var(--transition-speed);
}

.error-404 .btn:hover {
  background: var(--primary-color-hover);
  transform: translateY(-2px);
}

@media (min-width: 992px) {
  .error-404 img {
    max-width: 50%;
  }
}

/* ============================================================
     ICONS LIST
     ============================================================ */
.iconslist {
  display: grid;
  max-width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  padding-top: 15px;
}

.iconslist .icon {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  text-align: center;
  color: var(--primary-color);
  padding: 15px 0;
  transition: all var(--transition-speed);
  border: 1px solid var(--card-border);
}

.iconslist .icon:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.iconslist i {
  margin: 0.25rem;
  font-size: 2.5rem;
}

.iconslist .label {
  font-family: var(--bs-font-monospace);
  display: inline-block;
  width: 100%;
  overflow: hidden;
  padding: 0.25rem;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-text);
}

/* ============================================================
     CONTACT PAGE
     ============================================================ */
.contact .info-box {
  padding: 28px 30px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.contact .info-box i {
  font-size: 38px;
  line-height: 0;
  color: var(--primary-color);
}

.contact .info-box h3 {
  font-size: 20px;
  color: var(--text-color);
  font-weight: 700;
  margin: 20px 0 10px 0;
}

.contact .info-box p {
  padding: 0;
  line-height: 24px;
  font-size: 14px;
  margin-bottom: 0;
  color: var(--muted-text);
}

/* ============================================================
     THEME SETTINGS
     ============================================================ */
.theme-color-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
  border: 2px solid transparent;
}

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

.theme-color-btn.active {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  transform: scale(1.15);
}

/* ============================================================
     CHAT COMPONENTS
     ============================================================ */
.chat-sidebar,
.chat-window {
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.chat-item {
  padding: 15px;
  cursor: pointer;
  transition: all var(--transition-speed);
  border-radius: var(--border-radius);
  margin-bottom: 5px;
}

.chat-item:hover {
  background-color: var(--light-bg);
}

.chat-item.active {
  background-color: var(--primary-color-light);
  border-left: 3px solid var(--primary-color);
}

.chat-input {
  background: var(--card-bg);
  border: 1px solid var(--input-border);
  color: var(--text-color);
  padding: 10px 15px;
  border-radius: var(--border-radius);
  width: 100%;
  transition: all var(--transition-speed);
}

.chat-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-color-light);
}

.message.outgoing .message-bubble {
  background: var(--primary-color-light);
  color: var(--text-color);
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 var(--border-radius-lg);
}

.message.incoming .message-bubble {
  background: var(--card-bg);
  color: var(--text-color);
  border-radius: var(--border-radius-lg) var(--border-radius-lg) var(--border-radius-lg) 0;
  box-shadow: var(--shadow-sm);
}

body.dark .chat-sidebar,
body.dark .chat-window {
  background: var(--sidebar-bg);
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3);
}

body.dark .chat-item:hover {
  background-color: var(--card-border);
}

body.dark .chat-item.active {
  background-color: rgba(0, 157, 155, 0.2);
}

body.dark .message-bubble {
  background: var(--card-border);
}

/* ============================================================
     MOBILE NAVIGATION
     ============================================================ */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--header-bg);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: var(--z-fixed);
  padding: 10px 0;
  display: none;
}

@media (max-width: 768px) {
  .mobile-nav {
    display: block;
  }

  .fixed-action-btn {
    bottom: 70px;
  }

  @media (max-height: 600px) {
    .quick-actions {
      bottom: auto;
      top: -170px;
    }
  }
}

body.dark .mobile-nav {
  background: var(--header-bg);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

/* ============================================================
     ACTIVITY & TIMELINE
     ============================================================ */
.dashboard .activity {
  font-size: 14px;
}

.dashboard .activity .activity-item {
  margin-bottom: 20px;
}

.dashboard .activity .activity-item .activite-label {
  color: var(--muted-text);
  position: relative;
  flex-shrink: 0;
  flex-grow: 0;
  min-width: 64px;
}

.dashboard .activity .activity-item .activite-label::before {
  content: "";
  position: absolute;
  right: -11px;
  width: 4px;
  top: 0;
  bottom: 0;
  background-color: var(--card-border);
}

.dashboard .activity .activity-item .activity-badge {
  margin-top: 3px;
  z-index: 1;
  font-size: 11px;
  line-height: 0;
  border-radius: 50%;
  flex-shrink: 0;
  border: 3px solid var(--card-bg);
  flex-grow: 0;
}

.dashboard .activity .activity-item .activity-content {
  padding-left: 10px;
  padding-bottom: 20px;
}

/* ============================================================
     NEWS & UPDATES
     ============================================================ */
.dashboard .news .post-item+.post-item {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--card-border);
}

.dashboard .news img {
  width: 80px;
  float: left;
  border-radius: var(--border-radius);
}

.dashboard .news h4 {
  font-size: 15px;
  margin-left: 95px;
  font-weight: bold;
  margin-bottom: 5px;
}

.dashboard .news h4 a {
  color: var(--text-color);
  transition: var(--transition-speed);
}

.dashboard .news h4 a:hover {
  color: var(--primary-color);
}

.dashboard .news p {
  font-size: 14px;
  color: var(--muted-text);
  margin-left: 95px;
}

/* ============================================================
     RECENT SALES & TOP SELLING
     ============================================================ */
.dashboard .recent-sales,
.dashboard .top-selling {
  font-size: 14px;
}

.dashboard .recent-sales .table thead,
.dashboard .top-selling .table thead {
  background: var(--light-bg);
}

.dashboard .recent-sales .table thead th,
.dashboard .top-selling .table thead th {
  border: 0;
  font-weight: 600;
  color: var(--text-color);
}

.dashboard .top-selling .table tbody td {
  vertical-align: middle;
}

.dashboard .top-selling img {
  border-radius: var(--border-radius);
  max-width: 60px;
}

/* ============================================================
     BADGES
     ============================================================ */
.badge {
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
}

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

/* ============================================================
     CHARTS (Dark Mode Support)
     ============================================================ */
body.dark canvas {
  filter: brightness(0.85) contrast(1.2);
}

/* ============================================================
     AVATAR UTILITIES
     ============================================================ */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.avatar.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.avatar.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 1.25rem;
}

.avatar.avatar-xl {
  width: 72px;
  height: 72px;
  font-size: 1.5rem;
}

body.dark .avatar.bg-light {
  background-color: var(--card-border) !important;
  color: var(--text-color);
}

/* ============================================================
     LOGO & BRANDING
     ============================================================ */
.install-app-dialog .app-icon,
[id="v"] {
  background-image: url("../img/logo01.b9705579426b.png") !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  border-radius: var(--border-radius-lg);
}

.install-app-dialog img,
img.logo {
  max-width: 100%;
  height: auto;
}

.visempro-icon,
.app-icon {
  background-image: url("../img/logo01.b9705579426b.png") !important;
  background-size: contain !important;
}

/* ============================================================
     PROJECT-SPECIFIC ENHANCEMENTS
     ============================================================ */

/* Project Cards */
.project-card {
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-color);
  transform: scaleY(0);
  transition: transform var(--transition-speed);
}

.project-card:hover::before {
  transform: scaleY(1);
}

/* Status Indicators */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.813rem;
  font-weight: 600;
}

.status-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status-success {
  background: #d1f7c4;
  color: #0b6623;
}

.status-warning {
  background: #ffeaa7;
  color: #d63031;
}

.status-info {
  background: #dfe6e9;
  color: #2d3436;
}

.status-danger {
  background: #fab1a0;
  color: #d63031;
}

/* Progress Bars */
.progress-modern {
  height: 8px;
  border-radius: 50px;
  background: var(--card-border);
  overflow: hidden;
}

.progress-modern .progress-bar {
  background: linear-gradient(90deg, var(--primary-color), var(--primary-color-hover));
  border-radius: 50px;
  transition: width 0.6s ease;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--card-border);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-dot {
  position: absolute;
  left: -1.5rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 3px solid var(--primary-color);
  z-index: 1;
}

/* Kanban Board */
.kanban-column {
  background: var(--light-bg);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  min-height: 400px;
}

.kanban-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  box-shadow: var(--shadow-sm);
  cursor: move;
  transition: all var(--transition-speed);
}

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

body.dark .kanban-column {
  background: var(--card-bg);
}

/* ============================================================
     LOADING STATES
     ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--card-border) 25%, var(--light-bg) 50%, var(--card-border) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: var(--border-radius);
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.spinner {
  border: 3px solid var(--card-border);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
     SCROLLBAR CUSTOMIZATION
     ============================================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--muted-text);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* ============================================================
     ACCESSIBILITY
     ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ============================================================
     PRINT STYLES
     ============================================================ */
@media print {

  .sidebar,
  .header,
  .fixed-action-btn,
  .back-to-top,
  .mobile-nav,
  .btn,
  .action-buttons {
    display: none !important;
  }

  #main {
    margin-left: 0 !important;
    margin-top: 0 !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #000 !important;
    page-break-inside: avoid;
  }

  body {
    background: white !important;
    color: black !important;
  }
}

/* ============================================================
     RESPONSIVE UTILITIES
     ============================================================ */
@media (max-width: 576px) {
  .pagetitle h1 {
    font-size: 20px;
  }

  .card-title {
    font-size: 16px;
  }

  /* Hide info-card titles on mobile - icon-centric design */
  .dashboard .info-card h6 {
    display: none !important;
  }
}

@media (max-width: 768px) {
  #main {
    padding: 15px;
  }

  .stats-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
     ANIMATIONS
     ============================================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

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

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.5s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.5s ease-out;
}

/* ============================================================
     END OF STYLESHEET
     ============================================================ */