/* ===== NespODOOC MINIMAL DESIGN ===== */
:root {
  /* Color Palette */
  --midnight-blue: #2c3e50;
  --wet-asphalt: #34495e;
  --clouds: #ecf0f1;
  --silver: #bdc3c7;
  --concrete: #95a5a6;
  
  /* Accent Colors */
  --turquoise: #1abc9c;
  --emerald: #2ecc71;
  --peter-river: #3498db;
  --amethyst: #9b59b6;
  --sun-flower: #f1c40f;
  --carrot: #e67e22;
  --alizarin: #e74c3c;
  
  /* Minimal Design Variables */
  --bg: #ffffff;
  --card: #f8f9fa;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --accent: #3498db;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(44, 62, 80, 0.08);
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--text);
  background: var(--clouds);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER - STRUCTURED LAYOUT ===== */
.app-header {
  background: var(--midnight-blue);
  color: white;
  padding: 1rem 0;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(44, 62, 80, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

/* Left: App Branding */
.app-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.app-logo {
  height: 40px;
  width: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  font-size: 1.2rem;
}

.app-name h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  margin: 0;
  line-height: 1.2;
}

.app-tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  margin: 0;
}

/* Right: Organization Info & Actions */
.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-grow: 1;
  justify-content: flex-end;
}

.user-actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

/* Organization Info */
.org-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  min-width: 200px;
}

.org-logo {
  height: 32px;
  width: 32px;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.2);
}

.org-details {
  display: flex;
  flex-direction: column;
}

.org-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
  line-height: 1.2;
}

.org-contact {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  /* flex-shrink: 0; */
}

/* Settings Cog Button */
.btn-settings {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.2rem;
}

.btn-settings:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* New Document Button */
.btn-new-doc {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--turquoise);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-new-doc:hover {
  background: #16a085;
  transform: translateY(-1px);
}

