/* ===============================
   Coffee Theme (CSS-only update)
   =============================== */

/* Palette & tokens (safe fallbacks if undefined elsewhere) */
:root {
  --coffee-espresso: #2b1a14;
  --coffee-roast:    #4a2e20;
  --coffee-brew:     #6f4e37;
  --coffee-caramel:  #c58a54;
  --coffee-latte:    #b79274;
  --coffee-cream:    #f7efe9;
  --coffee-foam:     #fff9f3;

  --accent: var(--coffee-caramel);
  --text-dark: #3a2a20;

  --radius: 16px;
  --shadow: 0 14px 40px rgba(43, 26, 20, 0.25);
}

/* Subtle coffee paper backdrop for the card */
.register-card {
  background:
    radial-gradient(1200px 600px at -10% -20%, rgba(197,138,84,0.08), transparent 60%),
    radial-gradient(900px 500px at 110% 120%, rgba(111,78,55,0.08), transparent 60%),
    linear-gradient(180deg, var(--coffee-foam), var(--coffee-cream));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  margin: 2rem 0;
  border: 1px solid rgba(67, 49, 38, 0.08);
}
@media (max-width: 900px){
  .register-card { flex-direction: column; }
}

/* ============== Left panel (hero) ============== */
.card-left {
  flex: 1;
  background:
    radial-gradient(80% 120% at 20% 0%, rgba(255,255,255,0.06) 0%, transparent 60%),
    linear-gradient(135deg, var(--coffee-brew) 0%, var(--coffee-espresso) 70%);
  color: #fdfcfb;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Floating “foam speckles” */
.card-left::before {
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(rgba(255,255,255,0.08) 1px, transparent 2px) 0 0/26px 26px,
    radial-gradient(rgba(255,255,255,0.05) 1px, transparent 2px) 8px 8px/32px 32px;
  animation: moveDots 22s linear infinite;
  opacity: .9;
  mix-blend-mode: screen;
}

/* Soft glassy light sweep */
.card-left::after {
  content:"";
  position:absolute;
  top:0; left:-60%;
  width:40%; height:100%;
  background: linear-gradient(90deg, rgba(255,255,255,0.0), rgba(255,255,255,0.18), rgba(255,255,255,0.0));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transform: skewX(-25deg);
  animation: glassSlide 3.5s ease-in-out infinite;
}

.card-left .welcome-content {
  z-index:1;
  text-align:center;
  color:#fff;
  padding:1.25rem;
}
.card-left h2 {
  font-size:2rem;
  margin-bottom:.5rem;
  text-shadow: 0 2px 6px rgba(0,0,0,.35);
  letter-spacing:.3px;
}
.card-left p {
  margin-bottom:1rem;
  font-size:1.05rem;
  color: #f6efe8;
  opacity:.95;
}
.card-left .icon-bounce i {
  font-size:2.6rem;
  color: var(--accent);
  text-shadow: 0 2px 8px rgba(197,138,84,.35);
  animation:bounce 2s infinite;
}

/* ============== Right panel (form area) ============== */
.card-right {
  flex: 1;
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(600px 400px at 85% 15%, rgba(197,138,84,0.08), transparent 60%),
    linear-gradient(180deg, var(--coffee-foam), var(--coffee-cream));
}

/* Make login form panel fully transparent */
.card-right .form-inner {
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  border: 0 !important;
}


/* Optional form elements (safe generic selectors) */
.card-right .form-inner label {
  display:block;
  font-size:.9rem;
  color: var(--text-dark);
  margin: .25rem 0 .35rem;
  font-weight: 600;
}

.card-right .form-inner input,
.card-right .form-inner select,
.card-right .form-inner textarea {
  width:100%;
  padding:.75rem .9rem;
  border-radius:12px;
  border:1px solid rgba(74,46,32,.18);
  background: #fffdfa;
  color: var(--text-dark);
  outline:none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .05s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.card-right .form-inner input::placeholder,
.card-right .form-inner textarea::placeholder {
  color: rgba(58,42,32,.6);
}
.card-right .form-inner input:focus,
.card-right .form-inner select:focus,
.card-right .form-inner textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(197,138,84,.18);
}

.card-right .form-inner button,
.card-right .form-inner .btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  margin-top: .75rem;
  padding:.85rem 1rem;
  border-radius:14px;
  border: 1px solid rgba(90,65,48,.15);
  background: linear-gradient(180deg, var(--coffee-caramel), #ad6a34);
  color:#fff;
  font-weight:700;
  letter-spacing:.3px;
  cursor:pointer;
  transition: transform .05s ease, filter .15s ease, box-shadow .2s ease;
  box-shadow: 0 10px 18px rgba(197,138,84,.28), inset 0 1px 0 rgba(255,255,255,.25);
}
.card-right .form-inner button:hover,
.card-right .form-inner .btn:hover {
  filter: brightness(1.02);
}
.card-right .form-inner button:active,
.card-right .form-inner .btn:active {
  transform: translateY(1px);
}
.card-right .form-inner .btn--secondary {
  background: linear-gradient(180deg, var(--coffee-latte), #a07458);
  color:#311d14;
}

/* ============== Referrer toast ============== */
.referrer-toast {
  background: linear-gradient(180deg, #fff7ec, #fff2e1);
  border-left:4px solid var(--accent);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  box-shadow: 0 8px 20px rgba(43,26,20,.12);
  margin-bottom:1.5rem;
  animation: fadeIn .6s ease both;
  color: var(--text-dark);
}
.referrer-toast img {
  width:36px;
  height:36px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid var(--accent);
  box-shadow: 0 2px 6px rgba(43,26,20,.15);
}
.referrer-toast span {
  font-size: .96rem;
  color: var(--text-dark);
}

/* ============== Micro-interactions ============== */
@keyframes moveDots {
  0%   { background-position: 0 0, 8px 8px; }
  100% { background-position: 260px 0, 296px 8px; }
}

@keyframes glassSlide {
  0%   { transform: translateX(0) skewX(-25deg); opacity:.0; }
  35%  { opacity:.55; }
  50%  { transform: translateX(180%) skewX(-25deg); opacity:.0; }
  100% { transform: translateX(180%) skewX(-25deg); opacity:.0; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@keyframes fadeIn {
  from { opacity:0; transform: translateY(6px); }
  to   { opacity:1; transform: translateY(0); }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .card-left::before,
  .card-left::after,
  .card-left .icon-bounce i,
  .referrer-toast {
    animation: none !important;
  }
}

/* Optional: light coffee ring edge around the whole card for depth */
.register-card::after {
  content:"";
  position:absolute;
  inset:-1px;
  pointer-events:none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(74,46,32,.08), inset 0 0 60px rgba(197,138,84,.08);
}
