/* ============================================================
   EDUSEKART ENTERPRISE UI FRAMEWORK — Design System
   Version: 1.0.0
   
   Inspired by Stripe, Linear, Vercel.
   Premium · Minimal · Information-dense · Calm
   
   Class prefix: es-
   ============================================================ */


/* ============================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   ============================================================ */

:root {
  /* Primary */
  --es-primary: #75009E;
  --es-primary-hover: #63008A;
  --es-primary-light: #F3E8F9;
  --es-primary-dark: #5A0079;
  --es-primary-rgb: 117, 0, 158;

  /* Backgrounds */
  --es-bg: #F8F9FC;
  --es-surface: #FFFFFF;

  /* Borders */
  --es-border: #E5E7EB;
  --es-border-light: #F0F1F3;

  /* Text */
  --es-text: #1A1D26;
  --es-text-secondary: #6B7280;
  --es-text-tertiary: #9CA3AF;

  /* Semantic Colors */
  --es-success: #059669;
  --es-success-light: #ECFDF5;
  --es-danger: #DC2626;
  --es-danger-light: #FEF2F2;
  --es-warning: #D97706;
  --es-warning-light: #FFFBEB;
  --es-info: #2563EB;
  --es-info-light: #EFF6FF;

  /* Typography */
  --es-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --es-page-title: 22px;
  --es-section-title: 18px;
  --es-card-title-size: 16px;
  --es-body: 14px;
  --es-label: 13px;
  --es-small: 12px;
  --es-tiny: 11px;

  /* Spacing */
  --es-space-1: 4px;
  --es-space-2: 8px;
  --es-space-3: 12px;
  --es-space-4: 16px;
  --es-space-5: 20px;
  --es-space-6: 24px;
  --es-space-8: 32px;
  --es-space-10: 40px;
  --es-space-12: 48px;

  /* Border Radius */
  --es-radius-sm: 4px;
  --es-radius: 6px;
  --es-radius-lg: 8px;
  --es-radius-xl: 12px;
  --es-radius-full: 9999px;

  /* Shadows — minimal, barely visible */
  --es-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --es-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --es-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
  --es-shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --es-transition: 150ms ease;
  --es-transition-slow: 250ms ease;

  /* Z-index scale */
  --es-z-dropdown: 1000;
  --es-z-sticky: 1020;
  --es-z-modal-backdrop: 1040;
  --es-z-modal: 1050;
  --es-z-toast: 1090;
  --es-z-command: 1100;
}


/* ============================================================
   2. BASE RESET & BOOTSTRAP OVERRIDES
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: var(--es-font);
  font-size: var(--es-body);
  color: var(--es-text);
  background-color: var(--es-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

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

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

::selection {
  background-color: var(--es-primary);
  color: #fff;
}

/* Webkit Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--es-border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--es-text-tertiary);
}

/* --- Bootstrap Visual Overrides --- */

/* Buttons */
.btn {
  border-radius: var(--es-radius);
  font-family: var(--es-font);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid transparent;
  box-shadow: none !important;
  transition: all var(--es-transition);
}

.btn:focus,
.btn:active,
.btn:focus-visible {
  box-shadow: none !important;
  outline: none;
}

.btn-primary {
  background-color: var(--es-primary);
  border-color: var(--es-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--es-primary-hover);
  border-color: var(--es-primary-hover);
}

.btn-outline-primary {
  color: var(--es-primary);
  border-color: var(--es-primary);
}

.btn-outline-primary:hover {
  background-color: var(--es-primary);
  border-color: var(--es-primary);
}

/* Form Controls */
.form-control,
.form-select {
  font-family: var(--es-font);
  font-size: 13px;
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius);
  color: var(--es-text);
  padding: 8px 12px;
  height: 36px;
  transition: border-color var(--es-transition), box-shadow var(--es-transition);
  box-shadow: none;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--es-primary);
  box-shadow: 0 0 0 3px rgba(var(--es-primary-rgb), 0.08);
  outline: none;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--es-text);
  margin-bottom: 6px;
}

/* Cards */
.card {
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-lg);
  box-shadow: none;
  background: var(--es-surface);
}

.card-header {
  background: var(--es-surface);
  border-bottom: 1px solid var(--es-border);
  padding: 16px 20px;
  font-weight: 600;
}

.card-body {
  padding: 20px;
}

.card-footer {
  background: #FAFBFD;
  border-top: 1px solid var(--es-border);
  padding: 12px 20px;
}

/* Badges */
.badge {
  font-family: var(--es-font);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--es-radius-sm);
  line-height: 1;
}

/* Alerts */
.alert {
  font-family: var(--es-font);
  font-size: 13px;
  border: none;
  border-radius: var(--es-radius);
  border-left: 3px solid;
  padding: 12px 16px;
}

/* Tables */
.table {
  font-family: var(--es-font);
  font-size: 13px;
  margin-bottom: 0;
}

.table > thead > tr > th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--es-text-secondary);
  background: #FAFBFD;
  border-bottom: 1px solid var(--es-border);
  padding: 10px 14px;
  white-space: nowrap;
}

.table > tbody > tr > td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--es-border-light);
  vertical-align: middle;
}

.table > tbody > tr:hover {
  background: #FAFBFD;
}

/* Nav */
.nav-link {
  font-family: var(--es-font);
  font-size: 13px;
  color: var(--es-text-secondary);
  transition: all var(--es-transition);
}

.nav-link:hover {
  color: var(--es-text);
}

.nav-link.active {
  color: var(--es-primary);
}

/* Pagination */
.page-link {
  font-family: var(--es-font);
  font-size: 13px;
  color: var(--es-text-secondary);
  border: 1px solid transparent;
  border-radius: var(--es-radius-sm);
  padding: 6px 10px;
}

.page-link:focus {
  box-shadow: none;
}

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

/* Breadcrumb */
.breadcrumb {
  font-family: var(--es-font);
  font-size: 13px;
  background: none;
  padding: 0;
  margin: 0;
}

.breadcrumb-item a {
  color: var(--es-text-secondary);
  text-decoration: none;
}

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

.breadcrumb-item.active {
  color: var(--es-text);
}

/* Accordion */
.accordion {
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-lg);
  overflow: hidden;
}

.accordion-item {
  border: none;
  border-bottom: 1px solid var(--es-border);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-button {
  font-family: var(--es-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--es-text);
  background: var(--es-surface);
  box-shadow: none !important;
  padding: 12px 16px;
}

.accordion-button:not(.collapsed) {
  background: var(--es-surface);
  color: var(--es-text);
}

.accordion-button::after {
  color: var(--es-text-tertiary);
}

.accordion-body {
  padding: 0 16px 14px;
  font-size: 13px;
  color: var(--es-text-secondary);
}

/* Modal */
.modal-content {
  border: none;
  border-radius: var(--es-radius-lg);
  box-shadow: var(--es-shadow-xl);
}

.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.3);
}

.modal-backdrop.show {
  opacity: 1;
  backdrop-filter: blur(2px);
}

.modal-header {
  border-bottom: 1px solid var(--es-border);
  padding: 16px 20px;
}

.modal-title {
  font-family: var(--es-font);
  font-size: 16px;
  font-weight: 600;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  border-top: 1px solid var(--es-border);
  padding: 12px 20px;
}

/* Close button */
.btn-close:focus {
  box-shadow: none;
}

/* Dropdown */
.dropdown-menu {
  font-family: var(--es-font);
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-lg);
  box-shadow: var(--es-shadow-lg);
  background: #fff;
  padding: 4px;
  min-width: 180px;
  animation: es-fadeIn 150ms ease;
}

.dropdown-item {
  font-size: 13px;
  color: var(--es-text);
  border-radius: var(--es-radius-sm);
  padding: 7px 12px;
  transition: all var(--es-transition);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--es-bg);
  color: var(--es-text);
}

.dropdown-item:active {
  background-color: var(--es-primary-light);
  color: var(--es-primary);
}

.dropdown-divider {
  margin: 4px 0;
  border-top: 1px solid var(--es-border);
}

.dropdown-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--es-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 6px 12px;
}

/* Tooltip */
.tooltip-inner {
  background-color: var(--es-text);
  color: #fff;
  font-family: var(--es-font);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--es-radius-sm);
  max-width: 220px;
}

.bs-tooltip-top .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
  border-top-color: var(--es-text);
}

.bs-tooltip-bottom .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
  border-bottom-color: var(--es-text);
}

.bs-tooltip-start .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before {
  border-left-color: var(--es-text);
}

.bs-tooltip-end .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before {
  border-right-color: var(--es-text);
}


/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

.es-page-title {
  font-size: var(--es-page-title);
  font-weight: 600;
  line-height: 1.3;
  color: var(--es-text);
  margin: 0;
}

.es-section-title {
  font-size: var(--es-section-title);
  font-weight: 600;
  line-height: 1.4;
  color: var(--es-text);
  margin: 0;
}

.es-card-title {
  font-size: var(--es-card-title-size);
  font-weight: 600;
  line-height: 1.4;
  color: var(--es-text);
  margin: 0;
}

.es-body {
  font-size: var(--es-body);
  font-weight: 400;
  color: var(--es-text);
}

.es-label {
  font-size: var(--es-label);
  font-weight: 500;
  color: var(--es-text-secondary);
}

