:root {
  --sidebar-width: 18rem;
/* Reduce spacing to make the UI more information-dense */
  --pico-spacing: 0.5rem;
  --pico-form-element-spacing-horizontal: 0.4rem;
  --pico-form-element-spacing-vertical: 0.3rem;
  --pico-font-size: 85%;
  color-scheme: light;
}

/* Force light mode */
html[data-theme="light"] {
  color-scheme: light !important;
}

/* Hamburger menu icon - match huisstijl */
.sidebar-close-btn {
  color: #e8f1f5 !important;
}

body {
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid #4a6c7d;
  background: #3D5357;
  padding: var(--pico-spacing);
  display: flex;
  flex-direction: column;
}

.sidebar h1 {
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
  color: #e8f1f5;
}

.sidebar nav ul {
  list-style: none;
  padding: 0;
  flex: 1;
}

.sidebar a,
.sidebar p,
.sidebar span,
.sidebar label {
  color: #ddeaf0;
}

.nav-button {
  width: 100%;
  margin-bottom: 0.5rem;
  text-align: left;
  --pico-background-color: #C1A4A8;
  --pico-border-color: #5a8090;
  --pico-color: #e8f1f5;
}

.nav-button:hover {
  --pico-background-color: #7FA887;
  --pico-border-color: #6a95a8;
}

.nav-button.is-active {
  --pico-background-color: #7FA887;
  --pico-color: #f0f7fa;
  --pico-border-color: #2e5060;
}

.user-info {
  margin-top: auto;
  padding-top: var(--pico-spacing);
}

.user-info p {
  margin: 0.25rem 0;
  color: #e8f1f5;
}

.content-area {
  padding-block-start: calc(var(--pico-spacing) * 1.25);
  padding-block-end: var(--pico-spacing);
  min-width: 0;
}

.login-page {
  grid-column: 1 / -1;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--pico-spacing);
}

.login-card {
  text-align: center;
}

.login-logo {
  max-width: 200px;
  margin-bottom: 2rem;
}

table.striped tbody tr:nth-child(even) {
  background-color: var(--pico-table-row-stripped-background-color);
}

/* Right alignment for table cells */
.text-right {
  text-align: right;
}

/* Pagination positioned within content area */
.pagination-bottom {
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Filter controls styles */
.filters-section {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #4a6c7d;
  flex-wrap: wrap;
}

.filters-left {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filters-right {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

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

.filter-group label {
  font-weight: 500;
  color: #3D5357;
  font-size: 0.9rem;
}

.filter-group input {
  padding: 0.5rem;
  border: 1px solid #4a6c7d;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  background: #fff;
  color: #3D5357;
}

.filter-group input:focus {
  outline: none;
  border-color: #7FA887;
  box-shadow: 0 0 0 2px rgba(127, 168, 135, 0.2);
}

.filter-group input::placeholder {
  color: #646b79;
}

/* Pagination styles */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 1rem;
}

.pagination-btn {
  padding: 0.5rem 0.75rem;
  border: 1px solid #4a6c7d;
  background: #fff;
  color: #3D5357;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #7FA887;
  color: #3D5357;
}

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

.pagination-current {
  background: #7FA887;
  color: #f0f7fa;
  border-color: #7FA887;
}

.pagination-current:hover {
  background: #6a95a8;
  border-color: #6a95a8;
}

.pagination-ellipsis {
  padding: 0.5rem 0.25rem;
  color: #646b79;
  font-weight: bold;
}

/* Upload component styles */
.upload-container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--pico-spacing);
}

.upload-dropzone {
  border: 2px dashed #cfd5e2;
  border-radius: 8px;
  padding: 3rem 2rem;
  text-align: center;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.upload-dropzone:hover {
  border-color: #0172ad;
  background-color: #f0f4f8;
  box-shadow: 0 4px 12px rgba(1, 114, 173, 0.15);
}

.upload-dropzone.dragging {
  border-color: #0172ad;
  background-color: #e8f1f5;
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(1, 114, 173, 0.2);
  transform: scale(1.01);
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.upload-icon {
  font-size: 1.2rem;
  color: #373c44;
  font-weight: 500;
  opacity: 0.9;
}

.upload-separator {
  color: #646b79;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

.upload-button {
  background-color: #0172ad;
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #0172ad;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.upload-button:hover {
  background-color: #015887;
  border-color: #015887;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.upload-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.upload-files {
  background: #f8f9fa;
  border: 1px solid #cfd5e2;
  border-radius: 8px;
  padding: var(--pico-spacing);
}

.files-header h3 {
  margin: 0 0 1rem 0;
  color: #373c44;
}

.files-list {
  margin-bottom: 1.5rem;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid #cfd5e2;
  background-color: #fff;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.file-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.file-name {
  font-weight: 500;
  color: #373c44;
}

.file-size {
  color: #646b79;
  font-size: 0.9rem;
}

.upload-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.upload-confirmation {
  background: #fff;
  border: 1px solid #cfd5e2;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.confirmation-icon {
  font-size: 2rem;
  font-weight: bold;
  color: #000;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.confirmation-details {
  margin-bottom: 2rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #cfd5e2;
}

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

.detail-item span:first-child {
  color: #646b79;
}

.detail-item span:last-child {
  font-weight: 500;
  color: #373c44;
}

.confirmation-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.mobile-header {
  display: none;
}

.sidebar-close-btn {
  display: none;
}

.desktop-page-header {
  display: block;
}
@media (max-width: 768px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: var(--pico-spacing);
    border-bottom: 1px solid var(--pico-muted-border-color);
  }

  .mobile-header h2 {
    margin: 0;
    line-height: 1.2;
  }

  .sidebar {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 80vw;
    max-width: 300px;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
  }
figure {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  min-width: 500px;
}
  .sidebar.sidebar-open {
    display: flex;
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
  }
.desktop-page-header {
  display: none;
}
  .sidebar header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .sidebar-close-btn {
    display: flex;
    align-self: flex-end;
    margin-left: auto;
    margin-bottom: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--pico-color);
    padding: 0.25rem 0.5rem;
    line-height: 1;
  }

  .content-area {
    padding-top: var(--pico-spacing);
  }

  .upload-dropzone {
    padding: 2rem 1rem;
    min-height: 250px;
  }

  .upload-actions,
  .confirmation-actions {
    flex-direction: column;
  }

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

  .filters-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.4rem;
  }

  .filters-left,
  .filters-right {
    display: contents; /* Allow grid to directly access filter groups */
  }

  .filter-group {
    min-width: 0;
    margin-bottom: 0.25rem;
  }

  .filter-group label {
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
  }

  /* End date spans full width on row 3 */
  .filters-right .filter-group:last-child {
    grid-column: 1 / -1;
    min-width: 100%;
  }

  .pagination {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .pagination-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    min-width: 36px;
  }
}
