/* Vida y Tiempo en Orden — visual system v4 (azul cielo / coral)
   Tokens centralizados. Sin frameworks. */

:root {
  /* ——— Design tokens (dorado pre-DreamHost + texto navy) ——— */
  --primary: #c5933a;
  --primary-hover: #a67c00;
  --primary-active: #8c6900;
  --primary-soft: rgba(197, 147, 58, 0.16);
  --primary-glow: rgba(197, 147, 58, 0.28);
  --primary-2: #e0b45a;
  --secondary: #7b8387;
  --accent: #c5933a;
  --accent-2: #e0b45a;
  --accent-hover: #a67c00;
  --accent-soft: rgba(197, 147, 58, 0.16);
  --accent-glow: rgba(197, 147, 58, 0.28);
  --background: #f7f1e4;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-muted: #efe6d4;
  --surface-2: rgba(243, 234, 215, 0.92);
  --text: #26344f;
  --text-muted: #7b8387;
  --ink: #26344f;
  --ink-soft: #3d4a63;
  --muted: #7b8387;
  --muted-gold: #a67c00;
  --border: #e2d4b5;
  --border-strong: #c9b484;
  --success: #2f9e6f;
  --success-soft: #e5f6ee;
  --warning: #9a6a10;
  --warning-soft: #fff0e8;
  --danger: #b33a3a;
  --danger-soft: #f9ecec;
  --info: #3d5a80;
  --info-soft: #e7f1f9;
  --sidebar-bg: #0d2137;
  --sidebar-text: #e8eef5;
  --sidebar-muted: #9aa6b5;
  --tile-hoy: #5b9fd4;
  --tile-inbox: #2f9e6f;
  --tile-tasks: #7b5ea7;
  --tile-goals: #c5933a;
  --tile-finance: #2a9d8f;
  --tile-avisos: #3d5a80;
  --gradient-gold: linear-gradient(
    90deg,
    #c5933a 0%,
    #e0b45a 35%,
    #c5933a 50%,
    #e0b45a 65%,
    #c5933a 100%
  );
  --gradient-gold-btn: linear-gradient(
    90deg,
    #a67c00 0%,
    #c5933a 35%,
    #e0b45a 50%,
    #c5933a 65%,
    #a67c00 100%
  );
  --gradient-gold-btn-dual: linear-gradient(
    90deg,
    #a67c00 0%,
    #e0b45a 18%,
    #c5933a 36%,
    #a67c00 50%,
    #c5933a 64%,
    #e0b45a 82%,
    #a67c00 100%
  );
  --gradient-gold-coin: linear-gradient(
    145deg,
    #e0b45a 0%,
    #c5933a 45%,
    #a67c00 100%
  );
  --gold-frame: #c5933a;
  --gold-edge: rgba(197, 147, 58, 0.45);
  --shadow-gold: 0 3px 8px rgba(38, 52, 79, 0.08), 0 10px 22px rgba(197, 147, 58, 0.2);
  --shadow: 0 1px 2px rgba(26, 26, 26, 0.04), 0 14px 36px rgba(26, 26, 26, 0.07);
  --shadow-sm: 0 1px 2px rgba(26, 26, 26, 0.04), 0 6px 16px rgba(26, 26, 26, 0.05);
  --radius: 24px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --font: "Manrope", "Segoe UI", sans-serif;
  --font-display: "Outfit", "Manrope", sans-serif;
  --sidebar-w: 272px;
  --main-max: 1120px;
  --touch: 44px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  background: var(--background);
}

/* ——— Atmospheric background (dorado) ——— */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(255, 255, 255, 0.92), transparent 55%),
    radial-gradient(ellipse 70% 50% at 10% 0%, rgba(224, 180, 90, 0.2), transparent 58%),
    radial-gradient(ellipse 55% 45% at 92% 12%, rgba(197, 147, 58, 0.14), transparent 55%),
    linear-gradient(165deg, #fbf6eb 0%, #f3ead7 45%, #ebe0c8 100%);
}

.app-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.app-bg::after {
  content: "";
  position: absolute;
  width: 42vw;
  height: 42vw;
  max-width: 520px;
  max-height: 520px;
  right: -8vw;
  top: 18vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 147, 58, 0.26), transparent 68%);
  filter: blur(8px);
}

a { color: var(--primary-hover); }
a:hover { color: var(--primary-active); }
img { max-width: 100%; }

/* ——— Shell ——— */
.app-shell {
  min-height: 100vh;
  display: flex;
  position: relative;
}

.app-shell--guest {
  flex-direction: column;
}

.app-shell--app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
}

.app-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main {
  width: min(var(--main-max), calc(100% - 2.5rem));
  margin: 1.75rem auto 2rem;
  flex: 1;
}

.main-wide {
  width: min(1200px, calc(100% - 2.5rem));
}

.app-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem 1.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* ——— Sidebar ——— */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.95rem 0.85rem 0.85rem;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, #2c3c5a 0%, var(--sidebar-bg) 42%, #1c273a 100%);
  color: var(--sidebar-text);
  box-shadow: 8px 0 32px rgba(26, 26, 26, 0.18);
  z-index: 30;
}

