/* Vida y Tiempo en Orden — visual system v2
   Producto personal moderno. Sin frameworks. */

:root {
  --ink: #0e1a18;
  --ink-soft: #243330;
  --muted: #5d6f6b;
  --accent: #0a6b5a;
  --accent-2: #0e8a74;
  --accent-hover: #085445;
  --accent-soft: rgba(10, 107, 90, 0.12);
  --accent-glow: rgba(14, 138, 116, 0.28);
  --danger: #b33a3a;
  --danger-soft: #f9ecec;
  --warning: #9a6a10;
  --warning-soft: #f8f0d8;
  --info: #1a5f7a;
  --info-soft: #e8f3f8;
  --success: #1a6f4a;
  --success-soft: #e5f5ec;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --surface-2: rgba(246, 250, 248, 0.9);
  --border: rgba(18, 40, 36, 0.1);
  --border-strong: rgba(18, 40, 36, 0.16);
  --shadow: 0 1px 2px rgba(10, 24, 22, 0.04), 0 18px 40px rgba(10, 24, 22, 0.08);
  --shadow-sm: 0 1px 2px rgba(10, 24, 22, 0.05), 0 6px 16px rgba(10, 24, 22, 0.05);
  --radius: 20px;
  --radius-sm: 12px;
  --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(--ink);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  background: #dfe8e4;
}

/* ——— Atmospheric background ——— */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 8% -5%, rgba(14, 138, 116, 0.22), transparent 58%),
    radial-gradient(ellipse 55% 45% at 92% 8%, rgba(26, 95, 122, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 70% 100%, rgba(10, 107, 90, 0.1), transparent 50%),
    linear-gradient(165deg, #e7efec 0%, #f3f6f5 42%, #e4ebe8 100%);
}

.app-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  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(14, 138, 116, 0.16), transparent 68%);
  filter: blur(8px);
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
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 var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 252, 250, 0.72));
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: 8px 0 32px rgba(10, 24, 22, 0.04);
  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: 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: #fff;
  background:
    linear-gradient(145deg, var(--accent-2), var(--accent) 55%, #064a3f);
  box-shadow: 0 8px 20px var(--accent-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-mark__glyph-idle,
.brand-mark__glyph-sleep {
  grid-area: 1 / 1;
  line-height: 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: 0 10px 22px var(--accent-glow);
}

.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;
}

.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);
}

.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);
}

.nav-item:hover {
  background: rgba(10, 107, 90, 0.08);
  color: var(--accent);
}

.nav-item.is-active {
  background: linear-gradient(135deg, rgba(10, 107, 90, 0.16), rgba(10, 107, 90, 0.08));
  color: var(--accent-hover);
  border-color: rgba(10, 107, 90, 0.14);
  box-shadow: inset 3px 0 0 var(--accent);
  font-weight: 700;
}

.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;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-label { min-width: 0; }

.sidebar-foot {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.65rem;
}

.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 rgba(10, 107, 90, 0.18);
}

.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(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.guest-nav__link:hover,
.guest-nav__link.is-active {
  color: var(--text);
}

.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(1.6rem, 4vw, 2.6rem);
}

.landing-hero h1 {
  max-width: 18ch;
  font-size: clamp(1.9rem, 4.5vw, 2.85rem);
}

.landing-cta { margin-top: 0.25rem; }
.landing-note { margin-top: 0.85rem; font-size: 0.9rem; }

.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-plan-card { box-shadow: var(--shadow-sm); }

.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 ——— */
.card,
.panel,
.hero-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.5rem;
  backdrop-filter: blur(14px) saturate(1.1);
}

.card + .card,
.panel + .panel,
.stack-panels > * + * {
  margin-top: 1rem;
}

.panel-soft {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 90% at 100% 0%, rgba(14, 138, 116, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(26, 95, 122, 0.08), transparent 50%),
    rgba(255, 255, 255, 0.82);
}

.hero-panel::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -40px;
  top: -50px;
  border-radius: 50%;
  border: 1px solid rgba(10, 107, 90, 0.12);
  pointer-events: none;
}

.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;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease), border-color 0.15s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(145deg, var(--accent-2), var(--accent));
  color: #fff;
  width: 100%;
  box-shadow: 0 10px 22px var(--accent-glow);
}

.btn-primary.btn-inline,
.btn-primary.btn-small { width: auto; }

.btn-primary:hover {
  background: linear-gradient(145deg, #10967e, var(--accent-hover));
  color: #fff;
}

.btn-secondary {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid rgba(10, 107, 90, 0.12);
  width: auto;
}

.btn-secondary:hover {
  background: rgba(10, 107, 90, 0.18);
  color: var(--accent-hover);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 0.5rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 600;
  width: auto;
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: #fff;
  color: var(--ink);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #e8c4c4;
  width: auto;
}

.btn-success {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid #b9dbca;
  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(10, 107, 90, 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(10, 107, 90, 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: #fff;
  background: linear-gradient(145deg, var(--accent-2), var(--accent));
  box-shadow: 0 8px 16px var(--accent-glow);
}

/* ——— 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(10, 107, 90, 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: #b9d8cb; }

/* ——— 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: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}

.item-row:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.item-row.is-event {
  border-left: 4px solid var(--info);
  background: linear-gradient(90deg, rgba(232, 243, 248, 0.95), rgba(255, 255, 255, 0.9) 42%);
}

.item-row.is-task {
  border-left: 4px solid var(--accent);
}

.item-row.is-overdue {
  border-left-color: var(--danger);
  background: linear-gradient(90deg, rgba(249, 236, 236, 0.95), rgba(255, 255, 255, 0.9) 45%);
}

.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: #b9d8cb; 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: #b9d8cb; 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: #8fb39f; background: var(--accent-soft); color: var(--accent); }
.due-none, .due-past { color: var(--muted); }

.load-low { border-color: #8fb39f; 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: #8fb39f; }
.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: #8fb39f; }
.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: #b9d8cb; color: var(--accent); }

/* ——— 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: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
  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: rgba(10, 107, 90, 0.18);
}

/* ——— Empty ——— */
.empty-state {
  text-align: center;
  padding: 2.2rem 1.25rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.45);
}

.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: 0 8px 18px var(--accent-glow);
    border-color: transparent;
    color: #fff;
    background: linear-gradient(145deg, var(--accent-2), var(--accent));
  }

  .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,
.btn-ghost,
.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; }
