:root {
  --lm-primary: #3B82F6;
  --lm-primary-soft: rgba(59, 130, 246, 0.12);
  --lm-secondary: #14B8A6;
  --lm-secondary-soft: rgba(20, 184, 166, 0.12);
  --lm-success: #22C55E;
  --lm-warning: #F59E0B;
  --lm-danger: #EF4444;
  --lm-gray: #F8FAFC;

  --lm-bg: #F8FAFC;
  --lm-bg-elevated: rgba(255, 255, 255, 0.78);
  --lm-surface: #FFFFFF;
  --lm-text: #0F172A;
  --lm-text-muted: #64748B;
  --lm-border: rgba(148, 163, 184, 0.28);
  --lm-shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
  --lm-radius: 1.25rem;
  --lm-radius-sm: 0.875rem;
  --lm-sidebar: 260px;
  --lm-content-max: 1560px;
  --lm-font: "Inter", system-ui, sans-serif;
  --lm-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --lm-nav-height: 64px;
}

[data-theme="dark"] {
  --lm-bg: #0B1220;
  --lm-bg-elevated: rgba(15, 23, 42, 0.78);
  --lm-surface: #111827;
  --lm-text: #F8FAFC;
  --lm-text-muted: #94A3B8;
  --lm-border: rgba(148, 163, 184, 0.2);
  --lm-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --lm-primary-soft: rgba(59, 130, 246, 0.22);
  --lm-secondary-soft: rgba(20, 184, 166, 0.2);
  --lm-gray: #0f172a;
  color-scheme: dark;
}

:root {
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--lm-font);
  color: var(--lm-text);
  background: var(--lm-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

.lm-glass {
  background: var(--lm-bg-elevated);
  border: 1px solid var(--lm-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--lm-shadow);
}

.lm-panel {
  background: var(--lm-surface);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius);
  box-shadow: var(--lm-shadow);
}

.lm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s var(--lm-ease), box-shadow 0.25s var(--lm-ease), background 0.25s var(--lm-ease);
}

.lm-btn:active {
  transform: scale(0.98);
}

.lm-btn-primary {
  background: linear-gradient(135deg, var(--lm-primary), #2563EB);
  color: #fff;
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.28);
}

.lm-btn-primary:hover {
  box-shadow: 0 14px 28px rgba(59, 130, 246, 0.35);
}

.lm-btn-ghost {
  background: transparent;
  color: var(--lm-text-muted);
  border: 1px solid var(--lm-border);
}

.lm-btn-block {
  width: 100%;
}

.lm-input {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border-radius: var(--lm-radius-sm);
  border: 1px solid var(--lm-border);
  background: var(--lm-surface);
  color: var(--lm-text);
  outline: none;
  transition: border-color 0.2s var(--lm-ease), box-shadow 0.2s var(--lm-ease);
}

.lm-input:focus {
  border-color: var(--lm-primary);
  box-shadow: 0 0 0 4px var(--lm-primary-soft);
}

.lm-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--lm-text-muted);
}

.lm-field {
  margin-bottom: 1rem;
}

.lm-alert {
  display: none;
  padding: 0.85rem 1rem;
  border-radius: var(--lm-radius-sm);
  font-size: 0.925rem;
  margin-bottom: 1rem;
}

.lm-alert.is-visible {
  display: block;
  animation: lm-fade-up 0.35s var(--lm-ease);
}

.lm-alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--lm-danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.lm-alert-success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--lm-success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.lm-brand {
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--lm-primary), var(--lm-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lm-muted {
  color: var(--lm-text-muted);
}

.lm-fade-in {
  /* Sem fill-mode "both": o transform residual quebrava position:fixed dos modais. */
  animation: lm-fade-up 0.5s var(--lm-ease);
}

@keyframes lm-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lm-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
