/* styles.css */
*, *:before, *:after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  color: #e2e8f0;
  background: #0f1117;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
}

.app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
}

h1 {
  color: #f8fafc;
  letter-spacing: -.02em;
  margin-bottom: 24px;
  font-size: 1.5rem;
  font-weight: 600;
}

.input-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.tab-btn {
  color: #64748b;
  cursor: pointer;
  background: #161b27;
  border: 1px solid #2d3748;
  border-radius: 8px;
  padding: 7px 18px;
  transition: all .15s;
  font-size: .85rem;
  font-weight: 500;
}

.tab-btn:hover {
  color: #94a3b8;
  border-color: #3d4a5c;
}

.tab-btn.active {
  color: #818cf8;
  background: #1e2a4a;
  border-color: #4f46e5;
}

.warning-bar {
  color: #fbbf24;
  background: #2a1f00;
  border: 1px solid #7c5c00;
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 10px 16px;
  font-size: .8rem;
}

.drop-zone {
  text-align: center;
  cursor: pointer;
  background: #161b27;
  border: 2px dashed #2d3748;
  border-radius: 12px;
  margin-bottom: 32px;
  padding: 48px;
  transition: border-color .2s, background .2s;
}

.drop-zone:hover, .drop-zone.drag-over {
  background: #1a1f33;
  border-color: #4f46e5;
}

.drop-zone p {
  color: #94a3b8;
  margin-bottom: 12px;
  font-size: .95rem;
}

.drop-zone span {
  color: #64748b;
  font-size: .8rem;
}

.btn {
  display: inline-flex;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  align-items:  center;
  gap: 6px;
  padding: 8px 16px;
  transition: background .15s;
  font-size: .85rem;
  font-weight: 500;
}

.btn-primary {
  color: #fff;
  text-decoration: none;
  background: #4f46e5;
}

.btn-primary:hover {
  background: #4338ca;
}

.btn-ghost {
  color: #94a3b8;
  background: #1e2536;
  border: 1px solid #2d3748;
}

.btn-ghost:hover {
  color: #e2e8f0;
  background: #252d40;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: 12px;
  margin-bottom: 20px;
}

.search-box {
  color: #e2e8f0;
  outline: none;
  background: #161b27;
  border: 1px solid #2d3748;
  border-radius: 8px;
  flex: 1;
  min-width: 220px;
  padding: 8px 14px;
  transition: border-color .2s;
  font-size: .875rem;
}

.search-box:focus {
  border-color: #4f46e5;
}

.search-box::placeholder {
  color: #4a5568;
}

.date-input {
  color: #e2e8f0;
  outline: none;
  --buncss-light: ;
  --buncss-dark: initial;
  color-scheme: dark;
  background: #161b27;
  border: 1px solid #2d3748;
  border-radius: 8px;
  padding: 8px 10px;
  transition: border-color .2s;
  font-size: .875rem;
}

.date-input:focus {
  border-color: #4f46e5;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #161b27;
  border: 1px solid #2d3748;
  border-radius: 10px;
  flex: 1;
  min-width: 160px;
  padding: 16px 20px;
}

.stat-card .label {
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
  font-size: .75rem;
}

.stat-card .value {
  color: #f8fafc;
  font-size: 1.4rem;
  font-weight: 600;
}

.stat-card .value.positive {
  color: #34d399;
}

.stat-card .value.negative {
  color: #f87171;
}

.table-wrapper {
  overflow: hidden;
  overflow-x: auto;
  border: 1px solid #2d3748;
  border-radius: 12px;
}

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

thead {
  position: sticky;
  z-index: 1;
  background: #161b27;
  top: 0;
}

th {
  text-align: left;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid #2d3748;
  padding: 12px 16px;
  font-size: .75rem;
  font-weight: 500;
}

th:hover {
  color: #94a3b8;
}

th .sort-icon {
  display: inline-block;
  opacity: .4;
  margin-left: 4px;
}

th.sorted .sort-icon {
  opacity: 1;
  color: #4f46e5;
}

tbody tr {
  border-bottom: 1px solid #1e2536;
  transition: background .1s;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: #161b27;
}

td {
  color: #cbd5e1;
  vertical-align: middle;
  padding: 12px 16px;
}

.amount {
  font-variant-numeric: tabular-nums;
  font-size: .9rem;
  font-weight: 600;
}

.amount.positive {
  color: #34d399;
}

.amount.negative {
  color: #f87171;
}

.date-cell {
  white-space: nowrap;
  color: #64748b;
  font-size: .8rem;
}

.account-badge {
  display: inline-block;
  color: #818cf8;
  white-space: nowrap;
  background: #1e2a4a;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: .75rem;
  font-weight: 500;
}

.notes-cell {
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
  font-size: .8rem;
}

.name-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e2e8f0;
  max-width: 220px;
  font-weight: 500;
}

.empty {
  text-align: center;
  color: #4a5568;
  padding: 64px 32px;
}

.pagination {
  display: flex;
  color: #64748b;
  justify-content: space-between;
  align-items:  center;
  margin-top: 16px;
  font-size: .8rem;
}

.page-btns {
  display: flex;
  gap: 6px;
}

input[type="file"] {
  display: none;
}

.paste-section {
  margin-top: 16px;
}

.paste-box {
  color: #e2e8f0;
  resize: vertical;
  outline: none;
  background: #161b27;
  border: 1px solid #2d3748;
  border-radius: 10px;
  width: 100%;
  padding: 14px;
  transition: border-color .2s;
  font-family: monospace;
  font-size: .8rem;
}

.paste-box:focus {
  border-color: #4f46e5;
}

.paste-box::placeholder {
  color: #4a5568;
}

.paste-error {
  color: #f87171;
  margin-top: 8px;
  font-size: .8rem;
}

.col-check {
  text-align: center;
  cursor: default;
  width: 40px;
}

.col-check input[type="checkbox"] {
  display: inline;
  accent-color: #4f46e5;
  cursor: pointer;
  width: 15px;
  height: 15px;
}

tbody tr {
  cursor: pointer;
}

tr.row-selected td {
  background: #1a1f3a;
}

.selection-panel {
  overflow: hidden;
  border: 1px solid #4f46e5;
  border-radius: 12px;
  margin-top: 24px;
}

.selection-header {
  display: flex;
  color: #94a3b8;
  background: #1a1f3a;
  border-bottom: 1px solid #2d3748;
  justify-content: space-between;
  align-items:  center;
  padding: 12px 16px;
  font-size: .875rem;
}

.toggle-label {
  display: flex;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
  align-items:  center;
  gap: 6px;
  font-size: .8rem;
}

.toggle-label input[type="checkbox"] {
  display: inline;
  accent-color: #4f46e5;
  cursor: pointer;
  width: 14px;
  height: 14px;
}

.selection-panel .paste-box {
  background: #161b27;
  border: none;
  border-radius: 0;
  font-size: .75rem;
}
