/* Mobile-first responsive styles */
:root {
  --bg: #f7f7f8;
  --card: #ffffff;
  --text: #111;
  --muted: #666;
  --border: #e5e7eb;
  --shadow: 0 10px 24px rgba(0,0,0,.08);
  --radius: 16px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; background: var(--bg); color: var(--text); }

.nav { position: sticky; top: 0; background: var(--card); box-shadow: 0 2px 10px rgba(0,0,0,.06); z-index: 10; }
.nav-row { max-width: 1000px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav a { text-decoration: none; color: var(--text); }
.nav .brand { font-weight: 700; }
.nav .inline { display: inline; }
.nav-right { display: flex; gap: 10px; align-items: center; }

.card { max-width: 1000px; margin: 16px auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card.narrow { max-width: 420px; }
h1, h2, h3 { margin-top: 0; }

label { display: block; margin: 10px 0 6px; font-weight: 600; }
input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.btn { display: inline-block; padding: 10px 14px; border-radius: 12px; background: #111; color: #fff; border: 0; cursor: pointer; text-decoration: none; }
.btn.ghost { background: #eee; color: #111; }
.btn.danger { background: #c62828; }

.alert { padding: 10px 12px; border-radius: 12px; background: #eef2ff; }
.alert.error { background: #fee2e2; }
.alert.success { background: #dcfce7; }
.alert.info { background: #e0f2fe; }
.muted { color: var(--muted); }
.mt-1 { margin-top: 12px; }
.mt-2 { margin-top: 20px; }

.drop { border: 2px dashed #ccc; border-radius: var(--radius); padding: 24px; text-align: center; transition: background .2s; }
.drop.hover { background: #fafafa; }

.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 8px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--border); text-align: left; padding: 8px; white-space: nowrap; }

@media (min-width: 640px) {
  .grid2 { grid-template-columns: 1fr 1fr auto; }
}
