/**
 * Modern Dashboard CSS - Tailwind/shadcn Inspired
 * Clean, minimal, and professional UI design
 * Reset semua override yang bermasalah
 */

/* ===== CSS VARIABLES (Tailwind-inspired color palette) ===== */
:root {
  /* Background Colors */
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;
  
  /* Primary Colors - Tailwind Blue */
  --primary: 221.2 83.2% 53.3%;
  --primary-foreground: 210 40% 98%;
  
  /* Secondary Colors */
  --secondary: 210 40% 96.1%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  
  /* Muted Colors */
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  
  /* Accent Colors */
  --accent: 210 40% 96.1%;
  --accent-foreground: 222.2 47.4% 11.2%;
  
  /* Status Colors */
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --success: 142.1 76.2% 36.3%;
  --success-foreground: 355.7 100% 97.3%;
  --warning: 45.4 93.4% 47.5%;
  --warning-foreground: 26 83.3% 14.1%;
  --info: 199 89% 48%;
  --info-foreground: 0 0% 100%;
  
  /* Border & Input */
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 221.2 83.2% 53.3%;
  
  /* Radius */
  --radius: 0.375rem;
  --radius-sm: 0.25rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  
  /* Shadows - Tailwind style */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Font */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ===== GLOBAL RESETS - Tailwind Preflight Style ===== */
*, *::before, *::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: hsl(var(--border));
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-family: var(--font-sans);
}

body {
  font-family: var(--font-sans);
  background-color: hsl(var(--muted));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
}

/* ===== TYPOGRAPHY - Clean & Minimal ===== */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

/* Specific heading styles */
.h1, h1 { font-size: 1.875rem; font-weight: 700; line-height: 1.2; }
.h2, h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.25; }
.h3, h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.h4, h4 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
.h5, h5 { font-size: 1rem; font-weight: 600; line-height: 1.5; }
.h6, h6 { font-size: 0.875rem; font-weight: 600; line-height: 1.5; }

p { margin: 0 0 0.75rem; }

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

a:hover {
  text-decoration: underline;
}

/* Remove default list styles */
ol, ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Reset images */
img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ===== LAYOUT ===== */
.body__wrap {
  background-color: hsl(var(--muted));
  min-height: 100vh;
}

/* ===== SIDEBAR STYLES ===== */
#sidebarMenu {
  background: hsl(var(--card));
  border-right: 1px solid hsl(var(--border));
  box-shadow: none;
  transition: all 0.2s ease;
}

#sidebarMenu .position-sticky {
  padding: 1rem 0.5rem;
}

#sidebarMenu .nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin: 0.125rem 0.25rem;
  border-radius: var(--radius);
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  text-decoration: none;
  border: none;
}

#sidebarMenu .nav-link:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

#sidebarMenu .nav-link.active,
#sidebarMenu .nav-link:focus {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

#sidebarMenu .nav-link i {
  font-size: 1rem;
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

#sidebarMenu .sidebar-heading {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
  padding: 0.75rem 0.75rem 0.375rem;
  margin-top: 0.25rem;
}

/* ===== NAVBAR / HEADER ===== */
.navbar {
  background: hsl(var(--card));
  border-bottom: 1px solid hsl(var(--border));
  box-shadow: none;
  padding: 0.5rem 1rem;
  height: auto;
  min-height: 3rem;
}

.navbar-brand {
  font-weight: 600;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
}

.dash-profiles {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 1px solid hsl(var(--border));
}

/* Dropdown styling */
.navbar .dropdown-menu {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.25rem;
  min-width: 10rem;
  margin-top: 0.25rem;
}

.navbar .dropdown-item {
  border-radius: var(--radius-sm);
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  transition: all 0.1s ease;
}

.navbar .dropdown-item:hover {
  background-color: hsl(var(--accent));
}

.navbar .dropdown-item i {
  width: 1rem;
  text-align: center;
}

/* ===== MAIN CONTENT AREA ===== */
main {
  background-color: hsl(var(--muted));
  padding: 1rem;
}

@media (min-width: 992px) {
  main {
    padding: 1.5rem;
  }
}

