@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background: hsl(40, 33%, 98%);
    --foreground: hsl(20, 20%, 15%);
    --primary: hsl(270, 74%, 32%);
    --primary-foreground: hsl(40, 33%, 98%);
    --primary-glow: hsl(270, 85%, 55%);
    --muted: hsl(40, 15%, 93%);
    --muted-foreground: hsl(20, 10%, 45%);
    --border: hsl(40, 20%, 88%);
    --radius: 0.75rem;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

.auth-container {
    display: flex;
    min-height: 100vh;
}

/* Left Panel */
.left-panel {
    display: none;
    position: relative;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .left-panel {
        display: flex;
        width: 50%;
    }
}

.gradient-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 50%, var(--primary-glow) 100%);
}

.pattern-overlay {
    position: absolute;
    inset: 0;
    background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2260%22%20height%3D%2260%22%20viewBox%3D%220%200%2060%2060%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Cg%20fill%3D%22%23ffffff%22%20fill-opacity%3D%220.1%22%3E%3Cpath%20d%3D%22M36%2034v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6%2034v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6%204V0H4v4H0v2h4v4h2V6h4V4H6z%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E');
    opacity: 0.3;
}

.left-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    color: var(--primary-foreground);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    text-decoration: none;
    color: inherit;
}

.brand-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    background: rgba(255, 253, 250, 0.2);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-text {
    font-weight: 700;
    font-size: 1.5rem;
}

.left-hero {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease 0.2s forwards;
}

.left-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.left-description {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 28rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease 0.4s forwards;
}

.stat-card {
    background: rgba(255, 253, 250, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 0.75rem;
    padding: 1rem;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Right Panel */
.right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.form-wrapper {
    width: 100%;
    max-width: 28rem;
    opacity: 0;
    transform: translateX(20px);
    animation: fadeInRight 0.6s ease forwards;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    text-decoration: none;
    color: var(--foreground);
}

@media (min-width: 1024px) {
    .mobile-logo {
        display: none;
    }
}

.mobile-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-foreground);
}

.mobile-text {
    font-weight: 700;
    font-size: 1.25rem;
}

.form-header {
    margin-bottom: 2rem;
}

.form-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--muted-foreground);
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.hidden {
    display: none;
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--foreground);
    font-family: inherit;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(90, 26, 122, 0.1);
}

.form-input::placeholder {
    color: var(--muted-foreground);
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--foreground);
}

.eye-icon,
.eye-off-icon {
    display: block;
}

.hidden {
    display: none !important;
}

.forgot-password {
    display: flex;
    justify-content: center;
}

.forgot-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-submit:hover {
    background: hsl(270, 74%, 28%);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(90, 26, 122, 0.2);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-arrow {
    flex-shrink: 0;
}

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.switch-text {
    color: var(--muted-foreground);
}

.switch-link {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
}

.switch-link:hover {
    text-decoration: underline;
}

.terms-text {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.terms-text.hidden {
    display: none;
}

.terms-link {
    color: var(--foreground);
    text-decoration: underline;
}

.terms-link:hover {
    color: var(--primary);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    background: white;
    border: 1px solid var(--border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid hsl(158, 64%, 45%);
}

.toast.error {
    border-left: 4px solid hsl(8, 75%, 58%);
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
}

/* Google Sign-In Button - Modern Version */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 24px;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #3c4043;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.btn-google:hover {
  background: linear-gradient(90deg, #f1f3f4, #ffffff);
  border-color: #c6c9cc;
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.btn-google:active {
  transform: scale(0.97);
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.btn-google svg {
  flex-shrink: 0;
}

/* Divider */
.divider {
  position: relative;
  text-align: center;
  margin: 24px 0;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e5e7eb;
}

.divider span {
  position: relative;
  display: inline-block;
  padding: 0 16px;
  background: hsl(40, 33%, 98%);
  color: #6b7280;
  font-size: 16px;
  font-weight: 500;
}

/* Phone Group - hide on sign in */
#phoneGroup {
  transition: all 0.3s ease;
}

/* Toast animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast {
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 640px) {
    .left-title {
        font-size: 2rem;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
}