/* ===================================================================
   VUEXY ADMIN THEME - CUSTOM CSS STYLESHEET
   Clean Bootstrap 5 styling with signature Vuexy aesthetics
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --vx-primary: #7367f0;
  --vx-primary-rgb: 115, 103, 240;
  --vx-primary-hover: #5e50ee;
  --vx-primary-light: rgba(115, 103, 240, 0.12);
  --vx-secondary: #82868b;
  --vx-success: #28c76f;
  --vx-success-light: rgba(40, 199, 111, 0.12);
  --vx-danger: #ea5455;
  --vx-danger-light: rgba(234, 84, 85, 0.12);
  --vx-warning: #ff9f43;
  --vx-warning-light: rgba(255, 159, 67, 0.12);
  --vx-info: #00cfe8;
  --vx-info-light: rgba(0, 207, 232, 0.12);
  --vx-dark: #4b465c;
  --vx-body-bg: #f8f7fa;
  --vx-card-bg: #ffffff;
  --vx-border-color: #dbdade;
  --vx-text-color: #5d596c;
  --vx-heading-color: #4b465c;
  --vx-muted-color: #a5a3ae;
  --vx-sidebar-width: 260px;
  --vx-sidebar-bg: #ffffff;
  --vx-shadow-sm: 0 0.125rem 0.25rem rgba(165, 163, 174, 0.15);
  --vx-shadow: 0 0.125rem 0.375rem 0 rgba(161, 172, 184, 0.14);
  --vx-shadow-lg: 0 0.5rem 1.25rem 0 rgba(161, 172, 184, 0.2);
  --vx-radius: 0.625rem;
  --vx-radius-sm: 0.375rem;
  --vx-radius-lg: 1rem;
}

body {
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.9375rem;
  color: var(--vx-text-color);
  background-color: var(--vx-body-bg);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--vx-heading-color);
  font-weight: 600;
}

/* Layout */
.layout-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* Sidebar */
.layout-sidebar {
  width: var(--vx-sidebar-width);
  background: var(--vx-sidebar-bg);
  box-shadow: 0 0 15px 0 rgba(34, 41, 47, 0.05);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1030;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow-y: auto;
}

.sidebar-header {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--vx-heading-color);
}

.sidebar-brand-logo {
  height: 38px;
  max-width: 140px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.sidebar-brand:hover .sidebar-brand-logo {
  transform: scale(1.02);
}

.sidebar-brand-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #33303c;
  line-height: 1.2;
}

.sidebar-brand-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  font-weight: 600;
  border-radius: 4px;
}

.sidebar-nav {
  padding: 1rem 0.75rem;
  flex: 1;
}

.menu-header-text {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--vx-muted-color);
  padding: 0.75rem 0.875rem 0.375rem;
  margin-top: 0.5rem;
}

.menu-item {
  margin-bottom: 0.25rem;
}

.menu-link {
  display: flex;
  align-items: center;
  padding: 0.65rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--vx-text-color);
  text-decoration: none;
  border-radius: var(--vx-radius-sm);
  transition: all 0.2s ease-in-out;
  position: relative;
}

.menu-link i {
  font-size: 1.25rem;
  margin-right: 0.75rem;
  color: var(--vx-muted-color);
  transition: color 0.2s ease;
}

.menu-link:hover {
  background-color: rgba(115, 103, 240, 0.08);
  color: var(--vx-primary);
}

.menu-link:hover i {
  color: var(--vx-primary);
}

