:root {
  --bg: #f5f5f2;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #ffffff;
  --text: #111111;
  --muted: #6f6f6f;
  --border: #e8e8e5;
  --shadow: 0 20px 60px rgba(17, 17, 17, 0.12);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #f7f7f3 0%, #efefeb 100%);
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  opacity: 0.7;
}

body::before {
  width: 320px;
  height: 320px;
  background: rgba(17, 17, 17, 0.08);
  top: -80px;
  left: -100px;
}

body::after {
  width: 220px;
  height: 220px;
  background: rgba(255, 255, 255, 0.7);
  bottom: -40px;
  right: -40px;
}

.page-shell {
  width: min(1180px, 95vw);
  padding: 24px;
  animation: fadeUp 0.7s ease-out both;
}

.login-card {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  min-height: 660px;
  border-radius: 28px;
  overflow: hidden;
  background: var(--panel);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.form-panel {
  padding: clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(247,247,245,0.92));
}

.home-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 24px;
  transition: transform 0.25s ease, color 0.25s ease;
}

.home-link:hover {
  transform: translateX(-2px);
  color: #525252;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  color: #111111;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.08);
}

.brand-block h1 {
  margin: 0;
  font-size: 1.05rem;
}

.brand-block p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.welcome-box h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
}

.welcome-box p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: #7a7a7a;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2f2f2f;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 12px;
  background: rgba(255,255,255,0.86);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.input-wrap:focus-within {
  border-color: #111111;
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.08);
  transform: translateY(-1px);
}

.input-wrap i {
  color: #4f4f4f;
  width: 18px;
  text-align: center;
}

.input-wrap input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 14px 6px;
  background: transparent;
  color: var(--text);
  font-size: 0.96rem;
}

.input-wrap input::placeholder {
  color: #9b9b9b;
}

.input-wrap.invalid {
  border-color: #8f2f2f;
  box-shadow: 0 0 0 4px rgba(143, 47, 47, 0.12);
}

.input-wrap.valid {
  border-color: #2f6b3d;
  box-shadow: 0 0 0 4px rgba(47, 107, 61, 0.12);
}

.toggle-password {
  border: 0;
  background: transparent;
  color: #636363;
  cursor: pointer;
  font-weight: 600;
  padding: 4px 0;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.check-row input {
  accent-color: #111111;
}

.text-link,
.ghost-btn {
  border: 0;
  background: transparent;
  color: #111111;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.text-link:hover,
.ghost-btn:hover {
  color: #4b4b4b;
}

.primary-btn,
.google-btn {
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
  background: #111111;
  color: white;
  box-shadow: 0 14px 24px rgba(17, 17, 17, 0.18);
}

.primary-btn:hover,
.google-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(17, 17, 17, 0.16);
}

.primary-btn:disabled {
  opacity: 0.8;
  cursor: wait;
  transform: none;
}

.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
  background: #ffffff;
  color: #111111;
  border: 1px solid var(--border);
}

.google-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f2f2f2;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
}

.google-btn .spinner {
  border-top-color: #111111;
}

.message {
  min-height: 20px;
  font-size: 0.92rem;
  color: #5f5f5f;
}

.message.error {
  color: #8f2f2f;
}

.message.success {
  color: #2f6b3d;
}

.form-switch {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.visual-panel {
  background: linear-gradient(145deg, #111111 0%, #232323 100%);
  color: white;
  padding: clamp(24px, 4vw, 48px);
  display: flex;
  align-items: flex-end;
}

.visual-content {
  max-width: 360px;
}

.visual-content h3 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
}

.visual-content p {
  margin: 0 0 18px;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
}

.benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  color: rgba(255,255,255,0.9);
}

.benefits i {
  color: #d9d9d9;
  margin-right: 8px;
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .login-card {
    grid-template-columns: 1fr;
  }

  .visual-panel {
    min-height: 240px;
    align-items: center;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: 100%;
    padding: 12px;
  }

  .form-panel,
  .visual-panel {
    padding: 22px;
  }

  .meta-row,
  .form-switch {
    flex-direction: column;
    align-items: flex-start;
  }
}
.brand-mark img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    border-radius: 12px;
}