/* Klurios — authentication screens (sign in, password reset).
   Layout mirrors the INSPINIA "auth-2" split card; styling is self-contained
   and brand-driven so it carries no dependency on the full theme bundle. */

:root {
  --k-cyan: #22d3ee;
  --k-blue: #2563eb;
  --k-ink: #0f172a;
  --k-muted: #64748b;
  --k-border: #e2e8f0;
  --k-bg: #f1f5f9;
  --k-field-bg: #f8fafc;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100vh;
}

body.k-auth {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--k-ink);
  background:
    radial-gradient(1100px 600px at 12% -10%, #e0f2fe 0%, transparent 55%),
    radial-gradient(900px 500px at 110% 120%, #eef2ff 0%, transparent 50%),
    var(--k-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}

.k-card {
  width: 100%;
  max-width: 960px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.25), 0 8px 24px -12px rgba(15, 23, 42, 0.15);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ---- Form side ---- */
.k-form-side {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.k-brand {
  margin-bottom: 28px;
}

.k-brand img {
  height: 38px;
  width: auto;
}

.k-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.k-subtitle {
  color: var(--k-muted);
  font-size: 0.95rem;
  margin: 0 0 28px;
}

.k-field { margin-bottom: 18px; }

.k-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: #334155;
}

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

.k-input-group .k-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--k-muted);
  pointer-events: none;
}

.k-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-size: 0.95rem;
  color: var(--k-ink);
  background: var(--k-field-bg);
  border: 1px solid var(--k-border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.k-input::placeholder { color: #94a3b8; }

.k-input:focus {
  background: #fff;
  border-color: var(--k-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.k-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 24px;
  font-size: 0.85rem;
}

.k-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475569;
}

.k-link {
  color: var(--k-blue);
  text-decoration: none;
  font-weight: 600;
}
.k-link:hover { text-decoration: underline; }

.k-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 18px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--k-cyan) 0%, var(--k-blue) 60%, #1e3a8a 100%);
  box-shadow: 0 10px 20px -8px rgba(37, 99, 235, 0.6);
  transition: transform 0.06s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.k-btn:hover { filter: brightness(1.04); box-shadow: 0 14px 26px -8px rgba(37, 99, 235, 0.65); }
.k-btn:active { transform: translateY(1px); }

.k-footer {
  margin-top: 26px;
  text-align: center;
  color: var(--k-muted);
  font-size: 0.85rem;
}

/* ---- Flash messages ---- */
.k-flash {
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 0.88rem;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.k-flash--alert { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.k-flash--notice { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }

/* ---- Brand panel side ---- */
.k-panel-side {
  position: relative;
  padding: 48px 44px;
  color: #fff;
  background: linear-gradient(150deg, #06b6d4 0%, #2563eb 55%, #1e3a8a 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.k-panel-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(420px 320px at 80% 8%, rgba(255, 255, 255, 0.18), transparent 60%),
    radial-gradient(380px 300px at 0% 100%, rgba(255, 255, 255, 0.12), transparent 55%);
  pointer-events: none;
}

.k-panel-logo {
  position: relative;
  z-index: 1;
  height: 32px;
  width: auto;
}

.k-panel-figure {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 0;
}

.k-panel-illustration {
  width: 100%;
  max-width: 360px;
  filter: drop-shadow(0 22px 42px rgba(2, 8, 35, 0.35));
}

.k-panel-content {
  position: relative;
  z-index: 1;
}

.k-panel-tagline {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  text-shadow: 0 2px 12px rgba(2, 8, 35, 0.35);
}

.k-panel-sub {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 8px rgba(2, 8, 35, 0.3);
}

/* ---- Language selector ---- */
.k-locale-switcher {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 10;
  display: flex;
  gap: 2px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--k-border);
  border-radius: 999px;
  box-shadow: 0 6px 18px -10px rgba(15, 23, 42, 0.25);
}

.k-locale {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--k-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.k-locale:hover { color: var(--k-ink); }
.k-locale--active {
  color: #fff;
  background: linear-gradient(135deg, var(--k-cyan), var(--k-blue));
}

/* ---- Responsive ---- */
@media (max-width: 820px) {
  .k-card { grid-template-columns: 1fr; max-width: 460px; }
  .k-panel-side { display: none; }
  .k-form-side { padding: 40px 30px; }
  .k-locale-switcher { top: 12px; right: 12px; }
}
