/* ============ Giriş ekranı: loş bir okuma odasında okur kartı ============ */
.auth-view {
  --card: #e8d6ad; --card-2: #dcc697; --card-ink: #2b2218; --card-muted: #7a6446; --card-rule: #bda67b;
  --ink: #23306a; --stamp: #33439a; --rule-red: #b4473a;
  min-height: 100dvh; display: grid; place-items: center; padding: 28px 16px; position: relative; overflow: hidden; background: #110c08;
}

/* ---- Arka plan: duvar boyu raf ---- */
.shelf-wall { position: absolute; inset: -10px -60px; display: grid; grid-template-rows: repeat(4, 1fr); }
.shelf-wall::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 60% at 50% 42%, rgba(17,12,8,.35), rgba(17,12,8,.88) 75%, #110c08); }
.sw-row { display: flex; align-items: flex-end; gap: 3px; padding-top: 10px; position: relative; overflow: hidden;
  border-bottom: 14px solid #2c1c10; box-shadow: inset 0 -30px 40px -20px rgba(0,0,0,.6), 0 10px 18px rgba(0,0,0,.5); }
.sw-spine { flex: 0 0 var(--w); height: var(--h); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 12px 0 10px; border-radius: 2px 2px 0 0; color: hsl(var(--hue) 45% 84%);
  background: linear-gradient(90deg, rgba(0,0,0,.4), rgba(255,255,255,.1) 30%, transparent 55%, rgba(0,0,0,.35)), hsl(var(--hue) 32% 24%);
  transition: transform .35s var(--ease-out); }
.sw-spine.v1 { background-color: hsl(var(--hue) 40% 18%); }
.sw-spine.v2 { background-color: hsl(calc(var(--hue) + 20) 22% 32%); }
.sw-spine.v3::before, .sw-spine.v3::after { content: ''; position: absolute; left: 0; right: 0; height: 3px; background: rgba(226,190,120,.55); }
.sw-spine.v3::before { top: 8%; }
.sw-spine.v3::after { bottom: 8%; }
.sw-spine.lean { transform: rotate(-7deg); transform-origin: bottom left; margin: 0 10px 0 6px; }
.sw-spine:hover { transform: translateY(-10px); }
.sw-spine.lean:hover { transform: rotate(-7deg) translateY(-10px); }
.sw-spine span { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--font-display); font-weight: 600; font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: 68%; }
.sw-spine small { font-size: 8.5px; opacity: .7; writing-mode: vertical-rl; transform: rotate(180deg); max-height: 24%; overflow: hidden; white-space: nowrap; }
.sw-gap { flex: 0 0 24px; }

/* ---- Okur kartı (önü giriş, arkası kayıt) ---- */
.rc-stage { position: relative; z-index: 2; width: min(100%, 440px); perspective: 1800px; animation: rc-in 1.1s var(--ease-out) both; }
@keyframes rc-in { from { opacity: 0; transform: translateY(60px) rotate(-7deg); } }
.rc { display: grid; transform-style: preserve-3d; transform: rotate(-1.2deg); transition: transform .9s var(--ease-out); }
.rc.flipped { transform: rotate(1deg) rotateY(180deg); }
.rc.shake { animation: rc-shake .5s; }
@keyframes rc-shake { 20%, 60% { translate: -8px 0; } 40%, 80% { translate: 8px 0; } }
.rc-face { grid-area: 1 / 1; position: relative; display: flex; flex-direction: column; padding: 26px 28px 22px; border-radius: 5px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; color: var(--card-ink); overflow: hidden;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(255,250,235,.35), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(150,110,50,.18), transparent 70%),
    linear-gradient(var(--card), var(--card-2));
  box-shadow: inset 0 0 50px rgba(120,84,30,.22), 0 2px 3px rgba(0,0,0,.4), 0 40px 70px -20px rgba(0,0,0,.85); }
.rc-back { transform: rotateY(180deg); }
.rc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 12px; border-bottom: 4px double var(--rule-red); }
.rc-title { font-family: var(--font-display); font-size: 38px; font-weight: 650; line-height: 1; letter-spacing: -.01em; color: var(--card-ink);
  font-variation-settings: 'SOFT' 100, 'WONK' 1; }