.sidebar-brand {
  padding: 0.2rem 0.45rem 0.75rem;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark__glyph {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-shadow:
    0 0 2px rgba(90, 60, 0, 0.55),
    0 1px 2px rgba(90, 60, 0, 0.5);
  background: var(--gradient-gold-btn);
  border: 1px solid var(--gold-edge);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(90, 60, 0, 0.18),
    var(--shadow-gold);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.brand-mark__glyph::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.35;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 32%,
    rgba(255, 255, 255, 0.14) 50%,
    transparent 68%,
    transparent 100%
  );
  pointer-events: none;
}

.brand-mark__glyph-idle,
.brand-mark__glyph-sleep {
  grid-area: 1 / 1;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.brand-mark__glyph-sleep {
  opacity: 0;
  transform: scale(0.92);
  letter-spacing: 0.08em;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.brand-mark__glyph-idle {
  opacity: 1;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.brand-mark:hover .brand-mark__glyph,
.brand-mark:focus-visible .brand-mark__glyph {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.18),
    inset 0 -1px 2px rgba(122, 92, 0, 0.22),
    0 5px 12px rgba(166, 124, 0, 0.14),
    0 10px 22px rgba(184, 134, 11, 0.18);
}

.brand-mark:hover .brand-mark__glyph-idle,
.brand-mark:focus-visible .brand-mark__glyph-idle {
  opacity: 0;
  transform: scale(0.86);
}

.brand-mark:hover .brand-mark__glyph-sleep,
.brand-mark:focus-visible .brand-mark__glyph-sleep {
  opacity: 1;
  transform: scale(1.08);
}

.brand-mark__text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.brand-mark__text strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.sidebar .brand-mark__text strong { color: #fff; }
.sidebar .brand-mark__text small {
  color: var(--sidebar-muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.brand-mark__text small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 0.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-group-label {
  margin: 0.65rem 0.65rem 0.25rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar .nav-group-label { color: var(--sidebar-muted); }

.nav-group-label:first-child {
  margin-top: 0.05rem;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.35rem;
  padding: 0.38rem 0.7rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease), border-color 0.18s var(--ease);
}

.sidebar .nav-item { color: rgba(232, 238, 245, 0.88); }

.nav-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.sidebar .nav-item:hover {
  background: rgba(254, 128, 93, 0.18);
  color: #ffc2ae;
}

.nav-item.is-active {
  background: linear-gradient(135deg, rgba(197, 147, 58, 0.18), var(--accent-soft));
  color: var(--accent-hover);
  border-color: rgba(197, 147, 58, 0.22);
  box-shadow: inset 3px 0 0 var(--accent);
  font-weight: 700;
}

.sidebar .nav-item.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(254, 128, 93, 0.35);
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
}

.nav-icon svg {
  width: 1.2rem;
  height: 1.2rem;
  /* Colores vienen del SVG inline (fill/stroke en paths); no forzar mono. */
  overflow: visible;
}

.nav-icon svg .stroke {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-label { min-width: 0; }

.sidebar-foot {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 0.65rem;
}
.sidebar .sidebar-foot,
.sidebar .user-chip,
.sidebar .user-chip strong,
.sidebar .user-chip span { color: var(--sidebar-text); }
.sidebar .user-chip span { color: var(--sidebar-muted); }
.sidebar .btn-ghost {
  color: var(--sidebar-text);
  border-color: rgba(255, 255, 255, 0.18);
}
.sidebar .btn-ghost:hover {
  background: rgba(254, 128, 93, 0.2);
  color: #fff;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.65rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--border);
}

.user-avatar {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--accent-hover);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft);
}

.user-chip__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-chip__meta strong {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip__meta small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.btn-block { width: 100%; }
.logout-form { margin: 0; }

.mobile-topbar,
.mobile-nav {
  display: none;
}

.guest-topbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 1rem 1.25rem;
}

.guest-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin-left: 0.5rem;
}

.guest-nav__link {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-pill);
  transition: background 0.15s var(--ease), color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.guest-nav__link:hover {
  color: var(--text);
  background: rgba(197, 147, 58, 0.1);
}

.guest-nav__link.is-active {
  color: #ffffff;
  font-weight: 800;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-pill);
  background: var(--gradient-gold-btn);
  border: 1px solid var(--gold-edge);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    var(--shadow-gold);
  text-shadow:
    0 0 1px rgba(90, 60, 0, 0.4),
    0 1px 1px rgba(80, 50, 0, 0.35);
}

.guest-nav__actions {
  margin-left: auto;
  gap: 0.5rem;
}

.app-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.app-footer__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.app-footer__links a:hover { color: var(--text); }

/* ——— Landing / onboarding (F10.3) ——— */
.landing-hero {
  padding: clamp(2rem, 5vw, 3.25rem) clamp(1.6rem, 4vw, 2.85rem);
  min-height: 18rem;
}

.landing-hero h1 {
  max-width: 22ch;
  margin: 0.35rem 0 0.85rem;
  font-size: clamp(1.95rem, 4.6vw, 2.95rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.landing-hero .lede {
  max-width: 42rem;
  margin-bottom: 1.35rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.55;
}

.landing-cta {
  margin-top: 0.15rem;
  flex-direction: column;
  align-items: stretch;
  gap: 0.7rem;
  max-width: 100%;
}

.landing-cta .btn-primary {
  width: 100%;
}

.landing-cta .btn-ghost {
  align-self: flex-start;
}

.landing-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted-gold);
}

.landing-section {
  margin-top: 1.75rem;
}

.landing-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.landing-card h3 {
  margin: 0 0 0.45rem;
  text-transform: none;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  color: var(--text);
}

.landing-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.landing-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  align-items: center;
  font-weight: 700;
}

