/* ==========================================================================
   Stickies — login screen (sticky-note theme, from the Figma prototype)
   ========================================================================== */
.login-page {
  min-height: 100vh; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
}

/* --------------------------------------------------- floating mini notes */
@keyframes float-note {
  0%, 100% { transform: rotate(var(--r)) translateY(0); }
  50%      { transform: rotate(var(--r)) translateY(-10px); }
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(28px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); }
}
@keyframes success-pop {
  0% { transform: scale(1); } 50% { transform: scale(1.06); } 100% { transform: scale(1); }
}
.card-in { animation: card-in .55s cubic-bezier(.34,1.56,.64,1) both; }
.shake { animation: shake .45s ease; }
.success-pop { animation: success-pop .4s ease both; }

.float-note { position: absolute; pointer-events: none; user-select: none; }
.float-0 { --r: -8deg; animation: float-note 4.2s ease-in-out 0s infinite; }
.float-1 { --r: 5deg;  animation: float-note 3.8s ease-in-out .4s infinite; }
.float-2 { --r: -4deg; animation: float-note 4.5s ease-in-out .8s infinite; }
.float-3 { --r: 7deg;  animation: float-note 4.0s ease-in-out .6s infinite; }
.float-4 { --r: -6deg; animation: float-note 3.6s ease-in-out 1s infinite; }
.float-5 { --r: 4deg;  animation: float-note 4.3s ease-in-out .2s infinite; }
.float-6 { --r: -3deg; animation: float-note 3.9s ease-in-out 1.2s infinite; }
.float-7 { --r: 6deg;  animation: float-note 4.1s ease-in-out .9s infinite; }

.mini-note {
  width: 96px; height: 96px; border-radius: 12px;
  box-shadow: 0 8px 18px rgba(0,0,0,.16);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 10px; position: relative;
}
.mini-note pre {
  margin: 0; font-family: var(--font-body); font-size: 11px; font-weight: 700;
  line-height: 1.25; white-space: pre-wrap; color: rgba(0,0,0,.65);
}
.mini-fold {
  position: absolute; top: 0; right: 0; width: 20px; height: 20px;
  border-bottom: 20px solid transparent; border-right: 20px solid rgba(0,0,0,.1);
  border-top: 0 solid transparent; border-left: 0 solid transparent;
}
.doodle { position: absolute; }

/* -------------------------------------------------------------- the card */
.login-wrap { position: relative; z-index: 10; width: 100%; max-width: 384px; padding: 0 16px; }
.login-card { position: relative; z-index: 5; }

.login-head {
  position: relative; overflow: hidden; text-align: center;
  background: var(--yellow); border-radius: 16px 16px 0 0;
  padding: 30px 28px 22px;
}
.head-fold {
  position: absolute; top: 0; right: 0; width: 32px; height: 32px;
  border-bottom: 32px solid transparent; border-right: 32px solid rgba(0,0,0,.1);
}
.head-pin {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  width: 20px; height: 20px; border-radius: 999px; background: #F87171;
  border: 2px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center;
}
.head-pin i { display: block; width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.65); }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.login-brand h1 { font-size: 25px; line-height: 1.1; }
.tagline { margin: 0; font-size: 13px; font-weight: 600; color: #5C4A00; opacity: .8; }

.login-body {
  background: #fff; border-radius: 0 0 16px 16px;
  box-shadow: 0 25px 50px rgba(0,0,0,.22);
  padding: 20px 28px 26px;
}
.login-form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 11px; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
}
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 15px; }
.input-wrap input {
  width: 100%; padding: 11px 40px 11px 36px; border-radius: 12px;
  border: 2px solid var(--line-soft); font-weight: 600; font-size: 14px; color: var(--ink); background: #fff;
}
.input-wrap input:focus { outline: none; border-color: var(--primary); }
.input-wrap input::placeholder { color: #B5B0AA; font-weight: 500; }
.eye {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; font-size: 15px; padding: 4px; line-height: 1;
}
.forgot-row { text-align: right; margin-top: -4px; }
.link { background: none; border: none; padding: 0; font-size: 11px; font-weight: 700; color: var(--primary); }
.link:hover { text-decoration: underline; }
.login-submit {
  margin-top: 6px; width: 100%; padding: 13px; border: none; border-radius: 12px;
  font-size: 14px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #5B4FCF, #8B5CF6);
  box-shadow: 0 8px 18px rgba(91,79,207,.28); transition: filter .15s;
}
.login-submit:hover { filter: brightness(1.06); }
.login-submit:disabled { filter: grayscale(.3); }
.login-submit.ok { background: linear-gradient(135deg, #14B8A6, #0D9488); }
.no-account { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); margin: 16px 0 0; line-height: 1.5; }
.lang-row { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.lang-pill {
  font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 999px;
  background: var(--line-soft); color: var(--muted);
}
.lang-pill.on { background: var(--primary); color: #fff; }

.peek { position: absolute; z-index: -1; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.peek-left { left: -18px; bottom: -14px; width: 80px; height: 64px; background: #C5A3FF; }
.peek-right { right: -14px; bottom: -10px; width: 80px; height: 56px; background: #7FDBCA; }

/* ---------------------------------------------------------------- mobile */
@media (max-width: 900px) {
  .float-note .mini-note { width: 74px; height: 74px; padding: 8px; }
  .float-note .mini-note pre { font-size: 9px; }
  .float-2, .float-5 { opacity: .55; }
  .doodle { opacity: .35 !important; }
}
@media (max-width: 560px) {
  .login-page { align-items: flex-start; padding: 34px 0 26px; }
  .float-3, .float-4, .float-6, .float-7, .float-5 { display: none; }
  .float-0, .float-1, .float-2 { opacity: .5; }
  .doodle { display: none; }
  .login-body { padding: 18px 18px 22px; }
  .login-head { padding: 26px 18px 18px; }
  .peek-left, .peek-right { display: none; }
  .card-in { animation-duration: .4s; }
}
@media (prefers-reduced-motion: reduce) {
  .float-note, .card-in, .login-submit { animation: none !important; }
}
