* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Maneki Brand Colors */
  --primary-color: #2c0c6b;
  --primary-hover: #413581;
  --primary-light: #918dd7;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
  --text-primary: #2c0c6b;
  --text-secondary: #413581;
  --text-muted: #918dd7;
  --border-color: #dbd8ed;
  --bg-light: #e5e7f0;
  --bg-secondary: #dbd8ed;
  --bg-white: #ffffff;
  --sidebar-bg: #413581;
  --sidebar-text: #dbd8ed;
  --sidebar-text-hover: #ffffff;
  --sidebar-active-bg: rgba(145, 141, 215, 0.25);
  --shadow: 0 1px 3px 0 rgba(44, 12, 107, 0.1), 0 1px 2px 0 rgba(44, 12, 107, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(44, 12, 107, 0.1), 0 2px 4px -1px rgba(44, 12, 107, 0.06);
  --sidebar-width: 240px;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-optical-sizing: auto;
  background-color: var(--bg-light);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Apply Inter to all elements */
* {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Ensure Inter is used in inputs, buttons, and form elements */
input,
textarea,
select,
button {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-optical-sizing: auto;
}

/* ========================================
   SIDEBAR NAVIGATION (Stripe-like)
   ======================================== */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--sidebar-text-hover);
  font-weight: 600;
  font-size: 1.25rem;
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-text {
  letter-spacing: -0.02em;
}

.sidebar-menu {
  flex: 1;
  padding: 1rem 0.5rem;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  margin-bottom: 0.25rem;
  border-radius: 0.375rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--sidebar-text-hover);
}

.menu-item.active {
  background-color: var(--sidebar-active-bg);
  color: var(--primary-color);
}

.menu-item.active .menu-icon {
  stroke: var(--primary-color);
}

.menu-icon {
  flex-shrink: 0;
  stroke: currentColor;
}

.menu-text {
  flex: 1;
}

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

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  color: inherit;
}

.user-info:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sidebar-text-hover);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 0.75rem;
  color: var(--sidebar-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: var(--sidebar-text);
}

.user-info.active .user-menu-chevron {
  transform: rotate(180deg);
}

/* User Menu Dropdown */
.user-menu-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 8px;
  right: 8px;
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 1000;
  overflow: hidden;
}

.user-menu-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu-header {
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-light);
}

.user-menu-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.user-menu-info {
  flex: 1;
  min-width: 0;
}

