/* Auth / login-register split layout — keep in sync with login styles in app.css */
:root {
  --color-brand: #7c3aed;
  --color-brand-soft: #f3e8ff;
  --color-brand-gradient: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
  --color-brand-gradient-hover: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.login-page {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
}
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
/* Split login page */
.login-page {
  margin: 0;
  min-height: 100vh;
  background: #fff;
}

.login-split {
  display: flex;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.login-split-hero {
  position: relative;
  flex: 1 1 50%;
  min-height: 0;
  min-width: 0;
  overflow: visible;
  z-index: 1;
  background: linear-gradient(145deg, #6d28d9 0%, #7c3aed 45%, #9333ea 100%);
  color: #fff;
}

.login-split-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background:
    linear-gradient(160deg, rgba(124, 58, 237, 0.35) 0%, transparent 55%);
}

.login-split-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 48px 56px 0;
  overflow: visible;
}

.login-split-brand {
  margin-bottom: 40px;
}

.login-split-logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.login-split-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 420px;
}

.login-split-subtitle {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  max-width: 380px;
}

.login-split-preview {
  position: absolute;
  left: 158px;
  right: -120px;
  bottom: -36px;
  height: 52%;
  min-height: 380px;
  margin: 0;
  padding: 0;
  width: auto;
  max-width: none;
  transform: none;
  z-index: 1;
  pointer-events: none;
}

.login-dash {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  box-shadow: 0 28px 56px rgba(15, 23, 42, 0.35);
  background: #eef2f7;
}

.login-dash-sidebar {
  width: 56px;
  flex-shrink: 0;
  background: #5b21b6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 14px;
  border-radius: 16px 0 0 0;
}

.login-dash-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.login-dash-nav-icon {
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-dash-nav-icon svg {
  width: 18px;
  height: 18px;
}

.login-dash-nav-icon.is-active {
  color: #fff;
}

.login-dash-sidebar-user {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  background: var(--color-brand-gradient);
}

.login-dash-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f3f4f6;
  border-radius: 0 16px 0 0;
  padding: 0 0 12px;
}

.login-dash-chrome {
  display: flex;
  gap: 6px;
  padding: 10px 14px 0;
}

.login-dash-chrome span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
}

.login-dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px 10px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.login-dash-title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.login-dash-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-dash-tools span {
  width: 16px;
  height: 16px;
  color: #9ca3af;
  display: flex;
}

.login-dash-tools svg {
  width: 16px;
  height: 16px;
}

.login-dash-sheet {
  margin: 0 10px;
  flex: 1;
  min-height: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  font-size: 10px;
  display: flex;
  flex-direction: column;
}

.login-dash-sheet-head,
.login-dash-sheet-row {
  display: grid;
  grid-template-columns: 28px repeat(5, 1fr);
  border-bottom: 1px solid #eef2f7;
}

.login-dash-sheet-row {
  flex: 1;
}

.login-dash-sheet-head span,
.login-dash-sheet-row span {
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #eef2f7;
  color: #9ca3af;
  font-weight: 500;
}

.login-dash-sheet-head span:last-child,
.login-dash-sheet-row span:last-child {
  border-right: none;
}

.login-dash-sheet-head {
  background: #f9fafb;
}

.login-dash-sheet-row span.is-fill {
  background: var(--color-brand-soft);
}

.login-dash-sheet-row span.is-muted {
  background: #f3f4f6;
}

.login-dash-float {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  background-size: cover;
  background-position: center;
}

.login-dash-float-tr {
  top: -14px;
  right: 72px;
  background: var(--color-brand-gradient);
}

.login-split-panel {
  flex: 1 1 50%;
  min-height: 0;
  min-width: 0;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: #fff;
}

.login-split-form-wrap {
  width: 100%;
  max-width: 400px;
}

.login-split-form-wrap--wide {
  max-width: 420px;
}

.login-split-panel--scroll {
  align-items: flex-start;
  padding-top: 40px;
  padding-bottom: 40px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.login-form-lead {
  margin: -20px 0 24px;
  font-size: 14px;
  line-height: 1.5;
  color: #6b7280;
}

.login-form--register {
  gap: 16px;
}

.login-form-title {
  margin: 0 0 32px;
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.login-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  color: #111827;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-input::placeholder {
  color: #9ca3af;
}

.login-input:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14);
}

.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #111827;
  box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-out 0s;
}

.login-password-wrap {
  position: relative;
}

.login-input-password {
  padding-right: 14px;
}

.login-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.login-reset-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-brand);
  text-decoration: none;
  white-space: nowrap;
}

.login-reset-link:hover {
  text-decoration: underline;
}

.login-field-error {
  margin-top: 6px;
  font-size: 12px;
  color: #b91c1c;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  user-select: none;
}

.login-remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-brand);
  cursor: pointer;
}

.login-submit-btn {
  width: 100%;
  height: 48px;
  margin-top: 4px;
  border: none;
  border-radius: 10px;
  background: var(--color-brand-gradient);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.login-submit-btn:hover {
  background: var(--color-brand-gradient-hover);
}

.login-signup-text {
  margin: 28px 0 0;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}

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

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

@media (max-width: 960px) {
  .login-split {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .login-split-hero {
    flex: none;
    min-height: 280px;
    overflow: hidden;
  }

  .login-split-preview {
    display: none;
  }

  .login-split-panel--scroll {
    overflow-y: visible;
  }

  .login-split-hero-content {
    padding: 32px 24px 28px;
  }

  .login-split-panel {
    flex: 1;
    padding: 32px 24px 48px;
  }
}

@media (max-width: 480px) {
  .login-form-title {
    font-size: 26px;
    margin-bottom: 24px;
  }

  .login-input-password {
    padding-right: 14px;
  }

  .login-form-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .login-reset-link {
    display: inline-block;
    margin-top: 0;
  }
}
