*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: 245 247 250;
  --fg: 20 23 30;
  --card: 255 255 255;
  --primary: 14 165 233;
  --primary-hover: 12 140 200;
  --muted: 234 236 240;
  --muted-fg: 100 116 139;
  --border: 222 226 230;
  --glass: rgba(255, 255, 255, 0.8);
}

.dark {
  --bg: 14 17 22;
  --fg: 230 230 230;
  --card: 26 29 36;
  --primary: 34 211 238;
  --primary-hover: 45 220 250;
  --muted: 42 47 58;
  --muted-fg: 156 163 175;
  --border: 42 47 58;
  --glass: rgba(26, 29, 36, 0.8);
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background-color: rgb(var(--bg));
  color: rgb(var(--fg));
  min-height: 100vh;
  display: flex;
  transition: background-color .2s;
}

.login-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.brand-section {
  flex: 1;
  background: linear-gradient(135deg, rgb(var(--primary)), #0369a1);
  color: white;
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.brand-section::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  filter: blur(60px);
}

.brand-content {
  position: relative;
  z-index: 2;
  max-width: 500px;
}

.brand-logo {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
  display: block;
  text-decoration: none;
  color: white;
}

.brand-content h2 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.benefit-list {
  list-style: none;
  margin-top: 2rem;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
  opacity: 0.9;
}

.benefit-item svg {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.form-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-color: rgb(var(--bg));
  position: relative;
}

.form-card {
  width: 100%;
  max-width: 400px;
}

.form-header {
  margin-bottom: 2rem;
}

.form-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.form-header p {
  color: rgb(var(--muted-fg));
}

.input-group {
  margin-bottom: 1.25rem;
}

.input-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.input-field {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgb(var(--border));
  background-color: rgb(var(--card));
  color: rgb(var(--fg));
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.input-field:focus {
  border-color: rgb(var(--primary));
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.forgot-pass {
  color: rgb(var(--primary));
  text-decoration: none;
  font-weight: 500;
}

.submit-btn {
  width: 100%;
  padding: 0.875rem;
  border: none;
  border-radius: 0.5rem;
  background-color: rgb(var(--primary));
  color: white;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color .2s;
}

.submit-btn:hover {
  background-color: #0284c7;
}

.footer-text {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: rgb(var(--muted-fg));
}

.footer-text a {
  color: rgb(var(--primary));
  text-decoration: none;
  font-weight: 600;
}

.msg {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.msg--error {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #dc2626;
}

.msg--success {
  background-color: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #16a34a;
}

.dark .msg--error {
  color: #f87171;
}

.dark .msg--success {
  color: #4ade80;
}

.theme-switch {
  position: absolute;
  top: 2rem;
  right: 2rem;
}

.icon-btn {
  background: none;
  border: none;
  padding: .5rem;
  border-radius: .375rem;
  cursor: pointer;
  color: rgb(var(--fg));
  transition: background-color .2s;
  display: flex;
}

.icon-btn:hover {
  background-color: rgb(var(--muted));
}

@media (max-width: 900px) {
  .brand-section {
    display: none;
  }

  .form-section {
    padding: 1rem;
  }
}
