/* General login layout and components – include on any web_login*.php page.
   Theme files (e.g. web_login_aimia.css, web_login_patrice-ia.css) override :root and accent rules. */

:root {
  --midnight: #080c18;
  --deep-navy: #0d1526;
  --navy: #111d35;
  --navy-light: #172240;
  --rose-gold: #c9967a;
  --rose-light: #e8c4b0;
  --rose-pale: #f5ede8;
  --champagne: #f0dfd6;
  --electric: #4a80d4;
  --electric-glow: #6499ee;
  --text-primary: #f0e8e0;
  --text-secondary: #9aabbf;
  --text-muted: #526070;
  --border: rgba(201, 150, 122, 0.18);
  --border-focus: rgba(201, 150, 122, 0.6);
  --card-bg: rgba(13, 21, 38, 0.9);
  --input-bg: rgba(23, 34, 64, 0.8);
  --accent-rgb: 201, 150, 122;
  --electric-rgb: 74, 128, 212;
  --btn-gradient-start: #b8856d;
  --btn-gradient-mid: #c9967a;
  --btn-gradient-end: #d4a48c;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Outfit', sans-serif;
  background-color: #080c18 !important;
  color: var(--text-primary);
  overflow-x: hidden;
}

.panel-left #canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background-color: #080c18 !important;
}

.panel-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px 60px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #0a1020 0%, #0d1831 50%, #0f1a35 100%);
  border-right: 1px solid var(--border);
}

.panel-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 30%, rgba(var(--electric-rgb), 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 80% 80%, rgba(var(--accent-rgb), 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.panel-left::after {
  content: '';
  position: absolute;
  top: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--electric-rgb), 0.06) 0%, transparent 70%);
  animation: pulse-slow 8s ease-in-out infinite;
}

@keyframes pulse-slow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  animation: fadeDown 0.8s ease both;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--electric) 0%, var(--rose-gold) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(var(--electric-rgb), 0.3);
}

.logo-icon svg {
  width: 24px;
  height: 24px;
  fill: white;
}

.logo-text { line-height: 1; }

.logo-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-primary);
}

.logo-tag {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose-gold);
  margin-top: 2px;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 0 40px;
  animation: fadeUp 1s ease 0.2s both;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose-gold);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--rose-gold);
  opacity: 0.7;
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(38px, 4vw, 52px);
  font-weight: 300;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.hero-title em {
  font-style: italic;
  color: var(--rose-light);
}

.hero-subtitle {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 380px;
  margin-top: 20px;
  margin-bottom: 40px;
}

.stats-row { display: flex; gap: 32px; }

.stat {
  border-left: 1px solid var(--border);
  padding-left: 16px;
}

.stat-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--rose-light);
  line-height: 1;
}

.stat-label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(var(--electric-rgb), 0.1);
  border: 1px solid rgba(var(--electric-rgb), 0.25);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--electric-glow);
  margin-bottom: 24px;
  width: fit-content;
}

.ai-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--electric-glow);
  border-radius: 50%;
  animation: blink 2s ease infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--electric-glow); }
  50% { opacity: 0.4; box-shadow: none; }
}

.panel-footer {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
  animation: fadeUp 1s ease 0.5s both;
}

.panel-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.panel-footer a:hover { color: var(--rose-light); }

.panel-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 60px;
  background: linear-gradient(170deg, #0c1422 0%, #080c18 100%);
  position: relative;
}

.panel-right::before {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.05) 0%, transparent 70%);
  animation: pulse-slow 10s ease-in-out 3s infinite;
}

.form-card {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  margin-top: 20px;
}

.form-header {
  margin-bottom: 36px;
  animation: fadeDown 0.8s ease 0.1s both;
}

.form-welcome {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rose-gold);
  margin-bottom: 10px;
}

.form-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.2;
}

.form-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
  font-weight: 300;
  line-height: 1.6;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: fadeUp 0.8s ease 0.25s both;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.field-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 16px;
  pointer-events: none;
  color: var(--text-muted);
  transition: color 0.3s;
  display: flex;
  align-items: center;
}

.field-wrap:focus-within .field-icon { color: var(--rose-gold); }

.field-input {
  width: 100%;
  height: 52px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 16px 0 44px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
  -webkit-appearance: none;
}

.field-input::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

.field-input:focus {
  background: rgba(23, 34, 64, 1);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.07), 0 0 12px rgba(var(--accent-rgb), 0.1);
}

.toggle-pass {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color 0.2s;
}

.toggle-pass:hover { color: var(--rose-gold); }

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.checkbox-input { display: none; }

