@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

:root {
  --scarlet: #CC0033;
  --scarlet-700: #990024;
  --ink: #121316;
  --ink-600: #3B3F47;
  --paper: #FAFAFC;
  --card: #FFFFFF;
  --muted: #6B7280;
  --radius: 18px;
  --shadow: 0 20px 40px rgba(0, 0, 0, .08);
}

/* === Base === */
* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}

/* === Layout === */
body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
  overflow-x: hidden;
}

/* === Hero Section === */
.hero {
  background: radial-gradient(circle at top left, rgba(204, 0, 51, 0.15), rgba(204, 0, 51, 0.05)),
              linear-gradient(180deg, #fff3f5 0%, #fff 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 80px;
  position: relative;
  overflow: hidden;
  animation: fadeInLeft 1.2s ease;
}

.brand-badge {
  position: absolute;
  top: 40px;
  left: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(204, 0, 51, 0.25);
}

.brand-badge .title {
  font-weight: 800;
  font-size: 22px;
  color: var(--scarlet);
}

.hero-copy {
  max-width: 500px;
  animation: slideUp 1.4s ease;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--ink);
  line-height: 1.1;
}

.hero p {
  color: var(--ink-600);
  font-size: 17px;
  line-height: 1.6;
}

/* Decorative glow */
.hero::after {
  content: "";
  position: absolute;
  bottom: -150px;
  left: -100px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(204, 0, 51, 0.08), transparent 70%);
  filter: blur(60px);
  animation: pulse 8s infinite ease-in-out;
}

/* === Auth Panel === */
.panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  background: var(--card);
  animation: fadeInUp 1.2s ease;
}

.auth-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
  width: min(420px, 100%);
  margin: 0 auto;
  animation: floatIn 1.2s ease;
}

.tabbar {
  display: flex;
  background: #f4f4f6;
  border-radius: 14px;
  padding: 6px;
  margin-bottom: 26px;
}

.tabbar a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 14px;
  color: #374151;
  border-radius: 10px;
  transition: all 0.25s ease;
}

.tabbar a.active {
  background: #fff;
  color: var(--scarlet);
  box-shadow: 0 2px 8px rgba(204, 0, 51, 0.25);
}

/* === Inputs === */
.icon-field {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  padding: 10px 14px;
  margin-bottom: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.icon-field:focus-within {
  border-color: var(--scarlet);
  box-shadow: 0 0 0 4px rgba(204, 0, 51, 0.12);
}

.icon-field i.material-icons {
  color: #666;
  font-size: 20px;
  margin-right: 8px;
}

.icon-field input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 15px;
  background: transparent;
}

.toggle-password {
  cursor: pointer;
  color: #777;
  transition: color 0.2s ease;
}
.toggle-password:hover {
  color: var(--scarlet);
}

/* === Buttons === */
.btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--scarlet);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  margin-top: 8px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(204, 0, 51, 0.25);
  transition: all 0.25s ease;
}
.btn:hover {
  transform: translateY(-2px);
  background: var(--scarlet-700);
}

/* === Toast === */
.toast {
  display: none;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 1rem;
  animation: fadeIn 0.3s ease;
}
.toast.success { background: #e6f6e7; color: #1b5e20; }
.toast.error { background: #fdecea; color: #b91c1c; }

/* === Footer === */
.footer-note {
  text-align: center;
  font-size: 13px;
  color: #777;
  margin-top: 20px;
}

/* === Animations === */
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floatIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === Responsive (Keep Logo Visible) === */
@media (max-width: 980px) {
  body {
    grid-template-columns: 1fr;
    background: linear-gradient(180deg, #fff8f9 0%, #ffffff 100%);
  }

  /* Compact hero as header */
  .hero {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    padding: 16px 28px;
    background: linear-gradient(90deg, rgba(204, 0, 51, 0.08), rgba(204, 0, 51, 0));
    border-bottom: 1px solid rgba(204, 0, 51, 0.08);
  }

  .brand-badge {
    position: static;
    gap: 10px;
    animation: fadeIn 0.6s ease;
  }

  .brand-badge img {
    width: 40px;
    height: 40px;
    box-shadow: 0 4px 12px rgba(204, 0, 51, 0.2);
  }

  .brand-badge .title {
    font-size: 20px;
    font-weight: 700;
  }

  .hero-copy { display: none; }

  /* Form section */
  .panel {
    padding: 32px 20px;
    background: none;
  }

  .auth-card {
    width: 100%;
    max-width: 420px;
    margin: 50px auto;
    padding: 30px 24px;
  }
}

/* Small screens */
@media (max-width: 480px) {
  .auth-card { padding: 24px 18px; }
  h2 { font-size: 22px; }
  .tabbar { flex-direction: column; gap: 8px; }
  .brand-badge img { width: 34px; height: 34px; }
  .brand-badge .title { font-size: 18px; }
}

.meta {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
  animation: fadeIn 0.6s ease;
}

.meta a {
  color: var(--scarlet);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.meta a:hover {
  color: var(--scarlet-700);
  text-shadow: 0 0 6px rgba(204, 0, 51, 0.15);
}

