html {
  font-size: 14px;
}

/* Vergroot de font-size op mobiele schermen voor betere leesbaarheid */
@media (max-width: 600px) {
  html {
    font-size: 18px;
  }
  body, input, textarea, select, button {
    font-size: 1.15em;
  }
  h1, .page-title {
    font-size: 2.1em;
  }
  h2 {
    font-size: 1.6em;
  }
  h3 {
    font-size: 1.3em;
  }
  .btn, .form-label, .form-control, .upload-title, .upload-text, .file-info, .description-section, .bottom-info, .preview-header {
    font-size: 1.1em;
  }
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem rgba(255, 255, 255, 0.3), 0 0 0 0.25rem var(--accent-color);
  color: inherit;
}

/* Specific focus styles for different button types */
.btn-primary:focus,
.btn-primary:active:focus {
  color: white !important;
  background-color: var(--accent-color) !important;
  border-color: var(--light-blue) !important;
}

.btn-outline-light:focus,
.btn-outline-light:active:focus {
  color: white !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/*
   Hoofdkleur en lichte grijsblauwe kleur als custom properties
*/
:root {
  --main-color: #152c48;           /* Dark Blue - Main/Primary */
  --light-blue: #386399;           /* Light Blue - Checkmarks/Success */
  --lighter-blue: #5e82b0;         /* Lighter Blue - Input Fields/Forms */
  --blue-grey: #b7c1d1;           /* Blue Gray - Invoice/Receipt Elements */
  --accent-color: #386399;         /* Using Light Blue as accent */
  --success-color: #386399;        /* Using Light Blue for success */
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --background-light: #f8fafc;
  --border-radius: 16px;
  --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --gradient-primary: linear-gradient(135deg, var(--main-color) 0%, var(--accent-color) 100%);
}

body {
  background-color: var(--background-light);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.navbar, .navbar-brand {
  background-color: var(--blue-grey) !important;
  color: var(--main-color) !important;
}

.navbar-nav .nav-link.active, .navbar-nav .nav-link:focus, .navbar-nav .nav-link:hover {
  background-color: var(--main-color) !important;
  color: #fff !important;
}

.navbar-nav .nav-link {
  color: var(--main-color) !important;
}

.btn-primary, .btn-outline-primary {
  background-color: var(--main-color) !important;
  border-color: var(--main-color) !important;
  color: #fff !important;
}

.btn-outline-primary {
  background-color: transparent !important;
  color: var(--main-color) !important;
}

.card-header.bg-primary {
  background-color: var(--main-color) !important;
  border-color: var(--main-color) !important;
}

a {
  color: var(--main-color);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ====== MOBILE-FIRST DESIGN ====== */

/* Mobile Container */
.mobile-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
  min-height: calc(100vh - 120px);
}

/* Hero Section */
.hero-section {
  background: var(--gradient-primary);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
}

.hero-content {
  position: relative;
  z-index: 1;
}

.icon-wrapper {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  backdrop-filter: blur(10px);
}

.icon-wrapper i {
  font-size: 2.5rem;
  color: white;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 0;
  font-weight: 400;
}

/* Upload Section */
.upload-section {
  padding: 1.5rem;
}

.upload-area {
  margin-bottom: 2rem;
}

.upload-zone {
  background: white;
  border: 3px dashed var(--blue-grey);
  border-radius: var(--border-radius);
  padding: 3rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent-color);
  background: var(--background-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.upload-icon i {
  font-size: 3rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
  display: block;
}

.upload-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--main-color);
  margin-bottom: 0.5rem;
}

.upload-text {
  color: var(--lighter-blue);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.file-input {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
}

.file-info {
  margin-top: 1rem;
}

/* Preview Section */
.preview-section {
  margin: 1.5rem;
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.preview-header {
  padding: 1rem 1.5rem;
  background: var(--background-light);
  border-bottom: 1px solid var(--blue-grey);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-header h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--main-color);
}

.image-preview-container {
  position: relative;
  background: #000;
}

.image-preview {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  display: block;
}

.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  padding: 1rem;
}

.image-info span {
  display: block;
  font-size: 0.9rem;
}

.image-info span:first-child {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* Upload Preview Zoom Functionality */
.image-preview-container {
  position: relative;
  overflow: hidden;
}

.image-preview-container:hover .zoom-hint {
  display: flex !important;
  animation: fadeIn 0.3s ease;
}

.image-preview-container .zoom-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 10;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.image-preview-container .zoom-hint i {
  color: var(--accent-color);
}

/* Show zoom hint on mobile devices immediately */
@media (max-width: 767px) {
  .image-preview-container .zoom-hint {
    display: flex !important;
    opacity: 0.9;
  }
  
  .image-preview-container:hover .zoom-hint {
    opacity: 1;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Quality Check */
.quality-check {
  padding: 1rem 1.5rem;
}

.quality-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

.quality-good {
  background: rgba(56, 99, 153, 0.1);
  color: var(--success-color);
}

.quality-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.quality-info {
  background: rgba(56, 99, 153, 0.1);
  color: var(--accent-color);
}

/* Input Group */
.input-group, .description-section {
  margin: 1.5rem;
}

.form-label {
  font-weight: 600;
  color: var(--main-color);
  margin-bottom: 0.5rem;
  display: block;
}

.mobile-textarea {
  border: 2px solid var(--blue-grey);
  border-radius: 12px;
  padding: 1rem;
  font-size: 1rem;
  transition: border-color 0.2s ease;
  resize: vertical;
  min-height: 100px;
}

.mobile-textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

/* Submit Section */
.submit-section {
  padding: 1.5rem;
  background: white;
  border-top: 1px solid var(--blue-grey);
  z-index: 10;
}

/* Description Section - Mobile optimized positioning */
.description-section {
  background: white;
  border-top: 1px solid var(--blue-grey);
  padding: 1.5rem;
  margin: 0;
}

.btn-mobile {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  background: var(--gradient-primary);
  border: none;
  color: white;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-mobile:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-mobile:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-loader {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Quick Actions */
.quick-actions {
  padding: 1.5rem;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  background: white;
  border-radius: var(--border-radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  border: 1px solid var(--blue-grey);
}

.quick-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  text-decoration: none;
  color: inherit;
}

.quick-action-icon {
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.quick-action-icon i {
  font-size: 1.5rem;
  color: white;
}

.quick-action-content {
  flex: 1;
}

.quick-action-title {
  display: block;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--main-color);
  margin-bottom: 0.25rem;
}

.quick-action-subtitle {
  display: block;
  color: var(--lighter-blue);
  font-size: 0.9rem;
}

.quick-action-arrow {
  color: var(--blue-grey);
  font-size: 1.2rem;
}

/* Bottom Info */
.bottom-info {
  padding: 1.5rem;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--lighter-blue);
  font-size: 0.85rem;
  flex: 1;
  min-width: 100px;
}

.info-item i {
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

/* Validation Errors */
.validation-error {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

/* ====== MOBILE HEADER & LAYOUT ====== */

.mobile-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-header .navbar {
  padding: 0.75rem 0;
  margin-bottom: 0;
}

.mobile-header .navbar-brand {
  font-size: 1.1rem;
}

.mobile-header .nav-link {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  margin: 0 0.25rem;
  transition: all 0.2s ease;
}

.mobile-header .nav-link:hover {
  background-color: var(--background-light);
}

.mobile-header .navbar-toggler {
  padding: 0.5rem;
  border-radius: 8px;
}

.main-content {
  min-height: calc(100vh - 80px);
  padding-bottom: 1rem;
}

.mobile-footer {
  margin-top: auto;
}

/* PWA-like touch improvements */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

input, textarea, select, button {
  -webkit-user-select: auto;
  user-select: auto;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading states */
.btn-mobile.loading {
  pointer-events: none;
}

.btn-mobile.loading .btn-text {
  opacity: 0;
}

.btn-mobile.loading .btn-loader {
  opacity: 1;
}

/* Improved focus states for accessibility */
.upload-zone:focus-within {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Animation for quality indicator */
.quality-indicator {
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Preview section animations */
.preview-section {
  animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Touch feedback improvements */
.upload-zone:active,
.quick-action-btn:active,
.btn-mobile:active {
  transform: scale(0.98);
}

/* Dark mode support (if needed later) */
@media (prefers-color-scheme: dark) {
  /* Ready for dark mode implementation */
}

/* Landscape mobile optimizations */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    padding: 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .icon-wrapper {
    width: 60px;
    height: 60px;
  }
  
  .upload-zone {
    padding: 2rem 1rem;
  }
}

/* Tablet Design */
@media (min-width: 768px) {
  .mobile-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1rem;
  }
  
  .hero-section {
    border-radius: var(--border-radius);
    margin: 1rem 0;
  }
  
  .upload-section {
    padding: 2rem;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .preview-section,
  .mobile-preview {
    padding: 0 1.5rem;
  }
  
  .info-section {
    margin: 1.5rem 1.5rem;
  }
  
  .info-cards {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  
  .section-title {
    font-size: 1.25rem;
  }
  
  .file-preview-container {
    min-height: 350px;
    padding: 3rem;
  }
}

/* Desktop Design */
@media (min-width: 1200px) {
  .mobile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
  }
  
  .hero-section {
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
  }
  
  .hero-content {
    display: flex;
    align-items: center;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
  }
  
  .hero-content .icon-wrapper {
    margin: 0 2rem 0 0;
    width: 100px;
    height: 100px;
  }
  
  .hero-title {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
  }
  
  .upload-section {
    padding: 3rem 2rem;
  }
  
  .upload-zone {
    padding: 4rem 2rem;
  }
  
  .description-section {
    margin-top: 3rem;
  }
  
  .preview-section,
  .mobile-preview {
    padding: 0;
  }
  
  .info-section {
    margin: 0;
  }
  
  .desktop-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
  }
  
  .preview-column,
  .info-column {
    min-height: 0;
  }
  
  .preview-column {
    position: sticky;
    top: 2rem;
    height: fit-content;
  }
  
  .image-preview-container.desktop-preview {
    aspect-ratio: 3/4;
    max-height: 700px;
    box-shadow: var(--shadow-medium);
  }
  
  .file-preview-container.desktop-preview {
    min-height: 500px;
    box-shadow: var(--shadow-medium);
  }
  
  .info-cards.desktop-info {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .info-card {
    padding: 1.5rem;
  }
}

/* ====== INVOICES PAGE ====== */

/* Header Section */
.invoices-header {
  background: var(--gradient-primary);
  color: white;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.invoices-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
}

.header-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Header Navigation (back button for details page) */
.header-navigation {
  flex: 0 0 auto;
}

.header-navigation .back-button {
  color: white;
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
}

.header-navigation .back-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

/* Header Actions (action buttons for details page) */
.header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-actions .btn-round {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  text-decoration: none;
  transition: all 0.2s;
}

.header-actions .btn-round:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  transform: scale(1.05);
}

.header-icon {
  font-size: 2.5rem;
  opacity: 0.9;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.025em;
}

.page-subtitle {
  margin: 0;
  opacity: 0.8;
  font-size: 0.9rem;
}

.btn-round {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  backdrop-filter: blur(10px);
}

.btn-round:hover {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  transform: scale(1.05);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--lighter-blue);
}

.empty-icon {
  width: 120px;
  height: 120px;
  background: var(--background-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
}

.empty-icon i {
  font-size: 3rem;
  color: var(--blue-grey);
}

.empty-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--main-color);
  margin-bottom: 0.5rem;
}

.empty-subtitle {
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* Pagination Controls */
.pagination-controls {
  padding: 1rem 1.5rem;
  background: white;
  border-bottom: 1px solid var(--blue-grey);
  display: flex;
  justify-content: flex-end;
}

.page-size-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-size-selector .form-select {
  border-radius: 8px;
  border: 1px solid var(--blue-grey);
  min-width: 80px;
}

/* Invoices List */
.invoices-list {
  padding: 0 1rem;
}

/* Mobile-first layout */
.invoice-card {
  background: white;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--blue-grey);
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  display: block;
}

.invoice-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.invoice-card:active {
  transform: translateY(0) scale(0.98);
}

.invoice-thumbnail {
  width: 100%;
  height: 120px;
  position: relative;
  overflow: hidden;
  background: var(--background-light);
}

.thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #dc2626;
}

.thumbnail-placeholder i {
  font-size: 2.5rem;
}

.invoice-content {
  padding: 1rem;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.invoice-date {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  color: #6b7280;
}

.date-day {
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
}

.invoice-actions {
  position: relative;
}

.btn-ghost {
  background: transparent;
  border: none;
  color: #6b7280;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  background: #f3f4f6;
  color: #374151;
}

.invoice-title {
  font-weight: 600;
  font-size: 1rem;
  color: #1f2937;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.invoice-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.invoice-footer {
  border-top: 1px solid #f3f4f6;
  padding-top: 0.75rem;
}

.status-indicators {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.file-type-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 4px;
  text-transform: uppercase;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.status-pending {
  background: #fef3c7;
  color: #d97706;
}

.status-success {
  background: #ecfdf5;
  color: #059669;
}

.status-error {
  background: #fee2e2;
  color: #dc2626;
}

.invoice-analysis {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.store-name {
  font-size: 0.875rem;
  color: #6b7280;
  display: flex;
  align-items: center;
}

.total-amount {
  font-size: 1rem;
  font-weight: 600;
  color: var(--success-color);
}

/* Mobile Pagination */
.pagination-wrapper {
  padding: 1.5rem;
  background: white;
  border-top: 1px solid #e5e7eb;
}

.pagination-mobile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination-mobile .page-item {
  display: flex;
}

.pagination-mobile .page-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--gradient-primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.pagination-mobile .page-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
  color: white;
}

.page-info {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

/* Responsive Design for Invoices - Tablet */
@media (min-width: 768px) {
  .mobile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
  }
  
  .invoices-header {
    border-radius: var(--border-radius);
    margin: 1rem 0;
  }
  
  .pagination-controls {
    margin: 1rem 0;
    border-radius: var(--border-radius);
  }
  
  /* Card view for tablets */
  .card-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
  }
  
  .invoice-card {
    margin-bottom: 0;
    height: fit-content;
    display: flex;
    flex-direction: row;
  }
  
  .invoice-thumbnail {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
  }
  
  .invoice-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}

/* Desktop layout for large screens */
@media (min-width: 1200px) {
  .mobile-container {
    max-width: 1200px;
    padding: 0 2rem;
  }
  
  .invoices-header {
    margin: 2rem 0;
    padding: 2rem;
  }
  
  .header-content {
    max-width: none;
    justify-content: space-between;
  }
  
  .header-title {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
  }
  
  .header-actions {
    display: flex;
    gap: 1rem;
  }
  
  .btn-round {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
  }
  
  .pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .page-size-selector {
    margin-left: auto;
  }
  
  .invoices-list {
    padding: 0;
  }
  
  .table-view {
    display: block;
    padding: 2rem;
  }
  
  .card-view {
    display: none;
  }
}

/* Desktop Table View */
.table-view {
  padding: 1.5rem;
}

.modern-table {
  font-size: 0.9rem;
}

.table-header th {
  background: var(--main-color);
  color: white;
  border: none;
  font-weight: 600;
  padding: 1rem 0.75rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.table-row {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.table-row:hover {
  background-color: #f8fafc;
}

.table-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.table-thumbnail-placeholder {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dc2626;
  font-size: 1.5rem;
  margin: 0 auto;
}

.file-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.file-name {
  font-weight: 600;
  color: #1f2937;
  line-height: 1.3;
  max-width: 200px;
  word-break: break-word;
}

.file-details {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.description-text {
  color: #6b7280;
  font-size: 0.875rem;
  max-width: 200px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.date-info {
  text-align: center;
}

.date-primary {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.875rem;
}

.date-secondary {
  color: #6b7280;
  font-size: 0.75rem;
}

.analysis-info {
  font-size: 0.8rem;
}

.store-name-small {
  color: #6b7280;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.total-amount-small {
  font-weight: 600;
  color: var(--success-color);
  font-size: 0.875rem;
}

/* Responsive adjustments for table view */
@media (min-width: 1400px) {
  .file-name {
    max-width: 300px;
  }
  
  .description-text {
    max-width: 250px;
  }
}

/* ======================================
   INVOICE DETAILS PAGE STYLES - RESPONSIVE
   ====================================== */

/* Base Mobile Styles */
.preview-section,
.mobile-preview {
    margin-top: 1rem;
    padding: 0 1rem;
}

.info-section {
    margin: 1.5rem 1rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    margin-left: 1rem;;
    display: flex;
    align-items: center;
}

.section-title i {
    color: var(--accent-color);
}

.info-cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.info-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.info-card.full-width {
    grid-column: 1 / -1;
}

.info-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    word-break: break-word;
}

.info-secondary {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.file-type-badge {
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.image-preview-container {
    position: relative;
    background: #f8fafc;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.invoice-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s;
}

.invoice-image:hover {
    transform: scale(1.02);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.image-preview-container:hover .image-overlay {
    opacity: 1;
}

.file-preview-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-icon {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.file-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.file-info p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* Tablet Responsive */

/* Analysis Section */
.analysis-section {
    margin-top: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.analysis-content {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
}

.empty-state {
    padding: 3rem 2rem;
    text-align: center;
    color: #64748b;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #94a3b8;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.modern-alert {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-icon {
    color: #dc2626;
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert-content h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.alert-content p {
    margin-bottom: 0.25rem;
    color: #1e293b;
}

.alert-content small {
    color: #64748b;
}

/* Analysis Cards */
.analysis-cards {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    grid-template-columns: 1fr;
}

/* Analysis Card Base Styles */
.analysis-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.analysis-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.analysis-card .card-header {
    background: var(--main-color);
    color: white;
    padding: 0.75rem 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.analysis-card .card-content {
    padding: 1rem;
}

/* Analysis Card Info Items */
.analysis-card .info-item {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.analysis-card .info-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.analysis-card .info-item .label {
    font-weight: 600;
    color: #64748b;
    flex-shrink: 0;
    font-size: 0.875rem;
    min-width: 140px;
    text-align: left;
}

.analysis-card .info-item .value {
    font-weight: 600;
    color: #1e293b;
    text-align: left;
    word-break: break-word;
    font-size: 0.95rem;
    flex: 1;
}

.analysis-card .info-item.highlighted {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 0.5rem -0.5rem;
    border: 1px solid #bbf7d0;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.1);
}

.analysis-card .info-item.highlighted .value.amount {
    color: #059669;
    font-size: 1.25rem;
    font-weight: 700;
}

.analysis-card .info-item.highlighted .label {
    color: #065f46;
    font-weight: 700;
}

.analysis-card .info-item.meta .label,
.analysis-card .info-item.meta .value {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Desktop Enhancements for Analysis */
@media (min-width: 1200px) {
  .analysis-card .card-header {
    padding: 1.25rem 1.5rem;
    font-size: 1.2rem;
  }
  
  .analysis-card .card-content {
    padding: 1.5rem;
  }
  
  .analysis-card .info-item .label {
    font-size: 1rem;
    min-width: 160px;
  }
  
  .analysis-card .info-item .value {
    font-size: 1.05rem;
  }
  
  .analysis-card .info-item.highlighted .value.amount {
    font-size: 1.5rem;
  }
  
  .analysis-card .info-item {
    padding: 1rem 0;
  }
}

/* ====== DESKTOP DELETE CONFIRMATION ====== */
@media (min-width: 1200px) {
  .delete-confirm-desktop {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
  }
  
  .delete-preview-column {
    position: sticky;
    top: 2rem;
    height: fit-content;
  }
  
  .delete-action-column {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    height: fit-content;
  }
  
  .delete-warning {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #f87171;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-medium);
  }
  
  .delete-warning .alert-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .delete-warning h6 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .delete-warning p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  
  .delete-action-column .btn-danger {
    font-size: 1.25rem;
    padding: 1.5rem 2rem;
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
  }
  
  .delete-action-column .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
  }
  
  .delete-action-column .btn-outline-secondary {
    padding: 1rem 2rem;
    width: 100%;
    border-radius: 0.75rem;
    font-size: 1.1rem;
  }
  
  .desktop-details-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f1f5f9;
  }
  
  .desktop-details-section h5 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--main-color);
  }
  
  .desktop-details-section .info-cards {
    gap: 1.5rem;
  }
}

/* ====== GENERAL DESKTOP IMPROVEMENTS ====== */
@media (min-width: 1200px) {
  /* Improved spacing and typography */
  body {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  /* Better button spacing and sizing */
  .btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
  }
  
  .btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
  }
  
  /* Card improvements */
  .card {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid #e2e8f0;
  }
  
  .card:hover {
    box-shadow: var(--shadow-medium);
  }
  
  /* Form improvements */
  .form-control, .form-select {
    border-radius: 0.5rem;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
  }
  
  .form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(56, 99, 153, 0.1);
  }
  
  /* Alert improvements */
  .alert {
    border-radius: var(--border-radius);
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
    border: none;
    box-shadow: var(--shadow-soft);
  }
  
  /* Badge improvements */
  .badge {
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
  }
  
  /* Better spacing for sections */
  .info-section, .analysis-section, .articles-section {
    margin-bottom: 2rem;
  }
  
  /* Improved pagination */
  .pagination {
    justify-content: center;
    gap: 0.5rem;
  }
  
  .pagination .page-link {
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    border: 2px solid #e2e8f0;
    color: var(--main-color);
  }
  
  .pagination .page-link:hover {
    background-color: var(--background-light);
    border-color: var(--accent-color);
    transform: translateY(-1px);
  }
  
  .pagination .page-item.active .page-link {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
  }
}

/* Extra large screens */
@media (min-width: 1400px) {
  .mobile-container {
    max-width: 1400px;
    padding: 0 3rem;
  }
  
  .hero-section {
    padding: 4rem 3rem;
  }
  
  .hero-title {
    font-size: 4rem;
  }
  
  .page-title {
    font-size: 3rem;
  }
}

/* ====== GEËXTRAHEERDE ARTIKELEN STYLING ====== */

.items-section {
    margin-top: 2rem;
    margin-left: 1rem;
    margin-right: 1rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.items-title {
    background: var(--main-color);
    color: white;
    margin: 0;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.items-title i {
    color: white;
}

.compact-table-container {
    padding: 1rem 1.5rem;
}

.compact-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.compact-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--main-color);
    font-weight: 700;
    padding: 1rem 0.75rem;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    position: sticky;
    top: 0;
    z-index: 5;
}

.compact-table th.text-center {
    text-align: center;
}

.compact-table th.text-end {
    text-align: right;
}

.compact-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
    transition: background-color 0.2s ease;
}

.compact-table td.text-center {
    text-align: center;
}

.compact-table td.text-end {
    text-align: right;
}

.compact-table tr:hover {
    background-color: #f8fafc;
    transform: translateX(2px);
}

.compact-table tr:last-child td {
    border-bottom: none;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.item-name {
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.item-details-mobile {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.detail-qty {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    border: 1px solid #7dd3fc;
}

.detail-price {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #16a34a;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    border: 1px solid #86efac;
}

/* OCR Text Button */
.btn-ocr {
    background: var(--background-light);
    border: 1px solid #d1d5db;
    color: #6b7280;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
    margin-top: 1rem;
}

.btn-ocr:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #4b5563;
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.btn-ocr i {
    color: var(--accent-color);
}

/* Mobile responsive for items table */
@media (max-width: 767px) {
    .compact-table-container {
        padding: 0.75rem;
    }
    
    .compact-table th,
    .compact-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .items-title {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

/* Tablet responsive for items table */
@media (min-width: 768px) {
    .compact-table {
        font-size: 1rem;
    }
    
    .compact-table th,
    .compact-table td {
        padding: 1rem 1rem;
    }
    
    .items-section {
        margin-top: 2.5rem;
    }
    
    .compact-table-container {
        padding: 1.5rem 2rem;
    }
}

/* Desktop responsive for items table */
@media (min-width: 1200px) {
    .items-section {
        margin-top: 3rem;
    }
    
    .compact-table {
        font-size: 1.05rem;
    }
    
    .compact-table th,
    .compact-table td {
        padding: 1.25rem 1.5rem;
    }
    
    .compact-table-container {
        padding: 2rem;
    }
}

/* ====== OCR SECTION STYLING ====== */

.ocr-section {
    margin-top: 2rem;
    margin-left: 1rem;
    margin-right: 1rem;
    padding: 0 1rem;
}

.ocr-toggle {
    background: linear-gradient(135deg, var(--background-light) 0%, #f1f5f9 100%);
    border: 1px solid #d1d5db;
    color: var(--main-color);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-soft);
}

.ocr-toggle:hover {
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
    border-color: #9ca3af;
    color: var(--main-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.ocr-toggle i {
    color: var(--accent-color);
    font-size: 1rem;
}

.ocr-content {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    margin-bottom: 2rem;
}

.ocr-header {
    background: linear-gradient(135deg, var(--main-color) 0%, #1e3a5f 100%);
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    border-bottom: 2px solid #cbd5e1;
}

.ocr-header h6 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.ocr-header i {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
}

.ocr-text {
    padding: 1.5rem;
    background: #fafbfc;
    max-height: 400px;
    overflow-y: auto;
    position: relative;
}

.ocr-text::-webkit-scrollbar {
    width: 8px;
}

.ocr-text::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.ocr-text::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    border-radius: 4px;
}

.ocr-text::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.ocr-text pre {
    margin: 0;
    padding: 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-family: 'Courier New', Consolas, 'Liberation Mono', Monaco, 'Lucida Console', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #374151;
    white-space: pre-wrap;
    word-wrap: break-word;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    position: relative;
}

.ocr-text pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--main-color) 100%);
    border-radius: 0.75rem 0.75rem 0 0;
}

/* Responsive OCR styling */
@media (max-width: 767px) {
    .ocr-section {
        padding: 0 0.5rem;
        margin-top: 1.5rem;
    }
    
    .ocr-toggle {
        padding: 0.6rem 1.25rem;
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .ocr-header {
        padding: 0.75rem 1rem;
    }
    
    .ocr-header h6 {
        font-size: 1rem;
    }
    
    .ocr-text {
        padding: 1rem;
        max-height: 300px;
    }
    
    .ocr-text pre {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) {
    .ocr-section {
        margin-top: 2.5rem;
    }
    
    .ocr-toggle {
        padding: 0.85rem 1.75rem;
        font-size: 0.95rem;
        margin-bottom: 1.75rem;
    }
}

@media (min-width: 1200px) {
    .ocr-section {
        margin-top: 3rem;
        padding: 0;
    }
    
    .ocr-toggle {
        padding: 1rem 2rem;
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .ocr-content {
        margin-bottom: 3rem;
    }
    
    .ocr-header {
        padding: 1.25rem 2rem;
    }
    
    .ocr-header h6 {
        font-size: 1.2rem;
    }
    
    .ocr-text {
        padding: 2rem;
        max-height: 500px;
    }
    
    .ocr-text pre {
        padding: 1.5rem;
        font-size: 0.9rem;
    }
}

/* ====== IMAGE ZOOM MODAL STYLING ====== */

#imageZoomModal .modal-dialog {
    max-width: 90vw;
    max-height: 90vh;
}

#imageZoomModal .modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 1rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

#imageZoomModal .modal-header {
    background: linear-gradient(135deg, var(--main-color) 0%, #1e3a5f 100%);
    color: white;
    border-bottom: none;
    border-radius: 1rem 1rem 0 0;
    padding: 1rem 1.5rem;
}

#imageZoomModal .modal-title {
    font-weight: 600;
    font-size: 1.1rem;
}

#imageZoomModal .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

#imageZoomModal .btn-close:hover {
    opacity: 1;
}

#imageZoomModal .modal-body {
    padding: 1.5rem;
    background: #fafbfc;
    border-radius: 0 0 1rem 1rem;
}

#zoomedImage {
    border-radius: 0.75rem;
    box-shadow: var(--shadow-medium);
    max-width: 100%;
    height: auto;
    border: 1px solid #e2e8f0;
}

/* Zoom cursor styles */
.invoice-image, 
.image-preview, 
[data-zoom="true"] {
    cursor: zoom-in !important;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.invoice-image:hover, 
.image-preview:hover, 
[data-zoom="true"]:hover {
    filter: brightness(1.05);
    transform: scale(1.02);
}


/* Mobile optimizations for zoom modal */
@media (max-width: 767px) {
    #imageZoomModal .modal-dialog {
        max-width: 95vw;
        margin: 1rem;
    }
    
    #imageZoomModal .modal-header {
        padding: 1rem;
    }
    
    #imageZoomModal .modal-title {
        font-size: 1rem;
    }
    
    #imageZoomModal .modal-body {
        padding: 1rem;
    }
}

/* Carousel arrow icon styling for InvoiceDetails */
.carousel-arrow-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    color: var(--main-color, #2563eb); /* fallback naar een mooie blauw als var niet bestaat */
    pointer-events: none;
    left: 1.5rem;
}
.carousel-control-next .carousel-arrow-icon {
    left: auto;
    right: 1.5rem;
}