/* ===== PAGE HEADER ===== */
main h5.h5, main h6.h5 {
  font-size: 1.125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.125rem;
  letter-spacing: -0.01em;
}

/* Breadcrumb */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: 0.8125rem;
}

.breadcrumb-item {
  font-weight: 400;
}

.breadcrumb-item.fw-bold {
  font-weight: 500;
}

.breadcrumb-item a {
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: color 0.1s ease;
}

.breadcrumb-item a:hover {
  color: hsl(var(--foreground));
}

.breadcrumb-item.active {
  color: hsl(var(--muted-foreground));
}

.breadcrumb-item + .breadcrumb-item::before {
  color: hsl(var(--muted-foreground));
}

/* ===== CARDS ===== */
.card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease;
}

.card:hover {
  box-shadow: var(--shadow);
}

.card-header {
  padding: 0.75rem 1rem;
  background: transparent;
  border-bottom: 1px solid hsl(var(--border));
}

.card-body {
  padding: 1rem;
}

.card-body p {
  color: hsl(var(--muted-foreground));
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.card-body h4 {
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.025em;
  margin-bottom: 0.375rem;
}

.card-body a {
  font-size: 0.75rem;
  color: hsl(var(--primary));
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.1s ease;
}

.card-body a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.card-footer {
  padding: 0.75rem 1rem;
  background: transparent;
  border-top: 1px solid hsl(var(--border));
}

/* Stats cards icons */
.card-body svg,
.card-body .float-end svg {
  color: hsl(var(--muted-foreground));
  opacity: 0.5;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.1s ease;
  padding: 0.375rem 0.75rem;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.5;
  gap: 0.375rem;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* Primary Button */
.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

.btn-primary:hover {
  background-color: hsl(221.2 83.2% 45%);
  border-color: hsl(221.2 83.2% 45%);
  color: hsl(var(--primary-foreground));
}

/* Secondary/Outline Button */
.btn-secondary,
.btn-outline-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-color: hsl(var(--border));
}

.btn-secondary:hover,
.btn-outline-secondary:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

/* Dark/Outline Dark Button */
.btn-dark,
.btn-outline-dark {
  background-color: hsl(var(--foreground));
  color: hsl(var(--background));
  border-color: hsl(var(--foreground));
}

.btn-outline-dark {
  background-color: transparent;
  color: hsl(var(--foreground));
}

.btn-outline-dark:hover {
  background-color: hsl(var(--foreground));
  color: hsl(var(--background));
}

/* Success Button */
.btn-success {
  background-color: hsl(var(--success));
  color: hsl(var(--success-foreground));
  border-color: hsl(var(--success));
}

.btn-success:hover {
  background-color: hsl(142.1 76.2% 30%);
  border-color: hsl(142.1 76.2% 30%);
}

.btn-outline-success {
  background-color: transparent;
  color: hsl(var(--success));
  border-color: hsl(var(--success));
}

.btn-outline-success:hover {
  background-color: hsl(var(--success));
  color: hsl(var(--success-foreground));
}

/* Danger Button */
.btn-danger {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
  border-color: hsl(var(--destructive));
}

.btn-danger:hover {
  background-color: hsl(0 84.2% 50%);
  border-color: hsl(0 84.2% 50%);
}

.btn-outline-danger {
  background-color: transparent;
  color: hsl(var(--destructive));
  border-color: hsl(var(--destructive));
}

.btn-outline-danger:hover {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

/* Warning Button */
.btn-warning {
  background-color: hsl(var(--warning));
  color: hsl(var(--warning-foreground));
  border-color: hsl(var(--warning));
}

.btn-warning:hover {
  background-color: hsl(45.4 93.4% 40%);
  border-color: hsl(45.4 93.4% 40%);
}

/* Info Button */
.btn-info {
  background-color: hsl(var(--info));
  color: hsl(var(--info-foreground));
  border-color: hsl(var(--info));
}

.btn-info:hover {
  background-color: hsl(199 89% 40%);
  border-color: hsl(199 89% 40%);
}

/* Light Button */
.btn-light {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-color: hsl(var(--border));
}

.btn-light:hover {
  background-color: hsl(210 40% 92%);
}

/* Outline Buttons */
.btn-outline-primary {
  background-color: transparent;
  color: hsl(var(--primary));
  border-color: hsl(var(--primary));
}

.btn-outline-primary:hover {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* Button Sizes */
.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: var(--radius);
}

/* ===== FORM ELEMENTS ===== */
.form-control,
.form-select {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  transition: border-color 0.1s ease, box-shadow 0.1s ease;
  appearance: none;
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.15);
}

.form-control::placeholder {
  color: hsl(var(--muted-foreground));
}

.form-control:disabled,
.form-select:disabled,
.form-control[readonly] {
  background-color: hsl(var(--muted));
  opacity: 0.7;
  cursor: not-allowed;
}

.form-control-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
}

