:root {
  --bg: #f7f7f5;
  --panel: #ffffff;
  --border: #e2e0db;
  --text: #1f1e1c;
  --muted: #6b6862;
  --accent: #b5442e;
  --positive: #2f7a3f;
  --negative: #b5442e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

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

.app-nav {
  display: flex;
  gap: 4px;
  padding: 0 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.app-nav button {
  padding: 10px 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}

.app-nav button.active {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.app-content { padding: 24px; max-width: 1400px; margin: 0 auto; }

.muted { color: var(--muted); font-size: 13px; }

table { border-collapse: collapse; width: 100%; background: var(--panel); font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
th { font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

.positive { color: var(--positive); }
.negative { color: var(--negative); }

.tab-toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.tab-toolbar input, .tab-toolbar select {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 13px;
}
.tab-toolbar button {
  padding: 6px 14px; border: none; background: var(--accent); color: white;
  border-radius: 4px; cursor: pointer; font-size: 13px;
}

.flag { background: #f5d9c8; color: #7a3a1a; padding: 2px 6px; border-radius: 3px; font-size: 11px; }

.review-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
  padding: 14px; margin-bottom: 10px;
}
.review-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.review-reason { color: var(--accent); font-size: 13px; margin: 4px 0; }
.review-description { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.review-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.review-controls select, .review-controls input {
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 4px; font-size: 13px;
}
.review-controls input[type="text"] { flex: 1; min-width: 200px; }
.review-controls button {
  padding: 6px 14px; border: none; background: var(--positive); color: white;
  border-radius: 4px; cursor: pointer; font-size: 13px;
}

.auth-screen {
  max-width: 360px; margin: 80px auto; background: var(--panel); padding: 32px;
  border: 1px solid var(--border); border-radius: 8px; text-align: center;
}
.auth-hint { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
#auth-form { display: flex; flex-direction: column; gap: 10px; }
#auth-form input {
  padding: 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 14px;
}
.auth-buttons { display: flex; gap: 8px; }
.auth-buttons button {
  flex: 1; padding: 10px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px;
}
#auth-signin { background: var(--accent); color: white; }
#auth-signup { background: var(--bg); border: 1px solid var(--border) !important; }
.auth-error { color: var(--accent); font-size: 13px; min-height: 18px; margin-top: 10px; }
.auth-link { color: var(--muted); font-size: 13px; text-decoration: underline; }
