/* ============================================
   TaxCoin - Components
   ============================================ */

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  transition: all 0.15s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-text-muted);
}

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

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}
.btn-ghost:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.btn-sm {
  padding: 0.3125rem 0.625rem;
  font-size: 0.75rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 0.6875rem 1.5rem;
  font-size: 0.9375rem;
  border-radius: 10px;
}

.btn-icon {
  padding: 0.5rem;
  min-width: 36px;
  min-height: 36px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-group {
  display: inline-flex;
  gap: 0.375rem;
}

/* --- Cards --- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: var(--color-text-muted);
}

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

.card-header h3 {
  font-size: 0.9375rem;
  font-weight: 600;
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Stat Card */
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.15s ease;
}

.stat-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.stat-card .stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.stat-card .stat-change {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.375rem;
}

.stat-card .stat-change svg {
  width: 14px;
  height: 14px;
}

/* --- Tables --- */
.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.table-wrapper table {
  min-width: 100%;
}

.table-wrapper th {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  padding: 0.75rem 1rem;
  text-align: left;
  background: var(--color-surface-hover);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
}

.table-wrapper td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

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

.table-wrapper tr:hover td {
  background: var(--color-surface-hover);
}

.table-wrapper .td-mono {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.8125rem;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 0.375rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.5625rem 0.75rem;
  background: var(--color-input-bg);
  border: 1px solid var(--color-input-border);
  border-radius: 8px;
  font-size: 0.8125rem;
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.form-hint {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.form-error {
  font-size: 0.75rem;
  color: var(--color-danger);
  margin-top: 0.25rem;
}

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

/* Checkbox */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.form-check .form-check-label {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  cursor: pointer;
}

/* --- Modals --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.modal-header .modal-close {
  padding: 0.25rem;
  border-radius: 6px;
  color: var(--color-text-muted);
  transition: all 0.15s ease;
}

.modal-header .modal-close:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.modal-header .modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.modal-lg {
  max-width: 720px;
}

.modal-xl {
  max-width: 960px;
}

/* --- Toasts --- */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 380px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease;
  pointer-events: auto;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast.toast-exit {
  animation: toastOut 0.2s ease forwards;
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(16px); }
}

.toast .toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.toast .toast-content {
  flex: 1;
  min-width: 0;
}

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

.toast .toast-message {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin-top: 0.125rem;
}

.toast .toast-close {
  flex-shrink: 0;
  padding: 0.125rem;
  color: var(--color-text-muted);
  border-radius: 4px;
}

.toast .toast-close:hover {
  color: var(--color-text);
}

.toast .toast-close svg {
  width: 14px;
  height: 14px;
}

.toast-success { border-left: 3px solid var(--color-success); }
.toast-success .toast-icon { color: var(--color-success); }
.toast-danger { border-left: 3px solid var(--color-danger); }
.toast-danger .toast-icon { color: var(--color-danger); }
.toast-warning { border-left: 3px solid var(--color-warning); }
.toast-warning .toast-icon { color: var(--color-warning); }
.toast-info { border-left: 3px solid var(--color-primary); }
.toast-info .toast-icon { color: var(--color-primary); }

/* --- Tabs --- */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  gap: 0;
  overflow-x: auto;
}

.tab {
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  cursor: pointer;
}

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

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

.tab-content {
  display: none;
  padding-top: 1.25rem;
}

.tab-content.active {
  display: block;
}

/* --- Drop Zone --- */
.drop-zone {
  border: 2px dashed var(--color-border);
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--color-surface);
}

.drop-zone:hover {
  border-color: var(--color-primary);
  background: var(--color-surface-hover);
}

.drop-zone.dragover {
  border-color: var(--color-primary);
  background: rgba(59, 130, 246, 0.05);
}

.drop-zone .drop-icon {
  width: 48px;
  height: 48px;
  color: var(--color-text-muted);
  margin: 0 auto 1rem;
}

.drop-zone .drop-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.375rem;
}

.drop-zone .drop-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.drop-zone .drop-browse {
  color: var(--color-primary);
  text-decoration: underline;
  cursor: pointer;
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-primary {
  background: rgba(59, 130, 246, 0.12);
  color: var(--color-primary);
}

.badge-success {
  background: rgba(34, 197, 94, 0.12);
  color: var(--color-success);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--color-danger);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--color-warning);
}

.badge-muted {
  background: var(--color-surface-hover);
  color: var(--color-text-muted);
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--color-text-muted);
}

.empty-state .empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.375rem;
}

.empty-state p {
  font-size: 0.8125rem;
  margin-bottom: 1.25rem;
}

/* --- Loading Spinner --- */
.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  z-index: 10;
}

/* --- Chart Container --- */
.chart-container {
  position: relative;
  width: 100%;
}

/* --- Grid Helpers --- */
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* --- Auth Tabs --- */
.auth-tabs {
  display: flex;
  background: var(--color-surface-hover);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-tab.active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

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

.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* --- Misc --- */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--color-surface-hover);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.chip svg {
  width: 14px;
  height: 14px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--color-surface-hover);
  border-radius: 3px;
  overflow: hidden;
}

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

