/* ===========================================================
   SIMDU — Login Page (vanilla HTML/CSS port)
   Bright, elegant, modern: white + blue + violet
   =========================================================== */

:root {
  --radius: 0.625rem;

  --background: oklch(0.99 0.005 270);
  --foreground: oklch(0.22 0.05 270);

  --primary: oklch(0.55 0.2 270);
  --primary-foreground: oklch(0.99 0.005 270);

  --accent-blue: oklch(0.62 0.18 250);
  --accent-violet: oklch(0.6 0.22 295);

  --muted-foreground: oklch(0.5 0.03 270);
  --border: oklch(0.92 0.015 270);

  --gradient-brand: linear-gradient(135deg, oklch(0.62 0.18 250), oklch(0.6 0.22 295));
  --gradient-mesh:
    radial-gradient(at 20% 20%, oklch(0.85 0.12 260 / 0.55) 0px, transparent 55%),
    radial-gradient(at 80% 0%, oklch(0.85 0.14 295 / 0.50) 0px, transparent 55%),
    radial-gradient(at 80% 90%, oklch(0.88 0.10 240 / 0.55) 0px, transparent 55%),
    radial-gradient(at 10% 90%, oklch(0.90 0.08 285 / 0.50) 0px, transparent 55%);

  --shadow-elegant: 0 20px 60px -20px oklch(0.55 0.2 275 / 0.35);
  --shadow-card: 0 10px 40px -15px oklch(0.50 0.15 270 / 0.25);

  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }

/* ---------- Page shell ---------- */
.page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--background);
}

/* ---------- Background layers ---------- */
.bg-mesh {
  position: absolute; inset: 0;
  background-image: var(--gradient-mesh);
  pointer-events: none;
}
.bg-grid {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image:
    linear-gradient(var(--foreground) 1px, transparent 1px),
    linear-gradient(90deg, var(--foreground) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.bg-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(80px);
  will-change: transform;
  pointer-events: none;
}
.orb-1 {
  top: -10%; left: -8%;
  width: 32rem; height: 32rem;
  background: radial-gradient(circle, oklch(0.78 0.16 260 / 0.55), transparent 60%);
}
.orb-2 {
  bottom: -15%; right: -10%;
  width: 36rem; height: 36rem;
  background: radial-gradient(circle, oklch(0.78 0.18 295 / 0.50), transparent 60%);
  animation-delay: -4s;
}
.orb-3 {
  top: 30%; right: 18%;
  width: 20rem; height: 20rem;
  background: radial-gradient(circle, oklch(0.82 0.14 240 / 0.45), transparent 60%);
  animation-delay: -8s;
}
.bg-shimmer {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 45%, oklch(1 0 0 / 0.2) 100%);
}

/* ---------- Drifting icons ---------- */
.drift-layer {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.drift-icon {
  position: absolute;
  bottom: -5rem;
  width: var(--size, 48px);
  height: var(--size, 48px);
  color: oklch(0.55 0.2 270 / 0.30);
  animation: drift linear infinite;
  animation-duration: var(--duration, 30s);
  animation-delay: var(--delay, 0s);
  display: inline-block;
}
.drift-icon svg { width: 100%; height: 100%; }

/* ---------- Animations ---------- */
@keyframes float-slow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -40px) scale(1.08); }
}
@keyframes float-slower {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 30px) scale(1.05); }
}
@keyframes drift {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.7; }
  100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}
@keyframes grid-pan {
  0% { background-position: 0 0; }
  100% { background-position: 48px 48px; }
}
@keyframes shimmer {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.7; }
}
.animate-float-slow { animation: float-slow 14s ease-in-out infinite; }
.animate-float-slower { animation: float-slower 18s ease-in-out infinite; }
.animate-grid-pan { animation: grid-pan 20s linear infinite; }
.animate-shimmer { animation: shimmer 6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .animate-float-slow,
  .animate-float-slower,
  .animate-grid-pan,
  .animate-shimmer,
  .drift-icon { animation: none !important; }
}

/* ---------- Layout ---------- */
.layout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}
@media (min-width: 1024px) {
  .layout { grid-template-columns: 1fr 1fr; }
}

/* ---------- Brand panel ---------- */
.brand-panel {
  position: relative;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
}
@media (min-width: 1024px) {
  .brand-panel { display: flex; }
}

.brand-logo { display: inline-flex; align-items: center; gap: 0.75rem; }
.brand-logo-mark {
       display: inline-flex;
    /* align-items: center; */
    /* justify-content: center; */
    width: 10rem;
    /* height: 13.75rem; */
    border-radius: 0.75rem;
    /* color: var(--primary-foreground); */
    /* background: var(--gradient-brand); */
    /* box-shadow: 0 10px 25px -10px oklch(0.55 0.2 275 / 0.5); */
    margin-bottom: 15px;
}
.brand-logo-mark.sm { width: 2.5rem; height: 2.5rem; border-radius: 0.75rem; }
.brand-logo-mark svg { width: 1.5rem; height: 1.5rem; }
.brand-logo-mark.sm svg { width: 1.25rem; height: 1.25rem; }
.brand-logo-text { line-height: 1.1; }
.brand-name { margin: 0; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; color: var(--foreground); }
.brand-name.sm { font-size: 1rem; }
.brand-tag { margin: 0.15rem 0 0; font-size: 0.75rem; color: var(--muted-foreground); }

