/* ===== files-signer — partner-cabinet design system ===== */
:root {
  --brand: #FFCC00;
  --brand-dark: #F2BE00;
  --brand-ink: #171717;
  --brand-link: #034CC2;
  --brand-violet: #4338CA;

  --bg-page: #F9FAFB;
  --bg-card: #FFFFFF;
  --text-body: #171717;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --border-input: #D1D5DB;

  --radius-card: 16px;
  --radius-control: 8px;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.05);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: var(--bg-page);
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--brand-link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Topbar ---- */
.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.topbar .logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--brand-ink); }
.topbar .logo .mark {
  width: 32px; height: 32px; border-radius: 8px; background: var(--brand);
  display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--brand-ink);
}
.topbar nav { display: flex; gap: 4px; }
.topbar nav a {
  padding: 8px 14px; border-radius: 8px; color: #4B5563; font-weight: 500; text-decoration: none;
}
.topbar nav a:hover { background: #F3F4F6; text-decoration: none; }
.topbar nav a.active { color: var(--brand-ink); font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .user { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-muted); }
.topbar .user .avatar {
  width: 32px; height: 32px; border-radius: 9999px; background: #E5E7EB; color: var(--brand-ink);
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px;
}
.btn-logout {
  border: 1px solid var(--border-input); background: #fff; border-radius: 8px; padding: 6px 12px;
  font-size: 13px; cursor: pointer; color: #374151;
}
.btn-logout:hover { background: #F9FAFB; }

/* ---- Layout ---- */
.container { max-width: 1400px; margin: 0 auto; padding: 24px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---- Cards / Panels ---- */
.panel {
  background: var(--bg-card); border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm); padding: 24px;
}
.panel h2 { margin: 0 0 16px 0; font-size: 16px; font-weight: 600; color: #1F2937; }
.panel-muted { color: var(--text-muted); font-size: 14px; }

/* ---- KPI tile (yellow left border — the signature look) ---- */
.kpi {
  background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--brand); padding: 20px; min-width: 180px; flex: 1;
}
.kpi .num { font-size: 30px; font-weight: 700; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.kpi .label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ---- Buttons ---- */
.btn {
  border-radius: var(--radius-control); padding: 9px 16px; font-weight: 600; font-size: 14px;
  cursor: pointer; border: 1px solid transparent; display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { background: #FDE98E; cursor: not-allowed; }
.btn-secondary { background: #fff; color: #374151; border-color: var(--border-input); }
.btn-secondary:hover { background: #F9FAFB; }
.btn-danger { background: #fff; color: #B91C1C; border-color: #FCA5A5; }
.btn-danger:hover { background: #FEF2F2; }
.btn-sm { padding: 5px 10px; font-size: 13px; }

/* ---- Tables ---- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 12px; color: var(--text-muted); font-weight: 500; border-bottom: 1px solid var(--border); font-size: 13px; }
td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:hover { background: #F9FAFB; }

/* ---- Badges ---- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 9999px; font-size: 12px; font-weight: 600; }
.badge-done { background: #DCFCE7; color: #166534; }
.badge-queued, .badge-signing { background: #FEF3C7; color: #92400E; }
.badge-failed { background: #FEE2E2; color: #991B1B; }
.badge-admin { background: #EDE9FE; color: #5B21B6; }

/* ---- Forms ---- */
input[type=text], input[type=email], select {
  border-radius: var(--radius-control); border: 1px solid var(--border-input);
  padding: 8px 12px; font-size: 14px; font-family: inherit; background: #fff; color: var(--text-body);
}
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(255,204,0,.35); }

/* ---- Dropzone ---- */
.dropzone {
  border: 2px dashed var(--border-input); border-radius: var(--radius-card);
  padding: 40px; text-align: center; color: var(--text-muted); background: #FAFAFA;
  transition: all .15s; cursor: pointer;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: #FFFDF0; color: var(--brand-ink); }
.dropzone .big { font-size: 16px; font-weight: 600; color: var(--brand-ink); margin-bottom: 6px; }

/* ---- Progress ---- */
.progress { height: 8px; background: #F3F4F6; border-radius: 9999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); transition: width .3s; }

/* ---- Landing (logged-out) ---- */
.landing {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg-page);
}
.landing-card { background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-sm); padding: 48px; max-width: 440px; text-align: center; }
.landing-card .logo .mark { width: 56px; height: 56px; border-radius: 14px; font-size: 26px; margin: 0 auto 20px; }
.landing h1 { font-size: 22px; margin: 0 0 8px; color: var(--brand-ink); }
.landing p { color: var(--text-muted); margin: 0 0 24px; font-size: 14px; }
.landing .err { color: #B91C1C; margin-bottom: 16px; font-size: 14px; }

.muted { color: var(--text-muted); }
.flex { display: flex; align-items: center; gap: 8px; }
.gap-12 { gap: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
