:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1a1d23;
  --muted: #6b7280;
  --border: #e2e5ea;
  --primary: #2563eb;
  --primary-text: #ffffff;
  --danger: #dc2626;
  --warning: #b45309;
  --success: #15803d;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 16px;
  padding-bottom: 48px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

a { color: var(--primary); }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 8px;
  flex-wrap: wrap;
}

.topbar h1 {
  font-size: 18px;
  margin: 0;
}

.topbar nav a {
  margin-left: 12px;
  font-size: 14px;
  text-decoration: none;
  color: var(--muted);
}
.topbar nav a.active { color: var(--primary); font-weight: 600; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.asset-list { display: flex; flex-direction: column; gap: 10px; }

.asset-row {
  display: block;
  text-decoration: none;
  color: inherit;
}
.asset-row .card:hover { border-color: var(--primary); }

.asset-name { font-weight: 600; font-size: 15px; }
.asset-meta { color: var(--muted); font-size: 13px; margin-top: 2px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 4px;
}
.badge-active { background: #dcfce7; color: var(--success); }
.badge-broken { background: #fee2e2; color: var(--danger); }
.badge-retired, .badge-lost { background: #f3f4f6; color: var(--muted); }
.badge-pending { background: #fef3c7; color: var(--warning); }
.badge-it { background: #dbeafe; color: #1d4ed8; }
.badge-not_it { background: #f3f4f6; color: var(--muted); }

form.inline { display: inline; }

input[type=text], input[type=search], select, textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
  margin-bottom: 8px;
}

label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 2px; }

button, .btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: var(--primary-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
button.secondary, .btn.secondary { background: #e5e7eb; color: var(--text); }
button.danger, .btn.danger { background: var(--danger); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.flash-success { background: #dcfce7; color: var(--success); }
.flash-error { background: #fee2e2; color: var(--danger); }
.flash-warning { background: #fef3c7; color: var(--warning); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters select, .filters input { width: auto; margin-bottom: 0; }

.photo-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-grid img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

.report-form { display: none; margin-top: 10px; }
.report-form.open { display: block; }

.empty-state { text-align: center; color: var(--muted); padding: 40px 16px; }
