/* Custom dark theme material design styles */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --primary-color: #BB86FC;
  --primary-variant: #3700B3;
  --secondary-color: #03DAC6;
  --background: #121212;
  --surface: #1e1e1e;
  --error: #CF6679;
  --info: #b5942d;
  --notification: #f4d042;
  --on-primary: #000000;
  --on-secondary: #000000;
  --on-background-secondary: #783b77;
  --on-background: #FFFFFF;
  --on-surface: #FFFFFF;
  --on-error: #000000;
  --on-info: #000000;
  --on-notification: #000000;
  --card-bg: #2d2d2d;
  --card-border: #383838;
  --input-bg: #2d2d2d;
  --input-border: #444444;
  --input-focus-border: var(--primary-color);
  --button-hover: rgba(187, 134, 252, 0.08);
  --button-active: rgba(187, 134, 252, 0.12);
  --divider: rgba(255, 255, 255, 0.12);
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.5);
  --border: var(--divider);
  --primary: var(--primary-color);
}

body {
  background-color: var(--background);
  color: var(--on-background);
  font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.5;
  font-size: 16px;
  font-weight: 400;
}

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

a:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: no-preference) {
  :root {
    --primary-color: #BB86FC;
  }
}

/* Settings styles */
.settings-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--divider);
}

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

.settings-section-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--primary-color);
  letter-spacing: 0.5px;
}

.units-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 30px;
}

@media (max-width: 992px) {
  .units-grid {
    grid-template-columns: 1fr;
  }
}

.bank-accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.bank-account-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 25px;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.bank-account-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.bank-account-card.is-default {
  border-left: 4px solid var(--primary-color);
}

.bank-account-card .account-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--on-surface);
  padding-right: 60px;
}

.bank-account-card .account-details {
  font-size: 0.95rem;
  color: var(--on-surface);
  opacity: 0.8;
  line-height: 1.8;
  flex: 1;
}

.bank-account-card .account-actions {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  gap: 5px;
}

.bank-account-card .default-badge {
  display: inline-block;
  background: rgba(187, 134, 252, 0.15);
  color: var(--primary-color);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  margin-top: 20px;
  font-weight: 500;
  align-self: flex-start;
  border: 1px solid var(--primary-color);
}

/* Form layouts */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 5px;
}

.form-row .form-group {
  flex: 1;
  min-width: 200px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--surface);
  border-radius: 8px;
  border: 1px dashed var(--divider);
  color: var(--on-surface);
  opacity: 0.6;
}
.wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background-color: var(--surface);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1000;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--divider);
}

.sidebar-logo {
  text-align: center;
  margin-bottom: 10px;
}

.sidebar-logo-link {
  display: inline-block;
  line-height: 0;
}

.logo-img {
  max-width: 100%;
  height: auto;
  /*max-height: 60px;*/
  display: block;
  margin: 0 auto;
}

.sidebar-title {
  font-size: 1.5rem;
  margin: 0;
  color: var(--primary-color);
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-item {
  display: block;
  padding: 15px 20px;
  color: var(--on-surface);
  border-bottom: 1px solid var(--divider);
  transition: background-color 0.2s;
}

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

.sidebar-item.active {
  background-color: rgba(187, 134, 252, 0.1);
  color: var(--primary-color);
  border-right: 3px solid var(--primary-color);
}

.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 20px;
  padding-bottom: 100px;
}

.main-content-full {
  margin-left: 0;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  margin-bottom: 20px;
}

.page-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 10px 0;
}

.page-header h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--text-primary);
}

.btn-group {
  display: flex;
  gap: 15px;
  align-items: center;
}

.btn-group .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--card-border);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
}

#expense-export-card {
  border-color: rgba(187, 134, 252, 0.55);
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}

.form-row > .form-group {
  padding: 0 10px;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--divider);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  transition: background-color 0.2s, box-shadow 0.2s;
  text-align: center;
}

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

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

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

.btn-outline:hover {
  background-color: rgba(187, 134, 252, 0.08);
}

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

.btn-outline-secondary:hover {
  background-color: rgba(3, 218, 198, 0.08);
}

.btn-error {
  background-color: var(--error);
  color: var(--on-error);
}

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

.btn:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.btn-flat:hover {
  background-color: var(--button-hover);
  box-shadow: none;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.5;
  border-radius: 4px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--on-surface);
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--input-focus-border);
}

