/* ===============================================
   CSS VARIABLES
   =============================================== */
:root {
  --primary-color: #4361ee;
  --primary-hover: #3730a3;
  --primary-active: #312e81;
  --faded-bg: #eef2ff;
  --faded-hover: #e0e7ff;
  --faded-active: #c7d2fe;
  --text-primary: #1f2937;
  --text-secondary: #999999;
  --text-muted: #9ca3af;
  --border-color: #d1d5db;
  --white: #ffffff;
  --font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --danger-color: #F15F1F;
  --status-verified-bg: #dcfce7;
  --status-verified-text: #166534;
  --status-verified-border: #bbf7d0;
  --status-entry-bg: #fef3c7;
  --status-entry-text: #92400e;
  --status-entry-border: #fed7aa;
  --status-active-bg: #dcfce7;
  --status-active-text: #166534;
  --status-active-border: #bbf7d0;
  --status-pending-bg: #fef3c7;
  --status-pending-text: #92400e;
  --status-pending-border: #fed7aa;
  --status-inactive-bg: #f3f4f6;
  --status-inactive-text: #6b7280;
  --status-inactive-border: #d1d5db;
}

/* Global box-sizing reset */
* {
  box-sizing: border-box;
}

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

html {
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: #000000;
  background-color: #f9fafb;
  height: 100vh;
  overflow-x: hidden;
}

.app-container {
  background-color: #fff;
  display: flex;  
  height: 100vh;
  max-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ===============================================
   SIDE NAVIGATION STYLES
   =============================================== */
.side-nav {
  width: 240px;
  background-color: #fff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  height: 100vh;
  z-index: 20;
  flex-shrink: 0;
  overflow-y: auto;
}

.nav-header {
  padding: 1.5rem;
}

.nav-header .logo-container {
  display: flex;
  align-items: center;
}

.nav-header .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 6px;
  font-weight: bold;
  margin-right: 12px;
  font-size: 1.1rem;
}

.nav-header h1 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
}

.nav-menu {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 1.5rem;
  color: #000000;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 400;
  font-family: var(--font-family);
  line-height: 1.4;
}

.nav-item:hover {
  background-color: #f4f4f4;
  color: #000000;
}

.nav-item.active {
  background-color: #eef2ff !important;
  color: #4361ee !important;
  border-right: 3px solid #4361ee !important;
  font-weight: 500 !important;
}

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

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-title {
  font-size: 12px;
  color: #808080;
  font-weight: 500;
  margin: 0 0 8px 0;
  padding: 0 1.5rem;
  line-height: 1.4;
}

.nav-divider {
  height: 1px;
  background-color: #e6e6e6;
  margin: 0 1.5rem;
}

