/* CAFCI Cloud v2 - Estilos personalizados */

:root {
  --color-primary: #0d6efd;
  --color-primary-dark: #0a58ca;
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 80px;
  --navbar-height: 64px;
  --transition-speed: 0.3s;
}

/* Font global */
body {
  font-family: 'Outfit', sans-serif;
}

/* ============================================
   LOGIN - Trama geométrica (no se puede con Tailwind)
   ============================================ */

.login-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.login-left-panel {
  flex: 0 0 70%;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}

/* Geometric pattern (trama) */
.login-left-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.05;
  background-image:
    linear-gradient(30deg, #0d6efd 12%, transparent 12.5%, transparent 87%, #0d6efd 87.5%, #0d6efd),
    linear-gradient(150deg, #0d6efd 12%, transparent 12.5%, transparent 87%, #0d6efd 87.5%, #0d6efd),
    linear-gradient(30deg, #0d6efd 12%, transparent 12.5%, transparent 87%, #0d6efd 87.5%, #0d6efd),
    linear-gradient(150deg, #0d6efd 12%, transparent 12.5%, transparent 87%, #0d6efd 87.5%, #0d6efd),
    linear-gradient(60deg, #0a58ca 25%, transparent 25.5%, transparent 75%, #0a58ca 75%, #0a58ca),
    linear-gradient(60deg, #0a58ca 25%, transparent 25.5%, transparent 75%, #0a58ca 75%, #0a58ca);
  background-size: 80px 140px;
  background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
}

.login-left-panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 50%, rgba(13, 110, 253, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(10, 88, 202, 0.1) 0%, transparent 50%);
}

.login-branding {
  position: relative;
  z-index: 2;
  text-align: center;
}

.login-logo {
  max-width: 500px;
}

.login-right-panel {
  flex: 0 0 30%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  background: #ffffff;
}

.login-form-container {
  width: 100%;
  max-width: 480px;
}

@media (max-width: 992px) {
  .login-wrapper {
    flex-direction: column;
  }
  .login-left-panel {
    flex: 0 0 auto;
    min-height: 30vh;
    padding: 40px 20px;
  }
  .login-right-panel {
    flex: 1;
    padding: 40px 20px;
  }
  .login-logo {
    max-width: 250px;
  }
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.main-wrapper {
  display: flex;
  min-height: 100vh;
  background: #f1f5f9;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: margin-left var(--transition-speed) ease;
}

.main-wrapper.sidebar-collapsed .main-content {
  margin-left: var(--sidebar-collapsed-width);
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: width var(--transition-speed) ease;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}

.sidebar-logo {
  max-width: 160px;
  height: auto;
  transition: all var(--transition-speed) ease;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-section {
  padding: 0 20px;
  margin-bottom: 10px;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  margin: 2px 0;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border-left-color: rgba(59, 130, 246, 0.5);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.2) 0%, transparent 100%);
  border-left-color: #3b82f6;
}

.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-text {
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--transition-speed) ease;
}

/* Nav Submenu */
.nav-submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 24px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  margin: 2px 0;
  cursor: pointer;
  background: none;
  border-right: none;
  border-top: none;
  border-bottom: none;
}

.nav-submenu-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border-left-color: rgba(59, 130, 246, 0.5);
}

.nav-submenu-toggle.active {
  color: #fff;
  border-left-color: #3b82f6;
}

.nav-submenu-toggle .nav-submenu-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-submenu-arrow {
  font-size: 10px;
  transition: transform 0.2s ease;
  color: rgba(255, 255, 255, 0.4);
}

.nav-submenu-arrow.rotate-90 {
  transform: rotate(90deg);
}

.nav-subitem {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 24px 10px 58px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.nav-subitem:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-subitem.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, transparent 100%);
  border-left-color: #3b82f6;
}

/* Collapsed sidebar: hide submenu text and items */
.main-wrapper.sidebar-collapsed .nav-submenu-arrow,
.main-wrapper.sidebar-collapsed .nav-submenu-toggle .nav-text {
  opacity: 0;
  width: 0;
}

.main-wrapper.sidebar-collapsed .nav-submenu-toggle {
  justify-content: center;
  padding: 14px;
}

