:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --header: #0b0f1a;
  --link: #bfdbfe;
  --accent: #facc15;
}
* { box-sizing: border-box; }
body { font-family: Arial, sans-serif; margin: 0; background: var(--bg); color: var(--text); }
header { background: var(--header); color: #fff; padding: 0.8rem 1rem; }
.brand-row { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.brand-row h1 { margin: 0; font-size: 1.15rem; }
.brand-row img { width: 44px; height: 44px; object-fit: contain; border-radius: 50%; background: #fff; }
nav { margin-top: 0.55rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
nav a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.38rem 0.62rem;
  border: 1px solid #374151;
  border-radius: 999px;
  background: #111827;
}
nav a:hover { border-color: #60a5fa; color: #fff; }
main { max-width: 1100px; margin: 0.8rem auto; padding: 0 0.8rem 2rem; }
.card { background: var(--card); border-radius: 10px; padding: 0.9rem; margin: 0.5rem 0 1rem; }
.stacked label { display: block; margin-bottom: 0.75rem; }
input, select, textarea, button { width: 100%; margin-top: 0.2rem; padding: 0.62rem; border: 1px solid #d1d5db; border-radius: 8px; font-size: 16px; }
button, .btn { background: #2563eb; color: white; border: none; text-decoration: none; display: inline-block; width: auto; padding: 0.6rem 1rem; }
button.secondary { background: #374151; }
.row button { width: auto; }
[type="file"] { padding: 0.45rem; background: #f8fafc; }
[type="file"]::file-selector-button {
  border: none;
  border-radius: 8px;
  background: #1d4ed8;
  color: #fff;
  padding: 0.5rem 0.8rem;
  margin-right: 0.7rem;
  cursor: pointer;
}
.table-wrap { overflow-x: auto; background: #fff; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; background: white; min-width: 680px; }
th, td { border-bottom: 1px solid #e5e7eb; padding: 0.6rem; text-align: left; vertical-align: top; }
.flash-list { list-style: none; padding: 0; margin: 0 0 0.7rem; }
.flash { padding: 0.6rem; border-radius: 6px; margin-bottom: 0.4rem; }
.flash.success { background: #dcfce7; }
.flash.error { background: #fee2e2; }
.status { background: #dbeafe; padding: 0.2rem 0.5rem; border-radius: 999px; }
#signature-pad { border: 1px dashed #6b7280; width: 100%; max-width: 420px; background: white; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.preview { width: 100%; max-width: 300px; display: block; margin-top: 0.6rem; border-radius: 8px; }
.statement { background: #fef9c3; border-left: 4px solid var(--accent); padding: 0.65rem; border-radius: 6px; font-size: 0.92rem; }

@media (max-width: 700px) {
  main { padding: 0 0.55rem 1rem; }
  .brand-row h1 { font-size: 1rem; }
  nav a { font-size: 0.88rem; }
  .table-wrap { overflow: visible; background: transparent; }
  table, thead, tbody, th, td, tr { display: block; width: 100%; }
  table { min-width: 0; }
  thead { display: none; }
  tr { background: #fff; border-radius: 8px; margin-bottom: 0.6rem; padding: 0.4rem 0; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
  td { border: none; display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.45rem 0.7rem; }
  td::before { content: attr(data-label); font-weight: 600; color: #374151; }
}
