/* Convara — Auth Styles */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --bg: #080810;
  --surface: #10101a;
  --surface2: #15152a;
  --border: rgba(255,255,255,0.07);
  --accent: #00c9a7;
  --accent2: #0095ff;
  --text: #f0eeff;
  --muted: #6b6880;
  --success: #4ade80;
  --error: #f87171;
  --info: #60a5fa;
  --radius: 14px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Animated background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 20% 20%, rgba(0,201,167,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 600px 500px at 80% 80%, rgba(176,106,255,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Noise texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.auth-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 24px;
}

.brand {
  text-align: center;
  margin-bottom: 32px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
  box-shadow: 0 0 40px rgba(0,201,167,0.4);
}

.brand-name {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
}

.brand-parent {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.tabs {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 28px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--surface2);
  color: var(--text);
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  transition: border-color 0.2s;
  outline: none;
}

input:focus {
  border-color: var(--accent);
}

input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

/* Google button */
.btn-google {
  width: 100%;
  padding: 12px;
  background: #fff;
  border: 1.5px solid #e2e2e2;
  border-radius: var(--radius-sm);
  color: #3c3c3c;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.18s, box-shadow 0.18s;
  margin-bottom: 4px;
}

.btn-google:hover {
  background: #f7f7f7;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.btn-google:active { transform: scale(0.99); }

.btn-google.loading {
  opacity: 0.7;
  pointer-events: none;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #3c3c3c;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

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

/* Email primary button */
.btn-primary {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 8px;
}

.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.hidden { display: none !important; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  white-space: nowrap;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success { border-color: var(--success); color: var(--success); }
.toast.error { border-color: var(--error); color: var(--error); }
.toast.info { border-color: var(--accent); color: var(--accent); }

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
}

/* ── Brand mark image ── */
.brand-mark { overflow: hidden; }
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

/* ── Mobile responsiveness ── */
@media (max-width: 480px) {
  body {
    align-items: flex-start;
    padding: 20px;
    overflow-y: auto;
  }
  .auth-wrapper {
    padding: 16px;
  }
  .brand-name  { font-size: 24px; }
  .auth-card   { padding: 20px 16px; border-radius: 16px; }
  .btn-primary { padding: 12px; font-size: 14px; }
  input[type="text"],
  input[type="email"],
  input[type="password"] {
    font-size: 16px !important; /* Prevent iOS zoom */
  }
}
