/* Desktop-first approach for ShootingClubAccounting */

html {
  font-size: 16px;
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  color: #333;
  background-color: #f9f9f9;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Global button styling for better consistency */
.btn {
  font-weight: 500;
  border-radius: 0.25rem;
  padding: 0.5rem 1rem;
  transition: all 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Form styling improvements */
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.form-control, .form-select {
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ced4da;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
  border-color: #80bdff;
  outline: 0;
}

.input-group {
  border-radius: 0.25rem;
  overflow: hidden;
}

/* Card styling */
.card {
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin-bottom: 1.5rem;
  background-color: #fff;
}

.card-header {
  background-color: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  padding: 1rem 1.25rem;
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  background-color: rgba(0, 0, 0, 0.03);
  border-top: 1px solid rgba(0, 0, 0, 0.125);
  padding: 1rem 1.25rem;
}

/* Table improvements */
.table {
  --bs-table-bg: transparent;
  --bs-table-accent-bg: transparent;
  --bs-table-striped-bg: rgba(0, 0, 0, 0.02);
  --bs-table-striped-color: inherit;
  --bs-table-active-bg: rgba(0, 0, 0, 0.1);
  --bs-table-active-color: inherit;
  --bs-table-hover-bg: rgba(0, 0, 0, 0.04);
  --bs-table-hover-color: inherit;
  width: 100%;
  margin-bottom: 1rem;
  color: inherit;
  vertical-align: top;
  border-color: #dee2e6;
}

.table th {
  font-weight: 600;
  background-color: #f8f9fa;
}

/* Financial document styles */
.transaction-table th, 
.transaction-table td {
  padding: 0.75rem;
  vertical-align: middle;
}

.transaction-table .btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.transaction-table .btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.document-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.document-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.document-btn i {
  margin-right: 2px;
}

/* Action buttons and toolbar styling */
.action-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}

.action-toolbar .btn {
  display: inline-flex;
  align-items: center;
}

.action-toolbar .form-control {
  min-width: 200px;
}

/* Badge styling */
.badge {
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: 30px;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1060;
}

.toast {
  width: 350px;
  max-width: 100%;
  font-size: 0.875rem;
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.25rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

/* Responsive adjustments */
@media (max-width: 1199.98px) {
  .action-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .action-toolbar > * {
    margin-bottom: 0.5rem;
    width: 100%;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .transaction-table .btn-group {
    flex-direction: column;
    width: 100%;
  }
  
  .transaction-table .btn {
    margin-bottom: 3px;
    width: 100%;
    text-align: left;
  }
  
  .btn {
    padding: 0.5rem 0.75rem;
  }
  
  .card-header, .card-body, .card-footer {
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .toast-container {
    right: 0;
    left: 0;
    margin: 0 auto;
    width: 100%;
    padding: 0 1rem;
  }
  
  .toast {
    width: 100%;
  }
}