.es-text-muted {
  color: var(--es-text-secondary);
}

.es-text-small {
  font-size: var(--es-small);
}

.es-text-tiny {
  font-size: var(--es-tiny);
}

.es-link {
  color: var(--es-primary);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--es-transition);
}

.es-link:hover {
  text-decoration: underline;
  color: var(--es-primary-hover);
}

.es-text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ============================================================
   4. BUTTONS
   ============================================================ */

.es-btn {
  font-family: var(--es-font);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  padding: 8px 16px;
  border-radius: var(--es-radius);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  transition: all var(--es-transition);
  white-space: nowrap;
  height: 36px;
  text-decoration: none;
  outline: none;
  position: relative;
}

.es-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--es-primary-rgb), 0.15);
}

/* Variants */
.es-btn-primary {
  background-color: var(--es-primary);
  color: #fff;
  border-color: var(--es-primary);
}

.es-btn-primary:hover {
  background-color: var(--es-primary-hover);
  border-color: var(--es-primary-hover);
  box-shadow: 0 1px 3px rgba(var(--es-primary-rgb), 0.3);
}

.es-btn-secondary {
  background-color: var(--es-bg);
  color: var(--es-text);
  border: 1px solid var(--es-border);
}

.es-btn-secondary:hover {
  background-color: #F0F1F3;
  border-color: #D1D5DB;
}

.es-btn-outline {
  background-color: transparent;
  color: var(--es-primary);
  border: 1px solid var(--es-primary);
}

.es-btn-outline:hover {
  background-color: var(--es-primary-light);
}

.es-btn-ghost {
  background-color: transparent;
  color: var(--es-text-secondary);
  border: none;
}

.es-btn-ghost:hover {
  background-color: var(--es-bg);
  color: var(--es-text);
}

.es-btn-danger {
  background-color: var(--es-danger);
  color: #fff;
  border-color: var(--es-danger);
}

.es-btn-danger:hover {
  background-color: #B91C1C;
  border-color: #B91C1C;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.3);
}

.es-btn-success {
  background-color: var(--es-success);
  color: #fff;
  border-color: var(--es-success);
}

.es-btn-success:hover {
  background-color: #047857;
  border-color: #047857;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.3);
}

/* Sizes */
.es-btn-sm {
  height: 30px;
  padding: 5px 12px;
  font-size: 12px;
}

.es-btn-lg {
  height: 42px;
  padding: 10px 20px;
  font-size: 14px;
}

/* States */
.es-btn:disabled,
.es-btn.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

.es-btn-loading {
  color: transparent !important;
  pointer-events: none;
  position: relative;
}

.es-btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  margin-left: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: es-spin 600ms linear infinite;
}

.es-btn-secondary.es-btn-loading::after,
.es-btn-ghost.es-btn-loading::after,
.es-btn-outline.es-btn-loading::after {
  border-color: rgba(var(--es-primary-rgb), 0.2);
  border-top-color: var(--es-primary);
}

.es-btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
}

.es-btn-icon.es-btn-sm {
  width: 30px;
  height: 30px;
}

.es-btn-icon.es-btn-lg {
  width: 42px;
  height: 42px;
}

/* Button Group */
.es-btn-group {
  display: inline-flex;
}

.es-btn-group .es-btn {
  border-radius: 0;
}

.es-btn-group .es-btn:first-child {
  border-radius: var(--es-radius) 0 0 var(--es-radius);
}

.es-btn-group .es-btn:last-child {
  border-radius: 0 var(--es-radius) var(--es-radius) 0;
}

.es-btn-group .es-btn + .es-btn {
  border-left: 0;
}


/* ============================================================
   5. FORMS & INPUTS
   ============================================================ */

.es-form-group {
  margin-bottom: var(--es-space-4);
}

.es-form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--es-text);
  margin-bottom: 6px;
  display: block;
}

.es-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-family: var(--es-font);
  color: var(--es-text);
  background-color: var(--es-surface);
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius);
  transition: border-color var(--es-transition), box-shadow var(--es-transition);
  outline: none;
  line-height: 1.5;
}

.es-input::placeholder {
  color: var(--es-text-tertiary);
}

.es-input:focus {
  border-color: var(--es-primary);
  box-shadow: 0 0 0 3px rgba(var(--es-primary-rgb), 0.08);
}

.es-input.is-invalid {
  border-color: var(--es-danger);
}

.es-input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.es-input.is-valid {
  border-color: var(--es-success);
}

.es-input:disabled {
  background-color: #F9FAFB;
  color: var(--es-text-secondary);
  cursor: not-allowed;
}

.es-input:read-only {
  background-color: #F9FAFB;
  color: var(--es-text-secondary);
  cursor: default;
}

.es-input-sm {
  height: 30px;
  font-size: 12px;
}

.es-input-lg {
  height: 42px;
  font-size: 14px;
  padding: 0 14px;
}

/* Textarea */
.es-textarea {
  width: 100%;
  height: auto;
  min-height: 80px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: var(--es-font);
  color: var(--es-text);
  background-color: var(--es-surface);
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius);
  transition: border-color var(--es-transition), box-shadow var(--es-transition);
  outline: none;
  resize: vertical;
  line-height: 1.5;
}

.es-textarea::placeholder {
  color: var(--es-text-tertiary);
}

.es-textarea:focus {
  border-color: var(--es-primary);
  box-shadow: 0 0 0 3px rgba(var(--es-primary-rgb), 0.08);
}

.es-textarea.is-invalid {
  border-color: var(--es-danger);
}

.es-textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.es-textarea:disabled {
  background-color: #F9FAFB;
  color: var(--es-text-secondary);
  cursor: not-allowed;
}

/* Input with Icon */
.es-input-icon {
  position: relative;
}

.es-input-icon i {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--es-text-tertiary);
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
}

.es-input-icon-left i {
  left: 12px;
}

.es-input-icon-left .es-input {
  padding-left: 36px;
}

.es-input-icon-right i {
  right: 12px;
}

.es-input-icon-right .es-input {
  padding-right: 36px;
}

/* Input Group */
.es-input-group {
  display: flex;
}

.es-input-group .es-input {
  flex: 1;
  border-radius: 0;
  min-width: 0;
}

.es-input-group .es-input:first-child {
  border-radius: var(--es-radius) 0 0 var(--es-radius);
}

.es-input-group .es-input:last-child {
  border-radius: 0 var(--es-radius) var(--es-radius) 0;
}

.es-input-group-text {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 13px;
  color: var(--es-text-secondary);
  background-color: #F9FAFB;
  border: 1px solid var(--es-border);
  white-space: nowrap;
}

.es-input-group-text:first-child {
  border-radius: var(--es-radius) 0 0 var(--es-radius);
  border-right: 0;
}

.es-input-group-text:last-child {
  border-radius: 0 var(--es-radius) var(--es-radius) 0;
  border-left: 0;
}

/* Floating Label */
.es-floating {
  position: relative;
}

.es-floating .es-input {
  padding-top: 18px;
  padding-bottom: 4px;
  height: 48px;
}

.es-floating .es-floating-label {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--es-text-tertiary);
  transition: all var(--es-transition);
  pointer-events: none;
  line-height: 1;
}

.es-floating .es-input:focus ~ .es-floating-label,
.es-floating .es-input:not(:placeholder-shown) ~ .es-floating-label {
  top: 10px;
  transform: translateY(0);
  font-size: 11px;
  color: var(--es-primary);
}

/* Form Help Text */
.es-form-text {
  font-size: 12px;
  color: var(--es-text-secondary);
  margin-top: 4px;
}

.es-form-error {
  font-size: 12px;
  color: var(--es-danger);
  margin-top: 4px;
}

.es-field-error {
  font-size: 12px;
  color: var(--es-danger);
  margin-top: 4px;
  display: block;
}

/* Password Toggle */
.es-password-toggle {
  position: relative;
}

.es-password-toggle .es-toggle-btn {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--es-text-tertiary);
  background: transparent;
  border: none;
  border-radius: 0 var(--es-radius) var(--es-radius) 0;
  transition: color var(--es-transition);
  padding: 0;
}

.es-password-toggle .es-toggle-btn:hover {
  color: var(--es-text);
}

.es-password-toggle .es-input {
  padding-right: 40px;
}


/* ============================================================
   6. CUSTOM SELECT
   ============================================================ */

.es-custom-select {
  position: relative;
}

.es-custom-select-trigger {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-family: var(--es-font);
  color: var(--es-text);
  background-color: var(--es-surface);
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: border-color var(--es-transition), box-shadow var(--es-transition);
  outline: none;
  user-select: none;
}

.es-custom-select-trigger:hover {
  border-color: #D1D5DB;
}

.es-custom-select-trigger:focus,
.es-custom-select-trigger.open {
  border-color: var(--es-primary);
  box-shadow: 0 0 0 3px rgba(var(--es-primary-rgb), 0.08);
}

.es-custom-select-trigger::after {
  content: '\ea4e'; /* ri-arrow-down-s-line */
  font-family: 'remixicon';
  font-size: 16px;
  color: var(--es-text-tertiary);
  transition: transform var(--es-transition);
  flex-shrink: 0;
  line-height: 1;
}

.es-custom-select-trigger.open::after {
  transform: rotate(180deg);
}

.es-custom-select-trigger .es-placeholder {
  color: var(--es-text-tertiary);
}

