/* Invoice Verifier — minimal stylesheet */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f5f5f5;
  --card: #ffffff;
  --border: #ddd;
  --text: #222;
  --muted: #666;
  --accent: #1a56db;
  --accent-hover: #1341b0;
  --green: #0f7a3a;
  --green-bg: #ecfdf5;
  --yellow: #92400e;
  --yellow-bg: #fffbeb;
  --red: #9b1c1c;
  --red-bg: #fef2f2;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,.12);
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Nav */
nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
nav .brand { font-weight: 600; font-size: 16px; color: var(--text); text-decoration: none; }
nav .nav-right { display: flex; gap: 1rem; align-items: center; color: var(--muted); font-size: 14px; }
nav .nav-right a { color: var(--accent); text-decoration: none; }
nav .nav-right a:hover { text-decoration: underline; }

/* Layout */
.container { max-width: 820px; margin: 2rem auto; padding: 0 1rem; }

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Forms */
.form-group { margin-bottom: 1.25rem; }
label { display: block; font-weight: 500; margin-bottom: .4rem; font-size: 14px; }
input[type="file"] {
  display: block;
  width: 100%;
  padding: .45rem .6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 14px;
}
.hint { font-size: 13px; color: var(--muted); margin-top: .25rem; }

/* Buttons */
.btn {
  display: inline-block;
  padding: .55rem 1.25rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg); border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { background: #eee; }

/* Verdict banner */
.verdict-banner {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
  font-weight: 600;
}
.verdict-clean { background: var(--green-bg); color: var(--green); border: 1px solid #6ee7b7; }
.verdict-overcharge { background: var(--yellow-bg); color: var(--yellow); border: 1px solid #fbbf24; }
.verdict-high-risk { background: var(--red-bg); color: var(--red); border: 1px solid #f87171; }

/* Stats grid */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 1.5rem; font-weight: 700; margin-top: .2rem; }

/* Findings table */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: .5rem .75rem; border-bottom: 2px solid var(--border); font-size: 13px; color: var(--muted); }
td { padding: .5rem .75rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }

/* Progress bar */
.progress-wrap { height:6px; background:var(--border); border-radius:3px; margin-bottom:.25rem; overflow:hidden; }
.progress-fill { height:100%; background:var(--accent); border-radius:3px; transition:width .4s ease; min-width:5%; }

/* Progress steps */
.steps { list-style: none; }
.step { display: flex; align-items: flex-start; gap: .75rem; padding: .5rem 0; }
.step-icon { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.step-done .step-icon { background: var(--green); color: #fff; }
.step-running .step-icon { background: var(--accent); color: #fff; animation: pulse 1s ease-in-out infinite; }
.step-pending .step-icon { background: var(--border); color: var(--muted); }
.step-failed .step-icon { background: var(--red); color: #fff; }
.step-label { font-weight: 500; }
.step-detail { font-size: 13px; color: var(--muted); }

@keyframes pulse { 0%,100% { opacity:1 } 50% { opacity:.5 } }

/* Recent list */
.recent-list { list-style: none; }
.recent-item { display: flex; align-items: center; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.recent-item:last-child { border-bottom: none; }
.recent-badge { padding: .15rem .5rem; border-radius: 3px; font-size: 12px; font-weight: 600; }
.badge-clean { background: var(--green-bg); color: var(--green); }
.badge-overcharge { background: var(--yellow-bg); color: var(--yellow); }
.badge-high_risk { background: var(--red-bg); color: var(--red); }
.badge-running { background: #eff6ff; color: #1e40af; }
.badge-failed { background: #fef2f2; color: var(--red); }
.badge-pending { background: #f3f4f6; color: var(--muted); }

/* Slack preview */
.slack-preview {
  background: #1a1d21;
  color: #d1d2d3;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.6;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  white-space: pre-wrap;
  overflow-x: auto;
}

/* Utilities */
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.flex-row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.text-muted { color: var(--muted); font-size: 14px; }
.text-error { color: var(--red); font-size: 14px; }
h1 { font-size: 1.4rem; font-weight: 700; margin-bottom: 1.25rem; }
h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: .75rem; }
