* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f3f4f6;
  color: #1f2937;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  background: #6b7280;
  color: #fff;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0.75rem;
  background: #fff;
  color: #1f2937;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

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

th,
td {
  text-align: left;
  padding: 0.85rem;
  border-bottom: 1px solid #1e293b;
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 1.5rem;
  border-right: 1px solid #e5e7eb;
  background: #e5e7eb;
}

.sidebar h1 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
}

.sidebar p {
  margin: 0 0 1.5rem;
  color: #6b7280;
}

.nav-button {
  width: 100%;
  margin-bottom: 0.75rem;
  text-align: left;
  background: #d1d5db;
  color: #1f2937;
}

.nav-button.active {
  background: #9ca3af;
  color: #111827;
}

.content {
  padding: 2rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.page-header h2 {
  margin: 0;
}

.page-header p {
  margin: 0.35rem 0 0;
  color: #6b7280;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card,
.panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.25rem;
}

.card span {
  display: block;
  margin-bottom: 0.5rem;
  color: #6b7280;
}

.card strong {
  font-size: 1.7rem;
}

.panel + .panel,
.form-grid + .panel {
  margin-top: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-panel {
  display: grid;
  gap: 0.85rem;
}

.form-panel h3,
.panel h3 {
  margin: 0 0 0.5rem;
}

.message {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #9ca3af;
  color: #111827;
}

.message.error {
  background: #ef4444;
  color: #fff;
}

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

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

.filters-inline,
.section-header {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filters-inline input {
  max-width: 220px;
}

.table-action {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: #6b7280;
}

.table-action.danger {
  background: #dc2626;
  color: #fff;
}

.amount-input {
  min-width: 120px;
}

.hidden,
.tab {
  display: none;
}

.tab.active {
  display: block;
}

@media (max-width: 960px) {
  .layout,
  .form-grid,
  .cards,
  .grid-panels,
  .three-columns {
    grid-template-columns: 1fr;
  }
}