.btn-new-doc::before {
  content: "+";
  font-size: 1.2rem;
  font-weight: 300;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .header-content {
    gap: 1rem;
  }
  
  .org-info {
    min-width: 180px;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .app-branding {
    flex: 1;
  }
  
  .header-right {
    flex-basis: 100%;
    order: 3;
    justify-content: space-between;
    margin-top: 0.5rem;
  }
  
  .org-info {
    flex: 1;
    min-width: auto;
  }
  
  .org-details {
    flex: 1;
  }
  
  .org-name {
    font-size: 0.85rem;
  }
  
  .org-contact {
    display: none; /* Hide contact on mobile to save space */
  }
}

@media (max-width: 480px) {
  .header-content {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .app-branding {
    justify-content: center;
    text-align: center;
  }
  
  .header-right {
    flex-basis: auto;
    order: 2;
    margin-top: 0;
  }
  
  .org-info {
    justify-content: center;
    text-align: center;
  }
  
  .btn-new-doc span {
    display: none; /* Hide "New Document" text, show only + icon */
  }
  
  .btn-new-doc::before {
    content: "+";
    font-size: 1.4rem;
    margin: 0;
  }
}

/* ===== MAIN CONTENT AREA ===== */
.main-content {
  padding: 0 0 2rem 0;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

/* ===== CARDS - CLEAN & MINIMAL ===== */
.card {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(44, 62, 80, 0.12);
}

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

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

/* ===== BUTTONS - MINIMAL STYLE ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  background: transparent;
  color: var(--text);
}

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

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

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

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

.btn-ghost {
  color: var(--text-light);
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* ===== TABLES - CLEAN & BORDERLESS ===== */
.table-container {
  background: var(--bg);
  border-radius: var(--radius);
  /*overflow: hidden;*/
  box-shadow: var(--shadow);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead {
  background: var(--clouds);
}

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

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid #f1f3f4;
}

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

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

/* ===== FORMS - CLEAN STYLE ===== */
.form-group {
  margin-bottom: 1.25rem;
}

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

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #444647 !important;
  border-radius: var(--radius);
  font-size: 0.875rem;
  transition: border-color 0.2s ease;
  background: var(--bg);
}

.form-input:focus {
  outline: none;
  border-color: var(--peter-river);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

/* ===== MODALS - CLEAN OVERLAY ===== */
.modal-overlay {
  overflow-y: visible;
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(44, 62, 80, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: start;
  justify-content: center;
  padding: 1rem;
  padding-top: 10vh;
  padding-bottom: 10vh;
  max-height: fit-content;
}

.modal-content {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(44, 62, 80, 0.2);
  max-width: 800px;
  width: 100%;
  min-height: 80vh;
  overflow-y: none;
}

.modal-header {
  padding: 1.5rem 1.5rem 0;
  margin-bottom: 1rem;
}

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

.modal-body {
  padding: 0 1.5rem 1.5rem;
}

/* ===== DOCUMENT STATUS INDICATORS ===== */
.doc-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-draft { background: var(--silver); color: var(--text); }
.badge-pending { background: var(--sun-flower); color: var(--text); }
.badge-approved { background: var(--emerald); color: white; }
.badge-completed { background: var(--turquoise); color: white; }

/* ===== ACTION DROPDOWN - MINIMAL ===== */
/* Action Dropdown Styles */
.action-menu {
  position: relative;
  display: inline-block;
}

.action-trigger {
  padding: 0.5rem;
  border: none;
  background: none;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-light);
  font-size: 1.2rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-trigger:hover {
  background: var(--clouds);
  color: var(--text);
}

.action-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem;
  min-width: 200px;
  z-index: 100;
  border: 1px solid var(--silver);
}

.action-dropdown.show {
  display: block;
}

.action-item {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.action-item:hover {
  background: var(--clouds);
}

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

/* Table Controls Styling */
.table-controls {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-title {
  font-weight: bold;
  color: var(--text);
}

.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* DataTables Overrides */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  padding: 0.5rem 0;
}

.dataTables_wrapper .dataTables_filter input {
  border: 1px solid var(--silver);
  border-radius: var(--radius);
  padding: 0.5rem;
  margin-left: 0.5rem;
}

/* ===== UTILITY CLASSES ===== */
.text-muted { color: var(--text-light); }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.hidden { display: none; }
/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .brand {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .card {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .data-table {
    font-size: 0.8rem;
  }
  
  .data-table th,
  .data-table td {
    padding: 0.75rem 0.5rem;
  }
  
  .modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }
}

/* ===== LOADING STATES ===== */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
}

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

/* ===== DOCUMENT FORM STYLING ===== */
.doc-form {
  padding: 0;
}

.doc-form-header {
  padding: 1.5rem 1.5rem 0;
  margin-bottom: 1.5rem;
}

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

.doc-form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Document Form Sections */
.doc-section {
  margin-bottom: 1rem; /* 2rem; */
  padding: 0 1.5rem;
}

.doc-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--clouds);
}

/* Form Rows in Document Form */
.doc-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 0rem; /* 1rem; */
}

/* Items Table - Minimal Style */
.items-table-container {
  background: var(--bg);
  border-radius: var(--radius);
  /*overflow: hidden;*/
  margin: 1rem 0;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.items-table thead {
  background: var(--clouds);
}

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

.items-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f3f4;
}

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

.items-table input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e1e8ed;
  border-radius: 4px;
  font-size: 0.875rem;
  background: var(--bg);
}

.items-table input:focus {
  outline: none;
  border-color: var(--peter-river);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.items-table .amount {
  font-weight: 500;
  color: var(--text);
}

.items-table tfoot {
  background: var(--clouds);
  font-weight: 600;
}

.items-table tfoot td {
  padding: 1rem;
}

/* Items Table Actions */
.table-actions {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  padding: 0 1.5rem;
}

/* Signatures Table */
.signatures-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.signatures-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  background: var(--clouds);
  border-bottom: 1px solid #e1e8ed;
}