.user-menu-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.user-menu-email {
  font-size: 0.875rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-divider {
  height: 1px;
  background: var(--border-color);
}

.user-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.user-menu-item:hover {
  background: var(--bg-light);
}

.user-menu-item.logout-item {
  color: var(--danger-color);
}

.user-menu-item.logout-item:hover {
  background: #fff5f5;
}

.user-menu-item svg {
  flex-shrink: 0;
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 1rem 1.5rem;
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  box-sizing: border-box;
}

/* Section Management */
.content-section {
  display: none !important;
  width: 100%;
  max-width: 100%;
}

.content-section.active {
  display: block !important;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-header {
  margin-bottom: 2.5rem;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.container {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

header {
  text-align: left;
  margin-bottom: 2rem;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* Upload Section */
.upload-section {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow);
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 3rem 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

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

.drop-zone.drag-over {
  border-color: var(--primary-color);
  background-color: #e5e7f0;
  border-style: solid;
}

.drop-zone-content svg {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.drop-zone-text {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.drop-zone-subtext {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.drop-zone-info {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  text-align: center;
}

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

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

.btn-secondary {
  background-color: var(--text-secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--text-primary);
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background-color: var(--danger-hover);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

/* Progress Bar */
.upload-progress {
  margin-top: 2rem;
}

.progress-bar {
  height: 8px;
  background-color: var(--bg-light);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Messages */
.message {
  padding: 1rem;
  border-radius: 6px;
  margin-top: 1rem;
}

.alert {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.alert-error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Files Section */
.files-section {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow);
}

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.no-files-message {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-secondary);
  padding: 3rem;
  font-size: 1rem;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.file-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.file-icon {
  font-size: 2rem;
}

.file-details {
  flex: 1;
}

.file-name {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  word-break: break-all;
}

.file-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.file-actions {
  display: flex;
  gap: 0.5rem;
}

.no-files {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem;
}

/* Status Badges */
.file-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-pending {
  background-color: #fef3c7;
  color: #92400e;
}

.status-processing {
  background-color: #dbeafe;
  color: #1e40af;
}

.status-completed {
  background-color: #d1fae5;
  color: #065f46;
}

.status-failed {
  background-color: #fee2e2;
  color: #991b1b;
}

.confidence-score {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.error-message {
  font-size: 0.75rem;
  color: var(--danger-color);
  font-style: italic;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--bg-white);
  border-radius: 12px;
  max-width: 90%;
  max-height: 90%;
  overflow: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  margin: 0;
}

.close-modal {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.close-modal:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 2rem;
}

/* Transactions Table */
.transactions-table {
  width: 100%;
  overflow-x: auto;
}

.transactions-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 900px;
}

.transactions-table thead {
  background-color: var(--bg-light);
}

.transactions-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
  user-select: none;
}

.transactions-table th[onclick]:hover {
  background-color: #f3f4f6;
}

.sort-icon {
  margin-left: 0.5rem;
  font-size: 0.875rem;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.transactions-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.transactions-table tbody tr:hover {
  background-color: var(--bg-light);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

/* Row with active dropdown - higher z-index to show dropdown above other rows */
.transactions-table tbody tr {
  position: relative;
}

.transactions-table tbody tr.dropdown-active {
  z-index: 100;
}

/* Table inline loading, empty, and error states */
.table-loading,
.table-empty,
.table-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1rem;
  color: var(--text-muted);
}

.table-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.table-loading span,
.table-error span {
  font-size: 0.9rem;
}

.table-empty svg {
  color: var(--text-muted);
  opacity: 0.5;
}

.table-empty p {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.table-empty span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.table-error {
  color: var(--danger-color);
}

.transactions-loading-row td,
.transactions-empty-row td,
.transactions-error-row td {
  border-bottom: none;
}

.transactions-loading-row:hover,
.transactions-empty-row:hover,
.transactions-error-row:hover {
  background-color: transparent !important;
  cursor: default;
}

/* Apply full width to all sections */
#section-inicio,
#section-archivos,
#section-calendario,
#section-configuracion {
  width: 100%;
  max-width: 100%;
}

/* Stats grid full width */
.stats-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Files section full width */
.files-section,
.upload-section,
.recent-activity {
  width: 100%;
  max-width: 100%;
}

.negative-amount {
  color: var(--danger-color);
  font-weight: 500;
}

.positive-amount {
  color: var(--success-color);
  font-weight: 500;
}

.transaction-type {
  text-transform: capitalize;
}

.no-transactions {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem;
}

/* Transactions Section */
.transactions-section {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.transactions-container {
  background: var(--bg-primary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  min-height: 300px;
}

.transactions-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 4rem 2rem;
  gap: 1rem;
  color: var(--text-muted);
}

.transactions-loading .spinner {
  display: block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

.transactions-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

.transactions-empty svg {
  margin-bottom: 1rem;
  opacity: 0.5;
}

.transactions-empty p {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.transactions-empty span {
  font-size: 0.875rem;
}

.table-container {
  overflow-x: auto;
  margin-top: 1rem;
}

.file-cell {
  font-size: 0.875rem;
}

.file-cell div {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.bank-name {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-style: italic;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  .file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .file-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .modal-content {
    max-width: 95%;
    max-height: 95%;
  }

  .modal-body {
    padding: 1rem;
  }

  .transactions-table {
    font-size: 0.75rem;
  }

  .transactions-table th,
  .transactions-table td {
    padding: 0.5rem;
  }
}

/* VEP Styles */
.doc-type-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.vep-badge {
  background-color: #fef3c7;
  color: #92400e;
}

.statement-badge {
  background-color: #dbeafe;
  color: #1e40af;
}

.vep-details {
  padding: 1.5rem;
}

.vep-details h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 2rem;
  font-size: 1.75rem;
}

.vep-details h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.vep-header {
  background-color: #e5e7f0;
  border: 2px solid #3b82f6;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.vep-section {
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: var(--bg-light);
  border-radius: 0.5rem;
}

.vep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.vep-field {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  background-color: var(--bg-white);
  border-radius: 0.375rem;
  border: 1px solid var(--border-color);
}

.vep-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.vep-field .vep-value {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
}

.vep-number {
  font-size: 1.25rem;
  color: var(--primary-color);
  font-weight: 700;
}

.vep-expiration {
  color: #dc2626;
  font-weight: 600;
}

.vep-items {
  margin: 1.5rem 0;
}

.vep-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.vep-items-table th,
.vep-items-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.vep-items-table th {
  background-color: var(--bg-light);
  font-weight: 600;
  color: var(--text-primary);
}

.vep-items-table tbody tr:hover {
  background-color: var(--bg-light);
}

.vep-total {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.vep-total label {
  font-size: 1rem;
}

.vep-amount {
  font-size: 2rem;
  font-weight: 700;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 1rem;
  }

  .sidebar-menu {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    padding: 0.5rem;
  }

  .menu-item {
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    min-width: 80px;
    text-align: center;
  }

  .menu-text {
    font-size: 0.75rem;
  }

  .sidebar-footer {
    display: none;
  }

  .vep-grid {
    grid-template-columns: 1fr;
  }

  .vep-total {
    flex-direction: column;
    gap: 0.5rem;
  }

  .vep-amount {
    font-size: 1.5rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .transactions-table {
    font-size: 0.75rem;
  }

  .transactions-table th,
  .transactions-table td {
    padding: 0.5rem;
  }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --sidebar-width: 200px;
  }

  .logo-text {
    display: none;
  }

  .menu-text {
    font-size: 0.8rem;
  }
}

/* ========================================
   DASHBOARD STATS (Inicio Section)
   ======================================== */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.stat-info h3 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Recent Activity */
.recent-activity {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.recent-activity h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 0.375rem;
  transition: background-color 0.2s ease;
}

.activity-item:hover {
  background-color: #eef2f7;
}

.activity-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.activity-details {
  flex: 1;
}

.activity-title {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.activity-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.no-activity {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem;
}

/* ========================================
   PLACEHOLDER SECTIONS
   ======================================== */
.calendar-placeholder,
.settings-placeholder {
  background: var(--bg-white);
  border: 2px dashed var(--border-color);
  border-radius: 0.5rem;
  padding: 3rem;
  text-align: center;
}

.placeholder-content {
  max-width: 400px;
  margin: 0 auto;
}

.placeholder-content svg {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.placeholder-content h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.placeholder-content p {
  color: var(--text-secondary);
}

/* ========================================
   SETTINGS SECTION
   ======================================== */
.settings-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.settings-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.settings-card h3 {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.setting-item {
  margin-bottom: 1.25rem;
}

.setting-item:last-child {
  margin-bottom: 0;
}

.setting-item label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  background-color: var(--bg-light);
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--bg-white);
}

.form-input:read-only {
  cursor: not-allowed;
  opacity: 0.7;
}

.settings-placeholder {
  background: var(--bg-light);
  border: 2px dashed var(--border-color);
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
}

/* ========================================
   UPLOAD CARD STYLES
   ======================================== */
.upload-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: var(--shadow);
}

#upload-form {
  width: 100%;
  margin-bottom: 2rem;
}

.upload-area {
  text-align: center;
  padding: 4rem 2rem;
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  background: var(--bg-white);
  box-shadow: var(--shadow);
  width: 100%;
}

.upload-area:hover {
  border-color: var(--primary-color);
  background-color: var(--bg-light);
  box-shadow: var(--shadow-md);
}

.upload-area.drag-over {
  border-color: var(--primary-color);
  background-color: rgba(99, 102, 241, 0.1);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
  transform: scale(1.01);
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.upload-area h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.upload-area p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.file-types, .file-size {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.select-file-btn {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.select-file-btn:hover {
  background-color: var(--primary-hover);
}

.file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: var(--bg-light);
  border-radius: 0.375rem;
}

.file-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.file-info .file-name {
  font-weight: 500;
  color: var(--text-primary);
}

.file-info .file-size {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.upload-btn {
  padding: 0.625rem 1.25rem;
  background-color: var(--success-color);
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.upload-btn:hover {
  background-color: #059669;
}

.message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.message.success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.message.error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* ========================================
   FILE CARD STYLES (Google Drive Style)
   ======================================== */
.file-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.file-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.file-preview {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.file-preview .file-icon {
  font-size: 4rem;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

/* File type badge for file cards only (not for table) */
.file-card .file-type-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #667eea;
}

.file-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.file-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.file-meta-item {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.file-status-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.file-status-badge.completed {
  background: #d1fae5;
  color: #065f46;
}

.file-status-badge.processing {
  background: #dbeafe;
  color: #1e40af;
}

.file-status-badge.pending {
  background: #fef3c7;
  color: #92400e;
}

.file-status-badge.failed {
  background: #fee2e2;
  color: #991b1b;
}

.file-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.btn-view, .btn-delete {
  flex: 1;
  padding: 0.625rem;
  border: none;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-view {
  background-color: var(--primary-color);
  color: white;
}

.btn-view:hover {
  background-color: var(--primary-hover);
  transform: scale(1.02);
}

.btn-delete {
  background-color: transparent;
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
}

.btn-delete:hover {
  background-color: var(--danger-color);
  color: white;
}

/* ========================================
   STATS GRID
   ======================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* ========================================
   COMING SOON
   ======================================== */
.coming-soon {
  background: var(--bg-white);
  border: 2px dashed var(--border-color);
  border-radius: 0.5rem;
  padding: 4rem 2rem;
  text-align: center;
}

.coming-soon .emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
}

.coming-soon h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.coming-soon p {
  color: var(--text-secondary);
}

/* ========================================
   SECTION HEADER
   ======================================== */
.section-header {
  margin-bottom: 2rem;
}

.section-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* ========================================
   TRANSACTIONS TABLE IMPROVEMENTS
   ======================================== */
.transactions-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
}

.transactions-table thead {
  background-color: var(--bg-light);
}

.transactions-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
}

.transactions-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.transactions-table tbody tr:hover {
  background-color: var(--bg-light);
}

.transactions-table .debit {
  color: var(--danger-color);
  font-weight: 500;
}

.transactions-table .credit {
  color: var(--success-color);
  font-weight: 500;
}

/* Amount column colors */
.transactions-table .amount-negative {
  color: #EF4444;
  font-weight: 600;
}

.transactions-table .amount-positive {
  color: #22C55E;
  font-weight: 600;
}

/* Category Dropdown */
.category-cell {
  position: relative;
  overflow: visible;
}

.category-dropdown {
  position: relative;
  display: inline-block;
}

/* Ensure dropdown opens above other rows */
.transactions-table tbody tr.dropdown-active .category-cell {
  overflow: visible;
}

.category-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--text-primary);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.category-btn:hover {
  background: var(--bg-light);
  border-color: var(--category-color, var(--border-color));
}

.category-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dropdown-arrow {
  opacity: 0.5;
  transition: transform 0.2s ease;
}

/* Category saving spinner */
.category-saving-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid var(--border-color);
  border-top-color: var(--category-color, var(--primary-color));
  border-radius: 50%;
  animation: categorySpin 0.6s linear infinite;
}

@keyframes categorySpin {
  to { transform: rotate(360deg); }
}

/* Category success checkmark */
.category-success-check {
  color: #22c55e;
  animation: categoryCheckPop 0.3s ease-out;
}

@keyframes categoryCheckPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.category-options {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  min-width: 180px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 0;
  margin-top: 4px;
  display: none;
  max-height: 280px;
  overflow-y: auto;
}

.category-options.show {
  display: block;
  animation: dropdownFadeIn 0.15s ease;
}

/* Dropup variant - opens upward when near bottom of viewport */
.category-options.dropup {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 4px;
  animation: dropupFadeIn 0.15s ease;
}

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

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

.category-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--text-primary);
  transition: background 0.15s ease;
}

.category-option:hover {
  background: var(--bg-light);
}

.category-option.selected {
  background: var(--primary-light);
  color: var(--primary-color);
}

.category-option.selected .category-dot {
  box-shadow: 0 0 0 2px var(--bg-white), 0 0 0 4px currentColor;
}

/* ========================================
   ACTIVITY STYLES
   ======================================== */
.activity-name {
  font-weight: 500;
  color: var(--text-primary);
}

.activity-date {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.activity-status {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ========================================
   FILTERS SECTION
   ======================================== */
.filters-container {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.filter-input {
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  transition: all 0.2s ease;
  background: var(--bg-white);
}

.filter-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 12, 107, 0.1);
}

.filter-actions {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.filter-checkbox-group {
  flex: 0 0 auto;
  min-width: auto;
  justify-content: flex-end;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.625rem 0;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.checkbox-label span {
  white-space: nowrap;
}

.btn-primary,
.btn-secondary {
  padding: 0.625rem 1.25rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
}

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

.btn-secondary:hover {
  background: var(--border-color);
}

/* Full screen transactions section */
#section-transacciones {
  min-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  width: 100%;
}

#all-transactions-container {
  flex: 1;
  overflow-x: auto;
  background: var(--bg-white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  width: 100%;
}

.section-header {
  margin-bottom: 1rem;
}

.section-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ========================================
   ADVANCED FILTERS - Dropdowns (Stripe-inspired)
   ======================================== */
.filters-advanced {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.filter-dropdown-group {
  position: relative;
  flex: 0 0 auto;
  min-width: auto;
}

.filter-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-white);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-dropdown-btn:hover {
  border-color: var(--primary-color);
  background: #e5e7f0;
}

.filter-dropdown-btn.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 12, 107, 0.1);
}

.filter-dropdown-btn svg:first-child {
  color: var(--text-secondary);
}

.dropdown-arrow {
  margin-left: auto;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.filter-dropdown-btn.active .dropdown-arrow {
  transform: rotate(180deg);
}

.filter-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 280px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  animation: slideDown 0.2s ease;
}

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

.filter-dropdown-search {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--bg-white);
  z-index: 1;
}

.filter-dropdown-search input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.filter-dropdown-search input:focus {
  border-color: var(--primary-color);
}

.filter-dropdown-options {
  padding: 0.5rem;
}

.filter-dropdown-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: background 0.15s ease;
}

.filter-dropdown-option:hover {
  background: var(--bg-light);
}

.filter-dropdown-option input[type="checkbox"],
.filter-dropdown-option input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
  cursor: pointer;
  margin: 0;
}

.category-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.filter-dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.5rem 0;
}

.filter-amount-range {
  padding: 0.75rem;
  background: var(--bg-light);
  border-radius: 4px;
  margin-top: 0.5rem;
}

.filter-amount-inputs {
  display: flex;
  gap: 0.75rem;
}

.filter-amount-input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.filter-amount-input-group label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.filter-amount-input-group input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.filter-amount-input-group input:focus {
  border-color: var(--primary-color);
}

/* ========================================
   ACTIVE FILTERS PILLS (Stripe-inspired)
   ======================================== */
.active-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #e5e7f0;
  border-radius: 6px;
  flex-wrap: wrap;
}

.active-filters-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.active-filters-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.filter-pill:hover {
  border-color: var(--primary-color);
  background: #e5e7f0;
}

.filter-pill-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
}

.filter-pill-remove:hover {
  color: var(--primary-color);
}

.filter-pill-remove svg {
  width: 14px;
  height: 14px;
}

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

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

  .filter-actions {
    width: 100%;
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}

/* ========================================
   RIGHT SIDEBAR
   ======================================== */
.right-sidebar {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  height: 100vh;
  background: var(--bg-white);
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.right-sidebar.open {
  right: 0;
}

.right-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-light);
}

.right-sidebar-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.close-sidebar-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.close-sidebar-btn:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.right-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   TRANSACTION DETAIL VIEW
   ======================================== */
.detail-section {
  margin-bottom: 2rem;
}

.detail-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.detail-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.detail-value.positive {
  color: var(--success-color);
}

.detail-value.negative {
  color: var(--danger-color);
}

.detail-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.detail-info-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.detail-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-info-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-info-value {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
}

.detail-info-value.cuit-value {
  font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
  background: var(--gray-100);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Notes Section */
.notes-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.notes-textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.notes-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.save-note-btn {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.save-note-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Transaction UUID Section */
.transaction-uuid {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.transaction-uuid .detail-info-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.transaction-uuid .uuid-value {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'Monaco', 'Courier New', monospace;
  word-break: break-all;
  line-height: 1.4;
  opacity: 0.7;
}

/* File Preview Section */
.file-preview-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.file-preview-card {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-preview-card:hover {
  border-color: var(--primary-color);
  background: #e5e7f0;
}

.file-preview-icon {
  font-size: 2rem;
}

.file-preview-info {
  flex: 1;
}

.file-preview-name {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.file-preview-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.file-preview-arrow {
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.file-preview-card:hover .file-preview-arrow {
  transform: translateX(4px);
}

/* ========================================
   FILE DETAIL VIEW
   ======================================== */
.file-detail-header {
  text-align: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.file-detail-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.file-detail-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  word-break: break-word;
}

.file-detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.file-stat-card {
  background: var(--bg-light);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.file-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.file-stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.file-actions-section {
  margin-top: 2rem;
}

.file-action-btn {
  width: 100%;
  padding: 1rem;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.file-action-btn:hover {
  border-color: var(--primary-color);
  background: #e5e7f0;
}

.file-action-btn.danger {
  color: var(--danger-color);
  border-color: var(--border-color);
}

.file-action-btn.danger:hover {
  background: #fff5f5;
  border-color: var(--danger-color);
}

/* New File Detail Styles */
.file-detail-container {
  padding: 0;
}

.file-main-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem 1.5rem;
  text-align: center;
  color: white;
  margin: -1.5rem -1.5rem 1.5rem -1.5rem;
}

.file-type-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.file-bank-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
}

.file-transaction-count {
  margin: 1.5rem 0;
}

.count-number {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.count-label {
  font-size: 0.875rem;
  opacity: 0.9;
}

.file-status-indicator {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.file-status-indicator.completed {
  background: rgba(16, 185, 129, 0.3);
}

.file-status-indicator.failed {
  background: rgba(239, 68, 68, 0.3);
}

.file-name-section {
  padding: 1rem 0;
}

.file-name-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.file-name-text {
  font-size: 0.9rem;
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.4;
}

.detail-separator {
  height: 1px;
  background: var(--border-color);
  margin: 1.5rem 0;
}

.file-details-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.file-detail-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.detail-value {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.file-actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.file-action-button {
  width: 100%;
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
}

.file-action-button.primary {
  background: var(--primary-color);
  color: white;
}

.file-action-button.primary:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.file-action-button.secondary {
  background: var(--bg-light);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.file-action-button.secondary:hover {
  background: #e5e7f0;
  transform: translateY(-1px);
}

.file-action-button.danger {
  background: transparent;
  color: var(--danger-color);
  border: 2px solid var(--border-color);
}

.file-action-button.danger:hover {
  background: #fff5f5;
  border-color: var(--danger-color);
}

@media (max-width: 768px) {
  .right-sidebar {
    width: 100%;
    right: -100%;
  }
}

/* Loading state */
.detail-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.detail-error {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--danger-color);
}

/* ========================================
   CONNECTIONS SECTION
   ======================================== */
.connections-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.connection-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.connection-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(44, 12, 107, 0.1);
  transform: translateY(-2px);
}

.connection-card.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.connection-card.disabled:hover {
  border-color: var(--border-color);
  box-shadow: none;
  transform: none;
}

.connection-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.connection-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  flex-shrink: 0;
  overflow: hidden;
}

.connection-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.connection-icon.mercadopago-icon {
  background: #fff;
  border: 1px solid #e5e7eb;
}

.connection-info {
  flex: 1;
}

.connection-info h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.connection-status {
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-block;
}

.connection-status.connected {
  color: var(--success-color);
}

.connection-status.disconnected {
  color: var(--text-secondary);
}

.connection-description {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0;
}

.btn-connection {
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: auto;
}

.btn-connection:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44, 12, 107, 0.3);
}

.connection-card.disabled .btn-connection {
  background: var(--border-color);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.connection-card.disabled .btn-connection:hover {
  background: var(--border-color);
  transform: none;
  box-shadow: none;
}

/* Connected state styling */
.connection-card.connected {
  border-color: var(--success-color);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.03) 0%, var(--bg-white) 100%);
}

.connection-card.connected:hover {
  border-color: var(--success-color);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.connection-card.connected .connection-icon {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success-color);
}

/* Sync button */
.btn-sync {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #e0f2fe;
  color: #0284c7;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: auto;
}

.btn-sync:hover {
  background: #0284c7;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.3);
}

.btn-sync:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
}

/* Disconnect button */
.btn-disconnect {
  padding: 0.75rem 1.5rem;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: auto;
}

.btn-disconnect:hover {
  background: #dc2626;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.3);
}

.btn-disconnect:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

/* Connections Subsection Titles */
.connections-subsection-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

#active-connections-section .connections-subsection-title {
  margin-top: 0;
}

/* Connection User Info */
.connection-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.connection-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.avatar-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  font-size: 1rem;
}

.connection-user-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.connection-user-email {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.connection-last-sync {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ========================================
   CUSTOM MODAL
   ======================================== */

.custom-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.custom-modal-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-modal {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
  position: relative;
}

.custom-modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.custom-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 24px;
}

.custom-modal-icon.warning {
  background: #fef3c7;
  color: #f59e0b;
}

.custom-modal-icon.error {
  background: #fee2e2;
  color: #dc2626;
}

.custom-modal-icon.success {
  background: #d1fae5;
  color: #10b981;
}

.custom-modal-icon.info {
  background: #dbeafe;
  color: #3b82f6;
}

.custom-modal-icon.danger {
  background: #fee2e2;
  color: #dc2626;
}

.custom-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.custom-modal-message {
  margin: 0 0 2rem 0;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.9375rem;
}

.custom-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.custom-modal-btn {
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-width: 90px;
}

.custom-modal-btn.btn-cancel {
  background: var(--bg-light);
  color: var(--text-secondary);
}

.custom-modal-btn.btn-cancel:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.custom-modal-btn.btn-confirm {
  background: var(--primary-color);
  color: white;
}

.custom-modal-btn.btn-confirm:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44, 12, 107, 0.3);
}

.custom-modal-btn.btn-confirm.danger {
  background: #dc2626;
}

.custom-modal-btn.btn-confirm.danger:hover {
  background: #b91c1c;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.custom-modal-btn.btn-danger {
  background: var(--danger-color);
  color: white;
}

.custom-modal-btn.btn-danger:hover {
  background: var(--danger-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.custom-modal-btn:active {
  transform: translateY(0);
}

/* Delete Transaction Modal Styles */
.delete-confirm-modal {
  max-width: 420px;
}

.delete-transaction-details {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.delete-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.delete-detail-row:last-child {
  border-bottom: none;
}

.delete-detail-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.delete-detail-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delete-detail-value.income {
  color: var(--success-color);
}

.delete-detail-value.expense {
  color: var(--danger-color);
}

.custom-modal-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1.5rem;
}

/* Sync Result Modal */
.sync-result-modal {
  max-width: 420px;
}

.custom-modal-icon.success {
  background: #dcfce7;
  color: #16a34a;
}

.sync-result-details {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.sync-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.sync-detail-row:last-child {
  border-bottom: none;
}

.sync-detail-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.sync-detail-value {
  font-weight: 600;
  color: var(--text-color);
}

.sync-detail-value.highlight {
  color: var(--success-color);
}

.sync-detail-value.muted {
  color: var(--text-muted);
  font-weight: 400;
}

.sync-error-message {
  color: var(--danger-color);
  font-size: 0.875rem;
  padding: 0.75rem;
  background: #fee2e2;
  border-radius: 6px;
  text-align: center;
}

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

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 768px) {
  .connections-container {
    grid-template-columns: 1fr;
  }

  .custom-modal {
    padding: 1.5rem;
    max-width: 95%;
  }

  .custom-modal-actions {
    flex-direction: column-reverse;
  }

  .custom-modal-btn {
    width: 100%;
  }
}

/* ========================================
   BANK SELECTOR MODAL
   ======================================== */

.bank-selector-modal .custom-modal {
  max-width: 600px;
}

.bank-selector-step {
  display: none;
}

.bank-selector-step.active {
  display: block;
}

.country-selector, .bank-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
  max-height: 400px;
  overflow-y: auto;
}

.country-option, .bank-option {
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.country-option:hover, .bank-option:hover {
  border-color: var(--primary-color);
  background: var(--bg-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 12, 107, 0.15);
}

.country-option.selected, .bank-option.selected {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, rgba(44, 12, 107, 0.1) 0%, var(--bg-light) 100%);
}

.country-flag {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.country-name, .bank-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.bank-option {
  padding: 0.875rem;
  flex-direction: column;
  align-items: center;
  display: flex;
}

.bank-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 0.75rem;
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bank-logo-img {
  width: 64px;
  height: 64px;
  margin-bottom: 0.75rem;
  object-fit: contain;
  border-radius: 6px;
}

.selected-country-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  font-weight: 500;
}

.bank-country {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.selector-search {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease;
}

.selector-search:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 12, 107, 0.1);
}

.selector-loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.selector-loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--bg-light);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   GLOBAL LOADING STATES
   ======================================== */
/* Standard spinner that can be used anywhere */
.spinner {
  display: block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

/* Standard loading container */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 4rem 2rem;
  gap: 1rem;
  color: var(--text-muted);
}

.loading-state span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.selector-error {
  padding: 1rem;
  background: #fee2e2;
  color: #dc2626;
  border-radius: 8px;
  margin: 1rem 0;
}

.bank-selector-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

@media (max-width: 768px) {
  .country-selector, .bank-selector {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }

  .bank-selector-modal .custom-modal {
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* ========================================
   SETTINGS SECTIONS
   ======================================== */

.settings-section {
  margin-bottom: 2rem;
}

.settings-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.settings-section-title svg {
  color: var(--primary-color);
}

.settings-section-description {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

/* ========================================
   EMAIL UPLOAD CARD
   ======================================== */

.email-upload-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

/* Removed duplicate - see line 6123 for main definition */

.email-upload-address {
  margin-bottom: 1.5rem;
}

.email-upload-address label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.email-copy-container {
  display: flex;
  gap: 0.5rem;
}

.email-address-input {
  flex: 1;
  padding: 0.875rem 1rem;
  background: var(--bg-light);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  color: var(--text-primary);
  cursor: text;
}

.email-address-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.btn-copy {
  padding: 0.875rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-copy:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-copy:active {
  transform: translateY(0);
}

.btn-copy.copied {
  background: var(--success-color);
}

.email-upload-instructions {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.email-upload-instructions h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.email-upload-instructions ol {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.8;
}

.email-upload-instructions li {
  margin-bottom: 0.25rem;
}

.email-supported-formats {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.email-supported-formats strong {
  color: var(--text-primary);
}

.email-upload-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--bg-light);
  color: var(--text-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: white;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-secondary:active {
  transform: translateY(1px);
}

@media (max-width: 768px) {
  .email-copy-container {
    flex-direction: column;
  }

  .btn-copy {
    width: 100%;
    justify-content: center;
  }

  .email-upload-actions {
    flex-direction: column;
  }

  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================
   DASHBOARDS SECTION
   ======================================== */

/* Dashboard Filters */
.dashboard-filters {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 140px;
}

.filter-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.filter-input,
.filter-select {
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-white);
  transition: all 0.2s ease;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 12, 107, 0.1);
}

/* Modern Date Picker Styles */
input[type="date"] {
  position: relative;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  margin-left: 0.5rem;
}

input[type="date"]:hover::-webkit-calendar-picker-indicator {
  opacity: 1;
}

input[type="date"]::-webkit-datetime-edit {
  padding: 0;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

input[type="date"]::-webkit-datetime-edit-text {
  color: var(--text-secondary);
  padding: 0 0.25rem;
}

input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
  color: var(--text-primary);
  font-weight: 500;
}

input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus {
  background: rgba(44, 12, 107, 0.1);
  color: var(--primary-color);
  border-radius: 4px;
  outline: none;
}

/* Placeholder styling for empty dates */
input[type="date"]:invalid {
  color: var(--text-tertiary);
}

.filter-actions {
  margin-left: auto;
}

.filter-actions .btn-primary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-actions .btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Summary Cards */
.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.summary-card {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
}

.summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.summary-card.income .summary-icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.summary-card.expense .summary-icon {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.summary-card.balance .summary-icon {
  background: rgba(44, 12, 107, 0.1);
  color: var(--primary-color);
}

.summary-card.count .summary-icon {
  background: rgba(136, 152, 170, 0.1);
  color: var(--text-secondary);
}

.summary-content {
  flex: 1;
}

.summary-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.summary-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.summary-card.income .summary-value {
  color: var(--success-color);
}

.summary-card.expense .summary-value {
  color: var(--danger-color);
}

/* Chart Container */
.dashboard-chart-container {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  position: relative;
  min-height: 400px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.chart-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chart-legend {
  display: flex;
  gap: 1.5rem;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.chart-wrapper {
  position: relative;
  height: 350px;
}

.chart-loading,
.chart-empty {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-white);
  border-radius: 8px;
  z-index: 10;
  gap: 1rem;
}

.chart-loading span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.chart-empty svg {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.chart-empty p {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.chart-empty span {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Grouped Data Table */
.dashboard-grouped-data {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.grouped-data-header {
  margin-bottom: 1rem;
}

.grouped-data-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.grouped-data-table-wrapper {
  overflow-x: auto;
}

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

.grouped-data-table th,
.grouped-data-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.grouped-data-table th {
  background: var(--bg-light);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.grouped-data-table td {
  font-size: 0.875rem;
  color: var(--text-primary);
}

.grouped-data-table tbody tr:hover {
  background: var(--bg-light);
}

.grouped-data-table .amount-positive {
  color: var(--success-color);
  font-weight: 500;
}

.grouped-data-table .amount-negative {
  color: var(--danger-color);
  font-weight: 500;
}

/* Categories by Month Table - Compact styling */
#categories-by-month-container {
  margin-top: 2rem;
}

.categories-month-table th,
.categories-month-table td {
  padding: 0.5rem 0.75rem !important;
  font-size: 0.8125rem;
}

.categories-month-table th {
  font-size: 0.6875rem;
}

.categories-month-table tbody tr:last-child td {
  font-weight: 600;
  border-top: 2px solid var(--border-color);
  background: var(--bg-light);
}

/* Responsive */
@media (max-width: 768px) {
  .filters-row {
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
  }

  .filter-actions {
    margin-left: 0;
    width: 100%;
  }

  .filter-actions .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .dashboard-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .chart-wrapper {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .dashboard-summary {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   TRANSACTION ACTION BUTTONS
   ======================================== */
.actions-cell {
  text-align: center;
  white-space: nowrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: var(--bg-light);
  color: var(--primary);
}

.action-btn.create-service-btn:hover {
  background: rgba(139, 92, 246, 0.1);
  color: #8B5CF6;
}

.action-btn.service-linked-btn {
  color: #10B981;
}

.action-btn.service-linked-btn:hover {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.action-btn.delete-transaction-btn {
  color: var(--danger-color);
}

.action-btn.delete-transaction-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-hover);
}

.action-btn svg {
  flex-shrink: 0;
}

/* ========================================
   PAGINATION CONTROLS
   ======================================== */
.pagination-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-light);
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
  flex-wrap: wrap;
  gap: 1rem;
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.pagination-limit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-limit label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.pagination-limit select {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-white);
  cursor: pointer;
}

.pagination-limit select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 12, 107, 0.1);
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(44, 12, 107, 0.05);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-btn svg {
  width: 16px;
  height: 16px;
}

.pagination-page {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
  padding: 0 0.5rem;
  min-width: 120px;
  text-align: center;
}

/* Responsive pagination */
@media (max-width: 768px) {
  .pagination-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-actions {
    justify-content: space-between;
  }

  .pagination-info {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .pagination-actions {
    flex-direction: column;
    gap: 1rem;
  }

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

/* ========================================
   RESIZABLE TABLE COLUMNS
   ======================================== */
.transactions-table.resizable table {
  table-layout: fixed;
}

.transactions-table.resizable th {
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transactions-table.resizable td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Column resize handle */
.col-resize-handle {
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 24px;
  cursor: col-resize;
  background: transparent;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

/* Grip dots pattern - visible by default */
.col-resize-handle::before {
  content: '';
  width: 6px;
  height: 16px;
  background-image: radial-gradient(circle, #94a3b8 1.5px, transparent 1.5px);
  background-size: 6px 5px;
  background-position: center;
  opacity: 0.6;
  transition: all 0.2s ease;
}

.col-resize-handle:hover {
  background: rgba(44, 12, 107, 0.15);
}

.col-resize-handle:hover::before {
  opacity: 1;
  background-image: radial-gradient(circle, var(--primary-color) 1.5px, transparent 1.5px);
}

.col-resize-handle.active {
  background: rgba(44, 12, 107, 0.25);
}

.col-resize-handle.active::before {
  opacity: 1;
  background-image: radial-gradient(circle, var(--primary-color) 1.5px, transparent 1.5px);
}

/* Visual feedback during resize */
.transactions-table.resizing {
  cursor: col-resize;
  user-select: none;
}

.transactions-table.resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

/* Column min widths */
.transactions-table.resizable th[data-col="fecha"] {
  min-width: 100px;
}

.transactions-table.resizable th[data-col="descripcion"] {
  min-width: 150px;
}

.transactions-table.resizable th[data-col="monto"] {
  min-width: 100px;
}

.transactions-table.resizable th[data-col="categoria"] {
  min-width: 120px;
}

.transactions-table.resizable th[data-col="banco"] {
  min-width: 100px;
}

/* ========================================
   CALENDAR PAGE SECTION
   ======================================== */

.calendar-page-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.calendar-main {
  background: var(--bg-white);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 1.5rem;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.calendar-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.calendar-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-nav-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(44, 12, 107, 0.05);
}

.calendar-grid-large {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
}

.calendar-weekdays span {
  padding: 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.calendar-days-large {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-day-large {
  min-height: 100px;
  padding: 0.5rem;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
}

.calendar-day-large:nth-child(7n) {
  border-right: none;
}

.calendar-day-large:hover {
  background: var(--bg-light);
}

.calendar-day-large.other-month {
  background: var(--bg-light);
  opacity: 0.5;
}

.calendar-day-large.today {
  background: rgba(44, 12, 107, 0.05);
}

.calendar-day-large.selected {
  background: rgba(44, 12, 107, 0.1);
  border-color: var(--primary-color);
}

.calendar-day-number {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.calendar-day-large.today .calendar-day-number {
  background: var(--primary-color);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-day-payments {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calendar-payment-dot {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text-secondary);
  padding: 2px 4px;
  background: var(--bg-light);
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-payment-dot .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.calendar-payment-more {
  font-size: 0.65rem;
  color: var(--text-muted);
  padding: 2px 4px;
}

/* Calendar Sidebar */
.calendar-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.calendar-selected-day,
.calendar-month-summary,
.calendar-upcoming {
  background: var(--bg-white);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 1.25rem;
}

.calendar-selected-day h3,
.calendar-month-summary h3,
.calendar-upcoming h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

.calendar-selected-day-content .no-selection {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.calendar-selected-payment {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-light);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.calendar-selected-payment:last-child {
  margin-bottom: 0;
}

.calendar-selected-payment .payment-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.calendar-selected-payment .payment-details {
  flex: 1;
  min-width: 0;
}

.calendar-selected-payment .payment-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-selected-payment .payment-category {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.calendar-selected-payment .payment-amount {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--danger-color);
}

/* Month Summary */
.month-summary-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.stat-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Upcoming Payments */
.calendar-upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calendar-upcoming-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-light);
  border-radius: 8px;
}

.calendar-upcoming-item .upcoming-date {
  width: 44px;
  text-align: center;
}

.calendar-upcoming-item .upcoming-date .day {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.calendar-upcoming-item .upcoming-date .month {
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.calendar-upcoming-item .upcoming-details {
  flex: 1;
  min-width: 0;
}

.calendar-upcoming-item .upcoming-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-upcoming-item .upcoming-amount {
  font-size: 0.75rem;
  color: var(--danger-color);
  font-weight: 500;
}

.calendar-upcoming-empty {
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Calendar Responsive */
@media (max-width: 1200px) {
  .calendar-page-grid {
    grid-template-columns: 1fr;
  }

  .calendar-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .calendar-selected-day,
  .calendar-month-summary,
  .calendar-upcoming {
    flex: 1;
    min-width: 280px;
  }
}

@media (max-width: 768px) {
  .calendar-day-large {
    min-height: 60px;
    padding: 0.25rem;
  }

  .calendar-day-number {
    font-size: 0.75rem;
  }

  .calendar-payment-dot {
    font-size: 0.6rem;
  }

  .calendar-sidebar {
    flex-direction: column;
  }

  .calendar-selected-day,
  .calendar-month-summary,
  .calendar-upcoming {
    min-width: 100%;
  }
}

/* ==========================================
   SERVICES & SUBSCRIPTIONS STYLES
   ========================================== */

#section-servicios {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.services-actions-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.services-actions-bar .btn-primary,
.services-actions-bar .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.services-actions-bar .btn-primary {
  background: var(--primary-color);
  color: white;
  border: none;
}

.services-actions-bar .btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.services-actions-bar .btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.services-actions-bar .btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--primary-color);
}

.services-table-section {
  background: var(--bg-primary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.services-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.services-table-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.services-filter select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
}

.services-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 4rem 2rem;
  gap: 1rem;
  color: var(--text-muted);
}

.services-loading span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.services-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

.services-empty svg {
  margin-bottom: 1rem;
  opacity: 0.4;
}

.services-empty p {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.services-empty span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Services Table Styles */
.services-table-container {
  width: 100%;
  overflow-x: auto;
}

.services-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: var(--bg-white);
}

.services-table thead {
  background-color: var(--bg-light);
}

.services-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.services-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.services-table th.sortable:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.services-table th .sort-icon {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: var(--primary-color);
  min-width: 12px;
}

.services-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.services-table tbody tr {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.services-table tbody tr:hover {
  background-color: var(--bg-light);
}

.services-table tbody tr.paused {
  opacity: 0.6;
}

/* Service name cell with color dot */
.service-name-cell {
  min-width: 180px;
}

.service-name-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.service-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.service-name-text {
  font-weight: 500;
  color: var(--text-primary);
}

/* Category badge */
.service-category-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Amount cell */
.service-amount-cell {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.amount-varies-tag {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 0.25rem;
}

/* Status badge */
.service-status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.service-status-badge.active {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.service-status-badge.up_to_date {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.service-status-badge.due_soon {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.service-status-badge.overdue {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.service-status-badge.paused {
  background: rgba(148, 163, 184, 0.1);
  color: #64748b;
}

.service-status-badge.cancelled {
  background: rgba(100, 116, 139, 0.1);
  color: #475569;
}

/* ========================================
   FILES TABLE STYLES
   ======================================== */
.files-table-section {
  background: var(--bg-primary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  margin-top: 1.5rem;
}

.files-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.files-table-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.files-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 4rem 2rem;
  gap: 1rem;
  color: var(--text-muted);
}

.files-loading span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.files-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

.files-empty svg {
  margin-bottom: 1rem;
  opacity: 0.4;
}

.files-empty p {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.files-empty span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.files-table-container {
  width: 100%;
  overflow-x: auto;
}

.files-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: var(--bg-white);
}

.files-table thead {
  background-color: var(--bg-light);
}

.files-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.files-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.files-table tbody tr {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.files-table tbody tr:hover {
  background-color: var(--bg-light);
}

/* File name cell with icon */
.file-name-cell {
  min-width: 200px;
}

.file-name-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.file-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.file-name-text {
  font-weight: 500;
  color: var(--text-primary);
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* File type badge */
.file-type-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: var(--bg-light);
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* File status badge */
.file-status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.file-status-badge.completed {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.file-status-badge.pending {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.file-status-badge.processing {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.file-status-badge.failed {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* File actions */
.file-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

.upcoming-payments-section {
  background: var(--bg-primary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 1.5rem;
}

.upcoming-payments-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem;
}

.upcoming-payments-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.upcoming-payment-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.upcoming-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  border-radius: 8px;
  color: white;
}

.upcoming-day {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.upcoming-month {
  font-size: 0.625rem;
  text-transform: uppercase;
  opacity: 0.9;
}

.upcoming-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.upcoming-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.upcoming-amount {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.predicted-tag {
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  border-radius: 4px;
  font-weight: 500;
}

/* =============================================
   SERVICE DETAIL SIDEBAR STYLES
   ============================================= */

.service-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Service Logo */
.service-logo-container {
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  background: var(--bg-secondary);
  border-radius: 12px;
}

.service-logo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  border-radius: 12px;
}

/* Service Detail Header */
.service-detail-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.service-detail-info {
  flex: 1;
  min-width: 0;
}

.service-detail-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

/* Editable service name styling */
.editable-service-field {
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 8px;
  border-radius: 6px;
  margin-left: -8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.editable-service-field:hover {
  background-color: #F9FAFB;
}

.editable-service-field .edit-icon {
  opacity: 0;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.editable-service-field:hover .edit-icon {
  opacity: 0.5;
}

.service-detail-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.service-category-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 20px;
  font-weight: 500;
}

.service-frequency-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 20px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 500;
}

/* Service Summary Section */
.service-summary-section {
  background: #f8f9fc;
  border-radius: 16px;
  padding: 1.25rem;
  border: 1px solid #e5e7eb;
}

.detail-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #2c0c6b;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 1rem;
}

.service-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}

.summary-card {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(44, 12, 107, 0.08);
  border: 1px solid #f0f0f5;
  transition: all 0.2s ease;
}

.summary-card:hover {
  box-shadow: 0 4px 12px rgba(44, 12, 107, 0.12);
  transform: translateY(-2px);
}

.summary-label {
  font-size: 0.6875rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.summary-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: #2c0c6b;
  line-height: 1.3;
}

.varies-badge {
  font-size: 0.625rem;
  padding: 0.25rem 0.5rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.08));
  color: #d97706;
  border-radius: 6px;
  font-weight: 600;
  margin-left: 0.375rem;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Service Info Section */
.service-info-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f5;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row.notes-row {
  flex-direction: column;
  gap: 0.5rem;
  background: #f8f9fc;
  padding: 1rem;
  border-radius: 8px;
  border: none;
}

.info-label {
  font-size: 0.8125rem;
  color: #64748b;
  font-weight: 600;
}

.info-value {
  font-size: 0.875rem;
  color: #2c0c6b;
  font-weight: 600;
  text-align: right;
}

.info-row.notes-row .info-value {
  text-align: left;
  font-weight: normal;
  color: var(--text-secondary);
}

/* Service Payments Section */
.service-payments-section {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 1rem;
}

.service-payments-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 250px;
  overflow-y: auto;
}

.service-payments-list .payment-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0.75rem;
  background: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.service-payments-list .payment-history-item.predicted {
  border-style: dashed;
  opacity: 0.7;
}

.payment-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.payment-date {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.payment-status-text {
  font-size: 0.6875rem;
  text-transform: uppercase;
  font-weight: 500;
}

.payment-status-text.paid {
  color: #10b981;
}

.payment-status-text.pending {
  color: #f59e0b;
}

.payment-amount {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.payment-amount.negative {
  color: var(--danger-color);
}

.no-payments {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 1rem 0;
  margin: 0;
}

/* Service Detail Actions */
.service-detail-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.service-detail-actions button {
  flex: 1;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.service-detail-actions .btn-secondary {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.service-detail-actions .btn-secondary:hover {
  background: var(--border-color);
}

.service-detail-actions .btn-primary {
  background: var(--primary-color);
  border: 1px solid var(--primary-color);
  color: white;
}

.service-detail-actions .btn-primary:hover {
  background: var(--primary-hover);
}

.service-detail-actions .btn-danger {
  background: transparent;
  border: 1px solid var(--danger-color);
  color: var(--danger-color);
}

.service-detail-actions .btn-danger:hover {
  background: var(--danger-color);
  color: white;
}

/* Status Badge in Sidebar */
.service-summary-grid .status-badge {
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid;
}

.status-badge.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.08));
  color: #059669;
  border-color: rgba(16, 185, 129, 0.3);
}

.status-badge.up_to_date {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.08));
  color: #059669;
  border-color: rgba(16, 185, 129, 0.3);
}

.status-badge.due_soon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.08));
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.3);
}

.status-badge.overdue {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08));
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.3);
}

.status-badge.paused {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.15), rgba(148, 163, 184, 0.08));
  color: #475569;
  border-color: rgba(148, 163, 184, 0.3);
}

.status-badge.cancelled {
  background: rgba(100, 116, 139, 0.1);
  color: #475569;
}

.no-upcoming {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.add-service-modal {
  max-width: 560px;
}

.service-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.service-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.service-form .form-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.service-form .form-group input,
.service-form .form-group select,
.service-form .form-group textarea {
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.service-form .form-group input:focus,
.service-form .form-group select:focus,
.service-form .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.service-form .checkbox-group {
  grid-column: span 2;
}

.service-form .checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 400;
}

.detected-services-modal {
  max-width: 640px;
}

.detected-services-list {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.detected-service-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.detected-service-item:hover {
  border-color: var(--primary-color);
}

.detected-service-item.selected {
  border-color: var(--primary-color);
  background: rgba(99, 102, 241, 0.05);
}

.detected-service-info {
  flex: 1;
}

.detected-service-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.detected-service-details {
  display: flex;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.service-detail-modal {
  max-width: 600px;
}

.service-detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.service-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.service-detail-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.service-detail-value {
  font-size: 0.9375rem;
  color: var(--text-primary);
  font-weight: 500;
}

.service-payments-history {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  margin-top: 1rem;
}

.service-payments-history h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem;
}

#service-payments-list {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.payment-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--bg-secondary);
  border-radius: 6px;
  font-size: 0.8125rem;
}

@media (max-width: 768px) {
  .services-list {
    grid-template-columns: 1fr;
  }
  .service-form .form-row {
    grid-template-columns: 1fr;
  }
  .service-form .checkbox-group {
    grid-column: span 1;
  }
}

/* ========================================
   SETTINGS / AJUSTES SECTION
   ======================================== */
#section-ajustes {
  max-width: 900px;
}

.settings-section {
  margin-bottom: 2rem;
}

.settings-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.settings-section-title svg {
  color: var(--text-muted);
}

.settings-section-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0 0 1rem;
}

/* Categories Card */
.categories-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.categories-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-light);
}

.categories-count {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.categories-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 4rem 2rem;
  gap: 1rem;
  color: var(--text-muted);
}

.categories-loading span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.categories-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  gap: 0.75rem;
  color: var(--text-muted);
}

.categories-empty svg {
  opacity: 0.4;
}

.categories-empty p {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}

.categories-empty span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Categories Table */
.categories-list {
  width: 100%;
  overflow-x: auto;
}

.categories-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: var(--bg-white);
}

.categories-table thead {
  background-color: var(--bg-light);
}

.categories-table th {
  padding: 0.375rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.categories-table td {
  padding: 0.375rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

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

.categories-table tbody tr:hover {
  background-color: var(--bg-light);
}

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

.category-order-cell {
  width: 60px;
  text-align: center;
}

.category-color-cell {
  width: 60px;
  text-align: center;
}

.category-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

.category-name-cell {
  font-weight: 500;
  color: var(--text-primary);
}

.category-description-cell {
  color: var(--text-secondary);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-description-cell .text-muted {
  color: var(--text-muted);
}

.category-actions-cell {
  width: 80px;
  white-space: nowrap;
}

.category-actions-cell .action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-actions-cell .action-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
}

.category-actions-cell .action-btn.delete-btn {
  color: var(--danger-color);
}

.category-actions-cell .action-btn.delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-hover);
}

.category-system-badge {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.category-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.category-item:hover .category-actions {
  opacity: 1;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-icon-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
}

/* Category Modal */
.category-modal {
  max-width: 420px;
}

.category-form {
  padding: 1.25rem;
}

.category-form .form-group {
  margin-bottom: 1rem;
}

.category-form .form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.category-form input[type="text"],
.category-form input[type="number"] {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.category-form input[type="text"]:focus,
.category-form input[type="number"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 12, 107, 0.1);
}

.form-help-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  display: block;
}

.color-picker-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.category-form input[type="color"] {
  width: 48px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
}

.category-form input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.category-form input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.color-presets {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.color-preset {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.color-preset:hover {
  transform: scale(1.1);
  border-color: rgba(0, 0, 0, 0.2);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

/* Delete category preview */
.delete-category-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  margin: 0.75rem 0;
}

.delete-category-preview .category-name {
  font-weight: 500;
  color: var(--text-primary);
}

/* Email Upload Card */
.email-upload-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.email-upload-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 3rem 2rem;
  gap: 1rem;
  color: var(--text-muted);
}

.email-upload-loading span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.email-upload-content {
  padding: 1.25rem;
}

.email-upload-address {
  margin-bottom: 1.25rem;
}

.email-upload-address label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.email-copy-container {
  display: flex;
  gap: 0.5rem;
}

.email-address-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.9375rem;
  font-family: 'SF Mono', 'Consolas', monospace;
  background: var(--bg-light);
  color: var(--text-primary);
}

.btn-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.btn-copy:hover {
  background: var(--bg-light);
  color: var(--text-primary);
}

.email-upload-instructions {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.email-upload-instructions h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}

.email-upload-instructions ol {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

.email-upload-instructions li {
  margin-bottom: 0.375rem;
}

.email-supported-formats {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
}

.email-upload-actions {
  padding-top: 0.5rem;
}

@media (max-width: 640px) {
  .categories-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  .categories-count {
    text-align: center;
  }

  .category-actions {
    opacity: 1;
  }

  .color-presets {
    justify-content: center;
  }
}

/* ========================================
   TRANSACTION DETAIL EDITABLE FIELDS
   ======================================== */

.editable-field .detail-info-value {
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 8px;
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.editable-field .detail-info-value:hover {
  background-color: #F9FAFB;
}

.edit-icon {
  opacity: 0;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.editable-field .detail-info-value:hover .edit-icon {
  opacity: 0.5;
}

.edit-input {
  width: 100%;
  padding: 8px;
  border: 2px solid #3B82F6;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

/* Loading spinner animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.loading-spinner {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}

.category-value {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Category edit dropdown */
.category-edit-dropdown {
  position: relative;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 300px;
  z-index: 1000;
}

.category-edit-search {
  padding: 12px;
  border-bottom: 1px solid #E5E7EB;
}

.category-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}

.category-search-input:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.category-edit-options {
  max-height: 300px;
  overflow-y: auto;
  padding: 4px;
}

.category-edit-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.category-edit-option:hover {
  background-color: #F3F4F6;
}

.category-edit-option.selected {
  background-color: #EFF6FF;
}

/* Source badges */
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
}

.connection-source {
  background-color: #DBEAFE;
  color: #1E40AF;
  border: 1px solid #93C5FD;
}

.file-source {
  background-color: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-source:hover {
  background-color: #FDE68A;
  transform: translateY(-1px);
}

.transaction-id-value {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #6B7280;
  background-color: #F3F4F6;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* =============================================
   SERVICE-TRANSACTION LINKING STYLES
   ============================================= */

/* Service indicator in transactions table */
.service-indicator-cell {
  text-align: center;
  vertical-align: middle;
}

.service-linked-icon {
  font-size: 14px;
  opacity: 0.7;
  display: inline-block;
  transition: all 0.2s ease;
}

.service-linked-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Linked service in transaction detail */
.linked-service-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.linked-service-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

.linked-service-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: #6B7280;
}

.service-frequency,
.service-category {
  padding: 2px 8px;
  background-color: #F3F4F6;
  border-radius: 4px;
}

.linked-service-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.no-service-linked {
  display: flex;
  align-items: center;
  gap: 12px;
}

.no-service-text {
  color: #6B7280;
  font-size: 13px;
}

/* Payment link badge */
.payment-link-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  background-color: #DBEAFE;
  color: #1E40AF;
  border-radius: 4px;
}

/* Payment history item styles */
.payment-history-item {
  padding: 12px;
  border-bottom: 1px solid #E5E7EB;
  transition: background-color 0.2s ease;
}

.payment-history-item:hover {
  background-color: #F9FAFB;
}

.payment-history-item.linked {
  border-left: 3px solid #3B82F6;
}

.payment-history-item.predicted {
  opacity: 0.6;
  font-style: italic;
}

.payment-main-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.payment-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.payment-date {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
}

.payment-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}

.payment-status-text {
  font-size: 11px;
  color: #6B7280;
}

.payment-status-text.paid {
  color: #059669;
}

.payment-amount {
  font-size: 14px;
  font-weight: 600;
  color: #059669;
}

.payment-amount.negative {
  color: #DC2626;
}

.payment-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* Link buttons */
.btn-link-small,
.btn-link-tiny {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #3B82F6;
  background-color: transparent;
  border: 1px solid #3B82F6;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-link-tiny {
  padding: 4px 8px;
  font-size: 11px;
}

.btn-link-small:hover,
.btn-link-tiny:hover {
  background-color: #EFF6FF;
  transform: translateY(-1px);
}

.btn-link-small.danger,
.btn-link-tiny.danger {
  color: #DC2626;
  border-color: #DC2626;
}

.btn-link-small.danger:hover,
.btn-link-tiny.danger:hover {
  background-color: #FEF2F2;
}

/* Section header with action button */
.section-header-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

/* Modal for linking transactions */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

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

.modal-container {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #E5E7EB;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background-color: transparent;
  border: none;
  border-radius: 6px;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background-color: #F3F4F6;
  color: #111827;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* Transaction summary in modal */
.transaction-summary {
  background-color: #F9FAFB;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.tx-summary-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.tx-summary-item:last-child {
  margin-bottom: 0;
}

.tx-summary-label {
  font-size: 12px;
  font-weight: 600;
  color: #6B7280;
  min-width: 100px;
}

.tx-summary-value {
  font-size: 13px;
  color: #111827;
}

/* Suggested services section */
.suggested-services,
.all-services {
  margin-bottom: 24px;
}

.suggested-services:last-child,
.all-services:last-child {
  margin-bottom: 0;
}

.suggested-services h4,
.all-services h4 {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 12px 0;
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Service match item */
.service-match-item,
.service-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background-color: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.service-match-item:hover,
.service-item:hover {
  background-color: #F9FAFB;
  border-color: #3B82F6;
  transform: translateX(4px);
}

.service-match-info,
.service-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.service-match-name,
.service-item-name {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

.service-match-meta,
.service-item-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #6B7280;
}

.service-amount {
  padding: 2px 6px;
  background-color: #F3F4F6;
  border-radius: 4px;
}

.service-match-confidence {
  display: flex;
  align-items: center;
}

.confidence-badge {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  white-space: nowrap;
}

.confidence-badge.high {
  background-color: #D1FAE5;
  color: #065F46;
}

.confidence-badge.medium {
  background-color: #FEF3C7;
  color: #92400E;
}

.confidence-badge.low {
  background-color: #FEE2E2;
  color: #991B1B;
}

/* Loading spinner inline */
.loading-small-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6B7280;
}

.loading-small-inline::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid #E5E7EB;
  border-top-color: #3B82F6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 32px;
  color: #6B7280;
  font-size: 13px;
}

/* Error text */
.error-text {
  color: #DC2626;
  font-size: 12px;
}

/* ========================================
   ASSOCIATION MODAL - IMPROVED DESIGN
   ======================================== */

/* Association Modal Container */
.associate-service-modal {
  max-width: 700px;
  width: 95%;
}

/* Transaction Summary Card */
.transaction-summary-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tx-card-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.tx-card-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tx-card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}

.tx-card-value {
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
}

.tx-card-value-primary {
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-height: 1.4;
  max-height: 4.2em;
}

.tx-card-value-amount {
  font-size: 16px;
  font-weight: 700;
  color: #3b82f6;
}

/* Services Section */
.services-section {
  margin-bottom: 28px;
}

.services-section:last-child {
  margin-bottom: 0;
}

.services-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}

.services-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}

.services-section-title svg {
  color: #3b82f6;
  flex-shrink: 0;
}

.services-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  background: #3b82f6;
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: 12px;
}

/* Create Service Button */
.btn-create-service {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.btn-create-service:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-create-service:active {
  transform: translateY(0);
}

.btn-create-service svg {
  flex-shrink: 0;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

/* Service Card */
.service-card {
  background: white;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.service-card:hover {
  border-color: #3b82f6;
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card-suggested {
  border-color: #22c55e;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.service-card-suggested::before {
  background: linear-gradient(90deg, #22c55e, #10b981);
}

.service-card-suggested:hover {
  border-color: #16a34a;
  background: #ecfdf5;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.service-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.service-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
  flex: 1;
}

.service-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.service-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #6b7280;
  padding: 4px 8px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.service-card-suggested .service-meta-item {
  background: white;
  border-color: #d1fae5;
}

.service-meta-item svg {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
}

/* Confidence Badge */
.confidence-badge {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.confidence-badge.high {
  background: #22c55e;
  color: white;
}

.confidence-badge.medium {
  background: #f59e0b;
  color: white;
}

.confidence-badge.low {
  background: #6b7280;
  color: white;
}

/* Empty State for Services */
.empty-state-services {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  background: #e5e7f0;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  gap: 16px;
}

.empty-state-services svg {
  color: #9ca3af;
  opacity: 0.5;
}

.empty-state-services p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
}

.empty-state-services .btn-primary {
  margin-top: 8px;
}

/* Loading Services State */
.loading-services {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  gap: 12px;
}

.loading-services span {
  font-size: 13px;
  color: #6b7280;
}

.spinner-small {
  width: 24px;
  height: 24px;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Error State for Services */
.error-state-services {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  gap: 16px;
}

.error-state-services svg {
  color: #ef4444;
}

.error-state-services p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #dc2626;
}

.error-state-services .btn-secondary {
  margin-top: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tx-card-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .associate-service-modal {
    width: 98%;
    max-height: 90vh;
  }

  .modal-body {
    padding: 16px;
  }

  .services-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .btn-create-service {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================== */
/* KEYWORDS MODAL STYLES */
/* ========================================== */

.keywords-modal {
  width: 640px;
  max-width: 95%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.keywords-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  gap: 16px;
}

.keywords-loading span {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.keywords-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.keyword-form {
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(to bottom, #ffffff, #e5e7f0);
  flex-shrink: 0;
}

.keyword-input-wrapper {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.keyword-input-wrapper input {
  flex: 1;
  font-size: 15px;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  transition: all 0.2s ease;
  background: white;
}

.keyword-input-wrapper input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 12, 107, 0.1);
  transform: translateY(-1px);
}

.keyword-input-wrapper input::placeholder {
  color: #9ca3af;
}

.keyword-input-wrapper .btn-primary {
  margin-top: 0;
  white-space: nowrap;
  padding: 12px 20px;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(44, 12, 107, 0.2);
  transition: all 0.2s ease;
}

.keyword-input-wrapper .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 12, 107, 0.3);
}

.keyword-input-wrapper .btn-primary:active {
  transform: translateY(0);
}

.keywords-list-section {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  min-height: 200px;
}

.keywords-list-section::-webkit-scrollbar {
  width: 8px;
}

.keywords-list-section::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.keywords-list-section::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.keywords-list-section::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.keywords-list-section h4 {
  margin: 0 0 16px 0;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.keywords-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  gap: 12px;
}

.keywords-empty p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
}

.keywords-empty span {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.5;
  max-width: 300px;
}

.keywords-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.keyword-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: white;
  border: 2px solid #f1f5f9;
  border-radius: 10px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.keyword-item:hover {
  border-color: var(--primary-color);
  background: #fafbff;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(44, 12, 107, 0.08);
}

.keyword-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.keyword-text {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Courier New', monospace;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.keyword-meta {
  font-size: 12px;
  color: #6b7280;
}

.keyword-delete-btn {
  padding: 8px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #cbd5e1;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
}

.keyword-item:hover .keyword-delete-btn {
  opacity: 1;
}

.keyword-delete-btn:hover {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #dc2626;
  transform: scale(1.1) rotate(90deg);
}

.keyword-delete-btn:active {
  transform: scale(0.95) rotate(90deg);
}

@media (max-width: 768px) {
  .keywords-modal {
    width: 98%;
    max-height: 90vh;
  }

  .keyword-form {
    padding: 20px;
  }

  .keyword-input-wrapper {
    gap: 8px;
  }

  .keyword-input-wrapper input {
    font-size: 16px; /* Prevent zoom on iOS */
  }

  .keywords-list-section {
    padding: 20px;
  }

  .keyword-item {
    padding: 12px 16px;
  }

  .keyword-text {
    font-size: 14px;
  }
}

/* ========================================
   TRANSACTION SPLITS STYLES
   ======================================== */

/* Split badge en tabla */
.split-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background-color: #EEF2FF;
  color: #4F46E5;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
  vertical-align: middle;
}

.split-badge svg {
  width: 12px;
  height: 12px;
}

/* Lista de splits en panel derecho */
.splits-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #E5E7EB;
}

.detail-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.detail-section-header h4 {
  margin: 0;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #6B7280;
  transition: color 0.2s ease;
}

.btn-icon:hover {
  color: #111827;
}

.splits-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.split-item {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 12px;
  padding: 12px;
  background-color: #F9FAFB;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
}

.split-category {
  display: flex;
  align-items: center;
  gap: 8px;
}

.split-category .category-name {
  font-weight: 500;
  color: #111827;
}

.split-description {
  color: #6B7280;
  font-size: 13px;
}

.split-amount {
  font-weight: 600;
  color: #111827;
  text-align: right;
}

.splits-total {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background-color: #F3F4F6;
  border-radius: 8px;
  margin-top: 8px;
  font-size: 14px;
}

.btn-text-danger {
  background: none;
  border: none;
  color: #EF4444;
  cursor: pointer;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 500;
  margin-top: 12px;
  transition: color 0.2s ease;
}

.btn-text-danger:hover {
  color: #DC2626;
}

/* Modal de editor de splits */
.split-editor-modal {
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
}

.split-editor-modal .custom-modal-actions {
  padding: 20px 24px 24px 24px;
  margin-top: 8px;
}

.transaction-info-banner {
  background-color: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.info-row:last-child {
  margin-bottom: 0;
}

.info-row .label {
  color: #6B7280;
  font-size: 14px;
}

.info-row .value {
  font-weight: 600;
  color: #111827;
}

.splits-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.split-row {
  display: grid;
  grid-template-columns: 32px 1fr 40px;
  gap: 12px;
  align-items: start;
}

.split-row-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: #EEF2FF;
  color: #4F46E5;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.split-row-fields {
  display: grid;
  grid-template-columns: 1fr 2fr 120px;
  gap: 12px;
}

.split-row-fields .form-group {
  margin: 0;
}

.split-row-fields label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
}

.split-row-fields input,
.split-row-fields select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 14px;
}

.split-row-fields input:focus,
.split-row-fields select:focus {
  outline: none;
  border-color: #4F46E5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-icon-danger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #EF4444;
  transition: color 0.2s ease;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-danger:hover {
  color: #DC2626;
}

.split-summary {
  background-color: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.summary-row:last-child {
  margin-bottom: 0;
  font-weight: 600;
  font-size: 16px;
}

.sum-value {
  color: #6B7280;
}

.remaining-value {
  color: #10B981;
  font-weight: 600;
}

.btn-block {
  width: 100%;
}

/* Responsive para modal de splits */
@media (max-width: 768px) {
  .split-editor-modal {
    max-width: 95%;
    margin: 20px auto;
  }

  .split-row {
    grid-template-columns: 32px 1fr;
    gap: 8px;
  }

  .split-row-fields {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .btn-icon-danger {
    position: absolute;
    top: 4px;
    right: 4px;
  }

  .split-row {
    position: relative;
    padding-right: 40px;
  }
}

/* ===================================
   LANDING PAGE STYLES
   =================================== */

.landing-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  overflow-y: auto;
  background: #ffffff;
  font-family: 'Inter', sans-serif;
}

/* Navigation */
.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #f0f0f5;
  z-index: 1000;
  padding: 1rem 0;
}

.landing-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.landing-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.landing-logo-img {
  height: 36px;
  width: auto;
}

.landing-logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c0c6b;
}

.landing-nav-login {
  padding: 0.625rem 1.5rem;
  background: #2c0c6b;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.landing-nav-login:hover {
  background: #1f0850;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44, 12, 107, 0.2);
}

/* Hero Section */
.landing-hero {
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
}

.landing-hero-content {
  max-width: 600px;
  margin-bottom: 3rem;
}

.landing-hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  color: #1a1a1a;
  margin: 0 0 1.5rem;
}

.landing-gradient-text {
  background: linear-gradient(135deg, #2c0c6b 0%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.7;
  color: #64748b;
  margin: 0 0 2rem;
}

.landing-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #2c0c6b 0%, #4338ca 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(44, 12, 107, 0.3);
}

.landing-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(44, 12, 107, 0.4);
}

.landing-cta-primary svg {
  width: 20px;
  height: 20px;
}

/* Hero Visual */
.landing-hero-visual {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.landing-hero-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid #f0f0f5;
  max-width: 400px;
  width: 100%;
}

.landing-hero-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f5;
}

.landing-hero-card-icon {
  font-size: 1.5rem;
}

.landing-hero-card-header span {
  font-weight: 600;
  color: #2c0c6b;
  font-size: 1.125rem;
}

.landing-hero-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.landing-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.landing-hero-stat-label {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.landing-hero-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2c0c6b;
}

.landing-hero-stat-value.success {
  color: #10b981;
}

/* Features Section */
.landing-features {
  padding: 5rem 0;
  background: white;
}

.landing-section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.landing-section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 1rem;
  line-height: 1.3;
}

.landing-section-subtitle {
  font-size: 1.125rem;
  color: #64748b;
  line-height: 1.7;
}

.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.landing-feature-card {
  padding: 2rem;
  background: #f8f9fc;
  border-radius: 16px;
  border: 1px solid #f0f0f5;
  transition: all 0.3s ease;
}

.landing-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(44, 12, 107, 0.1);
  border-color: #e5e7eb;
}

.landing-feature-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #2c0c6b 0%, #4338ca 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.landing-feature-icon svg {
  color: white;
}

.landing-feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2c0c6b;
  margin: 0 0 0.75rem;
}

.landing-feature-description {
  font-size: 1rem;
  line-height: 1.6;
  color: #64748b;
  margin: 0;
}

/* CTA Section */
.landing-cta-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, #2c0c6b 0%, #4338ca 100%);
}

.landing-cta-box {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.landing-cta-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin: 0 0 1rem;
  line-height: 1.3;
}

.landing-cta-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 2.5rem;
  line-height: 1.6;
}

.landing-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: white;
  color: #2c0c6b;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.landing-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.landing-cta-button svg {
  width: 20px;
  height: 20px;
}

/* Footer */
.landing-footer {
  padding: 3rem 0;
  background: #f8f9fc;
  border-top: 1px solid #f0f0f5;
}

.landing-footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.landing-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.landing-footer-logo {
  height: 32px;
  width: auto;
}

.landing-footer-brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2c0c6b;
}

.landing-footer-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.landing-footer-link {
  color: #6366f1;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s ease;
}

.landing-footer-link:hover {
  color: #4f46e5;
  text-decoration: underline;
}

.landing-footer-separator {
  color: #9ca3af;
  font-size: 0.875rem;
}

.landing-footer-text {
  font-size: 0.9375rem;
  color: #64748b;
  margin: 0;
  margin-top: 0.75rem;
}

/* Error Message */
.landing-error {
  display: none;
  position: fixed;
  top: 6rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 500px;
  width: 90%;
  padding: 1rem 1.5rem;
  background: #fee;
  border: 1px solid #fcc;
  border-radius: 12px;
  color: #c00;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 10000;
}

/* Responsive Design */
@media (max-width: 768px) {
  .landing-container {
    padding: 0 1rem;
  }

  .landing-hero {
    padding: 6rem 0 3rem;
  }

  .landing-hero-title {
    font-size: 2.5rem;
  }

  .landing-hero-subtitle {
    font-size: 1.125rem;
  }

  .landing-cta-primary {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
  }

  .landing-section-title {
    font-size: 2rem;
  }

  .landing-section-subtitle {
    font-size: 1rem;
  }

  .landing-features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .landing-cta-title {
    font-size: 2rem;
  }

  .landing-cta-subtitle {
    font-size: 1.125rem;
  }

  .landing-hero-card {
    padding: 1.5rem;
  }

  .landing-hero-card-stats {
    gap: 1rem;
  }

  .landing-hero-stat-value {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .landing-hero-title {
    font-size: 2rem;
  }

  .landing-hero-subtitle {
    font-size: 1rem;
  }

  .landing-logo-text {
    font-size: 1.25rem;
  }

  .landing-nav-login {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .landing-section-title {
    font-size: 1.75rem;
  }

  .landing-cta-title {
    font-size: 1.75rem;
  }
}

/* ================================
   PROCESSING SPINNER
   ================================ */
.processing-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

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

.file-status-badge.processing {
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
  animation: pulse-processing 2s ease-in-out infinite;
}

@keyframes pulse-processing {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* ================================
   PROCESSING BANNER
   ================================ */
.processing-banner {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
  animation: slide-down 0.3s ease-out;
}

.processing-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.processing-banner-content.warning {
  background: rgba(251, 191, 36, 0.1);
  padding: 0.5rem;
  border-radius: 6px;
}

.btn-refresh-small {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  margin-left: auto;
}

.btn-refresh-small:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