.menu-link.active {
  background: linear-gradient(72.47deg, #7367f0 22.16%, rgba(115, 103, 240, 0.85) 76.47%);
  color: #ffffff !important;
  box-shadow: 0 2px 6px 0 rgba(115, 103, 240, 0.45);
}

.menu-link.active i {
  color: #ffffff !important;
}

/* Sidebar submenu & accordion styles */
.menu-toggle {
  cursor: pointer;
  user-select: none;
}

.menu-toggle .menu-arrow {
  font-size: 0.75rem;
  margin-right: 0 !important;
  transition: transform 0.25s ease-in-out;
  color: var(--vx-muted-color);
}

.menu-toggle:hover .menu-arrow {
  color: var(--vx-primary);
}

.menu-toggle[aria-expanded="true"] .menu-arrow,
.menu-toggle:not(.collapsed) .menu-arrow {
  transform: rotate(90deg);
}

.menu-link.active-parent {
  background-color: rgba(115, 103, 240, 0.08);
  color: var(--vx-primary) !important;
  font-weight: 600;
}

.menu-link.active-parent > i,
.menu-link.active-parent > .menu-arrow {
  color: var(--vx-primary) !important;
}

.sidebar-submenu {
  transition: height 0.25s ease;
}

.menu-sub {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.menu-sub .menu-link {
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
}

.menu-sub .menu-link i {
  font-size: 1rem;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

/* Content Area */
.layout-content-wrapper {
  flex: 1;
  margin-left: var(--vx-sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

/* Floating Top Navbar */
.layout-navbar {
  padding: 0.75rem 1.5rem;
  margin: 0.75rem 1.5rem 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: var(--vx-radius);
  box-shadow: var(--vx-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1020;
}

.navbar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--vx-primary-light);
  color: var(--vx-primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 0.95rem;
}

.avatar-online::after {
  content: '';
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--vx-success);
  border: 2px solid #ffffff;
}

/* Page Container */
.content-body {
  padding: 1.5rem;
  flex: 1;
}

/* Cards */
.card-vuexy {
  background: var(--vx-card-bg);
  border: none;
  border-radius: var(--vx-radius);
  box-shadow: var(--vx-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 1.5rem;
}

.card-vuexy-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-vuexy-body {
  padding: 1.5rem;
}

/* Metrics Stat Cards */
.stat-card {
  border-radius: var(--vx-radius);
  background: #ffffff;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--vx-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-icon.primary {
  background-color: var(--vx-primary-light);
  color: var(--vx-primary);
}

.stat-icon.success {
  background-color: var(--vx-success-light);
  color: var(--vx-success);
}

.stat-icon.warning {
  background-color: var(--vx-warning-light);
  color: var(--vx-warning);
}

.stat-icon.danger {
  background-color: var(--vx-danger-light);
  color: var(--vx-danger);
}

.stat-icon.info {
  background-color: var(--vx-info-light);
  color: var(--vx-info);
}

.stat-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--vx-muted-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--vx-heading-color);
  line-height: 1.2;
}

/* Table Styling */
.table-vuexy {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.table-vuexy thead th {
  background-color: #f8f8fb;
  color: #7b788a;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0.875rem 1.25rem;
  border-top: none;
  border-bottom: 1px solid #ebe9f1;
  white-space: nowrap;
}

.table-vuexy tbody td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
  border-bottom: 1px solid #ebe9f1;
  color: var(--vx-text-color);
  font-size: 0.875rem;
}

.table-vuexy tbody tr:hover {
  background-color: rgba(115, 103, 240, 0.03);
}

.table-vuexy tbody tr:last-child td {
  border-bottom: none;
}

/* Status Badges */
.badge-vuexy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50rem;
  letter-spacing: 0.3px;
}

.badge-vuexy .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.badge-status-delivered {
  background-color: var(--vx-success-light);
  color: var(--vx-success);
}
.badge-status-delivered .badge-dot {
  background-color: var(--vx-success);
}

.badge-status-sent {
  background-color: var(--vx-info-light);
  color: var(--vx-info);
}
.badge-status-sent .badge-dot {
  background-color: var(--vx-info);
}

.badge-status-pending {
  background-color: var(--vx-warning-light);
  color: var(--vx-warning);
}
.badge-status-pending .badge-dot {
  background-color: var(--vx-warning);
}

.badge-status-failed {
  background-color: var(--vx-danger-light);
  color: var(--vx-danger);
}
.badge-status-failed .badge-dot {
  background-color: var(--vx-danger);
}

.content-id-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  background-color: #f1f0f4;
  color: #5d596c;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #e2e1e7;
}

.timestamp-text {
  font-size: 0.8125rem;
  color: #6e6b7b;
}

.timestamp-time {
  font-size: 0.75rem;
  color: #b9b9c3;
}

/* Filter Bar */
.filter-card {
  background: #ffffff;
  border-radius: var(--vx-radius);
  box-shadow: var(--vx-shadow);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.form-control-vuexy, .form-select-vuexy {
  border: 1px solid var(--vx-border-color);
  border-radius: var(--vx-radius-sm);
  padding: 0.55rem 0.85rem;
  font-size: 0.875rem;
  color: var(--vx-text-color);
  background-color: #ffffff;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control-vuexy:focus, .form-select-vuexy:focus {
  border-color: var(--vx-primary);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(115, 103, 240, 0.18);
}

/* Primary Button */
.btn-primary-vuexy {
  background: var(--vx-primary);
  border-color: var(--vx-primary);
  color: #ffffff;
  font-weight: 500;
  border-radius: var(--vx-radius-sm);
  padding: 0.55rem 1.15rem;
  box-shadow: 0 2px 4px 0 rgba(115, 103, 240, 0.4);
  transition: all 0.2s ease;
}

.btn-primary-vuexy:hover {
  background: var(--vx-primary-hover);
  border-color: var(--vx-primary-hover);
  color: #ffffff;
  box-shadow: 0 4px 8px 0 rgba(115, 103, 240, 0.5);
}

.btn-outline-vuexy {
  border: 1px solid #d8d6de;
  color: #6e6b7b;
  background: #ffffff;
  border-radius: var(--vx-radius-sm);
  padding: 0.55rem 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-outline-vuexy:hover {
  background: #f8f8f8;
  color: var(--vx-primary);
  border-color: var(--vx-primary);
}

/* Pagination */
.pagination-vuexy .page-link {
  color: var(--vx-text-color);
  border-color: #ebe9f1;
  font-size: 0.875rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--vx-radius-sm);
  margin: 0 2px;
}

.pagination-vuexy .page-item.active .page-link {
  background-color: var(--vx-primary);
  border-color: var(--vx-primary);
  color: #ffffff;
  box-shadow: 0 2px 4px 0 rgba(115, 103, 240, 0.4);
}

.pagination-vuexy .page-item.disabled .page-link {
  color: #b9b9c3;
  background-color: #f8f8f8;
}

/* Auth Page */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f7fa;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(115, 103, 240, 0.15) 0%, rgba(115, 103, 240, 0) 70%);
  top: -100px;
  right: -100px;
  pointer-events: none;
}

.auth-wrapper::after {
  content: '';
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(40, 199, 111, 0.1) 0%, rgba(40, 199, 111, 0) 70%);
  bottom: -150px;
  left: -150px;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: var(--vx-radius);
  box-shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.1);
  padding: 2.25rem 2rem;
  position: relative;
  z-index: 1;
}

.auth-brand-logo {
  height: 48px;
  max-width: 220px;
  object-fit: contain;
  margin-bottom: 1.25rem;
}

/* Mobile Sidebar Backdrop */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(34, 41, 47, 0.5);
  z-index: 1025;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-backdrop.show {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 1199.98px) {
  .layout-sidebar {
    transform: translateX(-100%);
  }
  .layout-sidebar.show {
    transform: translateX(0);
  }
  .layout-content-wrapper {
    margin-left: 0 !important;
  }
  .layout-navbar {
    margin: 0.75rem 0.75rem 0;
  }
  .content-body {
    padding: 1rem 0.75rem;
  }
}