.es-custom-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-lg);
  box-shadow: var(--es-shadow-lg);
  z-index: var(--es-z-dropdown);
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  display: none;
}

.es-custom-select-dropdown.show {
  display: block;
  animation: es-fadeIn 150ms ease;
}

.es-custom-select-search {
  padding: 8px;
  border-bottom: 1px solid var(--es-border);
}

.es-custom-select-search .es-input {
  height: 32px;
}

.es-custom-select-option {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background var(--es-transition);
}

.es-custom-select-option:hover {
  background-color: var(--es-bg);
}

.es-custom-select-option.selected {
  background-color: var(--es-primary-light);
  color: var(--es-primary);
  font-weight: 500;
}

.es-custom-select-option.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Multi-select Tags */
.es-multi-select-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.es-multi-select-more {
  font-size: 12px;
  color: var(--es-text-secondary);
  font-weight: 500;
  flex-shrink: 0;
}


/* ============================================================
   7. CHECKBOX, RADIO, SWITCH
   ============================================================ */

/* Checkbox */
.es-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
  color: var(--es-text);
}

.es-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.es-check-box {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--es-border);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--es-transition);
  flex-shrink: 0;
  background: var(--es-surface);
}

.es-check-box i {
  font-size: 10px;
  color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--es-transition);
}

.es-checkbox:hover .es-check-box {
  border-color: #D1D5DB;
}

.es-checkbox input:checked ~ .es-check-box {
  background-color: var(--es-primary);
  border-color: var(--es-primary);
}

.es-checkbox input:checked ~ .es-check-box i {
  opacity: 1;
  transform: scale(1);
}

.es-checkbox input:disabled ~ .es-check-box {
  opacity: 0.5;
  cursor: not-allowed;
}

.es-checkbox input:disabled ~ span:last-child {
  opacity: 0.5;
}

/* Radio */
.es-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
  color: var(--es-text);
}

.es-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.es-radio-circle {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--es-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--es-transition);
  flex-shrink: 0;
  background: var(--es-surface);
}

.es-radio-circle::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
  transition: transform var(--es-transition);
}

.es-radio:hover .es-radio-circle {
  border-color: #D1D5DB;
}

.es-radio input:checked ~ .es-radio-circle {
  background-color: var(--es-primary);
  border-color: var(--es-primary);
}

.es-radio input:checked ~ .es-radio-circle::after {
  transform: scale(1);
}

.es-radio input:disabled ~ .es-radio-circle {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Switch */
.es-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
  color: var(--es-text);
}

.es-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.es-switch-track {
  width: 36px;
  height: 20px;
  background-color: var(--es-border);
  border-radius: 10px;
  position: relative;
  transition: background var(--es-transition);
  flex-shrink: 0;
}

.es-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--es-shadow-sm);
  transition: transform var(--es-transition);
}

.es-switch input:checked ~ .es-switch-track {
  background-color: var(--es-primary);
}

.es-switch input:checked ~ .es-switch-track::after {
  transform: translateX(16px);
}

.es-switch input:disabled ~ .es-switch-track {
  opacity: 0.5;
  cursor: not-allowed;
}


/* ============================================================
   8. TAG INPUT
   ============================================================ */

.es-tag-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 12px;
  min-height: 36px;
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius);
  background: #fff;
  align-items: center;
  cursor: text;
  transition: border-color var(--es-transition), box-shadow var(--es-transition);
}

.es-tag-input:focus-within {
  border-color: var(--es-primary);
  box-shadow: 0 0 0 3px rgba(var(--es-primary-rgb), 0.08);
}

.es-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--es-bg);
  border-radius: var(--es-radius-sm);
  font-size: 12px;
  color: var(--es-text);
  border: 1px solid var(--es-border);
  line-height: 1.4;
}

.es-tag-remove {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--es-text-tertiary);
  font-size: 14px;
  transition: color var(--es-transition);
  line-height: 1;
  padding: 0;
  background: none;
  border: none;
}

.es-tag-remove:hover {
  color: var(--es-danger);
}

.es-tag-input input {
  border: none;
  outline: none;
  font-size: 13px;
  font-family: var(--es-font);
  flex: 1;
  min-width: 80px;
  padding: 0;
  height: 22px;
  background: transparent;
  color: var(--es-text);
}

.es-tag-input input::placeholder {
  color: var(--es-text-tertiary);
}


/* ============================================================
   9. OTP INPUT
   ============================================================ */

.es-otp-group {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.es-otp-input {
  width: 44px;
  height: 48px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  font-family: var(--es-font);
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius);
  outline: none;
  transition: border-color var(--es-transition), box-shadow var(--es-transition), background var(--es-transition);
  color: var(--es-text);
  background: var(--es-surface);
}

.es-otp-input:focus {
  border-color: var(--es-primary);
  box-shadow: 0 0 0 3px rgba(var(--es-primary-rgb), 0.08);
}

.es-otp-input.filled {
  border-color: var(--es-primary);
  background: var(--es-primary-light);
}


/* ============================================================
   10. DATE PICKER
   ============================================================ */

.es-datepicker {
  position: relative;
}

.es-datepicker-calendar {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-lg);
  box-shadow: var(--es-shadow-lg);
  padding: 12px;
  z-index: var(--es-z-dropdown);
  margin-top: 4px;
  min-width: 280px;
  display: none;
}

.es-datepicker-calendar.show {
  display: block;
  animation: es-fadeIn 150ms ease;
}

.es-datepicker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.es-datepicker-nav {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--es-radius-sm);
  color: var(--es-text-secondary);
  border: none;
  background: none;
  transition: all var(--es-transition);
  font-size: 16px;
}

.es-datepicker-nav:hover {
  background: var(--es-bg);
  color: var(--es-text);
}

.es-datepicker-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--es-text);
}

.es-datepicker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  color: var(--es-text-tertiary);
  font-weight: 500;
  margin-bottom: 4px;
}

.es-datepicker-weekday {
  padding: 4px 0;
}

.es-datepicker-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.es-datepicker-day {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  border-radius: var(--es-radius-sm);
  transition: all var(--es-transition);
  border: none;
  background: none;
  color: var(--es-text);
  margin: 0 auto;
}

.es-datepicker-day:hover {
  background: var(--es-bg);
}

.es-datepicker-day.today {
  font-weight: 600;
  color: var(--es-primary);
}

.es-datepicker-day.selected {
  background: var(--es-primary);
  color: #fff;
}

.es-datepicker-day.selected:hover {
  background: var(--es-primary-hover);
}

.es-datepicker-day.other-month {
  color: var(--es-text-tertiary);
}

.es-datepicker-day.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.es-datepicker-day.in-range {
  background: var(--es-primary-light);
  border-radius: 0;
}

.es-datepicker-day.range-start {
  border-radius: var(--es-radius-sm) 0 0 var(--es-radius-sm);
}

.es-datepicker-day.range-end {
  border-radius: 0 var(--es-radius-sm) var(--es-radius-sm) 0;
}


/* ============================================================
   11. COLOR PICKER
   ============================================================ */

.es-color-picker {
  position: relative;
}

.es-color-swatch {
  width: 36px;
  height: 36px;
  border-radius: var(--es-radius);
  border: 2px solid var(--es-border);
  cursor: pointer;
  transition: border-color var(--es-transition);
  padding: 0;
  outline: none;
}

.es-color-swatch:hover {
  border-color: var(--es-primary);
}

.es-color-palette {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-lg);
  box-shadow: var(--es-shadow-lg);
  padding: 12px;
  z-index: var(--es-z-dropdown);
  margin-top: 4px;
  display: none;
}

.es-color-palette.show {
  display: block;
  animation: es-fadeIn 150ms ease;
}

.es-color-options {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.es-color-option {
  width: 28px;
  height: 28px;
  border-radius: var(--es-radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--es-transition);
  padding: 0;
  outline: none;
}

.es-color-option:hover,
.es-color-option.selected {
  border-color: var(--es-text);
  transform: scale(1.1);
}

.es-color-value {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--es-border);
}

.es-color-value .es-input {
  height: 30px;
  font-size: 12px;
}


/* ============================================================
   12. FILE UPLOAD
   ============================================================ */

.es-upload-zone {
  border: 2px dashed var(--es-border);
  border-radius: var(--es-radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--es-transition);
  background: #fff;
}

.es-upload-zone:hover {
  border-color: var(--es-primary);
  background: var(--es-primary-light);
}

.es-upload-zone.dragging {
  border-color: var(--es-primary);
  background: var(--es-primary-light);
  border-style: solid;
}

.es-upload-zone-icon {
  font-size: 32px;
  color: var(--es-text-tertiary);
  margin-bottom: 8px;
}

.es-upload-zone-text {
  font-size: 14px;
  color: var(--es-text);
  font-weight: 500;
}

.es-upload-zone-hint {
  font-size: 12px;
  color: var(--es-text-tertiary);
  margin-top: 4px;
}

/* Upload Queue */
.es-upload-queue {
  margin-top: 12px;
}

.es-upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius);
  margin-bottom: 8px;
  background: #fff;
  transition: all var(--es-transition);
}

.es-upload-item.success {
  background: var(--es-success-light);
  border-color: #A7F3D0;
}

.es-upload-item.error {
  background: var(--es-danger-light);
  border-color: #FECACA;
}

