/* public/css/app.css */

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

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --primary: #2563eb;
  --primary-dk: #1d4ed8;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 10px;
}

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

/* ── Login ── */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem 2rem; width: 100%; max-width: 380px; box-shadow: 0 4px 24px rgba(0,0,0,.06); }
.brand { font-size: 1.5rem; font-weight: 700; color: var(--primary); text-align: center; margin-bottom: 1.75rem; letter-spacing: -.02em; }
.login-card label { display: block; font-size: .8125rem; font-weight: 600; color: var(--muted); margin-bottom: .25rem; margin-top: 1rem; text-transform: uppercase; letter-spacing: .04em; }
.login-card input[type=email], .login-card input[type=password] {
  display: block; width: 100%; padding: .625rem .875rem;
  border: 1.5px solid var(--border); border-radius: 7px;
  font-size: 1rem; outline: none; transition: border-color .15s;
}
.login-card input:focus { border-color: var(--primary); }
.login-card button { width: 100%; margin-top: 1.5rem; padding: .75rem; background: var(--primary); color: #fff; border: none; border-radius: 7px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background .15s; }
.login-card button:hover { background: var(--primary-dk); }

/* ── Navbar ── */
.navbar { background: var(--surface); border-bottom: 1px solid var(--border); padding: .875rem 1.5rem; display: flex; align-items: center; gap: 1rem; }
.nav-brand { font-weight: 700; color: var(--primary); font-size: 1.1rem; flex: 1; }
.nav-user { font-size: .875rem; color: var(--muted); }
.btn-logout { background: none; border: 1px solid var(--border); border-radius: 6px; padding: .4rem .875rem; cursor: pointer; font-size: .875rem; color: var(--text); transition: background .15s; }
.btn-logout:hover { background: var(--bg); }

/* ── Container ── */
.container { max-width: 960px; margin: 2rem auto; padding: 0 1rem; display: flex; flex-direction: column; gap: 1.5rem; }

/* ── Stat cards ── */
.stats-row { display: flex; gap: 1rem; }
.stat-card { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; text-align: center; }
.stat-num { display: block; font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: .8125rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ── Card ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; }
.card h2 { font-size: 1.125rem; font-weight: 600; margin-bottom: 1.25rem; }

/* ── Drop zone ── */
.drop-zone { border: 2px dashed var(--border); border-radius: 8px; padding: 2.5rem 1rem; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; position: relative; }
.drop-zone.dragover { border-color: var(--primary); background: #eff6ff; }
.drop-icon { font-size: 2rem; margin-bottom: .5rem; }
.drop-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.link { color: var(--primary); cursor: pointer; text-decoration: underline; }
.file-name { font-size: .875rem; color: var(--primary); font-weight: 600; margin-top: .5rem; }
.hint { font-size: .8125rem; color: var(--muted); margin: .75rem 0; }
.btn-primary { background: var(--primary); color: #fff; border: none; border-radius: 7px; padding: .7rem 2rem; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background .15s; }
.btn-primary:hover { background: var(--primary-dk); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

/* ── Alerts ── */
.alert { border-radius: 7px; padding: .75rem 1rem; margin-bottom: 1rem; font-size: .9rem; }
.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-ok    { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th { background: var(--bg); padding: .625rem .875rem; text-align: left; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--border); }
tbody td { padding: .625rem .875rem; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafafa; }
.truncate { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Badges ── */
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 100px; font-size: .75rem; font-weight: 600; }
.badge-done       { background: #dcfce7; color: #166534; }
.badge-processing { background: #fef9c3; color: #854d0e; }
.badge-error      { background: #fee2e2; color: #991b1b; }
.badge-pending    { background: #f3f4f6; color: #374151; }

.empty { color: var(--muted); font-size: .9rem; padding: 1rem 0; text-align: center; }