.form-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
}

/* Input Group */
.input-group {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}

.input-group .form-control {
  position: relative;
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: hsl(var(--muted-foreground));
  background-color: hsl(var(--muted));
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
}

.input-group > :not(:first-child) {
  margin-left: -1px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.input-group > :not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: center;
  padding-left: 0;
  margin-bottom: 0.375rem;
}

.form-check-input {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  background-color: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.1s ease;
  flex-shrink: 0;
}

.form-check-input[type="radio"] {
  border-radius: 9999px;
}

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

.form-check-input:focus {
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.15);
}

.form-check-label {
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  cursor: pointer;
}

/* Select */
.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 0.875rem;
  padding-right: 2rem;
}

/* Textarea */
textarea.form-control {
  min-height: 4rem;
  resize: vertical;
}

/* ===== TABLES ===== */
.table {
  width: 100%;
  margin-bottom: 0;
  color: hsl(var(--foreground));
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th,
.table td {
  padding: 0.5rem 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid hsl(var(--border));
}

.table thead th {
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.025em;
  color: hsl(var(--muted-foreground));
  background-color: hsl(var(--muted));
  border-bottom: 1px solid hsl(var(--border));
  text-transform: uppercase;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: hsl(var(--muted) / 0.3);
}

.table-hover tbody tr:hover {
  background-color: hsl(var(--accent));
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: hsl(var(--card));
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border));
}

.table-responsive .table {
  margin-bottom: 0;
}

/* Table Primary header */
.table-primary,
thead.table-primary th,
.table-bordered.table-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* ===== ALERTS ===== */
.alert {
  position: relative;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.alert-success {
  background-color: hsl(142.1 76.2% 96%);
  border-color: hsl(142.1 76.2% 90%);
  color: hsl(142.1 76.2% 26%);
}

.alert-danger {
  background-color: hsl(0 84.2% 97%);
  border-color: hsl(0 84.2% 90%);
  color: hsl(0 84.2% 40%);
}

.alert-warning {
  background-color: hsl(45.4 93.4% 95%);
  border-color: hsl(45.4 93.4% 85%);
  color: hsl(45.4 93.4% 25%);
}

.alert-info {
  background-color: hsl(199 89% 96%);
  border-color: hsl(199 89% 86%);
  color: hsl(199 89% 30%);
}

.alert .btn-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem;
  background: transparent;
  border: none;
  opacity: 0.5;
  transition: opacity 0.1s ease;
}

.alert .btn-close:hover {
  opacity: 1;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1;
  border-radius: 9999px;
}

.badge.bg-primary,
.bg-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.badge.bg-success,
.bg-success {
  background-color: hsl(var(--success));
  color: hsl(var(--success-foreground));
}