.es-upload-item-preview {
  width: 40px;
  height: 40px;
  border-radius: var(--es-radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--es-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.es-upload-item-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.es-upload-item-preview i {
  font-size: 20px;
  color: var(--es-text-tertiary);
}

.es-upload-item-info {
  flex: 1;
  min-width: 0;
}

.es-upload-item-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--es-text);
}

.es-upload-item-size {
  font-size: 12px;
  color: var(--es-text-secondary);
}

.es-upload-item-progress {
  height: 3px;
  background: var(--es-border);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.es-upload-item-progress-bar {
  height: 100%;
  background: var(--es-primary);
  border-radius: 2px;
  transition: width 300ms ease;
}

.es-upload-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.es-upload-item-actions button {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--es-text-tertiary);
  cursor: pointer;
  border-radius: var(--es-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--es-transition);
  padding: 0;
  font-size: 16px;
}

.es-upload-item-actions button:hover {
  background: var(--es-bg);
  color: var(--es-danger);
}

/* Upload Preview Grid */
.es-upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.es-upload-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--es-radius);
  overflow: hidden;
  border: 1px solid var(--es-border);
}

.es-upload-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.es-upload-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  opacity: 0;
  transition: opacity var(--es-transition);
  padding: 0;
}

.es-upload-preview-item:hover .es-upload-preview-remove {
  opacity: 1;
}


/* ============================================================
   13. TABLES
   ============================================================ */

.es-table-wrapper {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-lg);
}

.es-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--es-border);
  flex-wrap: wrap;
  gap: 8px;
}

.es-table-search {
  max-width: 240px;
}

.es-table-search .es-input {
  height: 32px;
  font-size: 12px;
}

.es-table-bulk-bar {
  display: none;
  padding: 8px 16px;
  background: var(--es-primary-light);
  align-items: center;
  gap: 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--es-border);
}

.es-table-bulk-bar.show {
  display: flex;
}

.es-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.es-table thead th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--es-text-secondary);
  background: #FAFBFD;
  border-bottom: 1px solid var(--es-border);
  text-align: left;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.es-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--es-border-light);
  color: var(--es-text);
  vertical-align: middle;
}

.es-table tbody tr {
  transition: background var(--es-transition);
}

.es-table tbody tr:hover {
  background: #FAFBFD;
}

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

.es-table tbody tr.selected {
  background: var(--es-primary-light);
}

.es-table-check {
  width: 40px;
}

.es-table-check .es-checkbox {
  margin: 0;
}

.es-table-actions {
  width: auto;
  text-align: right;
  white-space: nowrap;
}

.es-table-action-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--es-text-tertiary);
  cursor: pointer;
  border-radius: var(--es-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all var(--es-transition);
  padding: 0;
}

.es-table-action-btn:hover {
  background: var(--es-bg);
  color: var(--es-text);
}

.es-table-action-btn.danger:hover {
  color: var(--es-danger);
  background: var(--es-danger-light);
}

.es-table-action-btn.success:hover {
  color: var(--es-success);
  background: var(--es-success-light);
}

.es-table-action-btn.warning:hover {
  color: var(--es-warning);
  background: var(--es-warning-light);
}

.es-table-status {
  display: inline-flex;
}

.es-table-loading {
  pointer-events: none;
}

.es-table-empty td {
  text-align: center;
  padding: 40px;
  color: var(--es-text-tertiary);
}

/* Sortable header */
.es-table thead th.sortable {
  cursor: pointer;
  user-select: none;
}

.es-table thead th.sortable:hover {
  color: var(--es-text);
}

.es-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--es-border);
  font-size: 13px;
  color: var(--es-text-secondary);
  flex-wrap: wrap;
  gap: 8px;
}


/* ============================================================
   14. CARDS
   ============================================================ */

.es-card {
  background: var(--es-surface);
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-lg);
  overflow: hidden;
}

.es-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--es-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.es-card-title {
  font-size: var(--es-card-title-size);
  font-weight: 600;
  color: var(--es-text);
  margin: 0;
  line-height: 1.4;
}

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

.es-card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--es-border);
  background: #FAFBFD;
}

/* Stat Card */
.es-stat-card {
  padding: 20px;
}

.es-stat-card .es-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--es-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}

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

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

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

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

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

.es-stat-card .es-stat-label {
  font-size: 12px;
  color: var(--es-text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.es-stat-card .es-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--es-text);
  margin-top: 4px;
  line-height: 1.2;
}

.es-stat-card .es-stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 8px;
}

.es-stat-card .es-stat-trend.up {
  color: var(--es-success);
}

.es-stat-card .es-stat-trend.down {
  color: var(--es-danger);
}


/* ============================================================
   15. BADGES
   ============================================================ */

.es-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--es-radius-sm);
  line-height: 1;
  white-space: nowrap;
}

.es-badge-primary {
  background: var(--es-primary-light);
  color: var(--es-primary);
}

.es-badge-success {
  background: var(--es-success-light);
  color: var(--es-success);
}

.es-badge-danger {
  background: var(--es-danger-light);
  color: var(--es-danger);
}

.es-badge-warning {
  background: var(--es-warning-light);
  color: var(--es-warning);
}

.es-badge-info {
  background: var(--es-info-light);
  color: var(--es-info);
}

.es-badge-neutral {
  background: var(--es-bg);
  color: var(--es-text-secondary);
}

.es-badge-outline {
  background: transparent;
  border: 1px solid currentColor;
}

/* Badge Dot */
.es-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.es-badge-dot.primary {
  background: var(--es-primary);
}

.es-badge-dot.success {
  background: var(--es-success);
}

.es-badge-dot.danger {
  background: var(--es-danger);
}

.es-badge-dot.warning {
  background: var(--es-warning);
}

.es-badge-dot.info {
  background: var(--es-info);
}

.es-badge-dot.neutral {
  background: var(--es-text-tertiary);
}


/* ============================================================
   16. ALERTS
   ============================================================ */

.es-alert {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--es-radius);
  border-left: 3px solid;
  font-size: 13px;
  align-items: flex-start;
}

.es-alert-info {
  background: var(--es-info-light);
  border-left-color: var(--es-info);
}

.es-alert-success {
  background: var(--es-success-light);
  border-left-color: var(--es-success);
}

.es-alert-warning {
  background: var(--es-warning-light);
  border-left-color: var(--es-warning);
}

.es-alert-danger {
  background: var(--es-danger-light);
  border-left-color: var(--es-danger);
}

.es-alert-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 1px;
}

.es-alert-info .es-alert-icon {
  color: var(--es-info);
}

.es-alert-success .es-alert-icon {
  color: var(--es-success);
}

.es-alert-warning .es-alert-icon {
  color: var(--es-warning);
}

.es-alert-danger .es-alert-icon {
  color: var(--es-danger);
}

.es-alert-content {
  flex: 1;
  min-width: 0;
}

.es-alert-title {
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--es-text);
}

.es-alert-dismiss {
  background: none;
  border: none;
  color: var(--es-text-tertiary);
  cursor: pointer;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  transition: color var(--es-transition);
}

.es-alert-dismiss:hover {
  color: var(--es-text);
}


/* ============================================================
   17. DROPDOWNS
   ============================================================ */

.es-dropdown-menu {
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-lg);
  box-shadow: var(--es-shadow-lg);
  background: #fff;
  padding: 4px;
  min-width: 180px;
  z-index: var(--es-z-dropdown);
}

