:root {
  --primary: #1fc9b3;
  --primary-hover: #19b7a2;
  --primary-dark: #0d8f82;
  --primary-light: #a6f5ea;
  --dark: #061d1e;
  --dark-2: #092728;
  --dark-3: #0c3433;
  --text: #152f30;
  --text-soft: #728584;
  --white: #ffffff;
  --bg: #f5faf9;
  --border: rgba(10, 71, 68, .12);
  --error: #df5656;
  --shadow: 0 30px 80px rgba(4, 47, 45, .14);
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }

.login-page {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
}

.brand-side {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 0;
  padding: 28px 44px 22px;
  display: flex;
  flex-direction: column;
  color: white;
  background:
    radial-gradient(circle at 18% 12%, rgba(46, 212, 188, .18), transparent 30%),
    radial-gradient(circle at 88% 78%, rgba(102, 212, 145, .10), transparent 26%),
    linear-gradient(145deg, #041719 0%, #072425 48%, #0b3634 100%);
}

.brand-side::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .11;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 90%);
  pointer-events: none;
}

.brand-glow {
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: rgba(31, 201, 179, .14);
  filter: blur(100px);
  right: -180px;
  top: 20%;
  pointer-events: none;
}

.brand-top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.brand-chip {
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: rgba(232, 255, 250, .72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  white-space: nowrap;
}

.logo {
  position: relative;
  z-index: 5;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: "Manrope", sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -1.1px;
  color: white;
}

.logo-symbol {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #05332e;
  background: linear-gradient(135deg, #a1f4e9, var(--primary));
  box-shadow: 0 10px 22px rgba(31,201,179,.18);
}

.logo-text span { color: #78e8d8; }

.brand-content {
  position: relative;
  z-index: 3;
  max-width: none;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 0 12px;
}

.brand-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 11px;
  border-radius: 100px;
  color: #92ebe0;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-content h1 {
  max-width: none;
  font-family: "Manrope", sans-serif;
  font-size: clamp(26px, 2.55vw, 42px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -1.5px;
  white-space: nowrap;
}

.gradient-text {
  background: linear-gradient(90deg, #87eee0, #4bd6bb, #aedf78);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-description {
  max-width: 92%;
  margin-top: 12px;
  color: rgba(229, 244, 242, .68);
  font-size: 14.5px;
  line-height: 1.55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 22px;
  min-height: 0;
}

.preview-window {
  position: relative;
  overflow: hidden;
  height: min(248px, 36vh);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 24px 50px rgba(0,0,0,.26);
  background: linear-gradient(145deg, #ddd6cd, #beb3a5);
}

.preview-window::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3,25,26,.46), transparent 62%);
  z-index: 2;
}

.preview-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-topbar {
  position: absolute;
  z-index: 4;
  top: 15px;
  left: 15px;
  right: 15px;
  min-height: 45px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 11px;
  color: white;
  background: rgba(6, 29, 30, .74);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.09);
}

.preview-project {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 600;
}

.preview-project-icon {
  width: 29px;
  height: 29px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #07312f;
  background: var(--primary);
}

.preview-controls { display: flex; gap: 6px; }

.preview-control {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(255,255,255,.07);
  font-size: 9px;
}

.preview-info {
  position: absolute;
  z-index: 5;
  left: 18px;
  bottom: 17px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-status {
  padding: 8px 11px;
  border-radius: 9px;
  background: rgba(255,255,255,.92);
  color: var(--dark);
  font-size: 10px;
  font-weight: 700;
}

.preview-status i { margin-right: 5px; color: var(--primary-dark); }

.brand-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  min-height: 0;
}

.metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
}

.metric strong {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.04em;
  color: #8ef0e3;
}

.metric span {
  color: rgba(229, 244, 242, .58);
  font-size: 11px;
  white-space: nowrap;
}

.brand-footer {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-shrink: 0;
  color: rgba(255,255,255,.34);
  font-size: 11px;
}

