/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
}

/* ── Envelope decoration (top of card) ───────────────────── */
.env-deco {
  margin-bottom: -1px;
  position: relative;
  display: flex;
  justify-content: center;
}

.env-deco-shape {
  width: 180px;
  height: 100px;
  background: linear-gradient(160deg, var(--pink-light), var(--pink));
  border-radius: var(--r-md) var(--r-md) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
  box-shadow: var(--shadow-sm);
}

/* V-flap at bottom */
.env-deco-shape::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 36px;
  background: var(--milk);
  clip-path: polygon(0 100%, 50% 0%, 100% 100%);
}

.env-deco-icon {
  font-size: 2.4rem;
  animation: envFloat 3s ease-in-out infinite;
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.12));
}

@keyframes envFloat {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%       { transform: translateY(-6px) rotate(3deg); }
}

/* ── Login card ───────────────────────────────────────────── */
.login-card {
  background: rgba(253, 248, 242, .92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--r-lg);
  padding: 0 32px 36px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 2;
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(249,205,216,.4);
  animation: cardIn .8s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(40px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Header text ──────────────────────────────────────────── */
.login-header {
  text-align: center;
  padding: 28px 0 24px;
}

.login-title {
  color: var(--text-dark);
  font-size: clamp(1.3rem, 4vw, 1.65rem);
  line-height: 1.4;
  margin-bottom: 14px;
}

.login-subtitle {
  color: var(--text-medium);
  font-size: .95rem;
  line-height: 1.65;
}

/* ── Divider ──────────────────────────────────────────────── */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  color: var(--text-soft);
  font-size: .85rem;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--beige);
}

/* ── Form ─────────────────────────────────────────────────── */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-wrapper {
  position: relative;
}

.password-input {
  width: 100%;
  padding: 16px 52px 16px 20px;
  border: 2px solid var(--beige);
  border-radius: var(--r-md);
  background: rgba(255,255,255,.8);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  color: var(--text-dark);
  outline: none;
  transition: border-color .25s, box-shadow .25s;
  -webkit-appearance: none;
}

.password-input::placeholder { color: var(--text-soft); }

.password-input:focus {
  border-color: var(--pink-dark);
  box-shadow: 0 0 0 4px rgba(232,160,180,.18);
  background: white;
}

.password-input.error {
  border-color: #e57373;
  animation: shake .4s ease;
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px); }
  60%      { transform: translateX(-5px); }
  80%      { transform: translateX(5px); }
}

.eye-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color .2s;
  -webkit-tap-highlight-color: transparent;
}

.eye-toggle:hover { color: var(--text-medium); }

/* ── Error message ────────────────────────────────────────── */
.error-msg {
  font-size: .88rem;
  color: #c0392b;
  min-height: 1.2em;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 4px;
}

/* ── Submit button ────────────────────────────────────────── */
.submit-btn {
  position: relative;
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--pink-dark) 0%, var(--rose) 100%);
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 24px rgba(212,132,158,.45);
  transition: transform .25s, box-shadow .25s;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.12);
  opacity: 0;
  transition: opacity .2s;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(212,132,158,.55);
}

.submit-btn:hover::before { opacity: 1; }

.submit-btn:active { transform: translateY(0); }

.submit-btn:disabled {
  opacity: .75;
  cursor: not-allowed;
  transform: none;
}

.btn-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.submit-btn.loading .btn-text,
.submit-btn.loading .btn-icon { opacity: 0; }

.submit-btn.loading .btn-loader { display: block; position: absolute; }

/* ── Decorative footer of card ────────────────────────────── */
.login-flowers {
  text-align: center;
  margin-top: 24px;
  font-size: 1.1rem;
  letter-spacing: 10px;
  opacity: .5;
}