.es-dropdown-item {
  padding: 7px 12px;
  font-size: 13px;
  color: var(--es-text);
  border-radius: var(--es-radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--es-transition);
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.es-dropdown-item:hover {
  background: var(--es-bg);
  color: var(--es-text);
  text-decoration: none;
}

.es-dropdown-item.danger {
  color: var(--es-danger);
}

.es-dropdown-item.danger:hover {
  background: var(--es-danger-light);
}

.es-dropdown-item-icon {
  width: 16px;
  text-align: center;
  color: var(--es-text-secondary);
  font-size: 16px;
  flex-shrink: 0;
}

.es-dropdown-item.danger .es-dropdown-item-icon {
  color: var(--es-danger);
}

.es-dropdown-divider {
  margin: 4px 0;
  border: none;
  border-top: 1px solid var(--es-border);
}

.es-dropdown-header {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--es-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.es-dropdown-item-shortcut {
  margin-left: auto;
  font-size: 11px;
  color: var(--es-text-tertiary);
}


/* ============================================================
   18. TABS
   ============================================================ */

.es-tabs {
  position: relative;
}

.es-tab-list {
  display: flex;
  border-bottom: 2px solid var(--es-border);
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

.es-tab-item {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--es-text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--es-transition);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.es-tab-item:hover {
  color: var(--es-text);
}

.es-tab-item.active {
  color: var(--es-primary);
  border-bottom-color: var(--es-primary);
}

/* Pill Tabs */
.es-tabs-pill .es-tab-list {
  border-bottom: none;
  gap: 4px;
  background: var(--es-bg);
  padding: 4px;
  border-radius: var(--es-radius);
  display: inline-flex;
}

.es-tabs-pill .es-tab-item {
  border-bottom: none;
  margin-bottom: 0;
  border-radius: var(--es-radius-sm);
  padding: 6px 14px;
}

.es-tabs-pill .es-tab-item.active {
  background: #fff;
  color: var(--es-text);
  box-shadow: var(--es-shadow-sm);
}

/* Tab Count Badge */
.es-tab-count {
  font-size: 11px;
  background: var(--es-bg);
  color: var(--es-text-secondary);
  padding: 1px 6px;
  border-radius: var(--es-radius-full);
  font-weight: 500;
  line-height: 1.4;
}

.es-tab-item.active .es-tab-count {
  background: var(--es-primary-light);
  color: var(--es-primary);
}

/* Tab Content */
.es-tab-content {
  padding-top: 16px;
}

.es-tab-pane {
  display: none;
}

.es-tab-pane.active {
  display: block;
  animation: es-fadeIn 150ms ease;
}


/* ============================================================
   19. TIMELINE
   ============================================================ */

.es-timeline {
  position: relative;
  padding-left: 24px;
}

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

.es-timeline-item {
  position: relative;
  padding-bottom: 20px;
  padding-left: 20px;
}

.es-timeline-item:last-child {
  padding-bottom: 0;
}

.es-timeline-dot {
  position: absolute;
  left: -24px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--es-border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.es-timeline-dot i {
  font-size: 8px;
}

.es-timeline-dot.primary {
  border-color: var(--es-primary);
  background: var(--es-primary-light);
}

.es-timeline-dot.primary i {
  color: var(--es-primary);
}

.es-timeline-dot.success {
  border-color: var(--es-success);
  background: var(--es-success-light);
}

.es-timeline-dot.success i {
  color: var(--es-success);
}

.es-timeline-dot.danger {
  border-color: var(--es-danger);
  background: var(--es-danger-light);
}

.es-timeline-dot.danger i {
  color: var(--es-danger);
}

.es-timeline-dot.warning {
  border-color: var(--es-warning);
  background: var(--es-warning-light);
}

.es-timeline-dot.warning i {
  color: var(--es-warning);
}

.es-timeline-dot.info {
  border-color: var(--es-info);
  background: var(--es-info-light);
}

.es-timeline-dot.info i {
  color: var(--es-info);
}

.es-timeline-time {
  font-size: 11px;
  color: var(--es-text-tertiary);
  margin-bottom: 4px;
}

.es-timeline-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--es-text);
}

.es-timeline-desc {
  font-size: 12px;
  color: var(--es-text-secondary);
  margin-top: 2px;
}


/* ============================================================
   20. STEPPER
   ============================================================ */

.es-stepper {
  display: flex;
  align-items: center;
}

.es-step {
  display: flex;
  align-items: center;
  flex: 1;
}

.es-step:last-child {
  flex: 0;
}

.es-step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--es-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--es-text-tertiary);
  flex-shrink: 0;
  transition: all var(--es-transition);
  background: var(--es-surface);
}

.es-step-label {
  font-size: 12px;
  color: var(--es-text-secondary);
  margin-left: 8px;
  white-space: nowrap;
}

.es-step-line {
  flex: 1;
  height: 2px;
  background: var(--es-border);
  margin: 0 12px;
  transition: background var(--es-transition);
}

/* Active Step */
.es-step.active .es-step-number {
  border-color: var(--es-primary);
  background: var(--es-primary);
  color: #fff;
}

.es-step.active .es-step-label {
  color: var(--es-primary);
  font-weight: 500;
}

/* Completed Step */
.es-step.completed .es-step-number {
  border-color: var(--es-success);
  background: var(--es-success);
  color: #fff;
}

.es-step.completed .es-step-label {
  color: var(--es-success);
}

.es-step.completed .es-step-line {
  background: var(--es-success);
}


/* ============================================================
   21. PAGINATION
   ============================================================ */

.es-pagination {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.es-page-item {
  list-style: none;
}

.es-page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  font-size: 13px;
  font-family: var(--es-font);
  color: var(--es-text-secondary);
  border: 1px solid transparent;
  border-radius: var(--es-radius-sm);
  cursor: pointer;
  transition: all var(--es-transition);
  text-decoration: none;
  background: none;
  line-height: 1;
}

.es-page-link:hover {
  background: var(--es-bg);
  color: var(--es-text);
  text-decoration: none;
}

.es-page-item.active .es-page-link {
  background: var(--es-primary);
  color: #fff;
  border-color: var(--es-primary);
}

.es-page-item.disabled .es-page-link {
  opacity: 0.4;
  pointer-events: none;
  cursor: default;
}


/* ============================================================
   22. ACCORDIONS
   ============================================================ */

.es-accordion {
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-lg);
  overflow: hidden;
}

.es-accordion-item {
  border-bottom: 1px solid var(--es-border);
}

.es-accordion-item:last-child {
  border-bottom: none;
}

.es-accordion-header {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  transition: background var(--es-transition);
  user-select: none;
  gap: 12px;
  color: var(--es-text);
  border: none;
  width: 100%;
  text-align: left;
}

.es-accordion-header:hover {
  background: var(--es-bg);
}

.es-accordion-icon {
  font-size: 16px;
  color: var(--es-text-tertiary);
  transition: transform 200ms ease;
  flex-shrink: 0;
  line-height: 1;
}

.es-accordion-item.open .es-accordion-icon {
  transform: rotate(180deg);
}

.es-accordion-body {
  padding: 0 16px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 250ms ease, padding 250ms ease;
  font-size: 13px;
  color: var(--es-text-secondary);
  line-height: 1.6;
}

.es-accordion-item.open .es-accordion-body {
  padding: 0 16px 14px;
  max-height: 500px;
}


/* ============================================================
   23. BREADCRUMBS
   ============================================================ */

.es-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.es-breadcrumb-item {
  color: var(--es-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.es-breadcrumb-link {
  color: var(--es-text-secondary);
  text-decoration: none;
  transition: color var(--es-transition);
}

.es-breadcrumb-link:hover {
  color: var(--es-primary);
  text-decoration: none;
}

.es-breadcrumb-separator {
  color: var(--es-text-tertiary);
  font-size: 11px;
  line-height: 1;
}

.es-breadcrumb-item.active {
  color: var(--es-text);
  font-weight: 500;
}


/* ============================================================
   24. AVATARS
   ============================================================ */

.es-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  position: relative;
  background: var(--es-primary);
}

.es-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.es-avatar-xs {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.es-avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.es-avatar-md {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.es-avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

.es-avatar-xl {
  width: 64px;
  height: 64px;
  font-size: 24px;
}

.es-avatar-initials {
  background: var(--es-primary-light);
  color: var(--es-primary);
}

/* Avatar Status */
.es-avatar-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
}

.es-avatar-status.online {
  background: #22C55E;
}

.es-avatar-status.offline {
  background: var(--es-text-tertiary);
}

.es-avatar-status.busy {
  background: var(--es-danger);
}

.es-avatar-status.away {
  background: var(--es-warning);
}

/* Avatar Group */
.es-avatar-group {
  display: flex;
}

.es-avatar-group .es-avatar {
  margin-left: -8px;
  border: 2px solid #fff;
}

.es-avatar-group .es-avatar:first-child {
  margin-left: 0;
}

.es-avatar-group .es-avatar-count {
  background: var(--es-bg);
  color: var(--es-text-secondary);
  font-size: 11px;
  font-weight: 600;
}


/* ============================================================
   25. TOOLTIPS
   ============================================================ */

/* Tooltip overrides handled in Bootstrap Overrides section above.
   Additional custom tooltip styles: */

.es-tooltip {
  position: relative;
}

.es-tooltip-content {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--es-text);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--es-radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--es-transition);
  z-index: var(--es-z-dropdown);
}

.es-tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--es-text);
}

.es-tooltip:hover .es-tooltip-content {
  opacity: 1;
}


/* ============================================================
   26. PROGRESS BARS
   ============================================================ */

.es-progress {
  height: 6px;
  background: var(--es-border-light);
  border-radius: 3px;
  overflow: hidden;
}

.es-progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 300ms ease;
}

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

.es-progress-bar.success {
  background: var(--es-success);
}

.es-progress-bar.danger {
  background: var(--es-danger);
}

.es-progress-bar.warning {
  background: var(--es-warning);
}

.es-progress-bar.info {
  background: var(--es-info);
}

.es-progress-sm {
  height: 4px;
}

.es-progress-lg {
  height: 10px;
}

.es-progress-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--es-text-secondary);
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}


/* ============================================================
   27. SPINNERS & LOADING
   ============================================================ */

.es-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--es-border);
  border-top-color: var(--es-primary);
  border-radius: 50%;
  animation: es-spin 600ms linear infinite;
  display: inline-block;
}

.es-spinner-sm {
  width: 14px;
  height: 14px;
  border-width: 1.5px;
}

.es-spinner-lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

.es-spinner-white {
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
}

.es-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(1px);
}


/* ============================================================
   28. SKELETON
   ============================================================ */