.brand-footer-links { display: flex; gap: 18px; }
.brand-footer-links a { transition: .2s; }
.brand-footer-links a:hover { color: #72e7d6; }

.form-side {
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 40px;
  position: relative;
  background: linear-gradient(180deg, #ffffff, #f8fbfa);
}

.form-side::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(32,198,176,.07), transparent 65%);
  pointer-events: none;
}

.form-container {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 3;
}

.mobile-logo {
  display: none;
  margin-bottom: 45px;
  color: var(--dark);
}

.mobile-logo .logo-text span { color: var(--primary-dark); }

.form-header { margin-bottom: 22px; }

.welcome {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.welcome-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(31,201,179,.10);
}

.form-header h2 {
  font-family: "Manrope", sans-serif;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -1.4px;
  font-weight: 800;
  color: var(--dark);
}

.form-header p {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
}

.login-form { display: grid; gap: 14px; }

.form-group { display: grid; gap: 8px; }

.form-label {
  color: #284645;
  font-size: 13px;
  font-weight: 700;
}

.input-wrapper { position: relative; }

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  display: grid;
  place-items: center;
  color: #93a4a3;
  font-size: 14px;
  pointer-events: none;
  transition: .2s;
}

.form-input {
  width: 100%;
  height: 50px;
  padding: 0 48px;
  border-radius: 13px;
  border: 1px solid var(--border);
  outline: none;
  color: var(--dark);
  background: white;
  font-size: 15px;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.form-input::placeholder { color: #a7b4b3; }
.form-input:hover { border-color: rgba(14,107,100,.20); }
.form-input:focus {
  border-color: rgba(31,201,179,.72);
  box-shadow: 0 0 0 4px rgba(31,201,179,.09);
}
.input-wrapper:focus-within .input-icon { color: var(--primary-dark); }

.password-toggle {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #879b99;
  font-size: 14px;
  transition: .2s;
}

.password-toggle:hover {
  color: var(--primary-dark);
  background: #eff9f7;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: -3px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  color: #607574;
  font-size: 13px;
}

.remember input { display: none; }

.checkbox-ui {
  position: relative;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 5px;
  border: 1px solid rgba(8,84,79,.18);
  background: white;
  transition: .2s;
}

.checkbox-ui::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: white;
  font-size: 9px;
  opacity: 0;
  transform: scale(.5);
  transition: .2s;
}

.remember input:checked + .checkbox-ui {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.remember input:checked + .checkbox-ui::after {
  opacity: 1;
  transform: scale(1);
}

.forgot-link {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 10px;
  transition: background .2s ease, color .2s ease;
}

.forgot-link:hover {
  text-decoration: none;
  color: #0d8f82;
  background: rgba(31, 201, 179, .1);
}

.form-hint {
  margin: -4px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.ghost-form { margin-top: 10px; }

.login-button.is-ghost {
  color: #0d8f82;
  background: #fff;
  border: 1.5px solid rgba(13, 143, 130, .35);
  box-shadow: 0 8px 22px rgba(13, 143, 130, .08);
}

.login-button.is-ghost:hover {
  transform: translateY(-2px);
  color: #ffffff;
  background: linear-gradient(135deg, #0d8f82, #1fc9b3);
  border-color: transparent;
  box-shadow: 0 16px 35px rgba(31, 201, 179, .19);
}

.auth-toast-stack {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  width: min(440px, calc(100vw - 32px));
  pointer-events: none;
}

.error-message,
.info-message,
.success-message {
  display: none;
}

.error-message.show,
.info-message.show,
.success-message.show {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
  pointer-events: auto;
  box-shadow: 0 18px 44px rgba(6, 29, 30, .22);
  opacity: 0;
  transform: translateY(22px);
  animation: authToastIn .38s ease forwards;
}

.error-message.show.is-out,
.info-message.show.is-out,
.success-message.show.is-out {
  animation: authToastOut .36s ease forwards;
}

.error-message.show {
  color: #fff;
  background: #e25757;
}

.info-message.show,
.success-message.show {
  color: #06332e;
  background: linear-gradient(135deg, #8ef0e3, #1fc9b3);
}

@keyframes authToastIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes authToastOut {
  to { opacity: 0; transform: translateY(16px); }
}

.login-button {
  position: relative;
  width: 100%;
  height: 50px;
  margin-top: 3px;
  border: 0;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #0d8f82, #1fc9b3);
  box-shadow: 0 16px 35px rgba(31, 201, 179, .19);
  font-size: 15px;
  font-weight: 800;
  transition: transform .25s ease, box-shadow .25s ease;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(31, 201, 179, .26);
}

.login-button:active { transform: translateY(0); }
.login-button.loading { pointer-events: none; }
.login-button.loading .button-text,
.login-button.loading .button-arrow { opacity: 0; }

.login-spinner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .28);
  border-top-color: #ffffff;
  opacity: 0;
  animation: spin .7s linear infinite;
}

.login-button.loading .login-spinner { opacity: 1; }

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

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0;
  color: #9baaa9;
  font-size: 11px;
}

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

.demo-box {
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #effaf8, #f5fbfa);
  border: 1px solid rgba(31,201,179,.12);
}

.demo-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--primary-dark);
  background: white;
  box-shadow: 0 7px 18px rgba(4,74,68,.06);
}