.main-wrapper.sidebar-collapsed .nav-subitems {
  display: none;
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 0;
}

/* Sidebar Collapsed State */
.main-wrapper.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
}

.main-wrapper.sidebar-collapsed .sidebar-logo {
  max-width: 40px;
}

.main-wrapper.sidebar-collapsed .nav-section-title,
.main-wrapper.sidebar-collapsed .nav-text {
  opacity: 0;
  width: 0;
}

.main-wrapper.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 14px;
}

.main-wrapper.sidebar-collapsed .sidebar-footer .nav-text {
  display: none;
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
}

.sidebar-overlay.show {
  display: block;
  opacity: 1;
}

/* Mobile Sidebar */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0 !important;
  }

  .main-wrapper.sidebar-collapsed .sidebar {
    width: var(--sidebar-width);
  }

  .main-wrapper.sidebar-collapsed .sidebar-logo {
    max-width: 160px;
  }

  .main-wrapper.sidebar-collapsed .nav-section-title,
  .main-wrapper.sidebar-collapsed .nav-text {
    opacity: 1;
    width: auto;
  }

  .main-wrapper.sidebar-collapsed .nav-item {
    justify-content: flex-start;
    padding: 14px 24px;
  }
}

/* ============================================
   TOP NAVBAR
   ============================================ */

.top-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: var(--navbar-height);
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.sidebar-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
}

.sidebar-toggle:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.navbar-icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
}

.navbar-icon-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-menu-btn:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.user-avatar-lg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

/* Avatar colors by user type */
.user-avatar.avatar-owner,
.user-avatar-lg.avatar-owner {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
}