.signatures-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f3f4;
}

.signatures-table input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e1e8ed;
  border-radius: 4px;
  font-size: 0.875rem;
  background: var(--bg);
}

.signatures-table input:focus {
  outline: none;
  border-color: var(--peter-river);
}

/* Modal Actions */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid var(--clouds);
  margin-top: 1rem;
}

/* View Modal Specific Styles */
.view-content {
  padding: 1.5rem;
}

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

.view-section:last-child {
  margin-bottom: 0;
}

.view-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.view-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  background: var(--clouds);
  border-bottom: 1px solid #e1e8ed;
}

.view-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f3f4;
}

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

/* Print/PDF View *
.print-section {
  margin-bottom: 2rem;
  page-break-inside: avoid;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.print-table th,
.print-table td {
  padding: 0.5rem;
  border: 1px solid #e1e8ed;
  text-align: left;
}

.print-table th {
  background: var(--clouds);
  font-weight: 600;
} */

/* Responsive Document Forms */
@media (max-width: 768px) {
  .doc-form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .doc-section {
    padding: 0 1rem;
  }
  
  .items-table {
    font-size: 0.8rem;
  }
  
  .items-table th,
  .items-table td {
    padding: 0.5rem;
  }
  
  .table-actions {
    padding: 0 1rem;
    flex-direction: column;
  }
  
  .modal-actions {
    flex-direction: column;
    padding: 1rem;
  }
}

/* Focus States for Better UX */
.form-input:focus,
.items-table input:focus,
.signatures-table input:focus {
  border-color: var(--peter-river);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Button Variants for Document Actions */
.btn-success {
  background: var(--emerald);
  color: white;
}

.btn-success:hover {
  background: #27ae60;
}

.btn-warning {
  background: var(--sun-flower);
  color: var(--text);
}

.btn-warning:hover {
  background: #f39c12;
}

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

.btn-danger:hover {
  background: #c0392b;
}

.btn-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--clouds);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-light);
  transition: all 0.2s ease;
}

.btn-close:hover {
  background: var(--silver);
  color: var(--text);
}

/* View Document Styles */
.form-static, input[disabled], textarea[disabled] {
  padding: 0.75rem;
  background: var(--clouds);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text);
  min-height: 42px;
  display: flex;
  align-items: center;
}

.acknowledgement-content {
  padding: 1rem 0;
}

.acknowledgement-block {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--silver);
}

.acknowledgement-block h4 {
  margin-bottom: 1rem;
  color: var(--midnight-blue);
  border-bottom: 2px solid var(--peter-river);
  padding-bottom: 0.5rem;
}

.acknowledgement-block p {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.signature-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 2rem;
}

.signature-line span {
  flex: 1;
}

/* Responsive adjustments for view modal */
@media (max-width: 768px) {
  .signature-line {
    flex-direction: column;
    gap: 1rem;
  }
  
  .acknowledgement-block {
    padding: 1rem;
  }
}

/* Title styling in view modal */
.doc-title-display {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--midnight-blue);
  padding: 0.75rem;
  background: var(--clouds);
  border-radius: var(--radius);
  border-left: 4px solid var(--peter-river);
}

/* ===== DOCUMENT TYPE COLOR CODING ===== */
.doc-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    text-align: center;
    min-width: 120px;
}

/* Draft document styling */
.draft-document td {
    font-weight: 600 !important;
    background: rgba(52, 152, 219, 0.05) !important;
}

.draft-document:hover td {
    background: rgba(52, 152, 219, 0.1) !important;
}

/* DataTable row styling adjustments */
.data-table tr {
    transition: all 0.2s ease;
}

.data-table tr:hover {
    background: var(--clouds);
}

/* Ensure proper spacing for left border */
.data-table td:first-child {
    padding-left: 1rem;
}