/* --- Analysis View --- */
.analysis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.analysis-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.analysis-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.analysis-charts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.chart-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  min-height: 260px;
}

.chart-card {
  overflow: hidden;
}

.empty-cell {
  text-align: center;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .analysis-charts {
    grid-template-columns: 1fr;
  }
}

/* --- Report View --- */
.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.report-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.report-header-left .report-subtitle {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0.25rem 0 0;
}

.report-header-right {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.report-content {
  min-height: 200px;
}

.report-empty,
.report-loading,
.report-error {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--color-text-muted);
}

.report-loading p,
.report-error p {
  margin-top: 1rem;
  font-size: 0.875rem;
}

.report-error .btn {
  margin-top: 1rem;
}

.report-section {
  margin-bottom: 1.5rem;
}

.report-section .card-header h3 {
  font-size: 1.0625rem;
  font-weight: 700;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.report-table th {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  padding: 0.75rem 0.75rem;
  text-align: left;
  background: var(--color-surface-hover);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.report-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.report-table tbody tr:hover {
  background: var(--color-surface-hover);
}

.report-table .section-title-row td {
  padding-top: 1rem;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
}

.report-table .subtotal-row td {
  border-top: 2px solid var(--color-border);
  background: var(--color-surface-hover);
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.report-table .total-row td {
  border-top: 2px solid var(--color-border);
  background: var(--color-surface-hover);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.report-table .td-gain {
  color: var(--color-success);
}

.report-table .td-loss {
  color: var(--color-danger);
}

.report-detail-subsection {
  margin-bottom: 2rem;
}

.report-detail-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.report-detail-empty {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-style: italic;
  padding: 0.75rem 0;
}

.badge-long {
  background: rgba(34, 197, 94, 0.12);
  color: var(--color-success);
}

.badge-short {
  background: rgba(245, 158, 11, 0.12);
  color: var(--color-warning);
}

@media (max-width: 768px) {
  .report-header {
    flex-direction: column;
  }
  .report-header-right {
    width: 100%;
  }
  .report-header-right select {
    width: 100%;
  }
}

/* --- Transactions View --- */
.transactions-view {
  position: relative;
}

.tx-toolbar {
  margin-bottom: 1rem;
}

.tx-toolbar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tx-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.tx-search-wrap .form-input {
  padding-left: 2.25rem;
}

.tx-search-icon {
  position: absolute;
  left: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
}

.tx-toolbar .form-select,
.tx-toolbar .form-input[type="date"] {
  min-width: 130px;
  max-width: 180px;
}

.tx-toolbar .btn-sm {
  white-space: nowrap;
}

/* Table columns */
.tx-col-check {
  width: 36px;
  text-align: center !important;
}

.tx-col-num {
  text-align: right;
}

.tx-col-actions {
  width: 80px;
  text-align: center !important;
}

.tx-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.tx-sortable:hover {
  color: var(--color-text);
}

.tx-sort-icon {
  opacity: 0.4;
  margin-left: 2px;
  vertical-align: middle;
}

.tx-sort-active {
  opacity: 1;
  color: var(--color-primary);
}

.tx-row.tx-selected td {
  background: rgba(59, 130, 246, 0.08);
}

.tx-row:hover .tx-col-actions .btn {
  opacity: 1;
}

.tx-col-actions .btn {
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

.tx-row:hover .tx-col-actions .btn:hover {
  opacity: 1;
}

.tx-notes {
  max-width: 160px;
}

.tx-loading,
.tx-empty,
.tx-error {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.tx-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.tx-error {
  color: var(--color-danger);
}

/* Pagination */
.tx-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding: 0 0.25rem;
}

.tx-pagination {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tx-page-info {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* Selection bar */
.tx-selection-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface);
  border: 1px solid var(--color-primary);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  box-shadow: var(--shadow-lg), 0 0 20px rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 100;
  animation: slideUp 0.25s ease;
}

.tx-selection-bar.hidden {
  display: none;
}

.tx-selection-count {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Batch Edit Panel */
.batch-panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  z-index: 210;
  align-items: flex-end;
  justify-content: flex-end;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.batch-panel-overlay.active {
  display: flex;
}

.batch-panel {
  width: 380px;
  max-width: 100%;
  max-height: 100vh;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.batch-panel.active {
  transform: translateX(0);
}

.batch-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.batch-panel-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.batch-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.batch-preview {
  background: var(--color-surface-hover);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.25rem;
}

.batch-panel-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Edit form in modal */
.tx-edit-form .form-row {
  grid-template-columns: 1fr 1fr;
}

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

  .tx-search-wrap {
    min-width: 100%;
  }

  .tx-toolbar .form-select,
  .tx-toolbar .form-input[type="date"] {
    min-width: 100%;
    max-width: 100%;
  }

  .batch-panel {
    width: 100%;
  }

  .tx-selection-bar {
    left: 1rem;
    right: 1rem;
    transform: none;
  }
}