.brand-content { max-width: 28rem; display: flex; flex-direction: column; gap: 2rem; }

.pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  background: oklch(1 0 0 / 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.75rem; font-weight: 500;
  color: var(--muted-foreground);
  width: fit-content;
}
.pill-icon { width: 0.875rem; height: 0.875rem; color: var(--accent-violet); }

.hero-title {
  font-size: 2.25rem; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em;
  margin: 0; color: var(--foreground);
}
.hero-gradient {
  background-image: var(--gradient-brand);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-desc {
  margin: 0; font-size: 1rem; line-height: 1.6; color: var(--muted-foreground);
}

.modules {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.75rem;
}
@media (min-width: 640px) { .modules { grid-template-columns: repeat(3, 1fr); } }

.module-card {
  border-radius: 0.75rem;
  padding: 1rem;
  border: 1px solid oklch(1 0 0 / 0.6);
  background: oklch(1 0 0 / 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}
.module-card:hover { transform: translateY(-2px); }
.module-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-foreground);
  background: var(--gradient-brand);
}
.module-icon svg { width: 1.25rem; height: 1.25rem; }
.module-title { margin: 0; font-size: 0.875rem; font-weight: 600; color: var(--foreground); }
.module-desc { margin: 0.15rem 0 0; font-size: 0.75rem; line-height: 1.35; color: var(--muted-foreground); }

.copyright { font-size: 0.75rem; color: var(--muted-foreground); margin: 0; }

/* ---------- Form panel ---------- */
.form-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
@media (min-width: 640px) { .form-panel { padding: 2.5rem; } }
.form-wrap { width: 100%; max-width: 28rem; }

.brand-mobile {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 2rem;
}
@media (min-width: 1024px) { .brand-mobile { display: none; } }

.card {
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid oklch(1 0 0 / 0.6);
  background: oklch(1 0 0 / 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-elegant);
}
.card-header { margin-bottom: 1.75rem; }
.card-title { margin: 0 0 0.35rem; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; color: var(--foreground); }
.card-desc { margin: 0; font-size: 0.875rem; color: var(--muted-foreground); }

.form { display: flex; flex-direction: column; gap: 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.label { font-size: 0.875rem; font-weight: 500; color: var(--foreground); }
.label-row { display: flex; align-items: center; justify-content: space-between; }
.link-sm { font-size: 0.75rem; font-weight: 500; color: var(--primary); transition: color .2s; }
.link-sm:hover { color: var(--accent-violet); }

.input-wrap { position: relative; }
.input-icon {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  width: 1rem; height: 1rem; color: var(--muted-foreground);
  pointer-events: none;
}
.input {
  width: 100%;
  height: 2.75rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  background: oklch(1 0 0 / 0.8);
  font-size: 0.875rem;
  color: var(--foreground);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
  font-family: inherit;
}
.input::placeholder { color: var(--muted-foreground); }
.input.has-icon-left { padding-left: 2.5rem; }
.input.has-icon-right { padding-right: 2.5rem; }
.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px oklch(0.55 0.2 270 / 0.30);
}

.input-toggle {
  position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 0;
  color: var(--muted-foreground);
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .2s;
}
.input-toggle:hover { color: var(--foreground); }
.input-toggle svg { width: 1rem; height: 1rem; }

/* Checkbox */
.remember {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; color: var(--muted-foreground);
  cursor: pointer; user-select: none;
}
.remember input { position: absolute; opacity: 0; pointer-events: none; }
.checkbox {
  width: 1rem; height: 1rem;
  border-radius: 0.25rem;
  border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  background: oklch(1 0 0 / 0.8);
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent;
  transition: var(--transition-smooth);
}
.checkbox svg { width: 0.7rem; height: 0.7rem; }
.remember input:checked + .checkbox {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 2.75rem; width: 100%;
  border-radius: 0.5rem;
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  transition: var(--transition-smooth);
  font-family: inherit;
}
.btn-primary {
  background: var(--gradient-brand);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-card);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-outline {
  background: oklch(1 0 0 / 0.8);
  color: var(--foreground);
  border-color: color-mix(in oklab, var(--border) 70%, transparent);
  font-weight: 500;
}
.btn-outline:hover { background: oklch(1 0 0 / 1); }
.btn-icon { width: 1rem; height: 1rem; margin-right: 0.5rem; }

/* Divider */
.divider {
  position: relative; padding: 0.25rem 0;
  display: flex; align-items: center; justify-content: center;
}
.divider::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  border-top: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
}
.divider span {
  position: relative; padding: 0 0.75rem;
  font-size: 0.75rem; color: var(--muted-foreground);
  background: transparent;
}

.card-footer {
  margin: 1.75rem 0 0; text-align: center;
  font-size: 0.875rem; color: var(--muted-foreground);
}
.link {
  font-weight: 600; color: var(--primary); transition: color .2s;
}
.link:hover { color: var(--accent-violet); }

.security-note {
  margin: 1.5rem 0 0; text-align: center;
  font-size: 0.75rem; color: var(--muted-foreground);
}