/* ===== STATUS BADGES ===== */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0.5rem 1rem;
}

.status-badge.draft {
    background: var(--sun-flower);
    color: var(--text);
}

.status-badge.final {
    background: var(--emerald);
    color: white;
}

.status-display {
    border-bottom: 1px solid var(--silver);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.draft {
    background: var(--sun-flower);
}

.status-dot.final {
    background: var(--emerald);
}

/* ===== SEAMLESS TABLE CONTROLS ===== */
.table-controls {
    background: var(--clouds);
    border-radius: var(--radius) var(--radius);
    padding: 1rem 1.5rem;
}

.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filters-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    min-width: 300px;
}

.filter-label {
  text-align: left;
  color: var(--text);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--midnight-blue);
    background: var(--bg);
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text);
}

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

.filter-btn.active {
    background: var(--midnight-blue);
    color: white;
    border-color: var(--midnight-blue);
}

.search-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--silver);
    border-radius: var(--radius);
    font-size: 0.875rem;
    min-width: 250px;
    background: var(--bg);
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--peter-river);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

/* Right-side controls */
.table-controls-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-label {
    font-size: 0.875rem;
    color: var(--text-light);
    white-space: nowrap;
}

.page-length-select {
    padding: 0.5rem;
    border: 1px solid var(--silver);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--bg);
}

.results-info, .page-info {
    font-size: 0.875rem;
    color: var(--text-light);
    white-space: nowrap;
}

.btn-control {
    padding: 0.5rem;
    border: 1px solid var(--silver);
    background: var(--bg);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text);
    transition: all 0.2s ease;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-control:hover:not(:disabled) {
    background: var(--clouds);
}

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

/* Table container */
.table-container {
    
}

.filters-bar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

/* Responsive */
@media (max-width: 1024px) {
    .controls-header {
        flex-direction: column;
    }
    
    .table-controls-right {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .filters-section {
        min-width: auto;
    }
    
    .search-input {
        min-width: auto;
        width: 100%;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .table-controls-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }
}

.data-table td:nth-child(3) {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table tr:hover {
  cursor: pointer;
}

/* ===== CLICKABLE ROWS ===== */
#docsTable tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#docsTable tbody tr:hover {
    background-color: var(--clouds) !important;
}

#docsTable tbody tr:active {
    background-color: #e0e6eb !important;
}

/* Optional: Add a hand cursor on hover */
#docsTable tbody tr {
    cursor: pointer;
}

/* Extra Fields Styling */
.extra-field-input {
    margin-bottom: 0.5rem;
}

.signature-field-container {
    position: relative;
}

.signature-line {
    border-bottom: 1px solid var(--text);
    margin-top: 0.25rem;
    width: 100%;
}

/* Required field indicators */
.form-label:has(+ input[required]),
.form-label:has(+ textarea[required]),
.form-label:has(+ select[required]) {
    position: relative;
}

.form-label:has(+ input[required])::after,
.form-label:has(+ textarea[required])::after,
.form-label:has(+ select[required])::after {
    content: " *";
    color: var(--alizarin);
}

/* Field grouping for better organization */
.field-group {
    background: var(--clouds);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--peter-river);
}

.field-group-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.field-group-title {
    font-weight: 600;
    color: var(--midnight-blue);
    margin: 0;
}

/* Responsive adjustments for extra fields */
@media (max-width: 768px) {
    .field-group {
        padding: 0.75rem;
    }
    
    .doc-form-row {
        grid-template-columns: 1fr;
    }
}

/* Read-only field styling */
.form-input[readonly] {
    background-color: var(--clouds);
    border-color: var(--silver);
    color: var(--text-light);
    cursor: not-allowed;
}

.form-input[readonly]:focus {
    border-color: var(--silver);
    box-shadow: none;
}

/* Read-only section indicator */
.section-title small {
    font-size: 0.8em;
    margin-left: 0.5rem;
    font-weight: normal;
}