.nav-icon {
  width: 14px;
  height: 14px;
  margin-right: 12px;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.nav-text {
  flex: 1;
}

.nav-arrow {
  width: 16px;
  height: 16px;
  margin-left: auto;
  transition: transform 0.2s ease;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.nav-item-with-sub.expanded .nav-arrow {
  transform: rotate(180deg);
}

.nav-group {
  position: relative;
}

.nav-submenu {
  background-color: #f8fafc;
  border-left: 2px solid #e2e8f0;
  margin-left: 30px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* Keep accounts submenu permanently expanded */
.nav-group .nav-submenu {
  max-height: 200px;
}

.nav-submenu.expanded {
  max-height: 200px;
}

.nav-subitem {
  display: block;
  padding: 0.5rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.nav-subitem:hover {
  color: var(--primary-color);
  background-color: #f1f5f9;
}

.nav-subitem.active {
  color: var(--primary-color);
  font-weight: 500;
}

.nav-footer {
  padding: 16px 0;
}

.nav-footer .nav-item[data-route="logout"] {
  color: var(--danger-color) !important;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  justify-content: flex-start;
  text-align: left;
}

.nav-footer .nav-item[data-route="logout"]:hover {
  background-color: #fef2f2 !important;
  color: var(--danger-color) !important;
}

.nav-footer .nav-item[data-route="logout"] .nav-icon {
  color: var(--danger-color) !important;
}

/* ===============================================
   MAIN CONTENT AREA
   =============================================== */
.main-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 16px 24px;
  background-color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
}

.header-title h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.page-content {
  flex: 1;
  background-color: #ffffff;
  max-width: 100%;
}

  .table-container {
    background-color: #fff;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
  }

  .content-areas {
    width: 100%;
  }
  
  .content-area {
    width: 100%;
  }
  
  /* Show search container by default */
  .search-container {
    display: block;
  }
  
  /* Show transactions search by default */
  .transactions-search {
    display: block;
  }

.content-area {
  width: 100%;
}

.content-area.hidden {
  display: none;
}

.main-footer {
  padding: 1rem 2rem;
  background-color: #fff;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.main-footer a {
  color: var(--primary-color);
  text-decoration: none;
}

.main-footer a:hover {
  text-decoration: underline; 
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */
@media (max-width: 768px) {
  .side-nav {
    position: fixed;
    left: -240px;
    transition: left 0.3s ease;
    z-index: 30;
  }
  
  .side-nav.mobile-open {
    left: 0;
  }
  
  .main-content {
    flex: 1;
  }
  
  .main-header {
    padding: 1rem;
  }
  
  .page-content {
    padding: 1rem;
  }
  
  .header-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .btn {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

/* ===============================================
   BUTTON STYLES
   =============================================== */
.header-actions {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 500;
  border: none;
  transition: all 0.2s ease;
  line-height: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

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

.btn-primary-outline {
  background-color: var(--faded-bg);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background-color: #e5e7eb;
  color: #1f2937;
}

.btn.filter-btn {
  background-color: transparent !important;
  color: #002bf8;
  border: none;
  outline: none;
  box-sizing: content-box;
  font-weight: 500 !important;
  margin-left: -12px;
}

.filter-container {
  padding: 0 24px;
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.info-container {
  padding: 0 24px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.info-container table {
  width: 600px;
  font-size: 14px;
  line-height: 1.5;
}

.info-container table td:first-child {
  font-weight: 600; /* semi-bold for parameter names */
  padding: 4px 0;
  width: 200px;
}

.info-container table td:last-child {
  font-weight: 400; /* regular for parameter values */
  padding: 6px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background-color: #fafafa;
}

.info-container table {
  border-spacing: 0 6px;
}

.amount-totals-container {
  padding: 16px 0;
  width: 100%;
  border-top: 1px solid #d9d9d9;
  font-size: 14px;
  display: flex;
  gap: 48px;
  border-bottom: 1px solid #d9d9d9;
}

.totals-group {
  min-width: 150px;
}

.balance-title {
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.balance-amount {
  font-weight: 800;
  color: var(--text-primary);
  font-size: 24px;
}

.filter-btn {
  width: auto;
}

/* Filter Modal Specific Styles */
.form-container.filter-modal-div {
  padding: 0;
  width: 100%;
  max-width: none;
}

.filter-results {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-summary {
  padding: 6px 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 400;
  background-color: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  flex: 1;
  width: 100%;
}

.filter-label {
  color: var(--primary-color);
  font-weight: 400;
}

.filter-value {
  color: var(--text-primary);
}

.btn.filter-btn:hover {
  background-color: var(--faded-bg) !important;
}

.btn-with-icon {
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn i,
.btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  margin-right: 6px;
}

.btn:hover {
  opacity: 0.9;
}

.btn-text {
  background-color: transparent;
  color: #666;
  border: none;
  padding: 8px 16px;
}

.btn-text:hover {
  color: #000000;
  background-color: #f5f5f5;
}

.btn-text-danger {
  background-color: transparent;
  color: #dc2626;
  border: none;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-text-danger:hover {
  color: #b91c1c;
  background-color: #fef2f2;
}

.btn-text-danger svg {
  stroke: currentColor;
}

/* ===============================================
   NAVIGATION & TABS
   =============================================== */
.tabs-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  background-color: #fff;
  border-bottom: 1px solid #eee;
}

.tabs {
  display: flex;
}

.tab {
  padding: 1rem;
  text-decoration: none;
  color: #666;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
}

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

.tab.active {
  border-bottom-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: 500;
}

.back-link {
  margin-bottom: 1.5rem;
}

.back-link a {
  color: var(--primary-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
}

.back-link a:hover {
  text-decoration: underline;
}

/* ===============================================
   LEDGER TABS STYLES
   =============================================== */
.ledger-tabs-container {
  display: flex;
  padding: 0.75rem 2rem;
  background-color: #fff;
  border-bottom: 1px solid #eee;
}

.ledger-tabs {
  display: flex;
  gap: 0.5rem;
}

.ledger-tab {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: #666;
  font-size: 0.9rem;
  border-radius: 4px;
  background-color: #f9fafb;
  transition: all 0.2s ease;
}

.ledger-tab:hover {
  background-color: var(--faded-hover);
  color: var(--primary-color);
}

.ledger-tab.active {
  background-color: var(--faded-bg);
  color: var(--primary-color);
  font-weight: 500;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 640px) {
  .ledger-tabs-container {
    padding: 0.5rem 1rem;
  }
  
  .ledger-tabs {
    width: 100%;
    justify-content: space-between;
  }
  
  .ledger-tab {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.5rem 0.5rem;
  }
}

/* ===============================================
   SEARCH & FILTER COMPONENTS
   =============================================== */
.search-container {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  width: 100%;
}

.search-input {
  padding: 12px 16px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  font-size: 0.9rem;
  background-color: #ffffff;
  transition: all 0.2s ease-in-out;
  color: #374151;
}

.search-input:hover {
  cursor: pointer;
}

.search-input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
  background-color: #ffffff;
}

.transaction-filters {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.search-field {
  width: 40%;
}

.date-range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.date-input {
  width: 150px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Date input styling for audit logs */
input[type="date"] {
  font-family: var(--font-family);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-color);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input[type="date"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(52, 78, 247, 0.1);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  color: var(--text-secondary);
  cursor: pointer;
}

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

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-color);
}

/* Show a subtle hint when date input is empty */
input[type="date"]:invalid {
  color: var(--text-secondary);
}

.search-filters {
  background-color: #f8fafc;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.transaction-search-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.search-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.search-row .form-group.search-buttons {
  flex: 0 0 auto;
  display: flex;
  gap: 0.5rem;
}

.search-row input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.search-row label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.25rem;
}

@media (max-width: 768px) {
  .search-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .search-row .form-group {
    width: 100%;
  }

  .search-row .form-group.search-buttons {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ===============================================
   MAIN CONTENT & PAGE STRUCTURE
   =============================================== */
.account-details-page {
  flex: 1;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  position: relative;
}

.page-header h2 {
  width: 100%;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
}

.subtitle {
  color: #595959;
  font-size: 0.9rem;
  margin: 0;
}

.page-header .btn {
  position: absolute;
  top: 0;
  right: 0;
}

#main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

/* ===============================================
   ACCOUNT INFO STYLES
   =============================================== */
.account-info {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.info-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  margin-bottom: 0.75rem;
}

.info-row:last-child {
  margin-bottom: 0;
}

.info-label {
  color: #595959;
  font-weight: 500;
}

.account-details {
  padding: 1rem;
}

.account-details-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.account-details-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

/* ===============================================
   TABLE STYLES - ACCOUNTS
   =============================================== */
.accounts-table-container {
  flex: 1;
  overflow-x: auto;
}

.accounts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.accounts-table th {
  text-align: left;
  padding: 1rem 0.5rem;
  font-weight: 500;
  color: #666;
  border-bottom: 1px solid #ddd;
}

.accounts-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #eee;
}

.accounts-table tbody tr:hover {
  background-color: #f5f7ff;
}

.account-row {
  cursor: pointer;
  transition: background-color 0.2s;
}

.account-row:hover {
  background-color: #f0f4ff;
}

/* ===============================================
   TABLE STYLES - TRANSACTIONS
   =============================================== */
.table-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.transactions-table {
  width: 100%;
  min-width: 1600px;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.transactions-table table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  table-layout: fixed;
}

.transactions-table th,
.transactions-table td {
  padding: 10px 0;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transactions-table th:not(:last-child),
.transactions-table td:not(:last-child) {
  padding-right: 24px;
}

.transactions-table th {
  background-color: #f7f7f7;
  color: #000000;
  font-weight: 500;
}

.transactions-table td:first-child {
  padding-left: 1.5rem;
}

.transactions-table td:last-child {
  padding-right: 1.5rem;
}

.transactions-table th:first-child {
  padding-left: 1.5rem;
}

.transactions-table th:last-child {
  padding-right: 1.5rem;
}

.col-debit,
.col-credit,
.col-description {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transactions-table .account-link {
  color: var(--primary-color) !important;
  font-weight: 500 !important;
}



.transactions-table {
  position: relative;
}

.transactions-table tr:hover {
  background-color: #f8fafc;
}

/* Actions column styling */
.transactions-table td.col-actions {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.transactions-table tr:hover td.col-actions {
  opacity: 1;
}

.actions-container {
  display: flex;
  gap: 0;
  justify-content: center;
  align-items: center;
}

.action-btn {
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 100px;
  transition: background-color 0.2s ease;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

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

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

.action-btn i[data-lucide] {
  color: var(--primary-color) !important;
  transition: color 0.2s ease;
  font-size: 12px;
}

.action-btn:hover i[data-lucide] {
  color: white !important;
}

.action-btn svg {
  color: var(--primary-color) !important;
  transition: color 0.2s ease;
}

.action-btn:hover svg {
  color: white !important;
}





.text-right {
  text-align: right;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
}

.page-info {
  color: #475569;
  font-size: 0.875rem;
}

/* Global column width classes */
.col-74 { width: 74px; max-width: 74px; }
.col-88 { width: 88px; max-width: 88px; }
.col-100 { width: 100px; max-width: 100px; }
.col-120 { width: 120px; max-width: 120px; }
.col-140 { width: 140px; max-width: 140px; }
.col-150 { width: 150px; max-width: 150px; }
.col-180 { width: 180px; max-width: 180px; }
.col-200 { width: 200px; max-width: 200px; }
.col-250 { width: 250px; max-width: 250px; }
.col-274 { width: 274px; max-width: 274px; }
.col-300 { width: 300px; max-width: 300px; }
.col-fill { min-width: 200px; width: auto; }





/* Add text truncation for specific columns */
.col-250,
.col-200 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status indicators */
.dr { color: #ef4444; }
.cr { color: #10b981; }

/* Table styles for all tables */
.accounts-table,
.projects-table,
.audit-logs-table,
.team-members-table,
.roles-table {
  width: 100%;
  min-width: 1200px;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.accounts-table table,
.projects-table table,
.audit-logs-table table,
.team-members-table table,
.roles-table table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  table-layout: fixed;
}

.accounts-table th,
.accounts-table td,
.projects-table th,
.projects-table td,
.audit-logs-table th,
.audit-logs-table td,
.team-members-table th,
.team-members-table td,
.roles-table th,
.roles-table td {
  padding: 10px 0;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.accounts-table th:not(:last-child),
.accounts-table td:not(:last-child),
.projects-table th:not(:last-child),
.projects-table td:not(:last-child),
.audit-logs-table th:not(:last-child),
.audit-logs-table td:not(:last-child),
.team-members-table th:not(:last-child),
.team-members-table td:not(:last-child),
.roles-table th:not(:last-child),
.roles-table td:not(:last-child) {
  padding-right: 24px;
}

.accounts-table th,
.projects-table th,
.audit-logs-table th,
.team-members-table th,
.roles-table th {
  background-color: #f7f7f7;
  color: #000000;
  font-weight: 500;
}

.accounts-table td:first-child,
.projects-table td:first-child,
.audit-logs-table td:first-child,
.team-members-table td:first-child,
.roles-table td:first-child {
  padding-left: 1.5rem;
}

.accounts-table td:last-child,
.projects-table td:last-child,
.audit-logs-table td:last-child,
.team-members-table td:last-child,
.roles-table td:last-child {
  padding-right: 1.5rem;
}

.accounts-table th:first-child,
.projects-table th:first-child,
.audit-logs-table th:first-child,
.team-members-table th:first-child,
.roles-table th:first-child {
  padding-left: 1.5rem;
}

.accounts-table th:last-child,
.projects-table th:last-child,
.audit-logs-table th:last-child,
.team-members-table th:last-child,
.roles-table th:last-child {
  padding-right: 1.5rem;
}

.accounts-table tr:hover,
.projects-table tr:hover,
.projects-table tr.project-row:hover,
.audit-logs-table tr:hover,
.team-members-table tr:hover,
.roles-table tr:hover {
  background-color: #f8fafc;
  cursor: pointer;
}

/* Actions column styling for all tables */
.accounts-table td.col-actions,
.projects-table td.col-actions,
.audit-logs-table td.col-actions,
.team-members-table td.col-actions,
.roles-table td.col-actions {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.accounts-table tr:hover td.col-actions,
.projects-table tr:hover td.col-actions,
.audit-logs-table tr:hover td.col-actions,
.team-members-table tr:hover td.col-actions,
.roles-table tr:hover td.col-actions {
  opacity: 1;
}

/* Transaction status indicators */
.status-verified {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 40rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--status-verified-bg);
  color: var(--status-verified-text);
  border: 1px solid var(--status-verified-border);
}

.status-entry {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 40rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--status-entry-bg);
  color: var(--status-entry-text);
  border: 1px solid var(--status-entry-border);
}

/* Status indicators for different types */
.status-active {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 40rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--status-active-bg);
  color: var(--status-active-text);
  border: 1px solid var(--status-active-border);
}

.status-completed {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 40rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.status-pending {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 40rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--status-pending-bg);
  color: var(--status-pending-text);
  border: 1px solid var(--status-pending-border);
}

.status-inactive {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 40rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--status-inactive-bg);
  color: var(--status-inactive-text);
  border: 1px solid var(--status-inactive-border);
}

/* Team member status badge */
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 40rem;
  font-size: 0.75rem;
  font-weight: 500;
}

tfoot tr {
  background-color: #f9fafb;
}

.totals-label {
  font-weight: 500;
  text-align: right;
  padding-right: 1rem;
}

.totals-value {
  font-weight: 500;
}

/* ===============================================
   COUNTERPARTY & USER ELEMENTS
   =============================================== */
.counterparty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: #f97316;
  color: white;
  border-radius: 50%;
  font-weight: bold;
}

.counterparty-link, .counterparty-name {
  color: var(--primary-color);
  text-decoration: none;
}

.counterparty-link:hover, .counterparty-name:hover {
  text-decoration: underline;
}

/* ===============================================
   TRANSACTIONS FOOTER (STICKY)
   =============================================== */
.transactions-footer {
  display: flex;
  background-color: #f8fafc;
  border-top: none;
  padding: 1rem 1.5rem;
  margin-top: -1px;
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  position: sticky;
  bottom: 0;
  z-index: 10;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05);
}

.totals-row {
  display: flex;
  flex-direction: column;
  margin-right: 5rem;
  padding: 0.5rem 0;
}

.total-label {
  font-weight: 500;
  color: #64748b;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.total-value {
  font-weight: 600;
  font-size: 1rem;
}

.net-balance {
  color: var(--primary-color);
}

/* ===============================================
   EMPTY STATE STYLES
   =============================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 50vh;
  color: #666;
}

.empty-state-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--faded-bg);
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.empty-state h3 {
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #000000;
}

.empty-state p {
  margin-bottom: 1rem;
  color: #666;
}

.empty-state button {
  margin-top: 0.5rem;
}

/* Remove border-bottom and hover state from empty state rows */
.empty-state {
  border-bottom: none !important;
}

.empty-state:hover {
  background-color: transparent !important;
}

/* Target table rows containing empty state */
tr:has(.empty-state) {
  border-bottom: none !important;
}

tr:has(.empty-state):hover {
  background-color: transparent !important;
}

/* Alternative selector for browsers that don't support :has() */
td:has(.empty-state) {
  border-bottom: none !important;
}

/* Target the specific table row structure used in empty states */
tbody tr td[colspan] {
  border-bottom: none !important;
}

tbody tr td[colspan]:hover {
  background-color: transparent !important;
}

/* Ensure the table row itself doesn't have hover effects */
tbody tr:has(td[colspan]) {
  border-bottom: none !important;
}

tbody tr:has(td[colspan]):hover {
  background-color: transparent !important;
}

/* ===============================================
   FOOTER STYLES
   =============================================== */
.app-footer {
  margin-top: auto;
  padding: 1rem 2rem;
  background-color: #fff;
  text-align: center;
  color: #999;
  font-size: 0.8rem;
  border-top: 1px solid #eee;
}

/* ===============================================
   MODAL STYLES
   =============================================== */
#modal-container {
  display: none;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

.modal.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-container {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.5rem 1.5rem 0.5rem 1.5rem;
  position: sticky;
  top: 0;
  background-color: #fff;
  z-index: 2;
  border-bottom: 1px solid #f3f4f6;
}

.modal-header h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
}

.modal-description {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.modal-content {
  padding: 1.5rem;
  overflow-y: auto;
  overflow-x: visible;
  max-height: calc(90vh - 150px); /* Account for header and footer */
}

.modal-footer {
  padding: 1rem 1.5rem;
  background-color: #fff;
  border-top: 1px solid #f3f4f6;
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
}

/* Media queries for better mobile experience */
@media (max-width: 640px) {
  .modal-container {
    width: 95%;
    max-height: 95vh;
  }

  .modal-content {
    padding: 1rem;
    max-height: calc(95vh - 130px);
  }

  .modal-header {
    padding: 1rem 1rem 0.5rem 1rem;
  }

  .modal-footer {
    padding: 0.75rem 1rem;
  }
}

/* ===============================================
   FORM STYLES
   =============================================== */
.form-group {
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #D9D9D9;
  border-radius: 8px;
  font-size: 0.9rem;
  background-color: white;
  transition: all 0.2s ease-in-out;
  color: #374151;
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
  border-color: #374151;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #4361ee;
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
  background-color: #ffffff;
}

.form-group input:disabled,
.form-group textarea:disabled,
.form-group select:disabled {
  background-color: #f3f4f6;
  border-color: white;
  color: #D9D9D9;
  cursor: not-allowed;
}

.form-group input[readonly],
.form-group textarea[readonly] {
  background-color: #f3f4f6;
  border-color: white;
  color: #4b5563;
}

/* Account search input styles */
.account-search-input {
  width: 500px;
  padding: 8px 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-family);
  font-size: 0.9rem;
  background-color: var(--white);
  transition: all 0.2s ease-in-out;
  color: var(--text-primary);
}

.account-search-input:hover {
  border-color: var(--text-primary);
}

.account-search-input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
  background-color: var(--white);
}

.detail-value {
  margin: 0;
  color: #212529;
  font-size: 14px;
  padding: 6px 8px;
  background-color: white;
  border-radius: 8px;
  border: 1px solid #d9d9d9;
  flex: 1;
}

.detail-status-container {
  display: flex;
  gap: 8px;
}

.transaction-row:hover {
  background-color: #f8f9fa;
}

.required {
  color: #e74c3c;
}

.select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.select-wrapper select {
  width: 100%;
  padding: 12px 16px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

.select-wrapper:after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid #000000;
  transform: translateY(-50%);
  pointer-events: none;
}

.form-section-title {
  font-size: 1rem;
  font-weight: 500;
  color: #000000;
  margin: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-group-half {
  flex: 1;
}

.form-group-small {
  flex: 0 0 25%;
}

.form-group-medium {
  flex: 1;
}

.btn-link {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: #4361ee;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 1rem;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-icon {
  margin-right: 0.5rem;
  font-weight: bold;
  font-size: 1.1rem;
}

.split-container {
  margin-top: 1rem;
}

.transaction-amount-section {
}

.form-section-title {
  font-size: 1rem;
  font-weight: 500;
  color: #000000;
  margin: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.split-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.split-amount-field {
  width: 100%;
  margin-bottom: 1rem;
}

.account-fields {
  display: flex;
  gap: 1rem;
}

.account-field {
  flex: 1;
}



.remove-split {
  position: absolute;
  top: 1rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background-color: #f3f4f6;
  color: #D9D9D9;
  font-size: 1.25rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.remove-split:hover {
  background-color: #e5e7eb;
  color: #4b5563;
}

.form-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.form-group label .required {
  color: #ef4444;
  margin-left: 2px;
}

/* Additional select styling */
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  padding-right: 3rem;
  cursor: pointer;
}

.form-group select:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234361ee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.hidden {
  display: none !important;
}

.transactions-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.filter-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.transactions-header .filter-controls {
  width: 100%;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-tags-container {
  margin-bottom: 16px;
}

.filter-tag {
  background-color: #eef2ff;
  color: #4f46e5;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

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

.btn-icon svg {
  width: 1rem;
  height: 1rem;
}

.filter-modal .modal-container {
  max-width: 500px;
}

.filter-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.filter-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .transactions-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .active-filters {
    order: 2;
  }

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

/* ===============================================
   TRANSACTION ROW STYLING
   =============================================== */
.transaction-row {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.transaction-row:hover {
  background-color: #f8fafc !important;
}

/* ===============================================
   TRANSACTION DETAILS MODAL
   =============================================== */
.transaction-details-modal .modal-container {
  max-width: 600px;
  width: 90vw;
}

.transaction-details-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.details-section {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.details-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.details-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
}

.amount-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.amount-label {
  color: #D9D9D9;
  font-size: 0.875rem;
}

.amount-value {
  color: #111827;
  font-weight: 500;
}

.entries-table {
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  overflow: hidden;
}

.entries-header {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr 2fr;
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.entries-row {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr 2fr;
  background-color: white;
}

.entry-col {
  padding: 0.75rem;
  font-size: 0.875rem;
  border-right: 1px solid #e5e7eb;
}

.entry-col:last-child {
  border-right: none;
}

.entries-header .entry-col {
  font-weight: 600;
  color: #374151;
}

.entries-row .entry-col {
  color: #111827;
}

.entry-account {
  color: #4f46e5;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.info-row:last-child {
  margin-bottom: 0;
}

.info-label {
  color: #595959;
  font-size: 0.875rem;
}

.info-value {
  color: #111827;
  font-weight: 500;
}

.comments-content {
  background-color: #f9fafb;
  padding: 1rem;
  border-radius: 0.375rem;
  border: 1px solid #e5e7eb;
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.5;
}

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

.modify-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: white;
  border: 1px solid #d1d5db;
  color: #4f46e5;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.modify-btn:hover {
  background-color: #f8fafc;
  border-color: #4f46e5;
}

.modify-btn svg {
  width: 1rem;
  height: 1rem;
}

.modal-bottom-actions {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: white;
  border: 1px solid #ef4444;
  color: #dc2626;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.delete-btn:hover {
  background-color: #fef2f2;
  border-color: #dc2626;
}

.delete-btn svg {
  width: 1rem;
  height: 1rem;
}

.close-btn {
  background-color: #4f46e5;
  color: white;
  border: 1px solid #4f46e5;
}

.close-btn:hover {
  background-color: #4338ca;
  border-color: #4338ca;
}

@media (max-width: 768px) {
  .transaction-details-modal .modal-container {
    width: 95vw;
    margin: 1rem;
  }

  .entries-header,
  .entries-row {
    grid-template-columns: 1fr;
  }

  .entries-header {
    display: none;
  }

  .entries-row .entry-col {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 0.75rem;
  }

  .entries-row .entry-col:last-child {
    border-bottom: none;
  }

  .actions-content {
    flex-direction: column;
  }

  .modify-btn,
  .delete-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Account Select Styles */
.account-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #D9D9D9;
  border-radius: 8px;
  font-size: 0.9rem;
  background-color: #ffffff;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  padding-right: 3rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  color: #374151;
}

.account-select:hover {
  border-color: #374151;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234361ee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.account-select:focus {
  outline: none;
  border-color: #4361ee;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
  background-color: #ffffff;
}

.account-select option {
  padding: 8px;
}

.account-select option:checked {
  background-color: #4361ee;
  color: white;
}

/* Autocomplete Container Styles */
.autocomplete-container {
  position: relative;
}

.account-autocomplete,
.project-autocomplete,
.document-autocomplete {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #D9D9D9;
  border-radius: 8px;
  font-size: 0.9rem;
  background-color: #ffffff;
  transition: all 0.2s ease-in-out;
  color: #374151;
}

.account-autocomplete:hover,
.project-autocomplete:hover,
.document-autocomplete:hover {
  border-color: #374151;
}

.account-autocomplete:focus,
.project-autocomplete:focus,
.document-autocomplete:focus {
  outline: none;
  border-color: #4361ee;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
  background-color: #ffffff;
  border-radius: 8px 8px 0 0;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #4361ee;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1100;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.autocomplete-dropdown:not(:empty) {
  display: block;
}

.autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s ease;
  user-select: none;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.autocomplete-item:hover,
.autocomplete-item.selected {
  background-color: #f8faff;
}

.autocomplete-item .account-code,
.autocomplete-item .project-reference {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.autocomplete-item .account-name,
.autocomplete-item .project-name {
  color: #6b7280;
  font-size: 0.85rem;
  margin-top: 2px;
}

.autocomplete-item .document-number {
  font-weight: 500;
  color: #374151;
  font-size: 0.9rem;
}

.autocomplete-item.no-results {
  color: #9ca3af;
  font-style: italic;
  cursor: default;
}

.autocomplete-item.no-results:hover {
  background-color: transparent;
}

/* ===============================================
   AUTHENTICATION STYLES
   =============================================== */

/* Auth Page Layout */
.auth-page {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--white);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  max-width: 300px;
  margin: 0 auto;
  margin-top: 6rem;
  width: 100%;
  gap: 24px; /* Use gap instead of margins */
}

/* Logo Section */
.auth-logo {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
}

.logo-square {
  width: 24px;
  height: 24px;
  background-color: var(--primary-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-square span {
  color: white;
  font-weight: 600;
  font-size: 12px;
}

.auth-logo h1 {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-color);
}

/* Auth Form Container */
.auth-form-container {
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 24px; /* Use gap instead of margins */
}

.auth-header {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px; /* Use gap instead of margins */
}

.auth-header h2 {
  font-size: 24px;
  font-weight: 600; /* Semibold */
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.auth-header p {
  color: #000000;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

/* Form Elements */
.auth-feedback {
  color: #f51f1f;
  border-left: 2px solid #f51f1f;
  align-items: start;
  gap: 8px;
  padding: 0 8px;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.35;
  display: none;
}

.auth-feedback svg {
  margin-top: 1.5px;
  width: 16px;
  height: 16px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px; /* Use gap instead of margins */
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px; /* Use gap instead of margins */
}

.auth-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.auth-form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 400;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1; /* Line height 1 for input text */
  background-color: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box; /* Ensure padding and border are included in width */
}

.auth-form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(52, 78, 247, 0.1);
}

.auth-form-group input::placeholder {
  color: #808080;
}

/* Email Input Container */
.email-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.email-input-container input {
  width: 100%;
}

/* Password Input Container */
.password-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-container input {
  padding-right: 60px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: var(--text-primary);
}

/* Auth Buttons */
.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 6px; /* Use gap instead of margins */
}

.auth-btn {
  width: 100%;
  height: 34px;
  padding: 0 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box; /* Ensure padding and border are included in width */
}

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

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

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

.auth-btn-secondary {
  background-color: var(--faded-bg);
  color: var(--primary-color);
  border: 1px solid var(--faded-bg);
}

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

.auth-btn-secondary:active {
  background-color: var(--faded-active);
}

/* Horizontal Divider */
.auth-divider {
  width: 100%;
  height: 1px;
  background-color: #e6e6e6;
  border: none;
}

/* Auth Footer */
.auth-footer {
  width: 100%; /* Fill the width */
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px; /* Use gap instead of margins */
}

.auth-footer p {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

/* Page Footer */
.page-footer {
  text-align: center;
  width: 100%;
  display: flex;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #e5e7eb;
  margin-top: auto;
}

.page-footer p {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 400;
}

.page-footer a {
  color: var(--text-secondary)
}

/* Error and Success Messages */
.auth-error-container {
  margin-top: 1rem;
}

.auth-error-message {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}

.auth-success-message {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}

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

  .auth-form-container {
    max-width: 100%;
  }
}

/* Auth Modal Styles */
.auth-modal {
  max-width: 400px;
  width: 100%;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab:hover {
  color: var(--text-primary);
  background-color: var(--faded-bg);
}

.auth-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.auth-form {
  margin-bottom: 1rem;
}

.auth-form .form-group {
  margin-bottom: 1rem;
}

.auth-form .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}

.auth-form .form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

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

.auth-form .form-group small {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-secondary);
  font-size: 12px;
}

.auth-form .btn {
  width: 100%;
  margin-top: 0.5rem;
}

#auth-feedback {
  margin-top: 1rem;
}

#auth-feedback .error-message {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}

#auth-feedback .success-message {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}

/* ===============================================
   AUDIT LOGS STYLES
   =============================================== */

/* Action badges for audit logs */
.action-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.action-create {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.action-update {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.action-delete {
  background-color: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* Resource link styling for audit logs */
.resource-link {
  color: #2563eb;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

.resource-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Changes container styling for audit logs */
.changes-container {
  height: 0;
  overflow: hidden;
  transition: height 0.3s ease;
  margin-top: 8px;
}

.changes-container.expanded {
  height: auto;
}

.changes-json {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 12px;
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: #495057;
  line-height: 1.4;
}

/* Make audit rows clickable */
.audit-row {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.audit-row:hover {
  background-color: #f8f9fa;
}

/* Audit Modal Styles */
.audit-modal {
  position: fixed;
  top: 0;
  right: -500px;
  width: 500px;
  height: 100vh;
  background-color: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 1000;
}

.audit-modal.show {
  right: 0;
}

.audit-modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
  gap: 24px;
}

.audit-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.audit-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #212529;
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  color: #6c757d;
}

.close-btn:hover {
  background-color: #f8f9fa;
  color: #495057;
}

.audit-modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Custom scrollbar for audit modal */
.audit-modal-body::-webkit-scrollbar {
  width: 6px;
}

.audit-modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.audit-modal-body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.audit-modal-body::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.details-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  margin: 0;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}



.audit-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audit-detail label {
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}

.audit-detail span {
  color: #212529;
  font-size: 14px;
}

.audit-detail pre {
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
}

.changes-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.changes-section h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #495057;
}

.previous-values,
.new-values {
  padding: 16px;
  background-color: #fafafa;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #212529;
}

.previous-values h4,
.new-values h4 {
  margin: 0 0 12px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--primary-color);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  text-transform: uppercase;
}

.values-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.values-table tr {
  border-bottom: 1px solid rgb(200, 200, 200);
}

.values-table td {
  padding: 4px 0;
  vertical-align: top;
}

.values-table .param-name {
  font-weight: 600;
  color: #495057;
  padding-right: 12px;
  margin-right: 16px;
  white-space: nowrap;
  width: 150px;
  min-width: 150px;
  max-width: 150px;
}

.values-table .param-value {
  font-weight: 400;
  color: #212529;
  word-break: break-word;
}

.no-values {
  color: #6c757d;
  font-style: italic;
}



/* ===============================================
   NEW FORM PAGE STYLES
   =============================================== */

/* Hide main header on new form pages since they have their own headers */
.new-form-page .main-header {
  display: none;
}

/* Adjust page content positioning when main header is hidden */
.new-form-page .page-content {
  top: 0;
}

.form-container {
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  padding: 120px 0 48px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: #fff;
}

.form-header {
  text-align: left;
}

.form-header h2 {
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-description {
  color: black;
  font-size: 0.875rem;
  line-height: 1.5;
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.form-footer .btn[type="submit"] {
  min-width: 120px;
}

/* Form input styles for new forms */
.form-container .form-group input,
.form-container .form-group select,
.form-container .form-group textarea {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
  font-size: 14px;
  padding: 8px 12px;
}

.form-container .form-group input:hover,
.form-container .form-group select:hover,
.form-container .form-group textarea:hover {
  border-color: rgba(67, 97, 238, 0.5);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.form-container .form-group input:focus,
.form-container .form-group select:focus,
.form-container .form-group textarea:focus {
  border-color: #4361ee;
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.form-container .form-group input::placeholder,
.form-container .form-group textarea::placeholder {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
}

/* Button text styles */
.btn {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Form sections container for organizing form groups */
.form-sections-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Role form styling */
#role-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Form group sections for grouping related fields */
.form-group-section {
  background-color: #fafafa;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Transaction amount section - different styling */
.transaction-amount-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Amount item container */
.amount-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Add amount button styling */
.add-amount-btn {
  gap: 4px;
  align-items: center;
  justify-content: center;
}



/* Hide split amounts by default */
#split-amounts {
  display: none;
}

/* Style split rows with top border and padding */
#split-amounts .amount-item {
  padding-top: 16px;
  border-top: 1px solid #f2f2f2;
  align-items: flex-start;
}

#split-amounts .account-fields,
#split-amounts .form-group {
  width: 100%;
}

/* Remove split button styling */
.btn-remove-split {
  background: none;
  border: none;
  color: var(--danger-color);
  cursor: pointer;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-remove-split:hover {
  text-decoration: underline;
  font-weight: 500;
  color: var(--danger-color);
}

/* Form styling for all forms */
#account-form,
#project-form,
#team-member-form,
#role-edit-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Responsive adjustments for form container */
@media (max-width: 768px) {
  .form-container {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .form-header h2 {
    font-size: 1.5rem;
  }
  
  .form-footer {
    flex-direction: column;
  }
  
  .form-footer .btn {
    width: 100%;
  }
}

/* ===============================================
   ROLES & PERMISSIONS STYLES
   =============================================== */

/* System role badge */
.system-role-badge {
  background-color: var(--primary-color);
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 40px;
  margin-left: 8px;
  font-weight: 500;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

/* Role description styling */
.role-description {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.role-description p {
  margin: 0;
  color: var(--text-primary);
}

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

/* Permissions container */
.permissions-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Permission category */
.permission-category {
  background-color: var(--white);
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 0;
}

.permission-category h4 {
  margin: 0 0 12px 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  text-transform: capitalize;
}

/* Permission checkboxes */
.permission-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  padding: 12px;
}

/* Checkbox label styling */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-primary);
  padding: 4px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.checkbox-label:hover {
  background-color: #f1f3f4;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  opacity: 0;
  position: absolute;
}

/* Checkmark styling for custom checkboxes */
.checkmark {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-radius: 3px;
  position: relative;
  transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}



/* Responsive adjustments for roles */
@media (max-width: 768px) {
  .permission-checkboxes {
    grid-template-columns: 1fr;
  }
  
  .permission-category {
    padding: 12px;
  }
}

/* Permissions container for roles form */
.permissions-container {
  padding-right: 8px;
}

/* Accordion toggle button */
.accordion-toggle {
  background: none;
  border: none;
  padding: 12px;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
}

/* Lucide icon styling for accordion */
.accordion-toggle svg {
  width: 14px;
  height: 14px;
  color: #808080;
  transition: transform 0.2s ease;
}