.badge.bg-danger,
.bg-danger {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.badge.bg-warning,
.bg-warning {
  background-color: hsl(var(--warning));
  color: hsl(var(--warning-foreground));
}

.badge.bg-info {
  background-color: hsl(var(--info));
  color: hsl(var(--info-foreground));
}

.badge.bg-dark,
.bg-dark {
  background-color: hsl(var(--foreground));
  color: hsl(var(--background));
}

.badge.bg-secondary,
.bg-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

/* ===== MODALS ===== */
.modal-content {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
}

.modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.modal-body {
  padding: 1rem;
}

.modal-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid hsl(var(--border));
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.btn-close {
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center / 0.75em auto no-repeat;
  border: 0;
  border-radius: var(--radius-sm);
  width: 1.5rem;
  height: 1.5rem;
  padding: 0.25rem;
  opacity: 0.5;
  transition: opacity 0.1s ease;
}

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

/* ===== LIST GROUP ===== */
.list-group {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.list-group-item {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.625rem 0.75rem;
  color: hsl(var(--foreground));
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-width: 0 0 1px;
  font-size: 0.875rem;
}

.list-group-item:first-child {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  border-top-width: 1px;
}

.list-group-item:last-child {
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  border-bottom-width: 1px;
}

.list-group-item-warning {
  background-color: hsl(45.4 93.4% 95%);
  border-color: hsl(45.4 93.4% 85%);
}

.list-alert a {
  text-decoration: none;
  color: inherit;
}

.list-alert a:hover .list-group-item {
  background-color: hsl(var(--accent));
}

/* ===== BOTTOM NAVIGATION (Mobile) ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: hsl(var(--card));
  border-top: 1px solid hsl(var(--border));
  padding: 0.375rem 0;
  z-index: 1030;
  box-shadow: 0 -2px 8px rgb(0 0 0 / 0.08);
}

.bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.25rem 0.5rem;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  font-size: 0.6875rem;
  transition: color 0.1s ease;
}

.bottom-nav .nav-item i {
  font-size: 1.125rem;
  margin-bottom: 0.125rem;
}

.bottom-nav .nav-item:hover,
.bottom-nav .nav-item.active {
  color: hsl(var(--primary));
}

.bottom-nav .nav-label {
  font-weight: 500;
}

/* ===== LOGIN CARD ===== */
.login-card {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  background: hsl(var(--card));
}

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

@media (max-width: 767px) {
  .login-card .card-body {
    padding: 1rem;
  }
}

/* ===== DROPDOWN ===== */
.dropdown-menu {
  position: absolute;
  z-index: 1000;
  display: none;
  min-width: 8rem;
  padding: 0.25rem;
  margin: 0;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

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

.dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.375rem 0.5rem;
  color: hsl(var(--foreground));
  text-decoration: none;
  background-color: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  transition: background-color 0.1s ease;
  font-size: 0.875rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.dropdown-toggle::after {
  display: inline-block;
  margin-left: 0.25rem;
  vertical-align: middle;
  content: "";
  border-top: 0.25em solid;
  border-right: 0.25em solid transparent;
  border-bottom: 0;
  border-left: 0.25em solid transparent;
}

/* ===== UTILITY CLASSES ===== */
.text-muted {
  color: hsl(var(--muted-foreground));
}

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

.text-success {
  color: hsl(var(--success));
}

.text-danger {
  color: hsl(var(--destructive));
}

.text-warning {
  color: hsl(var(--warning));
}

.fw-medium {
  font-weight: 500;
}

.fw-semibold {
  font-weight: 600;
}

/* Gap utilities */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* ===== LOADING STATES ===== */
.skeleton {
  background: linear-gradient(90deg, hsl(var(--muted)) 25%, hsl(var(--muted) / 0.5) 50%, hsl(var(--muted)) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

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

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: hsl(var(--muted));
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--muted-foreground) / 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground) / 0.5);
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* ===== TRANSITIONS ===== */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-colors {
  transition-property: color, background-color, border-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* ===== RESPONSIVE FIXES ===== */
@media (max-width: 991px) {
  #sidebarMenu {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1045;
    width: 260px;
    max-width: 80%;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  
  #sidebarMenu.show {
    transform: translateX(0);
  }
  
  main {
    margin-left: 0;
    width: 100%;
    padding-bottom: 4rem;
  }
}

/* ===== DATATABLE OVERRIDES ===== */
.dataTables_wrapper {
  font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  padding: 0.5rem 0.75rem;
}

.dataTables_wrapper .dataTables_filter input {
  padding: 0.25rem 0.5rem;
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  margin-left: 0.5rem;
  font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_filter input:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.15);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 0.25rem 0.5rem;
  margin: 0 0.0625rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm);
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  font-size: 0.8125rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: hsl(var(--accent));
  border-color: hsl(var(--border));
  color: hsl(var(--accent-foreground));
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: hsl(var(--primary));
  border-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  gap: 0.25rem;
}