.es-skeleton {
  background: linear-gradient(90deg, var(--es-border-light) 25%, #E8E9ED 50%, var(--es-border-light) 75%);
  background-size: 200% 100%;
  animation: es-shimmer 1.5s ease infinite;
  border-radius: var(--es-radius-sm);
}

.es-skeleton-text {
  height: 12px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.es-skeleton-text:last-child {
  width: 60%;
}

.es-skeleton-circle {
  border-radius: 50%;
}

.es-skeleton-rect {
  border-radius: var(--es-radius);
}

.es-skeleton-heading {
  height: 18px;
  margin-bottom: 12px;
  width: 40%;
}

.es-skeleton-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.es-skeleton-button {
  width: 80px;
  height: 36px;
  border-radius: var(--es-radius);
}


/* ============================================================
   29. EMPTY STATES
   ============================================================ */

.es-empty-state {
  text-align: center;
  padding: 48px 24px;
}

.es-empty-state-icon {
  font-size: 48px;
  color: var(--es-text-tertiary);
  margin-bottom: 16px;
  line-height: 1;
}

.es-empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--es-text);
  margin-bottom: 4px;
}

.es-empty-state-desc {
  font-size: 13px;
  color: var(--es-text-secondary);
  margin-bottom: 16px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}


/* ============================================================
   30. TOASTS
   ============================================================ */

.es-toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: var(--es-z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}

.es-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-lg);
  box-shadow: var(--es-shadow-lg);
  animation: es-slideInRight 250ms ease;
  position: relative;
  overflow: hidden;
}

.es-toast-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 1;
}

.es-toast-success .es-toast-icon {
  color: var(--es-success);
}

.es-toast-danger .es-toast-icon {
  color: var(--es-danger);
}

.es-toast-warning .es-toast-icon {
  color: var(--es-warning);
}

.es-toast-info .es-toast-icon {
  color: var(--es-info);
}

.es-toast-content {
  flex: 1;
  min-width: 0;
}

.es-toast-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--es-text);
}

.es-toast-message {
  font-size: 12px;
  color: var(--es-text-secondary);
  margin-top: 2px;
}

.es-toast-close {
  background: none;
  border: none;
  color: var(--es-text-tertiary);
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  transition: color var(--es-transition);
}

.es-toast-close:hover {
  color: var(--es-text);
}

.es-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  animation: es-toastProgress linear forwards;
}

.es-toast-success .es-toast-progress {
  background: var(--es-success);
}

.es-toast-danger .es-toast-progress {
  background: var(--es-danger);
}

.es-toast-warning .es-toast-progress {
  background: var(--es-warning);
}

.es-toast-info .es-toast-progress {
  background: var(--es-info);
}

.es-toast.hiding {
  animation: es-slideOutRight 200ms ease forwards;
}


/* ============================================================
   31. MODALS
   ============================================================ */

/* Bootstrap modal overrides handled in section 2.
   Additional Edusekart modal styles: */

.es-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--es-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.es-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--es-text);
  margin: 0;
}

.es-modal-close {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: var(--es-text-tertiary);
  cursor: pointer;
  border-radius: var(--es-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all var(--es-transition);
  padding: 0;
  flex-shrink: 0;
}

.es-modal-close:hover {
  background: var(--es-bg);
  color: var(--es-text);
}

.es-modal-body {
  padding: 20px;
}

.es-modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--es-border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Modal Sizes */
.es-modal-sm .modal-dialog {
  max-width: 380px;
}

.es-modal-lg .modal-dialog {
  max-width: 720px;
}

.es-modal-xl .modal-dialog {
  max-width: 960px;
}

.es-modal-fullscreen .modal-dialog {
  max-width: 100%;
  height: 100%;
  margin: 0;
}

.es-modal-fullscreen .modal-content {
  height: 100%;
  border-radius: 0;
}

/* Delete Confirmation */
.es-modal-confirm {
  text-align: center;
}

.es-modal-confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
}

.es-modal-confirm-icon.danger {
  background: var(--es-danger-light);
  color: var(--es-danger);
}

.es-modal-confirm-icon.warning {
  background: var(--es-warning-light);
  color: var(--es-warning);
}

.es-modal-confirm-icon.success {
  background: var(--es-success-light);
  color: var(--es-success);
}

.es-modal-confirm-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--es-text);
  margin-bottom: 4px;
}

.es-modal-confirm-desc {
  font-size: 13px;
  color: var(--es-text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.es-modal-confirm-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}


/* ============================================================
   32. CHARTS
   ============================================================ */

.es-chart-container {
  padding: 0;
  position: relative;
}

/* ApexCharts overrides */
.apexcharts-tooltip {
  border-radius: var(--es-radius) !important;
  border-color: var(--es-border) !important;
  box-shadow: var(--es-shadow-lg) !important;
  font-family: var(--es-font) !important;
  font-size: 12px !important;
}

.apexcharts-tooltip-title {
  background: #FAFBFD !important;
  border-bottom-color: var(--es-border) !important;
  font-family: var(--es-font) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.apexcharts-legend-text {
  font-family: var(--es-font) !important;
  font-size: 12px !important;
  color: var(--es-text-secondary) !important;
}

.apexcharts-xaxis-label,
.apexcharts-yaxis-label {
  font-family: var(--es-font) !important;
  font-size: 11px !important;
  fill: var(--es-text-tertiary) !important;
}

.apexcharts-gridline {
  stroke: var(--es-border-light) !important;
}

.apexcharts-xaxis-tick {
  stroke: var(--es-border-light) !important;
}

.apexcharts-menu {
  border: 1px solid var(--es-border) !important;
  border-radius: var(--es-radius) !important;
  box-shadow: var(--es-shadow-lg) !important;
}

.apexcharts-menu-item:hover {
  background: var(--es-bg) !important;
}


/* ============================================================
   33. SEARCH & COMMAND PALETTE
   ============================================================ */

/* Inline Search */
.es-search {
  position: relative;
}

.es-search .es-input {
  padding-left: 36px;
}

.es-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--es-text-tertiary);
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
}

.es-search-shortcut {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--es-text-tertiary);
  background: var(--es-bg);
  padding: 2px 6px;
  border-radius: var(--es-radius-sm);
  border: 1px solid var(--es-border);
  line-height: 1.3;
  pointer-events: none;
}

/* Command Palette */
.es-command-palette {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: var(--es-z-command);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  backdrop-filter: blur(2px);
}

.es-command-palette.show {
  display: flex;
}

.es-command-palette-inner {
  width: 560px;
  max-width: 90vw;
  background: #fff;
  border-radius: var(--es-radius-xl);
  box-shadow: var(--es-shadow-xl);
  overflow: hidden;
  animation: es-scaleIn 150ms ease;
}

.es-command-palette-input-wrapper {
  padding: 12px 16px;
  border-bottom: 1px solid var(--es-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.es-command-palette-input-wrapper i {
  color: var(--es-text-tertiary);
  font-size: 18px;
  flex-shrink: 0;
}

.es-command-palette-input {
  border: none;
  outline: none;
  font-size: 15px;
  width: 100%;
  font-family: var(--es-font);
  color: var(--es-text);
  background: transparent;
}

.es-command-palette-input::placeholder {
  color: var(--es-text-tertiary);
}

.es-command-palette-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}

.es-command-palette-group {
  padding: 4px 0;
}

.es-command-palette-group-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--es-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 4px 12px;
}

.es-command-palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--es-radius-sm);
  cursor: pointer;
  font-size: 13px;
  transition: background var(--es-transition);
  color: var(--es-text);
}

.es-command-palette-item:hover,
.es-command-palette-item.highlighted {
  background: var(--es-bg);
}

.es-command-palette-item-icon {
  width: 18px;
  text-align: center;
  color: var(--es-text-secondary);
  font-size: 16px;
  flex-shrink: 0;
}

.es-command-palette-item-shortcut {
  margin-left: auto;
  font-size: 11px;
  color: var(--es-text-tertiary);
}

.es-command-palette-empty {
  padding: 24px;
  text-align: center;
  color: var(--es-text-tertiary);
  font-size: 13px;
}

.es-command-palette-footer {
  padding: 8px 16px;
  border-top: 1px solid var(--es-border);
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: var(--es-text-tertiary);
}


/* ============================================================
   34. FILTERS
   ============================================================ */

.es-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.es-filter-group {
  display: flex;
  gap: 8px;
}

.es-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-family: var(--es-font);
  background: var(--es-bg);
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-full);
  color: var(--es-text);
  transition: all var(--es-transition);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.es-filter-chip:hover {
  border-color: #D1D5DB;
}

.es-filter-chip.active {
  background: var(--es-primary-light);
  border-color: var(--es-primary);
  color: var(--es-primary);
}

.es-filter-chip-remove {
  font-size: 14px;
  cursor: pointer;
  color: var(--es-text-tertiary);
  display: flex;
  margin-left: 2px;
  line-height: 1;
  transition: color var(--es-transition);
}

.es-filter-chip-remove:hover {
  color: var(--es-danger);
}

.es-filter-clear {
  font-size: 12px;
  color: var(--es-primary);
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--es-font);
  font-weight: 500;
  padding: 0;
  transition: all var(--es-transition);
}

.es-filter-clear:hover {
  text-decoration: underline;
}


/* ============================================================
   35. COMPONENT PAGE LAYOUT
   ============================================================ */

.es-component-page {
  display: flex;
  min-height: 100vh;
}

.es-component-sidebar {
  width: 240px;
  background: #fff;
  border-right: 1px solid var(--es-border);
  padding: 16px 0;
  position: fixed;
  top: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 10;
}