.form-control[readonly] {
  background-color: rgba(255, 255, 255, 0.05);
  cursor: not-allowed;
}

.form-text {
  margin-top: 5px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.form-check {
  display: flex;
  align-items: center;
}

.form-check-input {
  margin-right: 8px;
}

/* Tables */
.table-container {
  overflow-x: auto;
}

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

.table th,
.table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--divider);
}

.table th {
  font-weight: 500;
  color: var(--primary-color);
}

.table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.table-striped tbody tr:nth-child(odd) {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Alert messages */
.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
  border-left: 4px solid transparent;
}

.alert-success {
  background-color: rgba(3, 218, 198, 0.1);
  border-left-color: var(--secondary-color);
  color: var(--secondary-color);
}

.alert-error {
  background-color: rgba(207, 102, 121, 0.1);
  border-left-color: var(--error);
  color: var(--error);
}

.alert-notification {
  background-color: var(--primary-color);
  border-left-color: var(--notification);
  color: var(--notification);
}

.alert-danger {
  background-color: rgba(207, 102, 121, 0.1);
  border-left-color: var(--error);
  color: var(--error);
}

.alert-info {
  background-color: rgba(102, 179, 255, 0.1);
  border-left-color: var(--info);
  color: var(--info);
}

.alert-close {
  float: right;
  background: none;
  border: none;
  color: var(--error);
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.alert-close:hover {
  opacity: 1;
}

/* Invoice items form */
.invoice-items-container {
  margin-bottom: 20px;
}

.invoice-item {
  margin-bottom: 20px;
  padding: 20px;
  background-color: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.invoice-item:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.item-main-row {
  margin-bottom: 15px;
}

.item-details-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  align-items: end;
  width: 100%;
}

/* Adjustments for specific columns */
.item-col-description {
  width: 100%;
}

.item-col-total {
  min-width: 140px;
}

.item-total-display {
  padding: 10px 12px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 4px;
  text-align: right;
  font-weight: 500;
  color: var(--secondary-color);
}

.item-actions-top {
  position: absolute;
  top: 10px;
  right: 10px;
}

.btn-delete-item {
  color: var(--error);
  padding: 5px;
  min-width: auto;
}

.btn-delete-item:hover {
  background-color: rgba(207, 102, 121, 0.1);
}

@media (max-width: 768px) {
  .item-details-row {
    grid-template-columns: 1fr 1fr;
  }
  
  .item-col-total {
    grid-column: span 2;
  }
}

@media (max-width: 480px) {
  .item-details-row {
    grid-template-columns: 1fr;
  }
  
  .item-col-total {
    grid-column: span 1;
  }
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1001;
  background: var(--primary-color);
  color: var(--on-primary);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  transform: scale(1.05);
}

.mobile-menu-toggle:active {
  transform: scale(0.95);
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

body.sidebar-open {
  overflow: hidden;
}

/* Enhanced mobile styles */
@media (max-width: 991px) {
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .wrapper {
    display: block;
  }
  
  .sidebar {
    position: fixed;
    left: -280px;
    width: 280px;
    transition: left 0.3s ease;
    z-index: 1000;
    height: 100vh;
  }
  
  .sidebar.open {
    left: 0;
  }
  
  .main-content {
    margin-left: 0;
    padding-top: 80px;
  }
  
  .sidebar-list {
    display: block;
    padding-top: 20px;
  }
  
  .sidebar-item {
    flex: none;
    min-width: auto;
    border-bottom: 1px solid var(--divider);
    border-right: none;
    padding: 20px;
  }
  
  /* Card improvements for mobile */
  .card {
    margin-bottom: 15px;
  }
  
  .card-body {
    padding: 15px;
  }
  
  /* Form improvements */
  .form-group {
    margin-bottom: 15px;
  }
  
  /* Table responsive */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .table {
    min-width: 600px;
  }
  
  /* Stats grid mobile */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .stat-card {
    padding: 15px;
    gap: 15px;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .stat-icon {
    width: 48px;
    height: 48px;
  }

  .stat-icon i {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 15px;
  }
  
  .top-bar {
    flex-direction: column;
    gap: 15px;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
  
  /* Button improvements */
  .btn {
    padding: 10px 15px;
    font-size: 14px;
  }
  
  .btn-icon {
    width: 36px;
    height: 36px;
  }
  
  /* Form actions mobile */
  .form-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .form-actions > div {
    width: 100%;
  }
  
  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media print {
  .sidebar,
  .top-bar,
  .btn {
    display: none;
  }
  
  .wrapper {
    display: block;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  body {
    background-color: white;
    color: black;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.status-paid {
  background-color: rgba(3, 218, 198, 0.2);
  color: var(--secondary-color);
}

.status-unpaid {
  background-color: rgba(187, 134, 252, 0.2);
  color: var(--primary-color);
}

.status-overdue {
  background-color: rgba(207, 102, 121, 0.2);
  color: var(--error);
}

.status-skipped {
  background-color: rgba(255, 152, 0, 0.2);
  color: #ffb74d;
}

/* Dashboard stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.stat-card {
  padding: 25px;
  border-radius: 12px;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon i {
  font-size: 28px;
  color: white;
}

.stat-content {
  flex: 1;
  min-width: 0; /* Ensures content can shrink and not overflow */
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 4px 0;
  color: var(--on-background);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-description, .stat-sublabel {
  font-size: 0.8125rem;
  opacity: 0.8;
  margin-top: 4px;
}

/* Material icons */
.material-icons {
  vertical-align: middle;
}

/* Floating action button */
.fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--on-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: background-color 0.2s, box-shadow 0.2s;
  z-index: 100;
  border: none;
  cursor: pointer;
}

.fab:hover {
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
  text-decoration: none;
  background-color: var(--primary-variant);
  color: var(--on-primary);
}

.fab i {
  font-size: 24px;
}

/* Form floating submit button */
.btn-fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  border-radius: 28px;
  padding: 12px 24px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6);
}

.btn-fab i {
  margin: 0;
}

/* Loading states and animations */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-color);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Fade in animation */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

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

/* Slide animations */
.slide-in-left {
  animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.slide-in-right {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* Pulse animation for important elements */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Success/Error states */
.success-flash {
  animation: successFlash 0.5s ease-out;
}

@keyframes successFlash {
  0% { background-color: var(--primary-color); }
  100% { background-color: transparent; }
}

.error-shake {
  animation: errorShake 0.5s ease-out;
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 4px;
  background-color: var(--input-bg);
  border-radius: 2px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
  border-radius: 2px;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--input-bg) 25%, var(--card-border) 50%, var(--input-bg) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

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

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus indicators */
.form-control:focus,
.btn:focus,
.sidebar-item:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  :root {
    --primary-color: #FFD700;
    --on-primary: #000000;
    --background: #000000;
    --surface: #1a1a1a;
    --on-background: #FFFFFF;
    --on-surface: #FFFFFF;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
  }
}

/* Print styles */
@media print {
  .mobile-menu-toggle,
  .sidebar-overlay,
  .fab {
    display: none !important;
  }
  
  .sidebar {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
  }
  
  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .btn {
    display: none !important;
  }
}

/* Table Filters */
.table-filters {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 20px;
  background: var(--surface);
  border-radius: 8px;
  margin-bottom: 20px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  min-width: 200px;
  flex: 1;
}

.filter-field label {
  margin-bottom: 5px;
  font-size: 0.875rem;
  color: var(--on-surface);
  opacity: 0.87;
}

.filter-field input {
  padding: 10px 12px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 4px;
  color: var(--on-surface);
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

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

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.pagination {
  display: flex;
  gap: 5px;
  align-items: center;
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  color: var(--on-surface);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover:not(.active) {
  background: var(--button-hover);
  border-color: var(--primary-color);
}

.pagination-btn.active {
  background: var(--primary-color);
  color: var(--on-primary);
  border-color: var(--primary-color);
  font-weight: 500;
}

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

.pagination-dots {
  padding: 0 8px;
  color: var(--on-surface);
  opacity: 0.6;
}

.pagination-summary {
  font-size: 0.875rem;
  color: var(--on-surface);
  opacity: 0.7;
}

/* Loading states */
.table-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--on-surface);
  opacity: 0.7;
  font-size: 1rem;
}

.table-loading::after {
  content: '...';
  animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* Dynamic table list */
.dynamic-table-list {
  animation: fadeIn 0.3s ease-in;
}

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

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

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

  .pagination-container {
    flex-direction: column;
  }

  .pagination {
    order: 2;
  }

  .pagination-summary {
    order: 1;
    text-align: center;
  }
}


/* Type Breakdown Cards */
.type-breakdown-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.progress-bar {
    height: 6px;
    background: var(--background);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Badges */
.badge-custom {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.badge-primary {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    background: #9C27B0;
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 80px;
    color: var(--text-tertiary);
    display: block;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1rem;
}
/* Autocomplete styles */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: var(--on-surface);
}

.autocomplete-item:hover {
    background-color: var(--button-hover);
    color: var(--primary-color);
}

/* V2 medium UI refresh */
:root {
  --primary-color: #4c9dff;
  --primary-variant: #2f6fd4;
  --secondary-color: #22c1a5;
  --background: #0d1624;
  --surface: #142235;
  --card-bg: #1a2a3f;
  --card-border: rgba(134, 164, 197, 0.24);
  --input-bg: rgba(13, 28, 45, 0.82);
  --input-border: rgba(141, 169, 198, 0.26);
  --divider: rgba(143, 171, 200, 0.2);
  --on-background: #edf4ff;
  --on-surface: #edf4ff;
  --text-primary: #edf4ff;
  --text-secondary: rgba(223, 236, 255, 0.75);
  --text-tertiary: rgba(223, 236, 255, 0.5);
}

body {
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  background-color: var(--background);
  background-image:
    radial-gradient(circle at 0% 0%, rgba(76, 157, 255, 0.15), transparent 36%),
    radial-gradient(circle at 100% 16%, rgba(34, 193, 165, 0.09), transparent 32%);
}

h1,
h2,
h3,
.card-title,
.page-title {
  font-family: 'Space Grotesk', 'Source Sans 3', sans-serif;
  letter-spacing: 0.01em;
}

a {
  color: #8fc4ff;
}

.sidebar {
  width: 292px;
  background: linear-gradient(180deg, #122035 0%, #101c2e 100%);
  border-right: 1px solid rgba(147, 180, 215, 0.2);
  box-shadow: 0 10px 28px rgba(4, 12, 20, 0.55);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(143, 171, 200, 0.2);
}

.sidebar-logo {
  margin-bottom: 12px;
}

.sidebar-fiscal-year {
  border: 1px solid rgba(143, 171, 200, 0.26);
  border-radius: 12px;
  background: rgba(17, 37, 57, 0.82);
}

.sidebar-fiscal-year-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: inherit;
  text-decoration: none;
}

.sidebar-fiscal-year-link:hover {
  text-decoration: none;
}

.sidebar-fiscal-year-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(76, 157, 255, 0.2);
  color: #cfe6ff;
  flex-shrink: 0;
}

.sidebar-fiscal-year-icon i {
  font-size: 18px;
}

.sidebar-fiscal-year-content {
  display: flex;
  flex-direction: column;
}

.sidebar-fiscal-year-label {
  font-size: 0.73rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(214, 230, 250, 0.75);
}

.sidebar-fiscal-year-value {
  font-size: 1.06rem;
  font-weight: 700;
}

.sidebar-list {
  padding: 12px;
}

.sidebar-section-label {
  margin: 14px 8px 8px;
  color: rgba(215, 232, 251, 0.58);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  list-style: none;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  margin-bottom: 4px;
  padding: 12px 14px;
  border-bottom: none;
}

.sidebar-item i {
  font-size: 20px;
  opacity: 0.9;
}

.sidebar-item:hover {
  background-color: rgba(76, 157, 255, 0.12);
  border-color: rgba(120, 177, 239, 0.32);
  text-decoration: none;
}

.sidebar-item.active {
  background: linear-gradient(135deg, rgba(76, 157, 255, 0.2) 0%, rgba(76, 157, 255, 0.08) 100%);
  border-color: rgba(120, 177, 239, 0.42);
  border-right: 1px solid rgba(120, 177, 239, 0.42);
  color: #d7ebff;
}

.main-content {
  margin-left: 292px;
  padding: 26px;
  padding-bottom: 110px;
}

.main-content.main-content-full {
  margin-left: 0;
}

.top-bar {
  position: static;
  padding: 14px 18px;
  margin-bottom: 22px;
  border-radius: 16px;
  background: rgba(21, 38, 58, 0.9);
  border: 1px solid rgba(140, 170, 203, 0.26);
  backdrop-filter: blur(8px);
}

.top-bar-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.top-bar-subtitle {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-bar-logout {
  background: rgba(76, 157, 255, 0.18);
  color: #d6ebff;
}

.top-bar-logout:hover {
  background: rgba(76, 157, 255, 0.3);
}

.card {
  border-radius: 16px;
  border: 1px solid rgba(134, 164, 197, 0.24);
  background: linear-gradient(180deg, rgba(27, 42, 62, 0.92) 0%, rgba(21, 33, 48, 0.95) 100%);
  box-shadow: 0 10px 24px rgba(6, 14, 24, 0.32);
  overflow: visible;
}

.card-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(187, 134, 252, 0.32) 0%, rgba(55, 0, 179, 0.55) 100%);
  border-bottom: 1px solid rgba(187, 134, 252, 0.45);
}

.card > .card-header {
  position: sticky;
  top: 12px;
  z-index: 85;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 20px;
}

.card-subtitle {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  text-transform: none;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #69b2ff 100%);
  color: #041628;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #2ed5b2 100%);
  color: #04221b;
}

.btn-flat {
  color: #a5d0ff;
}

.btn-icon {
  border-radius: 10px;
}

.form-label {
  color: #d4e6fd;
}

.form-control {
  border-radius: 10px;
  background-color: var(--input-bg);
  border-color: var(--input-border);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(76, 157, 255, 0.2);
}

.has-error .form-control {
  border-color: #ff8b8b;
}

.form-error {
  margin-top: 6px;
  color: #ff9d9d;
  font-size: 0.82rem;
}

.table-container {
  border-radius: 12px;
  border: 1px solid rgba(134, 164, 197, 0.24);
  background: rgba(13, 28, 45, 0.45);
}

.table {
  min-width: 640px;
}

.table th,
.table td {
  padding: 13px 14px;
}

.table th {
  background: rgba(13, 28, 45, 0.9);
  color: #9fcfff;
}

.table tbody tr:hover {
  background-color: rgba(76, 157, 255, 0.12);
}

.stats-grid {
  gap: 18px;
  margin-bottom: 22px;
}

.dashboard-primary-stats {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stats-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-bottom: 0;
}

.stat-card {
  border-radius: 14px;
  min-height: 116px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 0;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-icon {
  background: rgba(4, 16, 26, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-label {
  font-size: 0.8rem;
  letter-spacing: 0.07em;
}

.stat-value {
  font-size: 1.6rem;
  color: #f4faff;
}

.stat-description,
.stat-sublabel {
  color: rgba(245, 250, 255, 0.82);
}

.stat-card--indigo {
  background: linear-gradient(135deg, #4f78c9 0%, #35579e 100%);
}

.stat-card--crimson {
  background: linear-gradient(135deg, #b24a63 0%, #8f3248 100%);
}

.stat-card--emerald {
  background: linear-gradient(135deg, #1c9a7e 0%, #167a64 100%);
}

.stat-card--ocean {
  background: linear-gradient(135deg, #2f7abf 0%, #255f97 100%);
}

.stat-card--amber {
  background: linear-gradient(135deg, #bf7f2e 0%, #a5601f 100%);
}

.stat-card--sky {
  background: linear-gradient(135deg, #2f87b8 0%, #286997 100%);
}

.stat-card--sunset {
  background: linear-gradient(135deg, #b84d45 0%, #b67229 100%);
}

.dashboard-expense-card {
  margin-bottom: 0;
}

.invoice-create-card {
  overflow: visible;
}

.invoice-create-header {
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.invoice-number-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(122, 176, 237, 0.5);
  background: rgba(76, 157, 255, 0.16);
  color: #d8ecff;
  font-size: 0.84rem;
  letter-spacing: 0.03em;
}

.invoice-create-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.invoice-progress {
  border-radius: 12px;
  border: 1px solid rgba(134, 164, 197, 0.32);
  background: rgba(13, 28, 45, 0.58);
  padding: 12px 14px;
}

.invoice-progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-bar {
  height: 8px;
  margin: 0;
  border-radius: 999px;
  background-color: rgba(10, 20, 33, 0.82);
}

.progress-bar-fill {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-color) 0%, #67c8ff 100%);
}

.invoice-form-section {
  border-radius: 14px;
  border: 1px solid rgba(134, 164, 197, 0.22);
  background: rgba(13, 28, 45, 0.42);
  padding: 16px 18px;
}

.form-group--wide {
  flex: 2;
  min-width: 220px;
}

.form-group--compact {
  flex: 1;
  min-width: 180px;
}

.form-group--spaced {
  flex: 1;
  min-width: 200px;
  margin-bottom: 15px;
}

.due-date-field {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.customer-mode-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.customer-mode-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(134, 164, 197, 0.32);
  border-radius: 10px;
  background: rgba(13, 28, 45, 0.38);
  cursor: pointer;
}

.customer-mode-option input {
  margin: 0;
}

.customer-mode-panel {
  margin-bottom: 8px;
}

.due-date-field .form-control {
  flex: 1;
  min-width: 0;
}

.due-date-sync-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.invoice-subcard {
  margin-bottom: 0;
}

.invoice-subtitle {
  margin: 0;
  font-size: 1.06rem;
}

.invoice-item-actions {
  margin-top: 14px;
}

.item-description-group {
  margin-bottom: 0;
}

.invoice-item {
  border-radius: 12px;
  background-color: rgba(13, 28, 45, 0.64);
  border-color: rgba(134, 164, 197, 0.28);
}

.item-total-display {
  border-radius: 10px;
}

.summary-table-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.invoice-summary-table {
  width: 320px;
  border-collapse: collapse;
}

.invoice-summary-table th,
.invoice-summary-table td {
  padding: 8px 0;
  border-bottom: 1px dashed rgba(143, 171, 200, 0.22);
}

.invoice-summary-table th {
  width: 60%;
  text-align: left;
  color: #dbe9f9;
  font-weight: 600;
}

.invoice-summary-table td {
  text-align: right;
  color: #f5faff;
  font-weight: 700;
}

.invoice-summary-table tr:last-child th,
.invoice-summary-table tr:last-child td {
  border-bottom: none;
  font-size: 1.04rem;
}

.invoice-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-submit-invoice {
  position: static;
  border-radius: 10px;
  box-shadow: none;
  padding: 10px 18px;
}

.btn-submit-invoice:hover {
  transform: none;
  box-shadow: none;
}

.dynamic-table-list .card-header > div:last-child {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-filters {
  border: 1px solid rgba(134, 164, 197, 0.24);
  border-radius: 12px;
  background: rgba(13, 28, 45, 0.4);
}

.filter-field label {
  font-weight: 600;
  opacity: 0.78;
}

@media (max-width: 991px) {
  .sidebar {
    width: 292px;
    left: -292px;
  }

  .sidebar.open {
    left: 0;
  }

  .main-content {
    padding-top: 88px;
  }

  .card > .card-header {
    top: 70px;
  }

  .mobile-menu-toggle {
    top: 16px;
    left: 16px;
  }
}

@media (max-width: 720px) {
  .due-date-field {
    flex-direction: column;
  }

  .due-date-sync-button {
    justify-content: center;
  }

  .customer-mode-toggle {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 14px;
    padding-top: 84px;
  }

  .top-bar {
    border-radius: 12px;
  }

  .card > .card-header {
    top: 68px;
  }

  .page-title {
    font-size: 1.3rem;
  }

  .top-bar-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .invoice-number-chip {
    width: 100%;
  }

  .invoice-form-section {
    padding: 14px;
  }

  .summary-table-wrap {
    justify-content: stretch;
  }

  .invoice-summary-table {
    width: 100%;
  }

  .invoice-form-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .table {
    min-width: 560px;
  }
}

/* Shared form utilities */
:root {
  --success: #2ed5b2;
}

.form-nested-card {
  margin-bottom: 20px;
}

.card-title-sm {
  margin: 0;
  font-size: 1.2rem;
}

.form-group--narrow {
  flex: 1;
  min-width: 120px;
  margin-bottom: 15px;
}

.form-group--standard {
  flex: 1;
  min-width: 200px;
  margin-bottom: 15px;
}

.form-group--wide-2 {
  flex: 2;
  min-width: 200px;
  margin-bottom: 15px;
}

.form-field-combo {
  display: flex;
  align-items: stretch;
}

.form-field-combo .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.form-field-combo .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: -1px;
}

.form-actions-spread {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 10px;
  flex-wrap: wrap;
}

.form-actions-spread > div {
  display: flex;
}

/* Mobile table list */
.table-mobile-list {
  display: none;
}

.table-mobile-item {
  margin-bottom: 10px;
}

.table-mobile-item:last-of-type {
  margin-bottom: 0;
}

.table-mobile-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
}

.table-mobile-summary::-webkit-details-marker {
  display: none;
}

.table-mobile-summary::marker {
  content: '';
}

.table-mobile-summary-main {
  flex: 1;
  min-width: 0;
}

.table-mobile-summary-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.table-mobile-summary-title {
  margin-top: 2px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  word-break: break-word;
}

.table-mobile-summary-subtitle {
  margin-top: 5px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.table-mobile-summary-subtitle-label {
  opacity: 0.8;
}

.table-mobile-summary-end {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.table-mobile-summary-status {
  display: inline-flex;
  align-items: center;
}

.table-mobile-summary-status .status-badge {
  white-space: nowrap;
}

.table-mobile-summary-amount {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.table-mobile-summary-icon {
  font-size: 20px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.table-mobile-item[open] .table-mobile-summary-icon {
  transform: rotate(180deg);
}

.table-mobile-detail {
  padding: 0 0 8px;
  display: grid;
  gap: 4px;
}

.table-mobile-row {
  display: grid;
  grid-template-columns: minmax(110px, 34%) 1fr;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
  border-top: none;
}

.table-mobile-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

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

.table-mobile-actions {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.table-mobile-actions .btn-icon {
  width: 38px;
  height: 38px;
}

.table-mobile-actions form {
  display: inline-flex !important;
}

.table-mobile-totals {
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
}

.table-mobile-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
}

.table-mobile-total-row-total {
  padding-top: 10px;
}

/* Mobile polish - single source of truth */
@media (max-width: 991px) {
  .main-content {
    margin-left: 0;
    padding-top: 88px;
  }

  .sidebar {
    width: 292px;
    left: -292px;
  }

  .sidebar.open {
    left: 0;
  }

  .mobile-menu-toggle {
    top: 16px;
    left: 16px;
  }

  .card > .card-header {
    position: static;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 10px;
    padding-top: 84px;
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 18px;
  }

  .btn-group {
    width: 100%;
    display: grid;
    gap: 10px;
  }

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

  .table-filters {
    padding: 0;
    gap: 8px;
    margin-bottom: 12px;
    border: none;
    background: transparent;
  }

  .table-filters .btn {
    width: 100%;
  }

  .dynamic-table-list .card {
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .dynamic-table-list .card-header,
  .dynamic-table-list .card-body,
  .dynamic-table-list .card-footer {
    padding-left: 0;
    padding-right: 0;
    background: transparent;
    border: none;
  }

  .table-container {
    overflow-x: hidden;
    border: none;
    background: transparent;
  }

  .table-container > .table {
    display: none;
  }

  .table-container > .table-mobile-list {
    display: block;
    padding: 0;
  }

  .invoice-create-card,
  .invoice-subcard,
  .invoice-form-section {
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .invoice-create-card > .card-header,
  .invoice-subcard > .card-header {
    background: transparent;
    border: none;
    padding: 8px 0;
  }

  .invoice-create-card > .card-body,
  .invoice-subcard > .card-body {
    padding: 0;
  }

  .invoice-form-section {
    padding: 0;
  }

  .invoice-progress {
    border: none;
    background: transparent;
    padding: 0;
  }

  .invoice-number-chip {
    border: none;
    background: transparent;
    padding: 0;
  }

  .invoice-item {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    margin-bottom: 14px;
  }

  .invoice-item:hover {
    box-shadow: none;
    border-color: transparent;
  }

  .table-mobile-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 0;
  }

  .table-mobile-actions {
    justify-content: flex-start;
  }

  .pagination-container {
    padding: 12px 14px;
  }

  .pagination {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .pagination-summary {
    width: 100%;
    text-align: center;
  }

  .main-content:not(.main-content-full) .form-actions {
    position: sticky;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 120;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 8px 0 0;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .main-content:not(.main-content-full) .form-actions > div {
    width: 100%;
  }

  .main-content:not(.main-content-full) .form-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .btn-fab {
    position: static;
    right: auto;
    bottom: auto;
    border-radius: 10px;
    box-shadow: none;
    transform: none;
  }

  .btn-fab:hover {
    transform: none;
    box-shadow: none;
  }

  .fab {
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .form-group--narrow,
  .form-group--standard,
  .form-group--wide-2 {
    flex: 1 1 100%;
    min-width: 100%;
    margin-bottom: 12px;
  }

  .form-nested-card {
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .form-nested-card > .card-header {
    background: transparent;
    border: none;
    padding: 8px 0;
  }

  .form-nested-card > .card-body {
    padding: 0;
  }
}

@media (min-width: 769px) {
  .table-mobile-list {
    display: none !important;
  }
}
