* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0; background: #f5f6f8; color: #1a1a1a; }
.topbar { background: #1f2937; color: #fff; padding: .75rem 1rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.topbar a, .topbar .user { color: #fff; text-decoration: none; margin-right: .75rem; }
.topbar .brand { font-weight: 600; font-size: 1.1rem; }
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.container { max-width: 1000px; margin: 1.25rem auto; padding: 0 1rem; }
h1 { margin-top: 0; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: .5rem .6rem; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: top; }
th { background: #f9fafb; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; max-width: 520px; background: #fff; padding: 1rem; border-radius: 6px; }
.form-grid label { display: flex; flex-direction: column; font-size: .9rem; }
.form-grid .checkbox-label { flex-direction: row; align-items: center; gap: .5rem; }
.checkbox-label input[type=checkbox] { flex: 0 0 auto; width: auto; margin: 0; }
.movement-form { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 100%; align-items: start; }
.movement-form__column { display: grid; gap: .75rem; align-content: start; }
.movement-form__inline-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.movement-form__actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], select, textarea {
  padding: .5rem; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 1rem; width: 100%; }
button, .btn { background: #2563eb; color: #fff; border: 0; padding: .5rem .9rem;
  border-radius: 4px; cursor: pointer; font-size: .95rem; text-decoration: none; display: inline-block; }
button.secondary, .btn.secondary { background: #6b7280; }
button.danger { background: #b91c1c; }
.linklike { background: none; color: #fff; padding: 0; text-decoration: underline; }
.inline { display: inline; }
.flash { padding: .6rem .8rem; border-radius: 4px; margin-bottom: .75rem; }
.flash-success { background: #dcfce7; color: #065f46; }
.flash-error { background: #fee2e2; color: #991b1b; }
.row-actions a, .row-actions form { margin-right: .4rem; }
.low { color: #b91c1c; font-weight: 600; }
.muted { color: #6b7280; font-size: .85rem; }
.toolbar { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.errors { background: #fee2e2; color: #991b1b; padding: .6rem .8rem; border-radius: 4px; margin-bottom: 1rem; }
.errors ul { margin: 0; padding-left: 1.2rem; }
@media (max-width: 600px) {
  .movement-form, .movement-form__inline-fields { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
  .topbar nav { margin-left: 0; }
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  td { border: 0; padding: .25rem .5rem; }
  tr { border-bottom: 1px solid #e5e7eb; padding: .5rem 0; }
}
