/* Pages auth Klausio — sobre, fond crème, logo ambre */
:root {
  --c-ink: #18181b;
  --c-cream: #faf7f2;
  --c-amber: #c2410c;
  --c-amber-light: #fef3e7;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--c-cream);
  color: var(--c-ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth-grain::before {
  content: ''; position: fixed; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.025) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none; z-index: 0;
}
.serif { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-style: italic; }

.auth-header { padding: 24px; }
.auth-logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--c-ink);
}
/* Tuile retirée — on garde uniquement le wordmark */
.auth-logo__mark { display: none; }
.auth-logo__name {
  font-family: 'Inter', sans-serif;
  font-weight: 800; font-size: 20px;
  letter-spacing: -0.035em; line-height: 1;
  color: var(--c-ink);
  display: inline-block;
  position: relative;
}
.auth-logo__name__dot {
  display: inline-block;
  width: 0.20em; height: 0.20em;
  background: var(--c-amber);
  border-radius: 50%;
  position: absolute;
  /* Dot positionné comme tittle du « i » dans Klaus•ia (6e lettre) */
  top: -0.04em;
  left: 4.05em;
}

.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; z-index: 1; }
.auth-card {
  width: 100%; max-width: 420px;
  background: white;
  border: 1px solid #e7e5e4;
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: 0 24px 64px -24px rgba(0,0,0,0.12);
}
.auth-card h1 {
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.auth-card .subtitle {
  color: #57534e; font-size: 14px; margin: 0 0 24px; line-height: 1.55;
}

.auth-tabs {
  display: flex; gap: 4px; background: #f5f5f4; border-radius: 12px;
  padding: 4px; margin-bottom: 24px;
}
.auth-tab {
  flex: 1; padding: 8px 12px; border-radius: 8px;
  text-align: center; font-size: 13px; font-weight: 500;
  text-decoration: none; color: #78716c; transition: all .15s ease;
}
.auth-tab--active {
  background: white; color: var(--c-ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 12px; font-weight: 500;
  color: #44403c; margin-bottom: 6px;
}
.field input {
  width: 100%; padding: 10px 12px;
  font: inherit; font-size: 14px;
  border: 1px solid #d6d3d1; border-radius: 10px;
  background: white; color: var(--c-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus {
  outline: none; border-color: var(--c-amber);
  box-shadow: 0 0 0 3px rgba(194,65,12,0.12);
}
.field .hint { font-size: 11px; color: #a8a29e; margin-top: 4px; }

.btn {
  width: 100%; padding: 12px 16px;
  border: none; border-radius: 10px;
  font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s ease;
}
.btn--primary { background: var(--c-ink); color: white; }
.btn--primary:hover { background: #292524; transform: translateY(-1px); }
.btn--primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn--danger { background: #b91c1c; color: white; }
.btn--danger:hover { background: #991b1b; }
.btn--ghost { background: transparent; color: var(--c-ink); border: 1px solid #d6d3d1; }
.btn--ghost:hover { background: #fafaf9; }

.alert {
  padding: 10px 12px; border-radius: 8px;
  font-size: 13px; margin-bottom: 14px;
  display: none;
}
.alert--err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert--ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert--info { background: var(--c-amber-light); color: #9a3412; border: 1px solid #fed7aa; }
.alert.is-shown { display: block; }

.auth-foot {
  margin-top: 16px; text-align: center;
  font-size: 13px; color: #57534e;
}
.auth-foot a { color: var(--c-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.checkbox-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; color: #57534e; line-height: 1.45;
  margin-bottom: 16px;
}
.checkbox-row input { margin-top: 2px; accent-color: var(--c-amber); }

/* Account / history pages — wider container */
.app-shell {
  max-width: 960px; margin: 0 auto; padding: 24px;
  position: relative; z-index: 1; flex: 1; width: 100%;
}
.app-shell h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; }
.app-shell h2 { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.app-shell p.lead { color: #57534e; font-size: 15px; margin: 0 0 32px; }

.panel {
  background: white; border: 1px solid #e7e5e4; border-radius: 16px;
  padding: 24px; margin-bottom: 16px;
}
.panel--danger { border-color: #fecaca; background: #fef2f2; }

.row-list { display: flex; flex-direction: column; gap: 8px; }
.row-list > div {
  display: flex; align-items: center; gap: 12px;
  background: white; border: 1px solid #e7e5e4; border-radius: 12px;
  padding: 14px;
}
.row-list .filename { font-weight: 600; flex: 1; min-width: 0; word-break: break-word; }
.row-list .meta { font-size: 12px; color: #78716c; }
.row-list .score-pill {
  font-weight: 700; font-size: 13px; padding: 4px 10px;
  border-radius: 999px; background: #fef3e7; color: #c2410c;
}
.row-list .score-pill--ok { background: #d1fae5; color: #065f46; }
.row-list .score-pill--bad { background: #fee2e2; color: #991b1b; }
.row-list .row-del {
  border: 1px solid #d6d3d1; background: white; color: #44403c;
  font: inherit; font-size: 12px; padding: 6px 10px; border-radius: 8px;
  cursor: pointer;
}
.row-list .row-del:hover { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }

.empty-state {
  text-align: center; padding: 48px 24px;
  background: white; border: 1px dashed #d6d3d1; border-radius: 16px;
  color: #78716c;
}
.empty-state strong { color: var(--c-ink); display: block; margin-bottom: 4px; }

.account-meta {
  display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px;
  font-size: 14px; color: #44403c;
}
.account-meta .k { color: #78716c; font-size: 12px; align-self: center; }
