:root {
  --bg-app: #070c17;
  --bg-surface: #0c1527;
  --bg-card: #0e1a30;
  --bg-input: #080f1e;
  --border: #172a47;
  --border-strong: #1e3256;
  --text-main: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-dim: #546887;
  --accent: #10b981;
  --accent-strong: #0d8f66;
  --accent-soft: #34d399;
  --blue: #2563eb;
  --red: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
    sans-serif;
  background:
    radial-gradient(900px 520px at 50% -12%, rgba(16, 185, 129, 0.16) 0%, rgba(37, 99, 235, 0.1) 42%, transparent 75%),
    linear-gradient(180deg, #081120 0%, #070c17 55%, #060a14 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[hidden] {
  display: none !important;
}

/* ---------- Acceso ---------- */
.view {
  min-height: 100vh;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.login-brand {
  text-align: center;
  margin-bottom: 22px;
}

.login-logo {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 16px;
  background: linear-gradient(135deg, #10b981 0%, #0d8f66 100%);
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.32);
}

.login-title {
  font-size: 24px;
  color: #f8fafc;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.login-title span {
  color: var(--accent-soft);
  font-weight: 700;
}

.login-subtitle {
  color: var(--text-secondary);
  margin-top: 8px;
  font-size: 14px;
}

.login-card {
  width: min(420px, 100%);
  background: rgba(12, 21, 39, 0.92);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(2, 6, 16, 0.55);
  padding: 30px;
}

.login-hint {
  color: var(--text-secondary);
  font-size: 13.5px;
  margin-bottom: 20px;
}

.alert {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  font-size: 13px;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 18px;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  height: 42px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: #f1f5f9;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
  color: #3d4f6d;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.login-footer {
  color: var(--text-dim);
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  width: 100%;
  height: 42px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #0d8f66 100%);
  border-color: #10b981;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.38);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-link {
  width: 100%;
  margin-top: 10px;
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-link:hover {
  color: var(--text-main);
}

.btn-ghost {
  height: 34px;
  padding: 0 14px;
  color: var(--text-secondary);
  background: transparent;
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

.btn-lg {
  width: auto;
  height: 48px;
  padding: 0 26px;
  font-size: 15px;
  text-decoration: none;
}

/* ---------- Landing ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(7, 12, 23, 0.75);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-brand .login-logo {
  width: 36px;
  height: 36px;
  margin: 0;
  border-radius: 10px;
  font-size: 0;
}

.site-title {
  font-size: 16px;
  color: #f8fafc;
}

.site-title strong {
  color: var(--accent-soft);
}

.site-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-email {
  color: var(--text-secondary);
  font-size: 13px;
}

.landing-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  text-align: center;
  padding: 84px 0 56px;
}

.hero-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-soft);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
  color: #f8fafc;
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 760px;
  margin: 0 auto;
}

.hero-title span {
  color: var(--accent-soft);
}

.hero-text {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 560px;
  margin: 18px auto 30px;
}

.hero-note {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 14px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  padding: 24px 0 72px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 24px;
  margin-bottom: 12px;
}

.feature-title {
  font-size: 16px;
  color: #f1f5f9;
  margin-bottom: 8px;
}

.feature-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
  padding: 24px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

@media (max-width: 560px) {
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-user {
    width: 100%;
    justify-content: space-between;
  }
}
