/* ── AUTH.CSS ── */

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

:root {
  --green-primary: #1db97a;
  --green-light: #25d48a;
  --green-dark: #17a368;
  --green-glow: rgba(29, 185, 122, 0.35);
  --dark-bg: #0e1117;
  --dark-card: #161b25;
  --dark-border: rgba(255,255,255,0.08);
  --dark-input: #1c2333;
  --dark-input-border: rgba(255,255,255,0.1);
  --dark-input-focus: rgba(29,185,122,0.4);
  --text-primary: #f0f4f8;
  --text-secondary: #8a95a3;
  --text-muted: #5c6672;
  --error: #f04040;
  --success: #1db97a;
  --font-main: 'Sora', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

html, body {
  height: 100%;
  font-family: var(--font-body);
  background: var(--dark-bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ── LAYOUT ── */

.login-layout {
  display: flex;
  min-height: 100vh;
}

/* ── LEFT PANEL ── */

.login-left {
  flex: 0 0 48%;
  background: linear-gradient(145deg, #1bc47a 0%, #14a065 45%, #0e8a52 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 3rem 3rem;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0,0,0,0.15) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.login-left::after {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
  top: -80px;
  left: -80px;
  pointer-events: none;
}

.left-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  position: relative;
  z-index: 1;

}

.left-brand-icon {
  width: 36px;
  height: 36px;
  background: #111726;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  color: #2cf0a1; /* or whatever your design uses */
  fill: currentColor;
}

.left-brand-icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.left-brand-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.2;
  padding-left: 8px;
}

.left-hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0 1rem;
}

.left-hero h2 {
  font-family: var(--font-main);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  max-width: 360px;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.left-hero p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(255,255,255,0.78);
  max-width: 320px;
  line-height: 1.6;
}

/* Dashboard mock illustration */

.dashboard-mock {
  margin-top: 2.5rem;
  background: rgba(0,0,0,0.2);
  border-radius: 14px;
  padding: 1.2rem;
  max-width: 400px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.1);
}

.mock-topbar {
  display: flex;
  gap: 6px;
  margin-bottom: 1rem;
}

.mock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.mock-dot.red    { background: #ff5f57; }
.mock-dot.yellow { background: #febc2e; }
.mock-dot.green  { background: #28c840; }

.mock-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mock-line {
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.15);
}

.mock-line.w80 { width: 80%; }
.mock-line.w55 { width: 55%; }

.mock-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 1rem;
  height: 70px;
}

.mock-bar {
  flex: 1;
  border-radius: 5px 5px 0 0;
  background: rgba(255,255,255,0.18);
}

.mock-bar.b1 { height: 45%; }
.mock-bar.b2 { height: 70%; }
.mock-bar.b3 { height: 55%; }
.mock-bar.b4 { height: 90%; background: rgba(255,255,255,0.35); }
.mock-bar.b5 { height: 60%; }

.left-footer {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}

.left-footer a {
  color: rgba(255,255,255,0.7);
  text-decoration: underline;
}

/* ── RIGHT PANEL ── */

.login-right {
  flex: 1;
  background: var(--dark-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.login-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.lang-selector {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 5;
  font-family: var(--font-body);
}

.lang-selector svg {
  width: 15px;
  height: 15px;
  opacity: 0.7;
}

/* ── LOGIN CARD ── */

.login-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 18px;
  padding: 2.6rem 2.8rem;
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
  animation: cardIn 0.5s cubic-bezier(0.22,1,0.36,1) both;
}

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

.card-heading h1 {
  font-family: var(--font-main);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  margin-bottom: 0.3rem;
}

.card-heading p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.8rem;
}

/* ── ALERT MESSAGES ── */

.auth-message-box {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.84rem;
  margin-bottom: 1.2rem;
  font-family: var(--font-body);
}

.auth-error-box {
  background: rgba(240,64,64,0.12);
  border: 1px solid rgba(240,64,64,0.3);
  color: #f47b7b;
}

.auth-success-box {
  background: rgba(29,185,122,0.12);
  border: 1px solid rgba(29,185,122,0.3);
  color: #4dd9a2;
}

/* ── FORM ── */

.form-group { margin-bottom: 1.1rem; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
  letter-spacing: 0.01em;
  font-family: var(--font-main);
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.9rem;
  color: var(--text-muted);
  display: flex;
  pointer-events: none;
}

.input-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

.form-input {
  width: 100%;
  background: var(--dark-input);
  border: 1px solid var(--dark-input-border);
  border-radius: 10px;
  padding: 0.72rem 0.9rem 0.72rem 2.6rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px var(--dark-input-focus);
}

.form-input.has-toggle { padding-right: 2.8rem; }
.form-input.is-error   { border-color: rgba(240,64,64,0.6); }

.input-toggle {
  position: absolute;
  right: 0.85rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  padding: 0;
  transition: color 0.15s;
}

.input-toggle:hover { color: var(--text-secondary); }
.input-toggle svg   { width: 16px; height: 16px; }

.hidden { display: none; }

.error-text {
  font-size: 0.76rem;
  color: #f47b7b;
  margin-top: 0.35rem;
}

.forgot-link {
  font-size: 0.78rem;
  color: var(--green-primary);
  text-decoration: none;
  font-family: var(--font-body);
  transition: color 0.15s;
}

.forgot-link:hover { color: var(--green-light); }

.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.9rem 0 1.4rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-body);
}

.checkbox-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--green-primary);
  cursor: pointer;
}

/* ── BUTTONS ── */

.btn-signin {
  width: 100%;
  padding: 0.82rem;
  background: var(--green-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  box-shadow: 0 4px 20px var(--green-glow);
}

.btn-signin:hover {
  background: var(--green-light);
  box-shadow: 0 6px 28px var(--green-glow);
}

.btn-signin:active { transform: scale(0.985); }

.divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.2rem 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: var(--font-body);
}

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

.btn-google {
  width: 100%;
  padding: 0.78rem;
  background: transparent;
  border: 1px solid var(--dark-input-border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: var(--font-main);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: background 0.2s, border-color 0.2s;
}

.btn-google:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.18);
}

.google-icon { width: 17px; height: 17px; }

/* Success icon */

.success-icon {
  width: 52px;
  height: 52px;
  background: var(--green-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.4rem;
  box-shadow: 0 0 0 8px rgba(29, 185, 122, 0.12);
}

.success-icon svg {
  width: 22px;
  height: 22px;
}

/* ── CARD FOOTER ── */

.card-footer {
  text-align: center;
  margin-top: 1.6rem;
  font-size: 0.83rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.card-footer a {
  color: var(--green-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.card-footer a:hover { color: var(--green-light); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.83rem;
  font-family: var(--font-body);
  transition: color 0.15s;
}

.back-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s;
}

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

.back-link:hover svg {
  transform: translateX(-3px);
}

.right-footer {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  font-family: var(--font-body);
  white-space: nowrap;
  z-index: 1;
}

.right-footer a {
  color: var(--green-primary);
  text-decoration: none;
}

/* Password hint */

.password-requirements {
  list-style: none;
  padding: 0.75rem 1rem;
  margin-bottom: 1.2rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--dark-border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.password-requirements li {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  padding-left: 1.1rem;
  position: relative;
}

.password-requirements li::before {
  content: '·';
  position: absolute;
  left: 0.3rem;
  color: var(--green-primary);
  font-size: 1rem;
  line-height: 1;
  top: 0.05rem;
}

.password-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-family: var(--font-body);
}

.left-brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;

}

/* ── RESPONSIVE ── */

@media (max-width: 860px) {
  .login-left { display: none; }
  .login-right { justify-content: center; }
}