.landing-flow__arrow { color: var(--accent); }

.pay-provider-form {
  margin: 0 0 0.85rem;
}

.pay-provider-label {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.pay-provider-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), filter 0.18s var(--ease);
}

.pay-provider-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.pay-provider-btn:focus-visible {
  outline: 3px solid rgba(242, 101, 34, 0.4);
  outline-offset: 2px;
}

.pay-provider-btn__mark {
  display: grid;
  place-items: center;
  flex: 0 0 2.35rem;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
}

.pay-provider-btn__copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.pay-provider-btn__copy strong {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.pay-provider-btn__copy small {
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.88;
}

.pay-provider-btn--payphone {
  color: #fff;
  background:
    linear-gradient(135deg, #ff8a3d 0%, #f26522 52%, #e25512 100%);
  box-shadow: 0 8px 18px rgba(242, 101, 34, 0.32);
}

.pay-provider-btn--payphone:hover {
  box-shadow: 0 10px 22px rgba(242, 101, 34, 0.4);
}

.paypal-button-host {
  min-height: 2.75rem;
}

.landing-plans {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.landing-price {
  margin: 0.35rem 0 0.75rem;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.landing-price small {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.landing-list {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  color: var(--muted);
}

.landing-list li + li { margin-top: 0.3rem; }

.onboarding-steps {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.onboarding-step h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.onboarding-step p {
  margin: 0;
  color: var(--muted);
}

.onboarding-actions {
  margin-top: 1.25rem;
  gap: 0.75rem;
}

.legal-prose p { color: var(--muted); max-width: 42rem; }

/* ——— Typography ——— */
h1, h2, .brand-mark__text strong {
  font-family: var(--font-display);
}

h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lede {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 40rem;
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.page-kicker::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.muted { color: var(--muted); }

/* ——— Surfaces (identidad oro / crema en toda la app) ——— */
.card,
.panel,
.panel-soft,
.hero-panel,
.landing-card,
.landing-plan-card,
.landing-flow,
.auth-card {
  background:
    linear-gradient(#ffffff, #fffdf8) padding-box,
    var(--gradient-gold) border-box;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 28px rgba(26, 26, 26, 0.05),
    0 2px 8px rgba(197, 147, 58, 0.08);
}

.card,
.panel,
.hero-panel {
  padding: 1.4rem 1.5rem;
  backdrop-filter: blur(14px) saturate(1.1);
}

.card + .card,
.panel + .panel,
.stack-panels > * + * {
  margin-top: 1rem;
}

.panel-soft,
.landing-card {
  padding: 1.1rem 1.2rem;
  background:
    linear-gradient(#fffef9, #fbf8ef) padding-box,
    var(--gradient-gold) border-box;
}

.landing-card:hover,
.landing-plan-card:hover,
.card:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    var(--shadow-gold);
}

.landing-plan-card {
  padding: 1.35rem 1.45rem;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(#fffef9, #ffffff) padding-box,
    var(--gradient-gold) border-box;
  border: 1.5px solid transparent;
  border-radius: calc(var(--radius) + 4px);
  box-shadow:
    0 10px 40px rgba(26, 26, 26, 0.06),
    0 2px 10px rgba(197, 147, 58, 0.08);
}

/* Tejido / guilloché dorado (esquina superior derecha) */
.hero-panel::before,
.hero-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.hero-panel::before {
  width: 380px;
  height: 380px;
  right: -100px;
  top: -120px;
  border-radius: 50%;
  opacity: 0.28;
  background:
    repeating-conic-gradient(
      from 12deg at 50% 50%,
      rgba(197, 147, 58, 0.18) 0deg 2deg,
      transparent 2deg 10deg
    ),
    repeating-radial-gradient(
      circle at center,
      transparent 0 6px,
      rgba(184, 134, 11, 0.2) 6px 7px
    );
  mask-image: radial-gradient(circle, #000 30%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 72%);
}

.hero-panel::after {
  width: 280px;
  height: 280px;
  right: -36px;
  top: -44px;
  border-radius: 50%;
  opacity: 0.32;
  background:
    repeating-radial-gradient(
      circle at center,
      transparent 0 10px,
      rgba(212, 168, 74, 0.3) 10px 11px,
      transparent 11px 17px,
      rgba(197, 147, 58, 0.22) 17px 18px
    ),
    repeating-conic-gradient(
      from 0deg at 50% 50%,
      rgba(232, 197, 106, 0.24) 0deg 1.5deg,
      transparent 1.5deg 8deg
    );
  mask-image: radial-gradient(circle, #000 24%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle, #000 24%, transparent 70%);
}

.hero-panel > * {
  position: relative;
  z-index: 1;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.section-head h2 { margin: 0; }
.section-head .lede { margin: 0.25rem 0 0; }

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0.72rem 1.2rem;
  min-height: 2.55rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.btn:active { transform: translateY(1px); }

/* Base metálica: oro realista, brillo atenuado (~30%) */
.btn-primary,
.btn-success {
  background: var(--gradient-gold-btn);
  color: #ffffff;
  border: 1px solid var(--gold-edge);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow:
    0 0 1px rgba(60, 40, 0, 0.45),
    0 1px 1px rgba(40, 25, 0, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(90, 60, 0, 0.18),
    var(--shadow-gold);
}

.btn-primary::before,
.btn-success::before,
.btn-secondary::before,
.btn-ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.btn-primary::before,
.btn-success::before {
  opacity: 0.35;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 34%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 66%,
    transparent 100%
  );
}

.btn-primary > *,
.btn-success > *,
.btn-secondary > *,
.btn-ghost > * {
  position: relative;
  z-index: 1;
}

.btn-primary {
  width: 100%;
}

.btn-primary.btn-inline,
.btn-primary.btn-small,
.btn-success.btn-inline,
.btn-success.btn-small { width: auto; }

.btn-primary:hover,
.btn-success:hover {
  background: linear-gradient(
    90deg,
    #8a6800 0%,
    #b8860b 22%,
    #c5933a 42%,
    #d4a84a 50%,
    #c5933a 58%,
    #b8860b 78%,
    #8a6800 100%
  );
  color: #ffffff;
  border-color: var(--gold-edge);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(90, 60, 0, 0.2),
    0 5px 12px rgba(197, 147, 58, 0.18),
    0 12px 26px rgba(184, 134, 11, 0.2);
}

/* CTA anchos (Empieza gratis): doble brillo I/D atenuado */
.landing-cta .btn-primary,
#planes .btn-primary {
  background: var(--gradient-gold-btn-dual);
}

.landing-cta .btn-primary::before,
#planes .btn-primary::before {
  opacity: 0.35;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 18%,
    transparent 30%,
    transparent 70%,
    rgba(255, 255, 255, 0.1) 82%,
    transparent 100%
  );
}

.landing-cta .btn-primary:hover,
#planes .btn-primary:hover {
  background: linear-gradient(
    90deg,
    #8a6800 0%,
    #c5933a 14%,
    #d4a84a 24%,
    #c5933a 36%,
    #a67c00 50%,
    #c5933a 64%,
    #d4a84a 76%,
    #c5933a 86%,
    #8a6800 100%
  );
}

/* Contorno dorado (secundarios / ghost) */
.btn-secondary,
.btn-ghost {
  width: auto;
  color: #7a5c00;
  font-weight: 750;
  background:
    linear-gradient(#fffdf6, #fffdf6) padding-box,
    var(--gradient-gold) border-box;
  border: 1.5px solid transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 4px 14px rgba(197, 147, 58, 0.12);
  text-shadow: none;
}

.btn-secondary::before,
.btn-ghost::before {
  opacity: 0.12;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 236, 170, 0.35) 50%,
    transparent 62%,
    transparent 100%
  );
}

.btn-secondary:hover,
.btn-ghost:hover {
  color: #5c4a18;
  background:
    linear-gradient(#fff8e4, #fff8e4) padding-box,
    var(--gradient-gold) border-box;
  border: 1.5px solid transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    var(--shadow-gold);
}

.btn-ghost {
  padding: 0.5rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #e8c4c4;
  width: auto;
  box-shadow: none;
  text-shadow: none;
}

.btn-danger:hover {
  background: #f3dede;
  color: var(--danger);
}

.btn-success {
  width: auto;
}

.btn-small {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  min-height: 2.2rem;
}

.actions-row,
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.quick-actions { margin-top: 1.1rem; }

/* ——— Forms ——— */
/* Author .field { display:flex } overrides UA [hidden]; keep hide reliable. */
[hidden] {
  display: none !important;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.field label {
  font-size: 0.86rem;
  font-weight: 700;
}

.field-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.78rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  min-height: var(--touch);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.field textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: rgba(166, 124, 0, 0.45);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-section {
  margin: 1.35rem 0 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.form-section:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.form-section-title {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.capture-box {
  display: grid;
  gap: 0.75rem;
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(166, 124, 0, 0.35);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  align-items: end;
  padding: 0.9rem;
  background: rgba(246, 250, 248, 0.85);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.field-actions { margin-bottom: 0; }

.filter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.42rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  min-height: 2.15rem;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.4);
}

.filter-links a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.filter-links a.is-active {
  color: #ffffff;
  font-weight: 800;
  background: var(--gradient-gold-btn);
  box-shadow: var(--shadow-gold);
  text-shadow:
    0 0 1px rgba(120, 80, 0, 0.4),
    0 1px 1px rgba(90, 60, 0, 0.3);
}

/* ——— Alerts ——— */
.alert {
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.05rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.alert a { font-weight: 800; }

.alert-error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #e7c5c5;
}

.alert-success {
  background: var(--success-soft);
  color: var(--success);
  border-color: #b9dbc9;
}

.alert-warning {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: #e6d59a;
}

.alert-info {
  background: var(--info-soft);
  color: var(--info);
  border-color: #b7d4e3;
}

/* ——— Stats ——— */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.8rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.72);
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

a.stat:hover {
  transform: translateY(-2px);
  border-color: rgba(166, 124, 0, 0.28);
  box-shadow: var(--shadow-sm);
  color: inherit;
}

.stat-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.stat-value.sm { font-size: 1.2rem; }

.stat.stat-danger { background: linear-gradient(160deg, #fff5f5, #fff); border-color: #e7c5c5; }
.stat.stat-warning { background: linear-gradient(160deg, #fffaf0, #fff); border-color: #e6d59a; }
.stat.stat-accent { background: linear-gradient(160deg, #eef8f5, #fff); border-color: var(--border-strong); }

/* ——— Lists ——— */
.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.item-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  background:
    linear-gradient(#ffffff, #fffdf8) padding-box,
    var(--gradient-gold) border-box;
  border: 1.5px solid transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 4px 14px rgba(197, 147, 58, 0.08);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}

.item-row:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    var(--shadow-gold);
  transform: translateY(-1px);
}

.item-row.is-event {
  box-shadow:
    inset 4px 0 0 var(--info),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 4px 14px rgba(197, 147, 58, 0.08);
  background:
    linear-gradient(90deg, rgba(232, 243, 248, 0.95), #fffdf8 42%) padding-box,
    var(--gradient-gold) border-box;
}

.item-row.is-task {
  box-shadow:
    inset 4px 0 0 var(--accent),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 4px 14px rgba(197, 147, 58, 0.08);
}

.item-row.is-overdue {
  box-shadow:
    inset 4px 0 0 var(--danger),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 4px 14px rgba(197, 147, 58, 0.08);
  background:
    linear-gradient(90deg, rgba(249, 236, 236, 0.95), #fffdf8 45%) padding-box,
    var(--gradient-gold) border-box;
}

.item-row.is-done { opacity: 0.7; }
.item-row.is-done strong { text-decoration: line-through; text-decoration-thickness: 1px; }

.item-main { flex: 1 1 220px; min-width: 0; }

.item-main strong {
  font-weight: 700;
  letter-spacing: -0.015em;
  font-family: var(--font-display);
}

.item-main strong a {
  color: inherit;
  text-decoration: none;
}

.item-main strong a:hover { color: var(--accent); }

.item-note {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.meta-line {
  margin: 0.55rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.86rem;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: flex-start;
}

.item-actions form { margin: 0; }

/* ——— Badges ——— */
.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.18rem 0.62rem;
  font-size: 0.74rem;
  font-weight: 700;
  background: #fff;
  color: var(--ink);
  line-height: 1.3;
}

.badge-high,
.badge.priority-high {
  border-color: #e0b48a;
  background: #fff6ec;
  color: #8a4b12;
}

.badge-status-open { background: var(--accent-soft); border-color: var(--border-strong); color: var(--accent); }
.badge-status-completed { background: var(--success-soft); border-color: #b9dbc9; color: var(--success); }
.badge-status-cancelled { background: #f2f4f3; color: var(--muted); }
.badge-status-active { background: var(--accent-soft); border-color: var(--border-strong); color: var(--accent); }

.due-overdue { border-color: #c97b7b; background: var(--danger-soft); color: var(--danger); }
.due-today { border-color: #d4b24a; background: var(--warning-soft); color: var(--warning); }
.due-future { border-color: var(--border-strong); background: var(--accent-soft); color: var(--accent); }
.due-none, .due-past { color: var(--muted); }

.load-low { border-color: var(--border-strong); background: var(--accent-soft); color: var(--accent); }
.load-normal { border-color: #c9a227; background: var(--warning-soft); color: var(--warning); }
.load-high { border-color: #d4a373; background: #fff1e4; color: #8a4b12; }
.load-overloaded { border-color: #c97b7b; background: var(--danger-soft); color: var(--danger); }

.badge.budget-normal { border-color: var(--border-strong); }
.badge.budget-attention { border-color: #c9a227; }
.badge.budget-near { border-color: #d4a373; }
.badge.budget-exceeded { border-color: #c97b7b; color: var(--danger); }
.badge.card-ok { border-color: var(--border-strong); }
.badge.card-high { border-color: #c9a227; }
.badge.card-over { border-color: #c97b7b; color: var(--danger); }
.badge-event { background: var(--info-soft); border-color: #b7d4e3; color: var(--info); }
.badge-task { background: var(--accent-soft); border-color: var(--border-strong); color: var(--accent); }
.badge-event-pending { background: rgba(79, 195, 247, 0.18); border-color: #7ec8e3; color: #0b6e99; }
.badge-event-progress { background: rgba(197, 147, 58, 0.2); border-color: #c5933a; color: #8a6418; }
.badge-event-done { background: var(--success-soft); border-color: #b9dbc9; color: var(--success); }
.badge-event-rescheduled { background: rgba(142, 68, 173, 0.14); border-color: #b07cc6; color: #6c3483; }
.badge-event-cancelled { background: #f2f4f3; border-color: #d5d8d6; color: var(--muted); text-decoration: line-through; }
.agenda-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.agenda-status-actions .inline-form { display: inline; margin: 0; }
.agenda-row--badge-event-cancelled { opacity: 0.78; }
.agenda-row--badge-event-done .item-main strong a { color: var(--success); }
.agenda-row--badge-event-progress {
  box-shadow: inset 3px 0 0 var(--vt-gold, #c5933a);
}

/* ——— Progress ——— */
.progress,
.budget-bar,
.capacity-bar {
  margin-top: 0.65rem;
  height: 0.58rem;
  border-radius: var(--radius-pill);
  background: rgba(14, 26, 24, 0.08);
  overflow: hidden;
}

.progress-fill,
.budget-bar-fill,
.capacity-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s var(--ease);
}

.budget-bar { margin-top: 0.85rem; height: 0.65rem; }
.budget-bar-fill.budget-normal { background: #5a8f74; }
.budget-bar-fill.budget-attention { background: #c9a227; }
.budget-bar-fill.budget-near { background: #d4a373; }
.budget-bar-fill.budget-exceeded { background: var(--danger); }

.capacity-meter {
  display: grid;
  gap: 0.65rem;
  padding: 1.05rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
}

.capacity-meter.is-overloaded {
  background: var(--danger-soft);
  border-color: #e7c5c5;
}

.capacity-meter.is-overloaded .capacity-bar-fill { background: var(--danger); }

.capacity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ——— Agenda ——— */
.agenda-timeline .agenda-time {
  flex: 0 0 7.5rem;
  font-variant-numeric: tabular-nums;
}

.agenda-time {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 6.5rem;
}

.agenda-time strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--info);
  font-family: var(--font-display);
}

/* ——— Goals / finance ——— */
.goal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
}

.goal-card {
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius);
  background:
    linear-gradient(#ffffff, #fffdf8) padding-box,
    var(--gradient-gold) border-box;
  border: 1.5px solid transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 6px 18px rgba(197, 147, 58, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.goal-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.goal-card a {
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  font-family: var(--font-display);
}

.goal-card a:hover { color: var(--accent); }

.finance-hero {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.finance-kpi {
  padding: 1.2rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
}

.finance-kpi .stat-value { font-size: 1.6rem; }

.finance-kpi.primary {
  background: linear-gradient(150deg, rgba(226, 243, 238, 0.95), rgba(255, 255, 255, 0.9));
  border-color: var(--accent-soft);
}

/* ——— Empty ——— */
.empty-state {
  text-align: center;
  padding: 2.2rem 1.25rem;
  border-radius: var(--radius);
  background: linear-gradient(#fffef9, #fbf8ef);
  border: 1.5px dashed rgba(197, 147, 58, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.empty-state strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.empty-state p {
  margin: 0 auto 1rem;
  color: var(--muted);
  max-width: 26rem;
}

/* ——— Auth ——— */
.auth-wrap {
  min-height: calc(100vh - 5rem);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.auth-card { width: min(440px, 100%); }
.auth-card .btn-primary { margin-top: 0.25rem; }

/* ——— Layout helpers ——— */
.stack { display: grid; gap: 0.75rem; }

.two-col {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 1rem;
  align-items: start;
}

.hoy-primary { display: grid; gap: 1rem; }

.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.92rem;
}

.inbox-callout {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: linear-gradient(120deg, #fff7e6, #fffdf8);
  border: 1px solid #e6d59a;
  box-shadow: var(--shadow-sm);
}

.inbox-callout strong { color: var(--warning); }

/* ——— Responsive ——— */
@media (max-width: 980px) {
  .two-col { grid-template-columns: 1fr; }
  .finance-hero { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .app-shell--app {
    display: flex;
    flex-direction: column;
  }

  .sidebar { display: none; }

  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
  }

  .mobile-nav {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.65rem 1rem 0.85rem;
    position: sticky;
    top: 3.4rem;
    z-index: 35;
    background: rgba(243, 247, 245, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mobile-nav::-webkit-scrollbar { display: none; }

  .mobile-nav .nav-item {
    flex: 0 0 auto;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 4.4rem;
    min-height: 3.5rem;
    padding: 0.45rem 0.55rem;
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border);
  }

  .mobile-nav .nav-item.is-active {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      var(--shadow-gold);
    border: 1px solid var(--gold-edge);
    border-radius: var(--radius-pill);
    color: #ffffff;
    font-weight: 800;
    background: var(--gradient-gold-btn);
    text-shadow:
      0 0 1px rgba(90, 60, 0, 0.4),
      0 1px 1px rgba(80, 50, 0, 0.35);
  }

  .mobile-nav .nav-label {
    font-weight: 700;
  }

  .brand-mark--compact .brand-mark__glyph {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 12px;
  }

  .main {
    width: calc(100% - 1.25rem);
    margin-top: 1rem;
  }

  .card, .panel, .hero-panel { padding: 1.15rem; }

  .item-actions { width: 100%; }

  .item-actions .btn,
  .item-actions button { min-height: var(--touch); }

  .item-actions form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
  }

  .filters { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .guest-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .landing-hero h1 { max-width: none; }
}

@media (max-width: 480px) {
  .agenda-timeline .item-row { flex-direction: column; }
  .agenda-time { min-width: 0; }
  h1 { font-size: 1.55rem; }
  .guest-topbar { padding: 0.85rem 1rem; }
}

/* Fix invalid font-weights for broader support */
.nav-item,
.capacity-meta { font-weight: 600; }

.nav-item.is-active,
.item-main strong,
.stat-label,
.field label,
.filter-links a,
.badge,
.user-chip__meta strong,
.brand-mark__text strong,
.empty-state strong,
.date-chip,
.finance-kpi .stat-label { font-weight: 700; }

/* ——— Password reveal (ojito) ——— */
.password-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-field input {
  width: 100%;
  padding-right: 2.85rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted-gold);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.password-toggle__icon {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ——— Admin settings cards + gold fields ——— */
.admin-settings {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-settings__form {
  display: grid;
  gap: 1rem;
}

.admin-settings__card {
  padding: 1.25rem 1.35rem;
}

.admin-settings__card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.admin-panel .field input,
.admin-panel .field textarea,
.admin-panel .field select,
.admin-settings .field input,
.admin-settings .field textarea,
.admin-settings .field select,
.admin-invite-form .field input,
.admin-invite-form .field select {
  background:
    linear-gradient(#fffef9, #fbf8ef) padding-box,
    var(--gradient-gold) border-box;
  border: 1.5px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.admin-panel .field input:focus,
.admin-panel .field textarea:focus,
.admin-panel .field select:focus,
.admin-settings .field input:focus,
.admin-settings .field textarea:focus,
.admin-settings .field select:focus,
.admin-invite-form .field input:focus,
.admin-invite-form .field select:focus {
  border-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 4px var(--accent-soft);
}

/* ——— Help / manual ——— */
.help-manual {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.help-card {
  padding: 1.25rem 1.35rem;
}

.help-card h2 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.help-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.help-card p {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
}

.help-list {
  margin: 0 0 0.85rem;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.help-list li + li { margin-top: 0.4rem; }

.help-list--steps { padding-left: 1.35rem; }

.help-tip {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  color: var(--ink);
  font-weight: 600;
}

.help-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.help-grid > div {
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--border);
}

/* ——— UX meters, help, compact forms (v4) ——— */
.meter-chart {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.85rem 1rem;
  align-items: center;
  margin: 0.35rem 0 0.85rem;
}
.meter-chart__donut { width: 96px; height: 96px; }
.meter-chart__track { stroke: var(--border); }
.meter-chart__fill { stroke: var(--accent); transition: stroke-dasharray 0.45s var(--ease); }
.meter-chart--warning .meter-chart__fill { stroke: #d97706; }
.meter-chart--danger .meter-chart__fill { stroke: var(--danger); }
.meter-chart--success .meter-chart__fill { stroke: var(--success); }
.meter-chart__pct {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  fill: var(--text);
}
.meter-chart__copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.meter-chart__copy strong {
  font-size: 0.98rem;
  color: var(--text);
}
.meter-chart__copy span {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.35;
}
.meter-chart__bar {
  margin-top: 0.35rem;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  overflow: hidden;
}
.meter-chart__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.meter-chart--warning .meter-chart__bar i { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.meter-chart--danger .meter-chart__bar i { background: linear-gradient(90deg, #b33a3a, #e07a7a); }
.meter-chart--success .meter-chart__bar i { background: linear-gradient(90deg, #2f6b4f, #5ea882); }
.meter-grid {
  display: grid;
  gap: 0.75rem 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.section-help {
  margin: 0.65rem 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
}
.section-help summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.section-help summary::-webkit-details-marker { display: none; }
.section-help__icon {
  display: inline-grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
}
.section-help__body {
  padding: 0 0.95rem 0.85rem 2.85rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

.time-compact {
  align-items: end;
  gap: 0.75rem 1rem;
}
.time-compact .field { min-width: 0; }
.time-compact input[type="date"],
.time-compact input[type="time"],
.field--date input[type="date"],
.field--compact select,
.field--compact input {
  max-width: 11.5rem;
  width: 100%;
}
.field--check {
  display: flex;
  align-items: center;
  min-height: auto;
  margin-bottom: 0.35rem;
}
.field--check .check-inline,
label.check-inline {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  width: fit-content !important;
  max-width: 100%;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
}
/* Evitar que .field input hinche el checkbox (min-height/touch/padding). */
.field .check-inline input[type="checkbox"],
.check-inline input[type="checkbox"] {
  width: 1.05rem !important;
  height: 1.05rem !important;
  min-width: 1.05rem !important;
  min-height: 1.05rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0.2rem;
  accent-color: var(--accent);
  flex: 0 0 auto;
  box-shadow: none;
}
.check-inline span {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.time24-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.field--time24 select.time24-hour,
.field--time24 select.time24-minute {
  width: auto !important;
  min-width: 4.25rem;
  max-width: 5.5rem;
  min-height: 2.55rem;
  padding: 0.45rem 0.55rem;
}
.time24-sep {
  font-weight: 800;
  color: var(--muted);
  font-size: 1.1rem;
}
.time-compact .field--time24 { margin-bottom: 0; }

.space-create-form,
.stack-form.space-create-form {
  display: grid;
  gap: 0.85rem;
  max-width: 28rem;
  margin-top: 0.75rem;
}
.space-create-form .field label,
.stack-form .field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}
.space-create-form select,
.space-create-form input[type="text"],
.stack-form select,
.stack-form input[type="text"] {
  width: 100%;
  min-height: var(--touch);
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font: inherit;
}
.space-create-form select:focus,
.space-create-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.inbox-edit-form input,
.inbox-edit-form textarea {
  width: 100%;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pwa-install-tip {
  margin: 0.75rem 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.pwa-install-tip strong { color: var(--text); }

@media (max-width: 640px) {
  .meter-chart { grid-template-columns: 84px 1fr; }
  .meter-chart__donut { width: 84px; height: 84px; }
  .time-compact input[type="date"],
  .time-compact input[type="time"],
  .field--date input[type="date"],
  .field--compact select { max-width: none; }
}

/* ——— Dashboard visual tiles (mockup-inspired) ——— */
.dash-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.dash-hero h1 {
  margin: 0.15rem 0 0.25rem;
  font-size: clamp(1.55rem, 3vw, 2rem);
}
.dash-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dash-board {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.dash-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 11.5rem;
  padding: 1.05rem 1.1rem 1rem;
  border-radius: 22px;
  text-decoration: none;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(38, 52, 79, 0.12);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.dash-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(38, 52, 79, 0.18);
  color: #fff;
}
.dash-tile__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.dash-tile__label {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.dash-tile__meta,
.dash-tile__link {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.9;
  color: inherit;
  text-decoration: none;
}
.dash-tile__badge {
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.22);
  font-size: 0.8rem;
  font-weight: 800;
}
.dash-tile__stat {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.dash-tile__money {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.dash-tile__date {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.dash-tile__date strong {
  font-size: 1.85rem;
  letter-spacing: -0.04em;
  line-height: 1;
}
.dash-tile__date span { opacity: 0.9; font-weight: 600; }
.dash-tile__foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.92;
}
.dash-tile__cta {
  margin-top: auto;
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0.95;
}
.dash-tile__warn {
  display: inline-block;
  margin-top: auto;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 0.78rem;
  font-weight: 700;
}

.dash-mini-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.28rem;
  font-size: 0.86rem;
  font-weight: 600;
  opacity: 0.95;
}
.dash-mini-list li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-mosaic {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.15rem;
}
.dash-mosaic--4 {
  grid-template-columns: repeat(4, 1fr);
  height: 3.4rem;
}
.dash-mosaic i {
  display: block;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.dash-mosaic i:nth-child(2) { background: rgba(255, 255, 255, 0.4); }
.dash-mosaic i:nth-child(3) { background: rgba(38, 52, 79, 0.18); }
.dash-mosaic i:nth-child(4) { background: rgba(255, 255, 255, 0.55); }

.dash-tile--hoy {
  grid-column: span 5;
  background: linear-gradient(145deg, #7eb6e0 0%, var(--tile-hoy) 55%, #3d7fb0 100%);
}
.dash-tile--inbox {
  grid-column: span 3;
  background: linear-gradient(145deg, #4cbc8a 0%, var(--tile-inbox) 60%, #1f7a54 100%);
}
.dash-tile--tasks {
  grid-column: span 4;
  background: linear-gradient(145deg, #9b7fc2 0%, var(--tile-tasks) 55%, #5a3f86 100%);
}
.dash-tile--agenda {
  grid-column: span 5;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
}
.dash-tile--agenda:hover { color: var(--text); }
.dash-tile--goals {
  grid-column: span 3;
  background: linear-gradient(145deg, #ff9f84 0%, var(--tile-goals) 55%, #e86d4c 100%);
}
.dash-tile--finance {
  grid-column: span 4;
  background: linear-gradient(145deg, #4db6a8 0%, var(--tile-finance) 55%, #1f7a70 100%);
}
.dash-tile--capacity {
  grid-column: span 7;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
}
.dash-tile--capacity:hover { color: var(--text); }
.dash-tile--avisos {
  grid-column: span 5;
  background: linear-gradient(145deg, #5a7498 0%, var(--tile-avisos) 60%, #26344f 100%);
}

.dash-agenda h3 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}
.dash-timeline {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}
.dash-timeline li {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 0.65rem;
  align-items: start;
}
.dash-timeline strong {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.dash-timeline a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.dash-timeline a:hover { color: var(--accent); }
.dash-dot {
  width: 10px;
  height: 10px;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--tile-hoy);
}
.dash-dot--coral { background: var(--accent); }
.dash-dot--teal { background: var(--tile-finance); }
.dash-dot--violet { background: var(--tile-tasks); }
.dash-dot--sky { background: var(--tile-hoy); }
.dash-agenda__review {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
}
.dash-agenda__review a { color: var(--accent); text-decoration: none; }

.dash-spark {
  width: 100%;
  max-width: 160px;
  height: 36px;
  margin-top: 0.15rem;
}

.dash-tile--capacity .meter-chart { margin: 0.15rem 0; }
.dash-tile--capacity .meter-chart__copy strong,
.dash-tile--capacity .meter-chart__pct { color: var(--text); }
.dash-tile--capacity .meter-chart__copy span { color: var(--text-muted); }

@media (max-width: 980px) {
  .dash-tile--hoy,
  .dash-tile--inbox,
  .dash-tile--tasks,
  .dash-tile--agenda,
  .dash-tile--goals,
  .dash-tile--finance,
  .dash-tile--capacity,
  .dash-tile--avisos { grid-column: span 6; }
}
@media (max-width: 640px) {
  .dash-board { grid-template-columns: 1fr; }
  .dash-tile--hoy,
  .dash-tile--inbox,
  .dash-tile--tasks,
  .dash-tile--agenda,
  .dash-tile--goals,
  .dash-tile--finance,
  .dash-tile--capacity,
  .dash-tile--avisos { grid-column: span 1; }
}