.user-avatar.avatar-cafci,
.user-avatar-lg.avatar-cafci {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.user-avatar.avatar-asociada,
.user-avatar-lg.avatar-asociada {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.user-avatar.avatar-no_asociada,
.user-avatar-lg.avatar-no_asociada {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.user-avatar.avatar-cnv,
.user-avatar-lg.avatar-cnv {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 280px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  z-index: 1000;
}

.dropdown-header {
  padding: 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.dropdown-body {
  padding: 8px;
}

.dropdown-footer {
  padding: 8px;
  border-top: 1px solid #e2e8f0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #475569;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s ease;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.dropdown-item:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.dropdown-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
}

.user-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.badge-purple {
  background: #f3e8ff;
  color: #7c3aed;
}

.badge-blue {
  background: #dbeafe;
  color: #2563eb;
}

.badge-green {
  background: #dcfce7;
  color: #16a34a;
}

.badge-amber {
  background: #fef3c7;
  color: #d97706;
}

.badge-slate {
  background: #f1f5f9;
  color: #475569;
}

/* ============================================
   PAGE HEADER
   ============================================ */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-title i {
  color: #3b82f6;
}

/* ============================================
   CARDS & PANELS
   ============================================ */

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.card.card--overflow-visible {
  overflow: visible;
}

.card.card--overflow-visible > *:first-child {
  border-radius: 16px 16px 0 0;
}

.card.card--overflow-visible tbody tr:last-child td:first-child {
  border-bottom-left-radius: 16px;
}

.card.card--overflow-visible tbody tr:last-child td:last-child {
  border-bottom-right-radius: 16px;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f1f5f9;
  background: #fafafa;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title i {
  color: #64748b;
}

.card-body {
  padding: 24px;
}

/* ============================================
   DATA TABLE
   ============================================ */

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: #f8fafc;
}

.data-table th {
  padding: 14px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e2e8f0;
}

.data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

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

/* Table Cell Variants */
.cell-primary {
  font-weight: 500;
  color: #1e293b;
}

.cell-secondary {
  font-size: 13px;
  color: #64748b;
}

.cell-muted {
  color: #94a3b8;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success {
  background: #dcfce7;
  color: #16a34a;
}

.badge-danger {
  background: #fee2e2;
  color: #dc2626;
}

.badge-warning {
  background: #fef3c7;
  color: #d97706;
}

.badge-info {
  background: #dbeafe;
  color: #2563eb;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

/* Action buttons container */
.action-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

/* Fix for button_to forms */
.action-buttons form {
  display: flex;
  margin: 0;
  padding: 0;
}

.btn-icon,
a.btn-icon,
button.btn-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  margin: 0;
  border-radius: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  text-decoration: none;
  box-sizing: border-box;
}

.btn-icon:hover {
  background: #f1f5f9;
}

.btn-icon:disabled,
.btn-icon[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-icon.text-blue-600:hover {
  background: #dbeafe;
}

.btn-icon.text-amber-600:hover {
  background: #fef3c7;
}

.btn-icon.text-red-600:hover {
  background: #fee2e2;
}

.btn-icon.text-green-600:hover {
  background: #dcfce7;
}

.btn-icon.text-indigo-600:hover {
  background: #e0e7ff;
}

/* ============================================
   STAT CARDS
   ============================================ */

.stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-icon.indigo {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  color: #4f46e5;
}

.stat-icon.green {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #059669;
}

.stat-icon.amber {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #d97706;
}

.stat-icon.blue {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563eb;
}

.stat-label {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  color: #1e293b;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.form-label i {
  color: #94a3b8;
  margin-right: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: #fff;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
  color: #94a3b8;
}

.form-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center;
  background-size: 20px;
  appearance: none;
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Form Error States */
.form-input.field-error,
.form-select.field-error {
  border-color: #dc2626;
  background-color: #fef2f2;
}

.form-input.field-error:focus,
.form-select.field-error:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.field-error-message {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  color: #dc2626;
}

.field-error-message i {
  font-size: 12px;
}

/* Form group with error */
.form-group.has-error .form-label {
  color: #dc2626;
}

.form-group.has-error .form-label i {
  color: #dc2626;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.quick-action-btn:hover {
  transform: translateY(-2px);
}

.quick-action-btn.primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.quick-action-btn.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-muted {
  color: #64748b;
}

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

/* ============================================
   PAGINATION
   ============================================ */

.pagination-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  gap: 16px;
  flex-wrap: wrap;
}

.pagination-limit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
}

.pagination-select {
  padding: 6px 28px 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #1e293b;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 6px center;
  background-size: 16px;
  appearance: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pagination-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.pagination-info {
  font-size: 13px;
  color: #64748b;
}

.pagination-info strong {
  color: #1e293b;
  font-weight: 600;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  background: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pagination-btn:hover:not(.disabled):not(.active) {
  border-color: #3b82f6;
  color: #3b82f6;
  background: #eff6ff;
}

.pagination-btn.active {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.pagination-btn.disabled {
  color: #cbd5e1;
  background: #f8fafc;
  border-color: #e2e8f0;
  cursor: not-allowed;
}

.pagination-gap {
  padding: 0 8px;
  color: #94a3b8;
  font-size: 13px;
}

@media (max-width: 768px) {
  .pagination-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .pagination-limit,
  .pagination-info,
  .pagination-nav {
    justify-content: center;
  }
}

/* ============================================
   FILTERS BAR
   ============================================ */

.filters-bar {
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filters-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-search {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.filter-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
}

.filter-input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: #f8fafc;
}

.filter-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-input::placeholder {
  color: #94a3b8;
}

.filter-group {
  flex-shrink: 0;
}

.filter-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 6px;
  letter-spacing: 0.025em;
}

.filter-select {
  padding: 10px 36px 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  color: #475569;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center;
  background-size: 18px;
  appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 160px;
}

.filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-clear-filters {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fee2e2;
  color: #dc2626;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-clear-filters:hover {
  background: #fecaca;
}

@media (max-width: 768px) {
  .filters-form {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-search {
    min-width: 100%;
  }

  .filter-group {
    width: 100%;
  }

  .filter-select {
    width: 100%;
  }
}

/* ============================================
   SORTABLE TABLE HEADERS
   ============================================ */

.sortable-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.sortable-header:hover {
  color: #3b82f6;
}

.sortable-header.active {
  color: #3b82f6;
}

.sortable-header i {
  font-size: 10px;
  opacity: 0.5;
}

.sortable-header:hover i,
.sortable-header.active i {
  opacity: 1;
}

/* Fix for sortable headers inside table cells */
th.sortable-header {
  display: table-cell;
}

th.sortable-header i {
  margin-left: 4px;
}

/* ============================================
   TABULAR NUMBERS (MONOSPACE)
   ============================================ */

.tabular-nums {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
}