.es-component-sidebar-logo {
  padding: 12px 20px 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--es-primary);
  border-bottom: 1px solid var(--es-border);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.es-component-sidebar-section {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--es-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.es-component-sidebar-nav {
  list-style: none;
  padding: 0 8px;
  margin: 0;
}

.es-component-sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--es-text-secondary);
  text-decoration: none;
  border-radius: var(--es-radius-sm);
  transition: all var(--es-transition);
}

.es-component-sidebar-link:hover {
  background: var(--es-bg);
  color: var(--es-text);
  text-decoration: none;
}

.es-component-sidebar-link.active {
  background: var(--es-primary-light);
  color: var(--es-primary);
  font-weight: 500;
}

.es-component-sidebar-link i {
  font-size: 16px;
  width: 18px;
  text-align: center;
}

.es-component-content {
  flex: 1;
  margin-left: 240px;
  padding: 24px 32px;
  max-width: calc(100% - 240px);
}

.es-component-section {
  margin-bottom: 48px;
}

.es-component-section-title {
  font-size: var(--es-section-title);
  font-weight: 600;
  color: var(--es-text);
  margin-bottom: 4px;
}

.es-component-section-desc {
  font-size: 13px;
  color: var(--es-text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.es-component-demo {
  padding: 20px;
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-lg);
  background: #fff;
  margin-bottom: 16px;
}

.es-component-demo-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--es-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.es-component-demo-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}


/* ============================================================
   35.a MASTER LAYOUT
   ============================================================ */

.es-layout {
  display: flex;
  min-height: 100vh;
  background: var(--es-bg);
  overflow: hidden;
}

/* Sidebar Wrapper */
.es-sidebar-main {
  width: 240px;
  background: var(--es-surface);
  border-right: 1px solid var(--es-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width var(--es-transition);
  position: relative;
  z-index: 1020;
}

/* Collapsed Sidebar (Desktop) */
.es-sidebar-main.es-sidebar-collapsed {
  width: 64px;
}

.es-sidebar-header {
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--es-border-light);
  overflow: hidden;
  white-space: nowrap;
}

.es-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--es-primary);
  text-decoration: none;
}

.es-sidebar-logo i {
  font-size: 20px;
  flex-shrink: 0;
}

.es-sidebar-logo-text {
  transition: opacity var(--es-transition);
  font-weight: 700;
}

.es-sidebar-collapsed .es-sidebar-logo-text {
  opacity: 0;
  pointer-events: none;
  width: 0;
}

/* Sidebar Panel Selector */
.es-sidebar-panel-select {
  padding: 12px 16px;
  border-bottom: 1px solid var(--es-border-light);
}

.es-sidebar-collapsed .es-sidebar-panel-select {
  display: none;
}

/* Sidebar Body (Scrollable) */
.es-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 8px;
}

.es-sidebar-body::-webkit-scrollbar {
  width: 4px;
}

.es-sidebar-body::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
}

.es-sidebar-body:hover::-webkit-scrollbar-thumb {
  background: var(--es-border);
}

/* Sidebar Groups */
.es-sidebar-group {
  margin-bottom: 20px;
}

.es-sidebar-group-title {
  padding: 0 12px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--es-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: opacity var(--es-transition);
}

.es-sidebar-collapsed .es-sidebar-group-title {
  opacity: 0;
  padding: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
}

/* Sidebar Nav & Links */
.es-sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.es-sidebar-link {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--es-text-secondary);
  text-decoration: none;
  border-radius: var(--es-radius);
  transition: all var(--es-transition);
  cursor: pointer;
  white-space: nowrap;
}

.es-sidebar-link:hover {
  background: var(--es-bg);
  color: var(--es-text);
  text-decoration: none;
}

.es-sidebar-link.active {
  background: var(--es-primary-light);
  color: var(--es-primary);
  font-weight: 500;
}

.es-sidebar-link i {
  font-size: 18px;
  margin-right: 10px;
  flex-shrink: 0;
  text-align: center;
  width: 20px;
}

.es-sidebar-collapsed .es-sidebar-link i {
  margin-right: 0;
}

.es-sidebar-link-text {
  transition: opacity var(--es-transition);
}

.es-sidebar-collapsed .es-sidebar-link-text {
  opacity: 0;
  pointer-events: none;
  width: 0;
}

/* Submenu Chevron & Badge */
.es-sidebar-link-chevron {
  margin-left: auto;
  font-size: 14px !important;
  width: auto !important;
  margin-right: 0 !important;
  transition: transform var(--es-transition);
}

.es-sidebar-link.collapsed .es-sidebar-link-chevron {
  transform: rotate(0deg);
}

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

.es-sidebar-collapsed .es-sidebar-link-chevron {
  display: none;
}

.es-sidebar-link-badge {
  margin-left: auto;
}

.es-sidebar-collapsed .es-sidebar-link-badge {
  display: none;
}

/* Nested Submenus */
.es-sidebar-submenu {
  list-style: none;
  padding: 4px 0 4px 32px;
  margin: 0;
  display: none;
  flex-direction: column;
  gap: 2px;
}

.es-sidebar-submenu.open {
  display: flex !important;
}

.es-sidebar-collapsed .es-sidebar-submenu {
  display: none !important;
}

.es-sidebar-sublink {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--es-text-secondary);
  text-decoration: none;
  border-radius: var(--es-radius);
  transition: all var(--es-transition);
}

.es-sidebar-sublink:hover {
  color: var(--es-text);
  background: var(--es-bg);
  text-decoration: none;
}

.es-sidebar-sublink.active {
  color: var(--es-primary);
  font-weight: 600;
  background: transparent;
}

/* Sidebar Footer */
.es-sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--es-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  white-space: nowrap;
}

.es-sidebar-collapsed .es-sidebar-footer {
  justify-content: center;
  padding: 12px 8px;
}

.es-sidebar-footer-toggle {
  width: 28px;
  height: 28px;
  border-radius: var(--es-radius-sm);
  border: 1px solid var(--es-border);
  background: var(--es-surface);
  color: var(--es-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--es-transition);
}

.es-sidebar-footer-toggle:hover {
  background: var(--es-bg);
  color: var(--es-text);
}

.es-sidebar-collapsed .es-sidebar-footer-toggle i {
  transform: rotate(180deg);
}

.es-sidebar-collapsed .es-sidebar-footer-profile {
  display: none;
}

/* Content Container Wrapper */
.es-content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