.page-link {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.1s ease;
}

.page-link:hover {
  background-color: hsl(var(--accent));
  border-color: hsl(var(--border));
}

.page-item.active .page-link {
  background-color: hsl(var(--primary));
  border-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.page-item.disabled .page-link {
  color: hsl(var(--muted-foreground));
  pointer-events: none;
  background-color: hsl(var(--muted));
}

/* ===== SELECT2 OVERRIDES ===== */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  min-height: 2rem;
  font-size: 0.875rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding: 0.25rem 0.5rem;
  line-height: 1.5;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.15);
}

.select2-dropdown {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.select2-results__option {
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
}

.select2-results__option--highlighted {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.select2-results__option--selected {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* ===== SIDEBAR NAV LINK HOVER ===== */
#sidebarMenu .nav-link:hover {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

#sidebarMenu .nav-link.active,
#sidebarMenu .nav-link[aria-current="page"] {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* ===== TABLE ROW HOVER ===== */
.table-hover tbody tr:hover {
  background-color: hsl(var(--accent));
}

/* ===== SMOOTH TRANSITIONS ===== */
a, button, .btn, .nav-link, .form-control, .form-select {
  transition: all 0.1s ease;
}

/* ===== SELECTION COLOR ===== */
::selection {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* ===== RESPONSIVE IMPROVEMENTS ===== */
@media (max-width: 767.98px) {
  main {
    padding-bottom: 4rem;
  }
  
  .card-body {
    padding: 0.75rem;
  }
  
  h6.h5 {
    font-size: 1rem;
  }
  
  .btn {
    font-size: 0.8125rem;
  }
  
  .table th,
  .table td {
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
  }
}

/* ===== ACCORDION ===== */
.accordion-item {
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
}

.accordion-button {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: hsl(var(--card));
  color: hsl(var(--foreground));
}

.accordion-button:not(.collapsed) {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.15);
  border-color: hsl(var(--ring));
}

.accordion-body {
  padding: 0.75rem 1rem;
}

/* ===== TOASTS ===== */
.toast {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
}

.toast-header {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid hsl(var(--border));
  background-color: hsl(var(--muted));
}

.toast-body {
  padding: 0.75rem;
}

/* ===== NAV TABS ===== */
.nav-tabs {
  border-bottom: 1px solid hsl(var(--border));
}

.nav-tabs .nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  transition: all 0.1s ease;
}

.nav-tabs .nav-link:hover {
  color: hsl(var(--foreground));
  border-bottom-color: hsl(var(--border));
}

.nav-tabs .nav-link.active {
  color: hsl(var(--primary));
  border-bottom-color: hsl(var(--primary));
  background-color: transparent;
}

/* ===== NAV PILLS ===== */
.nav-pills .nav-link {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  border-radius: var(--radius);
  transition: all 0.1s ease;
}

.nav-pills .nav-link:hover {
  background-color: hsl(var(--accent));
}

.nav-pills .nav-link.active {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* ===== PROGRESS ===== */
.progress {
  height: 0.5rem;
  background-color: hsl(var(--muted));
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar {
  background-color: hsl(var(--primary));
}

/* ===== SPINNER ===== */
.spinner-border {
  width: 1.5rem;
  height: 1.5rem;
  border-width: 0.2rem;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15rem;
}

/* ===== SWEET ALERT OVERRIDES ===== */
.swal2-popup {
  border-radius: var(--radius-lg);
  font-family: var(--font-sans);
  font-size: 0.875rem;
}

.swal2-styled.swal2-confirm {
  background-color: hsl(var(--primary));
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.swal2-styled.swal2-cancel {
  background-color: hsl(var(--muted));
  color: hsl(var(--foreground));
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
}

