/* assets/css/admin.css */

:root {
  --primary: #4e73df;
  --primary-hover: #2e59d9;
  --secondary: #858796;
  --success: #1cc88a;
  --info: #36b9cc;
  --warning: #f6c23e;
  --danger: #e74a3b;
  --light: #f8f9fc;
  --dark: #5a5c69;
  --body-bg: #f3f4f6;
  --sidebar-bg: #ffffff;
  --sidebar-width: 250px;
  --header-height: 70px;
  --card-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(0, 0, 0, 0.05);

  --bs-primary: #fb732c;
  --bs-primary-rgb: 251, 115, 44;
  --bs-light: #f5f5f5;
  --bs-light-rgb: 245, 245, 245;
  --bs-card-border-color: #e5e5e5;
  --bs-link-color: var(--bs-primary);
  --bs-link-color-rgb: var(--bs-primary-rgb);
  --font-family: "Plus Jakarta Sans", sans-serif;
}

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);

  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: rgba(var(--bs-primary-rgb), 0.85);
  --bs-btn-hover-border-color: rgba(var(--bs-primary-rgb), 0.85);

  --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);

  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: rgba(var(--bs-primary-rgb), 0.75);
  --bs-btn-active-border-color: rgba(var(--bs-primary-rgb), 0.75);
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);

  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--bs-primary);
  --bs-btn-disabled-border-color: var(--bs-primary);
}
.bg-soft-primary {
  background-color: rgba(var(--bs-primary-rgb), 0.1);
}
.tooltip-inner {
  font-family: var(--font-family);
}

body {
  font-family: var(--font-family);
  background-color: var(--bs-light);
  margin: 0;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ----------------------------------------------------------
   Layout
---------------------------------------------------------- */
.wrapper {
  display: flex;
  width: 100%;
  flex-direction: column;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1050;
  border-right: 1px solid #e5e5e5;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: all 0.3s ease;
}

/* ----------------------------------------------------------
   Sidebar
---------------------------------------------------------- */
.sidebar-brand {
  height: var(--header-height);
  padding: 1rem;
}

.sidebar-brand img {
  max-height: 40px;
}

.sidebar-nav {
  list-style: none;
  padding: 1.5rem 1rem;
  margin: 0;
  flex-grow: 1;
}

.sidebar-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #adb5bd;
  margin: 1.5rem 0 0.5rem 1rem;
  font-weight: 600;
}

.nav-item {
  margin-bottom: 0.25rem;
}

/* Sidebar Navigation */
.nav-link {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.25rem;
  color: var(--bs-black);
  text-decoration: none;
  border-radius: 0.35rem;
  transition: all 0.2s ease;
  font-weight: 500;
  margin-bottom: 0.25rem;
  position: relative;
}

.nav-link i {
  font-size: 1.25rem;
  margin-right: 0.75rem;
  min-width: 1.5rem;
  text-align: center;
  transition: transform 0.2s;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--bs-primary);
}

.nav-link.active i {
  color: var(--bs-primary);
}

.sidebar-footer {
  margin-top: auto;
  padding: 1rem;
  border-top: 1px solid #f0f0f0;
}

/* ----------------------------------------------------------
   Top Header (Sticky)
---------------------------------------------------------- */
.topbar {
  height: var(--header-height);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  border-bottom: 1px solid #e5e5e5;
  z-index: 99;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.user-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.user-avatar-sm {
  width: 38px;
  height: 38px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--bs-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  overflow: hidden;
}

.user-trigger {
  border: 1px solid #eee;
  background: #fff;
}
.user-trigger:hover {
  background: #f8f9fa;
  border-color: #ddd;
}

.topbar-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--dark);
  transition: all 0.2s;
  position: relative;
}
.topbar-btn:hover {
  background: #f8f9fa;
  color: var(--bs-primary);
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  border: 2px solid #fff;
  line-height: 1;
}

.hide-arrow::after {
  display: none !important;
}

.extra-small {
  font-size: 0.7rem;
}

.whitespace-normal {
  white-space: normal !important;
}

.transition-all {
  transition: all 0.2s ease;
}

/* ----------------------------------------------------------
   Content Area
---------------------------------------------------------- */
.content {
  flex: 1;
}

/* ----------------------------------------------------------
   Components
---------------------------------------------------------- */
.card,
.card-header {
  border-color: #e5e5e5;
}

.breadcrumb-item a {
  text-decoration: none;
  color: var(--bs-link-color);
}

/* Dropdown styling adjustment */
.dropdown-menu {
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
}

.table th {
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

/* ----------------------------------------------------------
   Mobile
---------------------------------------------------------- */
@media (max-width: 1200px) {
  .sidebar {
    margin-left: calc(-1 * var(--sidebar-width));
  }

  .main-content {
    margin-left: 0;
  }

  .sidebar.show {
    margin-left: 0;
  }
}

/* ----------------------------------------------------------
   UI Utilities
---------------------------------------------------------- */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.hover-row {
  transition: background-color 0.2s ease;
}
.hover-row:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.02) !important;
}

.hover-primary:hover {
  color: var(--bs-primary) !important;
}

.btn-white {
  background: #fff;
  color: var(--dark);
  border-color: #e5e5e5;
}
.btn-white:hover {
  background: #f8f9fc;
  color: var(--bs-primary);
}

.bg-soft-primary {
  background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
}
.bg-soft-success {
  background-color: rgba(28, 200, 138, 0.1) !important;
}
.bg-soft-info {
  background-color: rgba(54, 185, 204, 0.1) !important;
}
.bg-soft-warning {
  background-color: rgba(246, 194, 62, 0.1) !important;
}
.bg-soft-danger {
  background-color: rgba(231, 74, 59, 0.1) !important;
}

.avatar.bg-soft-primary {
  color: var(--bs-primary);
}
.avatar.bg-soft-success {
  color: #1cc88a;
}
.avatar.bg-soft-info {
  color: #36b9cc;
}
.avatar.bg-soft-warning {
  color: #f6c23e;
}

.btn-soft-danger {
  background-color: rgba(231, 74, 59, 0.1);
  color: #e74a3b;
  border: 1px solid rgba(231, 74, 59, 0.1);
}
.btn-soft-danger:hover {
  background-color: #e74a3b;
  color: #fff;
}

.offcanvas {
  border-radius: 12px 0 0 12px;
}