/* Sticky Topbar */
.es-topbar {
  height: 56px;
  background: var(--es-surface);
  border-bottom: 1px solid var(--es-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1010;
}

.es-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.es-sidebar-toggle-btn {
  display: none;
  background: none;
  border: none;
  color: var(--es-text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.es-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Content Body */
.es-content-body {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
}

/* Page Header Block */
.es-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.es-page-header-info {
  flex: 1;
  min-width: 0;
}

.es-page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Notifications Dropdown Panel styling */
.es-notifications-menu {
  width: 320px;
  max-height: 400px;
}

.es-notifications-menu.show {
  display: flex !important;
  flex-direction: column;
}

.es-notifications-list {
  overflow-y: auto;
  flex: 1;
}

.es-notification-item {
  display: flex;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--es-border-light);
  text-decoration: none;
  color: var(--es-text);
  transition: background var(--es-transition);
}

.es-notification-item:hover {
  background: var(--es-bg);
  color: var(--es-text);
}

.es-notification-item.unread {
  background: rgba(117, 0, 158, 0.02);
}

.es-notification-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.es-notification-content {
  flex: 1;
  min-width: 0;
}

/* User Dropdown Header styling */
.es-user-dropdown-header {
  padding: 10px 16px;
  border-bottom: 1px solid var(--es-border-light);
}

/* Backdrop Overlay for mobile */
.es-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(1px);
  z-index: 1015;
  display: none;
}


/* ============================================================
   36. ANIMATIONS (@keyframes)
   ============================================================ */

@keyframes es-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes es-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes es-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes es-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes es-slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes es-slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes es-scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes es-toastProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

@keyframes es-checkmark {
  0% {
    stroke-dashoffset: 50;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes es-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}


/* ============================================================
   37. UTILITIES
   ============================================================ */

.es-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.es-divider {
  border: none;
  border-top: 1px solid var(--es-border);
  margin: 16px 0;
}

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

/* Flex Utilities */
.es-flex {
  display: flex;
}

.es-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.es-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.es-flex-wrap {
  flex-wrap: wrap;
}

.es-gap-1 { gap: var(--es-space-1); }
.es-gap-2 { gap: var(--es-space-2); }
.es-gap-3 { gap: var(--es-space-3); }
.es-gap-4 { gap: var(--es-space-4); }
.es-gap-6 { gap: var(--es-space-6); }

/* Text Utilities */
.es-text-primary { color: var(--es-primary); }
.es-text-success { color: var(--es-success); }
.es-text-danger { color: var(--es-danger); }
.es-text-warning { color: var(--es-warning); }
.es-text-info { color: var(--es-info); }

/* Background Utilities */
.es-bg-primary-light { background: var(--es-primary-light); }
.es-bg-success-light { background: var(--es-success-light); }
.es-bg-danger-light { background: var(--es-danger-light); }
.es-bg-warning-light { background: var(--es-warning-light); }
.es-bg-info-light { background: var(--es-info-light); }

/* Spacing Utilities */
.es-mt-0 { margin-top: 0; }
.es-mt-1 { margin-top: var(--es-space-1); }
.es-mt-2 { margin-top: var(--es-space-2); }
.es-mt-3 { margin-top: var(--es-space-3); }
.es-mt-4 { margin-top: var(--es-space-4); }
.es-mt-6 { margin-top: var(--es-space-6); }
.es-mt-8 { margin-top: var(--es-space-8); }

.es-mb-0 { margin-bottom: 0; }
.es-mb-1 { margin-bottom: var(--es-space-1); }
.es-mb-2 { margin-bottom: var(--es-space-2); }
.es-mb-3 { margin-bottom: var(--es-space-3); }
.es-mb-4 { margin-bottom: var(--es-space-4); }
.es-mb-6 { margin-bottom: var(--es-space-6); }
.es-mb-8 { margin-bottom: var(--es-space-8); }

.es-p-0 { padding: 0; }
.es-p-2 { padding: var(--es-space-2); }
.es-p-3 { padding: var(--es-space-3); }
.es-p-4 { padding: var(--es-space-4); }
.es-p-6 { padding: var(--es-space-6); }

/* Border */
.es-border { border: 1px solid var(--es-border); }
.es-border-bottom { border-bottom: 1px solid var(--es-border); }
.es-border-top { border-top: 1px solid var(--es-border); }

/* Rounded */
.es-rounded { border-radius: var(--es-radius); }
.es-rounded-lg { border-radius: var(--es-radius-lg); }
.es-rounded-xl { border-radius: var(--es-radius-xl); }
.es-rounded-full { border-radius: var(--es-radius-full); }

/* Width */
.es-w-full { width: 100%; }

/* Cursor */
.es-pointer { cursor: pointer; }

/* Opacity */
.es-opacity-50 { opacity: 0.5; }
.es-opacity-75 { opacity: 0.75; }

/* Overflow */
.es-overflow-hidden { overflow: hidden; }
.es-overflow-auto { overflow: auto; }

/* Position */
.es-relative { position: relative; }


/* ============================================================
   38. RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  /* Component Page Layout */
  .es-component-sidebar {
    display: none;
  }

  .es-component-content {
    margin-left: 0;
    padding: 16px;
    max-width: 100%;
  }

  /* Master Layout Mobile Rules */
  .es-sidebar-toggle-btn {
    display: block;
  }

  .es-sidebar-main {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -240px;
    height: 100vh;
    box-shadow: var(--es-shadow-xl);
    transition: left var(--es-transition);
  }

  .es-sidebar-main.es-mobile-open {
    left: 0;
  }

  .es-content-body {
    padding: 20px 16px;
  }

  .es-topbar {
    padding: 0 16px;
  }


  /* Stepper */
  .es-stepper {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .es-step {
    flex: none;
    width: 100%;
  }

  .es-step-line {
    display: none;
  }

  /* Tables */
  .es-table-wrapper {
    margin: 0 -16px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .es-table-header {
    padding: 10px 12px;
  }

  .es-table thead th,
  .es-table tbody td {
    padding: 8px 10px;
  }

  /* Command Palette */
  .es-command-palette-inner {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    border-top-left-radius: var(--es-radius-xl);
    border-top-right-radius: var(--es-radius-xl);
  }

  /* Stat Cards */
  .es-stat-card {
    padding: 16px;
  }

  .es-stat-card .es-stat-value {
    font-size: 20px;
  }

  /* OTP */
  .es-otp-group {
    gap: 4px;
  }

  .es-otp-input {
    width: 38px;
    height: 42px;
    font-size: 16px;
  }

  /* Toasts */
  .es-toast-container {
    left: 16px;
    right: 16px;
    max-width: none;
  }

  /* Cards */
  .es-card-header {
    padding: 12px 16px;
  }

  .es-card-body {
    padding: 16px;
  }

  /* Modals */
  .es-modal-footer {
    flex-direction: column;
  }

  .es-modal-footer .es-btn {
    width: 100%;
  }

  /* Page Title */
  .es-page-title {
    font-size: 18px;
  }

  .es-section-title,
  .es-component-section-title {
    font-size: 16px;
  }

  /* Filter Bar */
  .es-filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  /* Upload Zone */
  .es-upload-zone {
    padding: 24px 16px;
  }

  /* Timeline */
  .es-timeline {
    padding-left: 20px;
  }

  .es-timeline-item {
    padding-left: 16px;
  }

  /* Tab List */
  .es-tab-list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .es-tab-item {
    padding: 8px 12px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  /* Component demos */
  .es-component-demo {
    padding: 12px;
  }

  .es-component-demo-row {
    gap: 8px;
  }

  /* Modals */
  .modal-dialog {
    margin: 8px;
  }

  .es-modal-header {
    padding: 12px 16px;
  }

  .es-modal-body {
    padding: 16px;
  }

  .es-modal-footer {
    padding: 12px 16px;
  }

  /* Buttons */
  .es-btn {
    font-size: 12px;
    height: 34px;
    padding: 6px 12px;
  }

  .es-btn-lg {
    height: 38px;
    padding: 8px 16px;
    font-size: 13px;
  }

  /* Pagination */
  .es-page-link {
    min-width: 28px;
    height: 28px;
    font-size: 12px;
  }

  /* Avatars */
  .es-avatar-group .es-avatar {
    margin-left: -6px;
  }

  /* Section Spacing */
  .es-component-section {
    margin-bottom: 32px;
  }

  /* Date Picker */
  .es-datepicker-calendar {
    min-width: 260px;
  }

  .es-datepicker-day {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  /* Upload preview grid */
  .es-upload-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
}

/* ============================================================
   UPGRADED DESIGN SYSTEM ADDITIONS
   ============================================================ */

:root {
  /* Premium Spring Transition */
  --es-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --es-ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Upgraded Soft Layered Shadows */
  --es-shadow-elevated: 
    0 1px 1px rgba(0,0,0,0.02), 
    0 2px 4px rgba(0,0,0,0.02), 
    0 4px 8px rgba(0,0,0,0.02), 
    0 8px 16px rgba(0,0,0,0.03);
}

/* 1. Glassmorphism Topbar */
.es-topbar {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(229, 231, 235, 0.5) !important;
  position: sticky;
  top: 0;
  z-index: var(--es-z-sticky);
}

/* 2. Card Hover Effects & Depth */
.es-card {
  border: 1px solid var(--es-border-light) !important;
  box-shadow: var(--es-shadow-sm) !important;
  transition: transform var(--es-transition-slow) var(--es-ease-out-expo), 
              box-shadow var(--es-transition-slow) var(--es-ease-out-expo) !important;
}

.es-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--es-shadow-elevated) !important;
  border-color: rgba(117, 0, 158, 0.15) !important; /* Subtle brand color border on hover */
}

/* 3. Button Click Scale-Down */
.es-btn, .btn {
  transition: transform 100ms var(--es-ease-out-expo), 
              background-color var(--es-transition), 
              box-shadow var(--es-transition) !important;
}
.es-btn:active, .btn:active {
  transform: scale(0.97);
}

/* 4. Active Sidebar Link Easing & Accent */
.es-sidebar-link {
  position: relative;
  transition: all var(--es-transition-slow) var(--es-ease-out-expo) !important;
}

.es-sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 3px;
  background: var(--es-primary);
  border-radius: 0 4px 4px 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--es-transition-slow) var(--es-ease-spring);
}

.es-sidebar-link.active::before {
  transform: scaleX(1);
}

.es-sidebar-link:hover {
  background: rgba(117, 0, 158, 0.05) !important;
  color: var(--es-primary) !important;
  padding-left: 20px !important; /* Subtle slide-in effect */
}

/* 5. Smooth Page Fade-In */
.es-content-body {
  animation: es-page-enter 400ms var(--es-ease-out-expo);
}

@keyframes es-page-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 6. Livewire Loading Skeleton Animation */
.es-skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: es-skeleton-loading 1.5s infinite;
  border-radius: var(--es-radius);
}

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

/* File Upload Card */
.es-upload-card { border:2px dashed var(--es-border, #cbd5e1); border-radius:var(--es-radius, 8px); background:var(--es-bg-card, #f8fafc); padding:16px; text-align:center; cursor:pointer; display:block; transition:all 0.15s; position:relative; }
.es-upload-card:hover { border-color:var(--es-primary, #6366f1); background:var(--es-primary-light, rgba(99, 102, 241, 0.05)); }
.es-upload-card.dragover { border-color:var(--es-primary, #6366f1) !important; background:var(--es-primary-light, rgba(99, 102, 241, 0.1)) !important; }
.es-upload-card.has-file, .es-upload-card.uploaded, .es-upload-zone.uploaded { border-style:solid !important; border-color:#059669 !important; background:#ECFDF5 !important; }
.es-upload-card.has-file:hover, .es-upload-card.uploaded:hover, .es-upload-zone.uploaded:hover { border-color:#047857 !important; background:#D1FAE5 !important; }
.es-upload-card img { max-height:120px; max-width:100%; object-fit:contain; border-radius:4px; margin-bottom:8px; }
.es-upload-card .upload-icon { font-size:32px; color:var(--es-text-tertiary); }
.es-upload-card .upload-label { font-size:13px; color:var(--es-text-tertiary); margin-top:4px; }
.es-upload-card .file-name { font-size:11px; color:var(--es-text-secondary); margin-top:4px; word-break:break-all; }
