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

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

body.cb-login-page {
  display: flex;
  min-height: 100vh;
  font-family: var(--cb-font);
  background: var(--cb-secondary);
  color: var(--cb-text);
  overflow: hidden;
}

.cb-login-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-height: 100vh;
}

.cb-login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 56px;
  background: linear-gradient(145deg, var(--cb-primary-dark) 0%, #1a3d2e 40%, var(--cb-secondary) 100%);
  color: #fff;
  overflow: hidden;
}

.cb-login-hero::before {
  content: '';
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(90, 158, 74, 0.45), transparent 70%);
  top: -120px;
  right: -80px;
  filter: blur(2px);
}

.cb-login-hero::after {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 180, 230, 0.2), transparent 70%);
  bottom: -60px;
  left: -40px;
}

.cb-login-hero__content {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.cb-login-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--cb-radius-full);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.cb-login-hero h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.5;
  margin-bottom: 16px;
}

.cb-login-hero p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

.cb-login-hero__features {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cb-login-hero__feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

.cb-login-hero__feature svg {
  width: 20px;
  height: 20px;
  color: var(--cb-primary-light);
  flex-shrink: 0;
}

.cb-login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: var(--cb-surface-2);
}

.cb-login-wrap {
  width: 100%;
  max-width: 400px;
  animation: fadeInUp 0.55s var(--cb-ease);
}

.cb-login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.cb-login-logo__mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cb-primary) 0%, var(--cb-primary-dark) 100%);
  color: #fff;
  box-shadow: var(--cb-shadow-glow);
}

.cb-login-logo__mark svg {
  width: 34px;
  height: 34px;
}

.cb-login-logo h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--cb-primary-dark), var(--cb-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cb-login-logo__tag {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cb-muted);
  margin-top: 6px;
}

.cb-login-card {
  background: var(--cb-surface);
  border-radius: var(--cb-radius-lg);
  border: 1px solid var(--cb-border);
  box-shadow: var(--cb-shadow-md);
  overflow: hidden;
}

.cb-login-body {
  padding: 32px 32px 28px;
}

.cb-login-body .field {
  margin-bottom: 20px;
}

.cb-login-body label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cb-text-2);
  margin-bottom: 8px;
}

.cb-login-body input {
  width: 100%;
  background: var(--cb-surface-2);
  border: 1.5px solid var(--cb-border);
  border-radius: var(--cb-radius-sm);
  padding: 13px 16px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--cb-text);
  outline: none;
  transition: border-color 0.2s var(--cb-ease), box-shadow 0.2s var(--cb-ease);
}

.cb-login-body input:focus {
  border-color: var(--cb-primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(90, 158, 74, 0.15);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-inline-end: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  inset-inline-end: 12px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--cb-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.password-toggle:hover {
  color: var(--cb-primary);
  background: var(--cb-active);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.password-toggle .icon-hide { display: none; }
.password-toggle.is-visible .icon-show { display: none; }
.password-toggle.is-visible .icon-hide { display: block; }

.cb-btn-primary {
  width: 100%;
  padding: var(--cb-btn-padding-y) var(--cb-btn-padding-x);
  border: none;
  border-radius: var(--cb-btn-radius);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--cb-primary) 0%, var(--cb-primary-dark) 100%);
  box-shadow: 0 4px 14px var(--cb-primary-glow);
  transition: transform 0.15s var(--cb-ease), box-shadow 0.2s var(--cb-ease);
  margin-top: 8px;
}

.cb-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cb-login-alert {
  padding: 12px 14px;
  border-radius: var(--cb-radius-sm);
  font-size: 0.82rem;
  margin-bottom: 18px;
  display: none;
  line-height: 1.45;
}

.cb-login-alert.error.show {
  display: block;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.cb-login-alert.success.show {
  display: block;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.cb-login-demo {
  margin-top: 16px;
  padding: 10px 12px;
  font-size: 0.78rem;
  color: var(--cb-text-2);
  text-align: center;
  background: var(--cb-accent-peach);
  border-radius: var(--cb-radius-sm);
  line-height: 1.5;
}

.cb-login-footer {
  text-align: center;
  padding: 16px;
  font-size: 0.75rem;
  color: var(--cb-muted);
  border-top: 1px solid var(--cb-border-soft);
  background: var(--cb-surface-2);
}

.btn-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

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

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

  .cb-login-hero {
    display: none;
  }

  .cb-login-panel {
    min-height: 100vh;
  }
}