.demo-content { flex: 1; }

.demo-content strong {
  display: block;
  color: var(--dark);
  font-size: 12px;
}

.demo-content span {
  display: block;
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 11px;
}

.demo-link {
  width: 35px;
  height: 35px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--primary-dark);
  background: white;
  font-size: 11px;
  transition: .2s;
}

.demo-link:hover { transform: translateX(2px); }

.form-footer {
  margin-top: 22px;
  text-align: center;
  color: #91a09f;
  font-size: 11px;
  line-height: 1.7;
}

.form-footer a {
  color: #0d8f82;
  font-weight: 700;
  transition: color .2s ease;
}
.form-footer a:hover { color: #1fc9b3; }

.login-button .button-arrow,
.login-button .button-text {
  color: inherit;
}


@media (max-width: 1280px) {
  .login-page { grid-template-columns: 1fr 1fr; }
  .brand-side { padding: 24px 32px 18px; }
  .brand-content h1 { font-size: clamp(22px, 2.2vw, 34px); letter-spacing: -1.1px; white-space: normal; }
  .brand-description { white-space: normal; }
  .preview-window { height: min(210px, 32vh); }
  .form-side { padding: 28px 32px; }
}

@media (max-width: 980px) {
  .login-page { grid-template-columns: 1fr 1fr; }
  .preview-window { height: min(190px, 28vh); }
}

@media (max-width: 850px) {
  html, body { height: auto; overflow: auto; }
  .login-page { display: block; height: auto; min-height: 100dvh; overflow: visible; }
  .brand-side { display: none; }
  .form-side {
    min-height: 100dvh;
    height: auto;
    overflow: visible;
    padding: 32px 24px;
    align-items: flex-start;
  }
  .form-container { max-width: 500px; margin: auto; }
  .mobile-logo { display: inline-flex; margin-top: 10px; }
  .form-header { margin-top: 36px; }
  .form-header h2 { font-size: 32px; }
  .brand-content h1 { white-space: normal; }
}

@media (max-width: 480px) {
  .form-side { padding: 24px 18px; }
  .mobile-logo { margin-top: 4px; margin-bottom: 30px; font-size: 22px; }
  .mobile-logo .logo-symbol { width: 39px; height: 39px; }
  .form-header { margin-top: 20px; margin-bottom: 30px; }
  .form-header h2 { font-size: 28px; letter-spacing: -1.2px; }
  .form-header p { font-size: 14px; }
  .form-input { height: 52px; font-size: 16px; }
  .form-options { align-items: flex-start; gap: 12px; }
  .remember { font-size: 12px; }
  .login-button { height: 52px; }
}

@media (max-width: 360px) {
  .form-side { padding-inline: 14px; }
  .form-options { flex-direction: column; }
}
