/* ============================================================
   BUSINESS DIAGNOSTIC PLATFORM — Login Page
   ============================================================ */

/* ── Shell split layout ─────────────────────────────────── */
.login-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Panels ─────────────────────────────────────────────── */
.login-panel {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

/* ── Left: Visual Panel ─────────────────────────────────── */
.login-panel-left {
  background: var(--color-bg-elevated);
  border-right: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.login-panel-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 20%, rgba(99,102,241,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 70% 80%, rgba(34,211,238,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.panel-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--space-8);
  width: 100%;
  position: relative;
  z-index: 1;
  gap: var(--space-8);
}

/* ── Panel Visual ───────────────────────────────────────── */
.panel-visual {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.panel-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  width: 100%;
  max-width: 340px;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(99,102,241,0.15);
}

.panel-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.panel-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.panel-kpi-label {
  font-size: 9px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.panel-kpi-val {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
}

/* ── Bars ───────────────────────────────────────────────── */
.panel-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.panel-bar-row {
  display: grid;
  grid-template-columns: 72px 1fr 28px;
  align-items: center;
  gap: var(--space-3);
}

.panel-bar-label {
  font-size: 10px;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.panel-bar-track {
  height: 6px;
  background: var(--color-bg-hover);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.panel-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.panel-bar-val {
  font-size: 10px;
  color: var(--color-text-muted);
  text-align: right;
  font-weight: 600;
}

/* ── Floating chips ─────────────────────────────────────── */
.panel-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}

.panel-chip-top {
  top: -12px;
  right: 0;
  animation: float 5s ease-in-out infinite;
  animation-delay: -1s;
}

.panel-chip-bottom {
  bottom: -12px;
  left: 0;
  animation: float 5s ease-in-out infinite;
  animation-delay: -3s;
}

.panel-chip-icon { font-style: normal; }

/* ── Quote ──────────────────────────────────────────────── */
.panel-quote {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.6;
  border-left: 2px solid var(--color-primary);
  padding-left: var(--space-4);
  max-width: 360px;
}

.panel-quote cite {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  font-style: normal;
  color: var(--color-text-muted);
  opacity: 0.7;
}

/* ── Right: Form Panel ──────────────────────────────────── */
.login-panel-right {
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-form-container {
  width: 100%;
  max-width: 420px;
  padding: var(--space-8) var(--space-6);
}

.login-controls {
  gap: var(--space-3);
}

/* ── Login Header ───────────────────────────────────────── */
.login-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2);
}

.login-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
}

/* ── Alert ──────────────────────────────────────────────── */
.login-alert {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
  animation: fadeInDown 0.3s ease both;
}

.alert-error {
  background: var(--color-error-bg);
  border: 1px solid rgba(239,68,68,0.25);
  color: var(--color-error);
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10b981;
}

.login-alert[hidden] { display: none; }

/* ── Forgot link ────────────────────────────────────────── */
.forgot-link {
  font-size: var(--text-sm);
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

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

/* ── Register redirect ──────────────────────────────────── */
.login-register {
  text-align: center;
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.login-register a {
  color: var(--color-primary);
  font-weight: 500;
  margin-left: 4px;
  transition: color var(--transition-fast);
}

.login-register a:hover { color: var(--color-info); }

/* ── Light Mode overrides ───────────────────────────────── */
[data-theme="light"] .login-panel-left {
  background: var(--color-bg-elevated);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-panel-left {
    display: none;
  }

  .login-form-container {
    padding: var(--space-6) var(--space-4);
  }
}