.rc-kind { font-size: 13px; color: var(--card-muted); margin-top: 6px; }
.rc-date { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.rc-date span { font-size: 11.5px; color: var(--card-muted); }
.rc-date b { font-family: var(--font-hand); font-size: 22px; font-weight: 600; color: var(--ink); line-height: 1.1; transform: rotate(-2deg); }
.rc-sub { font-family: var(--font-read); font-style: italic; font-size: 15.5px; color: #5d4b34; margin: 14px 0 6px; }
.rc-form { display: flex; flex-direction: column; }
.rc-row { display: grid; grid-template-columns: 104px 1fr; align-items: end; gap: 10px; border-bottom: 1px solid var(--card-rule); padding-top: 8px; transition: border-color .2s, box-shadow .2s; }
.rc-row span { font-size: 12.5px; color: var(--card-muted); padding-bottom: 9px; }
.rc-row:focus-within { border-bottom-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.rc-row:focus-within span { color: var(--ink); }
.rc-row input { background: transparent; border: 0; outline: none; min-width: 0; padding: 2px 0 0; height: 40px;
  font-family: var(--font-hand); font-size: 27px; font-weight: 600; color: var(--ink); }
.rc-row input[type="password"] { letter-spacing: .12em; }
.rc-row input::-ms-reveal { display: none; }
.rc-row input::placeholder { color: rgba(122,100,70,.55); font-size: 20px; font-weight: 500; letter-spacing: 0; }
.rc-row input:-webkit-autofill { -webkit-text-fill-color: var(--ink); transition: background-color 99999s; }
.rc-terms { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 12.5px; line-height: 1.45; color: #5d4b34; }
.rc-terms input { accent-color: var(--ink); width: 17px; height: 17px; margin-top: 1px; flex-shrink: 0; }
.rc-terms a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.rc-error { color: #a3352a; font-size: 13.5px; font-weight: 600; margin-top: 10px; }
.rc-error:empty { display: none; }
.rc-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.rc-submit { height: 46px; padding: 0 24px; border-radius: 10px; background: var(--card-ink); color: #f3e5c6; font-weight: 650; font-size: 15px;
  box-shadow: 0 2px 0 #000, 0 10px 20px -10px rgba(0,0,0,.7); transition: transform .15s, box-shadow .15s; }
.rc-submit:hover { transform: translateY(-1px); }
.rc-submit:active { transform: translateY(1px); box-shadow: 0 1px 0 #000; }
.rc-submit:disabled { opacity: .6; }
.rc-submit:focus-visible, .rc-switch:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.rc-switch { font-size: 13.5px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(35,48,106,.4); padding: 6px 0; }
.rc-switch:hover { text-decoration-color: var(--ink); }

/* Kartın altındaki ödünç çizelgesi: ön yüz, kayıt yüzünden kısa kalınca boşluğu doldurur */
.rc-ledger { flex: 1; min-height: 0; overflow: hidden; display: grid; grid-template-columns: 1fr 90px; grid-auto-rows: 32px; align-content: start;
  margin: 22px -28px -22px; padding: 0 28px; border-top: 2px solid var(--card-rule);
  background: repeating-linear-gradient(transparent 0 31px, var(--card-rule) 31px 32px); }
.rc-ledger span { font-size: 11.5px; color: var(--card-muted); align-self: end; padding-bottom: 6px; }
.rc-ledger > :nth-child(even) { padding-left: 14px; border-left: 1px solid var(--card-rule); }
.rc-ledger i { font-family: var(--font-hand); font-style: normal; font-size: 21px; color: #6d6356; opacity: .6; align-self: end; padding-bottom: 2px; white-space: nowrap; overflow: hidden; }

/* Başarılı girişte basılan damga */
.rc-stamp { position: absolute; right: 26px; bottom: 22px; width: 132px; height: 132px; color: var(--stamp); mix-blend-mode: multiply; pointer-events: none;
  opacity: .82; transform: rotate(-14deg); animation: stamp .5s cubic-bezier(.3, 1.5, .5, 1) both; }
.rc-stamp svg { width: 100%; height: 100%; font-family: var(--font-ui); overflow: visible; }
@keyframes stamp { from { opacity: 0; transform: scale(2.1) rotate(-4deg); } 55% { opacity: .95; } to { opacity: .82; transform: scale(1) rotate(-14deg); } }

@media (max-width: 520px) {
  .rc-face { padding: 22px 20px 18px; }
  .rc-title { font-size: 32px; }
  .rc-row { grid-template-columns: 86px 1fr; }
  .rc-ledger { margin: 18px -20px -18px; padding: 0 20px; }
  .sw-spine span { font-size: 11px; }
}
