:root {
  --bg-primary: #0a0a0f;
  --bg-card: #16161e;
  --accent: #4a90d9;
  --accent-light: #6ba8ef;
  --accent-glow: rgba(74, 144, 217, 0.15);
  --accent-glow-strong: rgba(74, 144, 217, 0.3);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.35);
  --text-dark: #111827;
  --text-dark-secondary: #4b5563;
  --surface: #f8f9fb;
  --white: #ffffff;
  --gradient-accent: linear-gradient(135deg, #4a90d9 0%, #38bdf8 100%);
  --font-display: 'Sora', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --border-radius: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  min-height: 100vh;
  color: var(--text-dark);
  background: var(--bg-primary);
}

/* --- Split Layout --- */
.login-split {
  display: flex;
  min-height: 100vh;
}

.login-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  background: var(--white);
}

.login-right {
  flex: 1;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* --- Form Wrapper --- */
.login-form-wrapper {
  width: 100%;
  max-width: 400px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3.5rem;
}

.logo-mark {
  width: 38px;
  height: 38px;
  background: var(--gradient-accent);
  color: var(--white);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.logo-mark-img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

.login-form-wrapper h1 {
  font-family: var(--font-display);
  color: var(--text-dark);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.login-subtitle {
  color: var(--text-dark-secondary);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

/* --- Form --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dark);
  background: var(--surface);
  transition: all var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background: var(--white);
}

.form-group input::placeholder {
  color: #aab;
}

/* --- Options Row --- */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-dark-secondary);
  cursor: pointer;
}

.remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.forgot-link {
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

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

/* --- Error / Success --- */
.login-error {
  background: #fef2f2;
  color: #991b1b;
  padding: 0.85rem 1.1rem;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  border: 1px solid #fecaca;
}

.login-success {
  background: #f0fdf4;
  color: #166534;
  padding: 0.85rem 1.1rem;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  border: 1px solid #bbf7d0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 4px 20px var(--accent-glow-strong);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow-strong);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-block { width: 100%; }

.btn-google {
  background: var(--white);
  color: #344054;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50px;
}

.btn-google:hover {
  background: var(--off-white);
  border-color: rgba(0, 0, 0, 0.15);
}

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

/* --- Divider --- */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.75rem 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

.divider span {
  font-size: 0.85rem;
  color: #aab;
}

/* --- Footer --- */
.login-footer {
  text-align: center;
  font-size: 0.875rem;
  color: #889;
  margin-top: 2rem;
}

.login-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.login-footer a:hover { text-decoration: underline; }

.back-link {
  display: block;
  text-align: center;
  margin-top: 1.75rem;
  font-size: 0.85rem;
  color: #aab;
  text-decoration: none;
  transition: color var(--transition);
}

.back-link:hover { color: var(--accent); }

/* --- Illustration Panel --- */
.illustration-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
}

.illustration-center {
  text-align: center;
  z-index: 2;
}

.monitor-illustration {
  width: 240px;
  margin: 0 auto 2.5rem;
  opacity: 0.8;
}

.monitor-illustration svg {
  width: 100%;
  height: auto;
}

.illustration-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
}

.illustration-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.7;
}

/* --- Floating Icons --- */
.float-icon {
  position: absolute;
  color: rgba(255, 255, 255, 0.06);
  animation: float 8s ease-in-out infinite;
  z-index: 1;
}

.float-icon svg {
  width: 100%;
  height: 100%;
}

.icon-1 { width: 40px; top: 10%; left: 15%; animation-delay: 0s; }
.icon-2 { width: 36px; top: 8%; right: 20%; animation-delay: 1.2s; }
.icon-3 { width: 44px; top: 25%; left: 8%; animation-delay: 2.4s; }
.icon-4 { width: 32px; bottom: 30%; left: 12%; animation-delay: 0.6s; }
.icon-5 { width: 48px; top: 20%; right: 8%; animation-delay: 3.6s; }
.icon-6 { width: 38px; bottom: 15%; right: 15%; animation-delay: 1.8s; }
.icon-7 { width: 34px; bottom: 25%; left: 25%; animation-delay: 3s; }
.icon-8 { width: 42px; bottom: 10%; right: 30%; animation-delay: 4.8s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 1; }
  50% { transform: translateY(-15px) rotate(3deg); opacity: 0.6; }
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-primary);
  color: var(--white);
  padding: 0.95rem 1.75rem;
  border-radius: 50px;
  font-size: 0.9rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  z-index: 100;
  animation: toastIn 0.4s ease;
}

.toast[hidden] { display: none; }

.toast a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@keyframes toastIn {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .login-right { display: none; }

  .login-left {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .login-form-wrapper h1 {
    font-size: 1.5rem;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