.checkbox-custom {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.checkbox-input:checked + .checkbox-custom {
  background: linear-gradient(135deg, var(--rose-gold), var(--electric));
  border-color: transparent;
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.35);
}

.checkbox-input:checked + .checkbox-custom::after {
  content: '';
  width: 10px;
  height: 7px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translateY(-1px);
  display: block;
}

.checkbox-label {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-secondary);
  user-select: none;
}

.forgot-link {
  font-size: 13px;
  font-weight: 400;
  color: var(--rose-gold);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}

.forgot-link:hover { color: var(--rose-light); }

.btn-submit {
  width: 100%;
  height: 54px;
  background: linear-gradient(135deg, var(--btn-gradient-start) 0%, var(--btn-gradient-mid) 40%, var(--btn-gradient-end) 100%);
  border: none;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.25);
  margin-bottom: 6px;
}

.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
}

.btn-submit::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: rgba(255,255,255,0.15);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}

.btn-submit:hover::after { left: 130%; }

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(var(--accent-rgb), 0.35);
  filter: brightness(1.05);
}

.btn-submit:active { transform: translateY(0px); }

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider-text {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.register-wrap {
  text-align: center;
  animation: fadeUp 0.8s ease 0.5s both;
}

.register-text {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-secondary);
}

.register-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--rose-gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.3);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
  margin-left: 5px;
}

.register-link:hover {
  color: var(--rose-light);
  border-color: var(--rose-light);
}

.form-foot {
  margin-top: 36px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.7;
  animation: fadeUp 0.8s ease 0.6s both;
}

.form-foot a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.form-foot a:hover { color: var(--text-secondary); }

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.geo-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  border: 1px solid rgba(var(--accent-rgb), 0.08);
}

.geo-1 {
  width: 320px;
  height: 320px;
  bottom: 80px;
  left: -100px;
  animation: rotate-slow 30s linear infinite;
}

.geo-2 {
  width: 200px;
  height: 200px;
  bottom: 130px;
  left: -50px;
  border-color: rgba(var(--electric-rgb), 0.07);
  animation: rotate-slow 20s linear infinite reverse;
}

.geo-top {
  width: 260px;
  height: 260px;
  top: -80px;
  right: 60px;
  border-color: rgba(var(--accent-rgb), 0.06);
  animation: rotate-slow 25s linear infinite;
}

@keyframes rotate-slow { to { transform: rotate(360deg); } }

@media (max-width: 960px) {
  .page { grid-template-columns: 1fr; }
  .panel-left { display: none; }
  .panel-right {
    padding: 40px 28px;
    min-height: 100vh;
    align-items: center;
    justify-content: flex-start;
    padding-top: 60px;
  }
  .panel-right-top { left: 28px; right: 28px; }
  .form-card { max-width: 400px; width: 100%; }
  .panel-right .mobile-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    animation: fadeDown 0.8s ease both;
  }
}

@media (min-width: 961px) {
  .panel-right .mobile-logo { display: none; }
}

@media (max-width: 480px) {
  .panel-right { padding: 32px 20px; }
  .panel-right-top { left: 20px; right: 20px; }
  .form-title { font-size: 26px; }
}

.field-input:-webkit-autofill,
.field-input:-webkit-autofill:hover,
.field-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 100px #172240 inset;
  -webkit-text-fill-color: var(--text-primary);
  border-color: var(--border);
  caret-color: var(--text-primary);
}

.panel-right-top {
  position: absolute;
  top: 20px;
  left: 60px;
  right: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.lang-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-select-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lang-select {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 28px 6px 10px;
  font-size: 12px;
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.lang-select:hover,
.lang-select:focus { border-color: var(--border-focus); }

.ai-powered {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ai-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--electric-glow);
  animation: blink 2.5s ease infinite;
}

.login-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.login-tabs .nav-link {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  padding: 10px 16px;
  border: none;
  background: none;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}

.login-tabs .nav-link:hover { color: var(--text-primary); }

.login-tabs .nav-link.active {
  color: var(--rose-gold);
  border-bottom-color: var(--rose-gold);
}

.tab-pane { display: none; }
.tab-pane.show { display: block; }

.form-msg {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.form-msg ul { margin: 0; padding-left: 18px; }

.social-auth-wrap {
  margin-bottom: 20px;
  text-align: center;
}

.social-auth-wrap .btn-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 10px;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text-primary);
  transition: background 0.2s, border-color 0.2s;
}

.social-auth-wrap .btn-social:hover {
  background: var(--navy-light);
  border-color: var(--border-focus);
  color: var(--text-primary);
}

.login_txt_or {
  display: block;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 20px 0 16px;
}

.disabledlogin {
  pointer-events: none !important;
  opacity: 0.4 !important;
}
